This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Bug report and patch to suggest on triggering related to optimizing out a great deal of code
- To: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>, gcc-bugs at gcc dot gnu dot org
- Subject: Bug report and patch to suggest on triggering related to optimizing out a great deal of code
- From: "David L. Nicol" <dnicol at cstp dot umkc dot edu>
- Date: Fri, 31 Dec 1999 19:31:57 +0000
- Organization: University of Missouri - Kansas City network operations
- References: <38695362.7DC767CA@cstp.umkc.edu> <199912300909.KAA01238@loewis.home.cs.tu-berlin.de> <386BE87C.57C4A620@cstp.umkc.edu> <199912302326.AAA22949@loewis.home.cs.tu-berlin.de> <386BFACF.B7ED2A44@cstp.umkc.edu> <199912310811.JAA00596@loewis.home.cs.tu-berlin.de>
Gcc version:
gcc --version
2.95.2
system type: i686 gnu/linux-2.2.12-mosix, glibc2 from redhat 6.1 rpms
and/or GNU source distributions
What has happened is, I was modifying a program, and putting exit() near
the beginning of it, to stop after my modifications (I am currently
fumbling
with ncurses) and my compilation aborted (as shown below.)
I reported this as requested in the error message, and have created and
applied
a patch (also shown below) to offer suggestion. Without optimizing, the
program
compiles and works as well as can be expected, considering that at this
point
in my grasp of ncurses I still don't know addch from a hole in the
ground.
attached is compressed mon.i.gz file
Here is the patch in action:
[david@lucy color_mon]$ cc -I/m/include -I/usr/include -O -c mon.c -o
mon.o -
-save-temps
mon.c: In function `main':
mon.c:839: warning: optimizing out a lot of code: try without -O switch
mon.c:839: Internal compiler error in `build_insn_chain', at
global.c:1758
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for
instructions.
[david@lucy color_mon]$ gzip mon.i
Here is the patch:
--- gcc/global.c.dist Thu Dec 30 15:01:16 1999
+++ gcc/global.c Thu Dec 30 15:03:22 1999
@@ -1753,7 +1753,10 @@
for (first = NEXT_INSN (first) ; first; first = NEXT_INSN
(first))
if (GET_RTX_CLASS (GET_CODE (first)) == 'i'
&& GET_CODE (PATTERN (first)) != USE)
- abort ();
+ {
+ warning ("optimizing out a lot of code: try without -O
switch");
+ abort ();
+ }
break;
}
}
__________________________________________________
David Nicol 816.235.1187 nicold@umkc.edu
ln -s `which grep` ~/bin/kibo
mon.i.gz