🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #238

-funroll-loops bug in gcc 2.2.2?

#238
From: Mike J. Fuller
Date: Mon, 03 Aug 1992 16:20
69 lines
3754 bytes
When compiling utx_conv.c in mit/extensions/lib/PEX/util of the current
X11R5 distribution with gcc2.2.2 under SGI Irix4.0.1, the following happens:

% gcc -fpcc-struct-return -O2 -funroll-loops -I../include
-I../../../include/PEX -I../../../../X11 -I../../../../.  -DSYSV
-DFUNCPROTO=7 -DNARROWPROTO -c utx_conv.c
utx_conv.c: In function `sofa_edges_to_pex':
utx_conv.c:3174: internal error--insn does not satisfy its constraints:
(insn:HI 214 213 387 (set (reg:SI 24)
       (reg/s:SI 87)) 87 {movsi_internal} (nil)
   (nil))
gcc: Internal compiler error: program cc1 got fatal signal 6

If I remove the -funroll-loops option, it compiles fine.  Also, it compiled
fine with gcc2.1, so I don't know what changed with -funroll-loops between
2.1 and 2.2.2. 

If I grab a preprocessor output file and run cc1 under gdb, I get the
following:

% gdb /usr/local/lib/gcc-lib/mips-sgi-irix4/2.2.2/cc1
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.6, Copyright 1992 Free Software Foundation, Inc...
(gdb) run /usr/tmp/cca09454.i -mgpopt -quiet -dumpbase utx_conv.c -O2 -version
-fpcc-struct-return -funroll-loops -o /usr/tmp/cca09454.s 
Starting program: /usr/local/lib/gcc-lib/mips-sgi-irix4/2.2.2/cc1
/usr/tmp/cca09454.i -mgpopt -quiet -dumpbase utx_conv.c -O2 -version
-fpcc-struct-return -funroll-loops -o /usr/tmp/cca09454.s
GNU C version 2.2.2 [AL 1.1, MM 19] Silicon Graphics Mips compiled by GNU C
version 2.2.2.
utx_conv.c: In function `sofa_edges_to_pex':
utx_conv.c:3174: internal error--insn does not satisfy its constraints:
(insn:HI 214 213 387 (set (reg:SI 24)
       (reg/s:SI 87)) 87 {movsi_internal} (nil)
   (nil))

Program received signal 6, Abort
_kill () at sys/_kill.s:16
sys/_kill.s:16: No such file or directory.
(gdb) where
#0  _kill () at sys/_kill.s:16
#1  0x50aa5c in raise () at sys/raise.c:19
#2  0x5061e8 in abort () at abort.c:40
#3  0x41f03c in fatal_insn_not_found () at toplev.c:723
#4  0x4f91a0 in result_ready_cost () at insn-attrtab.c:464
#5  0x4da01c in priority () at sched.c:934
#6  0x4da068 in priority () at sched.c:934
#7  0x4da068 in priority () at sched.c:934
#8  0x4d9f94 in priority () at sched.c:934
#9  0x4d9f94 in priority () at sched.c:934
#10 0x4dcfc4 in schedule_block () at sched.c:2289
#11 0x4dfd00 in schedule_insns () at sched.c:3774
#12 0x4220f8 in rest_of_compilation () at toplev.c:1971
#13 0x411f5c in finish_function () at c-decl.c:5648
#14 0x40093c in yyparse () at bison.simple:171
#15 0x4207a8 in compile_file () at toplev.c:1319
#16 0x423398 in main () at toplev.c:2541
(gdb)

I hope this helps; in the meantime, I'll just forget about using
-funroll-loops.

/-----------------------------------------------------------------------------\
| Mike J. Fuller | Internet: mikef@sarah.lerc.nasa.gov      |     "I hate     |
|----------------|           mikef@zippysun.math.uakron.edu |   quotations."  |
|/\/\/\/\/\/\/\/\| Bitnet:   r2mjf@akronvm                  | -- R.W. Emerson |
\-----------------------------------------------------------------------------/
Technical Details
Message-ID: <1992Aug3.162008.21796@eagle.lerc.nasa.gov>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!holodeck.lerc.nasa.gov!mikef

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!holodeck.lerc.nasa.gov!mikef
From: mikef@holodeck.lerc.nasa.gov (Mike J. Fuller)
Subject: -funroll-loops bug in gcc 2.2.2?
Message-ID: <1992Aug3.162008.21796@eagle.lerc.nasa.gov>
Sender: gnulists@ai.mit.edu
Reply-To: mikef@sarah.lerc.nasa.gov
Organization: Computational Materials Laboratory, NASA Lewis Research Center
Distribution: gnu
Date: Mon, 3 Aug 1992 16:20:08 GMT
Approved: bug-gcc@prep.ai.mit.edu
Lines: 70