This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bug report and patch to suggest on triggering related to optimizing out a great deal of code






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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]