http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51522
Bug #: 51522 Summary: ICE in gfortran 4.6.2, x86_64 Classification: Unclassified Product: gcc Version: 4.6.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: adr...@llnl.gov Created attachment 26066 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26066 this one is only reproducible when the modules are spread over multiple files I accidentally created this ICE while I was delta-debugging Bug 51520; my script was only testing for *any* Segmentation fault instead of a specific one ;-) The machine is running Ubuntu 10.04, 64 bit on an Intel Xeon. gfortran -I. -O0 -c -o sidl.o sidl.f03 && \ gfortran -O0 -c -o vect_Utils_type.o vect_Utils_type.f03 && \ debugx f951 gfortran -O0 -c -o vectortest.o vectortest.f03 GNU gdb (GDB) 7.1-ubuntu Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /home/prantl1/sw/libexec/gcc/x86_64-unknown-linux-gnu/4.6.1/f951...done. (gdb) r Starting program: /home/prantl1/sw/libexec/gcc/x86_64-unknown-linux-gnu/4.6.1/f951 vectortest.f03 -quiet -dumpbase vectortest.f03 -mtune=generic -march=x86-64 -auxbase-strip vectortest.o -O0 -fintrinsic-modules-path /home/prantl1/sw/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/finclude -o /tmp/ccEoT7Es.s vectortest.f03:13.10: integer(c_int) function vect_Utils_vuTriIneqHolds_c(u, v, tol, exception) & 1 Error: Parameter 'c_int' at (1) has not been declared or is a variable, which does not reduce to a constant expression vectortest.f03:15.7: real(c_double) function vect_Utils_vuNorm_c(u, tol, badLevel, exception) bind 1 Error: Parameter 'c_double' at (1) has not been declared or is a variable, which does not reduce to a constant expression vectortest.f03:10.49-47: integer(c_int) function vect_Utils_vuIsUnit_c(u, tol, exception) bind(c) 2 1 Warning: Implicitly declared variable 'u' at (1) may not be C interoperable but it is a dummy argument to the BIND(C) procedure 'vect_utils_vuisunit_c' at (2) vectortest.f03:10.54-47: integer(c_int) function vect_Utils_vuIsUnit_c(u, tol, exception) bind(c) 2 1 Warning: Implicitly declared variable 'tol' at (1) may not be C interoperable but it is a dummy argument to the BIND(C) procedure 'vect_utils_vuisunit_c' at (2) vectortest.f03:10.65-47: integer(c_int) function vect_Utils_vuIsUnit_c(u, tol, exception) bind(c) 2 1 Warning: Implicitly declared variable 'exception' at (1) may not be C interoperable but it is a dummy argument to the BIND(C) procedure 'vect_utils_vuisunit_c' at (2) vectortest.f03:4.49-47: integer(c_int) function vect_Utils_vuIsZero_c(u, tol, exception) bind(c) 2 1 Warning: Implicitly declared variable 'u' at (1) may not be C interoperable but it is a dummy argument to the BIND(C) procedure 'vect_utils_vuiszero_c' at (2) vectortest.f03:4.54-47: integer(c_int) function vect_Utils_vuIsZero_c(u, tol, exception) bind(c) 2 1 Warning: Implicitly declared variable 'tol' at (1) may not be C interoperable but it is a dummy argument to the BIND(C) procedure 'vect_utils_vuiszero_c' at (2) vectortest.f03:4.65-47: integer(c_int) function vect_Utils_vuIsZero_c(u, tol, exception) bind(c) 2 1 Warning: Implicitly declared variable 'exception' at (1) may not be C interoperable but it is a dummy argument to the BIND(C) procedure 'vect_utils_vuiszero_c' at (2) vectortest.f03:15.47-2: real(c_double) function vect_Utils_vuNorm_c(u, tol, badLevel, exception) bind 2 1 Warning: Implicitly declared variable 'u' at (1) may not be C interoperable but it is a dummy argument to the BIND(C) procedure 'vect_utils_vunorm_c' at (2) vectortest.f03:15.52-2: real(c_double) function vect_Utils_vuNorm_c(u, tol, badLevel, exception) bind 2 1 Warning: Implicitly declared variable 'tol' at (1) may not be C interoperable but it is a dummy argument to the BIND(C) procedure 'vect_utils_vunorm_c' at (2) vectortest.f03:15.62-2: real(c_double) function vect_Utils_vuNorm_c(u, tol, badLevel, exception) bind 2 1 Warning: Implicitly declared variable 'badlevel' at (1) may not be C interoperable but it is a dummy argument to the BIND(C) procedure 'vect_utils_vunorm_c' at (2) vectortest.f03:15.73: real(c_double) function vect_Utils_vuNorm_c(u, tol, badLevel, exception) bind 1 vectortest.f03:15.2: real(c_double) function vect_Utils_vuNorm_c(u, tol, badLevel, exception) bind 2 Warning: Implicitly declared variable 'exception' at (1) may not be C interoperable but it is a dummy argument to the BIND(C) procedure 'vect_utils_vunorm_c' at (2) vectortest.f03:15.2: real(c_double) function vect_Utils_vuNorm_c(u, tol, badLevel, exception) bind 1 Warning: Variable 'vect_utils_vunorm_c' at (1) may not be a C interoperable kind but it is bind(c) Program received signal SIGSEGV, Segmentation fault. resolve_symbol (sym=0x13037a0) at ../../gcc-4.6.1/gcc/fortran/resolve.c:12390 12390 sym->formal_ns->refs++; (gdb) bt #0 resolve_symbol (sym=0x13037a0) at ../../gcc-4.6.1/gcc/fortran/resolve.c:12390 #1 0x000000000052bd27 in traverse_ns (st=<value optimized out>, func=0x50dec0 <resolve_symbol>) at ../../gcc-4.6.1/gcc/fortran/symbol.c:3333 #2 0x0000000000518cd4 in resolve_types (ns=0x1302da0) at ../../gcc-4.6.1/gcc/fortran/resolve.c:13520 #3 0x000000000050d774 in gfc_resolve (ns=0x1302da0) at ../../gcc-4.6.1/gcc/fortran/resolve.c:13619 #4 gfc_resolve (ns=0x1302da0) at ../../gcc-4.6.1/gcc/fortran/resolve.c:13607 #5 0x000000000050ed55 in resolve_symbol (sym=0x1303b30) at ../../gcc-4.6.1/gcc/fortran/resolve.c:12378 #6 0x000000000052bd27 in traverse_ns (st=<value optimized out>, func=0x50dec0 <resolve_symbol>) at ../../gcc-4.6.1/gcc/fortran/symbol.c:3333 #7 0x0000000000518cd4 in resolve_types (ns=0x129c4c0) at ../../gcc-4.6.1/gcc/fortran/resolve.c:13520 #8 0x000000000050d774 in gfc_resolve (ns=0x129c4c0) at ../../gcc-4.6.1/gcc/fortran/resolve.c:13619 #9 gfc_resolve (ns=0x129c4c0) at ../../gcc-4.6.1/gcc/fortran/resolve.c:13607 #10 0x0000000000502f19 in gfc_parse_file () at ../../gcc-4.6.1/gcc/fortran/parse.c:4403 #11 0x000000000053bf36 in gfc_be_parse_file () ---Type <return> to continue, or q <return> to quit--- at ../../gcc-4.6.1/gcc/fortran/f95-lang.c:250 #12 0x000000000079a11c in compile_file (argc=14, argv=0x7fffffffdfa8) at ../../gcc-4.6.1/gcc/toplev.c:579 #13 do_compile (argc=14, argv=0x7fffffffdfa8) at ../../gcc-4.6.1/gcc/toplev.c:1900 #14 toplev_main (argc=14, argv=0x7fffffffdfa8) at ../../gcc-4.6.1/gcc/toplev.c:1963 #15 0x00007ffff7409c4d in __libc_start_main (main=<value optimized out>, argc=<value optimized out>, ubp_av=<value optimized out>, init=<value optimized out>, fini=<value optimized out>, rtld_fini=<value optimized out>, stack_end=0x7fffffffdf98) at libc-start.c:226 #16 0x000000000049cd05 in _start () (gdb)