------- Comment #17 from anlauf at gmx dot de 2010-01-29 23:32 ------- (In reply to comment #16) > Created an attachment (id=19754) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19754&action=view) [edit] > patch > > Here is an updated patch which fixes the test case in the last comment and the > original problem. >
I tried this one and compared it to the semi-solution in comment #9. Both "work for me", but the patch from comment #16 appears to produce a significant performance regression for my code of the order of 10-15% as compared to the one from #9. There is another problem left with the patch. I am not sure whether the code is legal, but it gives an ICE for me: implicit none type t integer :: X = -999.0 ! Real initializer! end type t class(t), allocatable :: x class(t), allocatable :: y(:) allocate (t::x) allocate (t::y(1)) ! ICE end gfcbug103a.f90: In function MAIN__: gfcbug103a.f90:8:0: internal compiler error: Segmentation fault (gdb) run gfcbug103a.f90 Starting program: /opt/gfortran/4.5/libexec/gcc/i686-pc-linux-gnu/4.5.0/f951 gfcbug103a.f90 MAIN__ Program received signal SIGSEGV, Segmentation fault. 0x0816ee06 in gfc_conv_scalarized_array_ref (se=0xbfffe468, ar=0x8bf3394) at ../../trunk/gcc/fortran/trans-array.c:2487 2487 n = se->loop->order[0]; (gdb) bt #0 0x0816ee06 in gfc_conv_scalarized_array_ref (se=0xbfffe468, ar=0x8bf3394) at ../../trunk/gcc/fortran/trans-array.c:2487 #1 0x0816f5c9 in gfc_conv_array_ref (se=0xbfffe468, ar=0x8bf3394, sym=0x8bf0c90, where=0x8bf3350) at ../../trunk/gcc/fortran/trans-array.c:2537 #2 0x00000029 in ?? () Backtrace stopped: previous frame inner to this frame (corrupt stack?) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42888