> cat small.f90 interface assignment (=) interface pseudo_scalar pure function double_tensor2odd (x, t2) result (xt2) > gfortran small.f90 small.f90:2.25: interface pseudo_scalar 1 Error: Unexpected INTERFACE statement in INTERFACE block at (1) f951: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions.
Confirmed: Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000 0x00000001000674c8 in parse_spec (st=ST_INTERFACE) at ../../p_work/gcc/fortran/parse.c:2239 2239 gfc_add_function (&sym->attr, sym->name, NULL); (gdb) bt #0 0x00000001000674c8 in parse_spec (st=ST_INTERFACE) at ../../p_work/gcc/fortran/parse.c:2239 #1 0x000000010006838d in parse_progunit (st=ST_ARITHMETIC_IF) at ../../p_work/gcc/fortran/parse.c:3758 #2 0x000000010006942c in gfc_parse_file () at ../../p_work/gcc/fortran/parse.c:4192 #3 0x00000001000a291c in gfc_be_parse_file (set_yydebug=<value temporarily unavailable, due to optimizations>) at ../../p_work/gcc/fortran/f95-lang.c:239 #4 0x00000001006d6b5a in toplev_main (argc=2, argv=0x7fff5fbfd9f0) at ../../p_work/gcc/toplev.c:1053 #5 0x00000001000019e4 in start () Not a regression, I get the "Bus error" for 4.2.4, 4.3.4, 4.4.2, and trunk.
I have a patch.
http://gcc.gnu.org/ml/gcc-patches/2010-04/msg01922.html
Subject: Bug 43592 Author: kargl Date: Mon May 3 17:57:14 2010 New Revision: 158998 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158998 Log: 2010-05-03 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/43592 * fortran/parse.c (parse_interface): Do not dereference a NULL pointer. 2010-05-03 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/43592 * gfortran.dg/unexpected_interface.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/unexpected_interface.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/parse.c trunk/gcc/testsuite/ChangeLog
Subject: Bug 43592 Author: kargl Date: Wed May 5 15:30:54 2010 New Revision: 159068 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159068 Log: 2010-05-05 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/43592 * fortran/parse.c (parse_interface): Do not dereference a NULL pointer. 2010-05-05 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/43592 * gfortran.dg/unexpected_interface.f90: New test. Added: branches/gcc-4_5-branch/gcc/testsuite/gfortran.dg/unexpected_interface.f90 Modified: branches/gcc-4_5-branch/gcc/fortran/ChangeLog branches/gcc-4_5-branch/gcc/fortran/parse.c branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
Fixed on trunk and 4.5. Closing.