------- Comment #20 from dominiq at lps dot ens dot fr 2010-01-11 12:29 ------- The patch in comment #19, passes all my tests, but (otherwise you'ld be disappointed;-) compiling the reduced test in comment #8 gives a "Segmentation fault"
pr41478_1.f90:7:0: internal compiler error: Segmentation fault Backtrace: (gdb) run pr41478_1.f90 The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /opt/gcc/gcc4.5w/libexec/gcc/x86_64-apple-darwin10/4.5.0/f951 pr41478_1.f90 MAIN__ Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000 0x00000001000aeee1 in structure_alloc_comps (der_type=<value temporarily unavailable, due to optimizations>, decl=<value temporarily unavailable, due to optimizations>, dest=<value temporarily unavailable, due to optimizations>, rank=<value temporarily unavailable, due to optimizations>, purpose=3) at ../../work/gcc/fortran/trans-array.c:6014 6014 tmp = gfc_duplicate_allocatable(dcmp, comp, ctype, c->as->rank); (gdb) bt #0 0x00000001000aeee1 in structure_alloc_comps (der_type=<value temporarily unavailable, due to optimizations>, decl=<value temporarily unavailable, due to optimizations>, dest=<value temporarily unavailable, due to optimizations>, rank=<value temporarily unavailable, due to optimizations>, purpose=3) at ../../work/gcc/fortran/trans-array.c:6014 #1 0x00000001000aed7c in structure_alloc_comps (der_type=<value temporarily unavailable, due to optimizations>, decl=0x141df5500, dest=<value temporarily unavailable, due to optimizations>, rank=<value temporarily unavailable, due to optimizations>, purpose=3) at ../../work/gcc/fortran/trans-array.c:5874 #2 0x00000001000c7ed6 in gfc_conv_procedure_call (se=0x7fff5fbfea70, sym=<value temporarily unavailable, due to optimizations>, arg=0x14180aef0, expr=<value temporarily unavailable, due to optimizations>, append_args=<value temporarily unavailable, due to optimizations>) at ../../work/gcc/fortran/trans-expr.c:3383 #3 0x00000001000d7abb in conv_generic_with_optional_char_arg (se=0x7fff5fbfea70, expr=0x141816b10) at ../../work/gcc/fortran/trans-intrinsic.c:3432 #4 0x00000001000d8aeb in gfc_conv_intrinsic_function (se=0x7fff5fbfea70, expr=0x141816b10) at ../../work/gcc/fortran/trans-intrinsic.c:5074 #5 0x00000001000c8e36 in gfc_conv_function_expr (se=0x7fff5fbfea70, expr=<value temporarily unavailable, due to optimizations>) at ../../work/gcc/fortran/trans-expr.c:3722 #6 0x00000001000ca508 in gfc_trans_assignment (expr1=0x1418165c0, expr2=0x141816b10, init_flag=0 '\0') at ../../work/gcc/fortran/trans-expr.c:4827 #7 0x00000001000a5c06 in gfc_trans_code (code=0x1418172a0) at ../../work/gcc/fortran/trans.c:1086 #8 0x00000001000c1d57 in gfc_generate_function_code (ns=<value temporarily unavailable, due to optimizations>) at ../../work/gcc/fortran/trans-decl.c:4383 #9 0x0000000100068c3f in gfc_parse_file () at ../../work/gcc/fortran/parse.c:4242 #10 0x00000001000a0d0c in gfc_be_parse_file (set_yydebug=<value temporarily unavailable, due to optimizations>) at ../../work/gcc/fortran/f95-lang.c:239 #11 0x00000001006cf01a in toplev_main (argc=2, argv=0x7fff5fbfee28) at ../../work/gcc/toplev.c:1053 #12 0x0000000100000d54 in start () -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41478