http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49648
Summary: ICE(segfault) with MATHMUL and function-result actual argument Product: gcc Version: 4.7.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: bur...@gcc.gnu.org Created attachment 24696 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24696 test case With gfortran 4.1 to 4.7, I get a segfault for the attached program: test.f90: In function ‘gf_generateembpot’: test.f90:31:0: internal compiler error: Segmentation fault ==1006== Invalid read of size 4 ==1006== at 0x57C534: gfc_walk_subexpr (trans-array.c:7509) ==1006== by 0x57CC10: gfc_walk_expr (trans-array.c:7893) ==1006== by 0x5A2B32: gfc_conv_intrinsic_size (trans-intrinsic.c:4947) ==1006== by 0x5B159C: gfc_conv_intrinsic_function (trans-intrinsic.c:6595) ==1006== by 0x5A0532: gfc_conv_function_expr (trans-expr.c:4064) ==1006== by 0x59C629: gfc_apply_interface_mapping (trans-expr.c:2313) ==1006== by 0x57229B: gfc_set_loop_bounds_from_array_spec (trans-array.c:585) ==1006== by 0x59FC79: gfc_conv_procedure_call (trans-expr.c:3509)