Article View: gnu.gcc.bug
Article #325GCC 2.2.2 compiler crashes. Loop unrolling and the -g flag.
From: drk
Date: Sat, 08 Aug 1992 11:07
Date: Sat, 08 Aug 1992 11:07
83 lines
4125 bytes
4125 bytes
The following program causes the 2.2.2 compiler (mips-dec-ultrix) to abort
with a signal 11. For the compiler to abort both the -g flag and one of
-funroll-loops or -funroll-all-loops must be specified.
In the program the macro FrequencY usually inserts some accounting code
into the my programs. Here I have removed all of that stuff and just made
it null. If you were to remove the ";" from "({;})" the compiler would not
abort.
Thanks
Dan
Here are the full command lines and the gdb traceback:
------------------------------------------------------
Reading specs from /homes/gws/drk/vlsi-mount/gcc-2.2.2/specs
gcc version 2.2.2
/homes/gws/drk/vlsi-mount/gcc-2.2.2/cpp -lang-c -v -undef -D__GNUC__=2 -D__ANSI_COMPAT -DMIPSEL -DR3000 -DSYSTYPE_BSD -D_SYSTYPE_BSD -Dbsd4_2 -Dhost_mips -Dmips -Dultrix -Dunix -D__ANSI_COMPAT -D__MIPSEL__ -D__R3000__ -D__SYSTYPE_BSD__ -D___SYSTYPE_BSD__ -D__bsd4_2__ -D__host_mips__ -D__mips__ -D__ultrix__ -D__unix__ -D__ANSI_COMPAT -D__MIPSEL -D__R3000 -D__SYSTYPE_BSD -D___SYSTYPE_BSD -D__bsd4_2 -D__host_mips -D__mips -D__ultrix -D__unix -D__OPTIMIZE__ -g -D__LANGUAGE_C__ -D__LANGUAGE_C -DLANGUAGE_C mts.
e.d.c mts.e.d.i
GNU CPP version 2.2.2 [AL 1.1, MM 19] DECstation running ultrix
/homes/gws/drk/vlsi-mount/gcc-2.2.2/cc1 mts.e.d.i -mgpopt -quiet -dumpbase mts.e.d.c -g -O2 -version -funroll-loops -o mts.e.d.s
GNU C version 2.2.2 [AL 1.1, MM 19] DECstation running ultrix compiled by CC.
/homes/gws/drk/vlsi-mount/gcc-2.2.2/gcc: Internal compiler error: program cc1 got fatal signal 11
% gdb /homes/gws/drk/vlsi-mount/gcc-2.2.2/cc1
GDB 3.5, Copyright (C) 1989 Free Software Foundation, Inc.
There is ABSOLUTELY NO WARRANTY for GDB; type "info warranty" for details.
GDB is free software and you are welcome to distribute copies of it
under certain conditions; type "info copying" to see the conditions.
Reading symbol data from /homes/gws/drk/vlsi-mount/gcc-2.2.2/cc1...done.
Type "help" for a list of commands.
(gdb) run mts.e.d.i -mgpopt -quiet -dumpbase mts.e.d.c -g -O2 -version -funroll-loops -o mts.e.d.s
Starting program: /homes/gws/drk/vlsi-mount/gcc-2.2.2/cc1 mts.e.d.i -mgpopt -quiet -dumpbase mts.e.d.c -g -O2 -version -funroll-loops -o mts.e.d.s
GNU C version 2.2.2 [AL 1.1, MM 19] DECstation running ultrix compiled by CC.
Program received signal 11, Segmentation fault
0x453af0 in find_loop_tree_blocks (f=(struct rtx_def *) 0x1003a198) (stmt.c line 4610)
stmt.c: No such file or directory.
(gdb) where
#0 0x453af0 in find_loop_tree_blocks (f=(struct rtx_def *) 0x1003a198) (stmt.c line 4610)
#1 0x4b6120 in loop_optimize (f=(struct rtx_def *) 0x1003a198, dumpfile=(struct _iobuf *) 0x0) (loop.c line 441)
#2 0x4289d4 in rest_of_compilation (decl=(union tree_node *) 0x1004f410) (toplev.c line 2168)
#3 0x41412c in finish_function (nested=0) (c-decl.c line 5684)
#4 0x400a2c in yyparse () (bison.simple line 329)
#5 0x427470 in compile_file (name=(char *) 0x7fffbc18 "mts.e.d.i") (toplev.c line 1638)
#6 0x42ab00 in main (argc=12, argv=(char **) 0x7fffbb64, envp=(char **) 0x7fffbb98) (toplev.c line 3055)
(gdb)
Program follows:
----------------
#define FrequencY(x) ({;})
typedef long int integer;
typedef float real;
typedef double doublereal;
real sig0[100];
int finit4_bv(dt,wb,cell,facm,ipfl)
real dt,wb,cell,facm;
integer ipfl;
{
doublereal phit[16];
doublereal p0[16];
integer ks;
extern int matmlt_bv4x4();
doublereal tm1[16];
integer ksm;
for ((FrequencY(1),(ks = 1));(FrequencY(16),(ks<=15));(FrequencY(15),(++ks)))
{
if ((FrequencY(15),(ks==1)))
{
(FrequencY(1),(matmlt_4x4bv(p0,phit,tm1)));
}
}
}
Technical Details
Message-ID:
<9208090107.AA08088@sanddab.cs.washington.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cs.washington.edu!drkShow Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cs.washington.edu!drk From: drk@cs.washington.edu Subject: GCC 2.2.2 compiler crashes. Loop unrolling and the -g flag. Message-ID: <9208090107.AA08088@sanddab.cs.washington.edu> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Sat, 8 Aug 1992 11:07:08 GMT Approved: bug-gcc@prep.ai.mit.edu Lines: 83