[EMAIL PROTECTED]:~/src/work> cat const.f90 module const real(8), parameter :: g = - sqrt(2._8) * Gf end module const [EMAIL PROTECTED]:~/src/work> ../gcc/build/gcc/f951 const.f90 const.f90:0: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. [EMAIL PROTECTED]:~/src/work> The uninitialized variable is necessary for the segfault. In the debugger: (gdb) run const.f90 Starting program: /home/pcl331/schluter/src/gcc/build/gcc/f951 const.f90
Program received signal SIGSEGV, Segmentation fault. 0x0805efad in check_inquiry (e=0x8695ad0) at ../../gcc/fortran/expr.c:1382 1382 name = e->symtree->n.sym->name; (gdb) bt #0 0x0805efad in check_inquiry (e=0x8695ad0) at ../../gcc/fortran/expr.c:1382 #1 0x0806082b in check_init_expr (e=0x8695ad0) at ../../gcc/fortran/expr.c:1443 #2 0x0805edc6 in check_intrinsic_op (e=0x8695b28, check_function=0x80607c0 <check_init_expr>) at ../../gcc/fortran/expr.c:1284 #3 0x0806081d in check_init_expr (e=0x8695b28) at ../../gcc/fortran/expr.c:1434 #4 0x0805ed32 in check_intrinsic_op (e=0x8695c78, check_function=0x80607c0 <check_init_expr>) at ../../gcc/fortran/expr.c:1250 #5 0x0806081d in check_init_expr (e=0x8695c78) at ../../gcc/fortran/expr.c:1434 #6 0x0805ed32 in check_intrinsic_op (e=0x8695cd0, check_function=0x80607c0 <check_init_expr>) at ../../gcc/fortran/expr.c:1250 #7 0x0806081d in check_init_expr (e=0x8695cd0) at ../../gcc/fortran/expr.c:1434 #8 0x08060a52 in gfc_match_init_expr (result=0xbfffed64) at ../../gcc/fortran/expr.c:1543 #9 0x08059f00 in variable_decl (elem=Variable "elem" is not available. ) at ../../gcc/fortran/decl.c:1209 #10 0x0805aa82 in gfc_match_data_decl () at ../../gcc/fortran/decl.c:2240 #11 0x0807ec0a in match_word (str=Variable "str" is not available. ) at ../../gcc/fortran/parse.c:65 #12 0x0807ed1d in decode_statement () at ../../gcc/fortran/parse.c:134 #13 0x0807f745 in next_statement () at ../../gcc/fortran/parse.c:358 #14 0x08080a5b in parse_spec (st=ST_NONE) at ../../gcc/fortran/parse.c:1556 #15 0x080815f9 in gfc_parse_file () at ../../gcc/fortran/parse.c:2501 #16 0x0809cadd in gfc_be_parse_file (set_yydebug=0) at ../../gcc/fortran/f95-lang.c:286 #17 0x0836cf40 in toplev_main (argc=2, argv=0xbfffefd4) at ../../gcc/toplev.c:990 #18 0x080c766f in main (argc=Cannot access memory at address 0x0 ) at ../../gcc/main.c:35 (gdb) -- Summary: Segfault with simple expression Product: gcc Version: 4.2.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tobi at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25018