[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-bugs
Subject: Bug report and patch to suggest on triggering related to optimizing out
From: "David L. Nicol" <dnicol () cstp ! umkc ! edu>
Date: 1999-12-31 19:31:57
[Download RAW message or body]
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" (application/gnu)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic