------- Comment #10 from pault at gcc dot gnu dot org  2010-02-16 09:04 -------
(In reply to comment #6)

Joost,

I held back from committing the patch this morning because I noticed that your
testcase below is also calling pack/unpack like it is going out of business. 

I have to confess that I looked into this because one of the maintainers
(Dominique, I think) asked me if I understood the fix to this segfault.  My
off-the-cuff response was CLASSes but I see that this cannot entirely be the
case.  In investigating, I found these extra temporaries and have eliminated
them.  However, I did not have time to regtest and get the new patch to you.

Paul
> (In reply to comment #5)
> > I had to exclude
> > dummies but I now do not recall why.  I'll look into it.
> 
> Hi Paul,
> 
> tested your patch at http://gcc.gnu.org/ml/fortran/2010-02/msg00106.html.
> 
> However, this ICEs with:
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x0000000000550816 in gfc_conv_array_parameter (se=0x7fff19b82f90,
> expr=0x13af600, ss=0x13b1e20, g77=1, fsym=0x0,
>     proc_name=0x7f450fd48ee8 "newuob", size=0x0) at
> /data03/vondele/gcc_trunk/gcc/gcc/fortran/trans-array.c:5550
> 5550      if (contiguous && g77 && !this_array_result
> (gdb) list
> 5545              se->expr = gfc_conv_array_data (tmp);
> 5546              return;
> 5547            }
> 5548        }
> 5549
> 5550      if (contiguous && g77 && !this_array_result
> 5551            && expr->symtree->n.sym->as->type != AS_ASSUMED_SHAPE)
> 5552        {
> 5553          gfc_conv_expr_descriptor (se, expr, ss);
> 5554          if (expr->ts.type == BT_CHARACTER)
> (gdb) q
> 
> on the following reduced testcase.
> 
> MODULE powell
>   INTEGER, PARAMETER :: dp=8
>   TYPE opt_state_type
>     REAL(dp), DIMENSION(:), POINTER  :: w
>   END TYPE opt_state_type
> CONTAINS
>   SUBROUTINE newuoa (n,x,optstate)
>     TYPE(opt_state_type)                     :: optstate
>     CALL newuob (optstate%w(ixb:),optstate%w(ixo:),&
>          optstate%w(ivl:),optstate%w(iw:),optstate)
>   END SUBROUTINE newuoa
> END MODULE powell
> 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36932

Reply via email to