This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
ICE: gcc version 2.96 19990831: i686-pc-linux-gnu: Internal compiler error in `scan_region', at except.c:2464
- To: gcc-bugs at gcc dot gnu dot org
- Subject: ICE: gcc version 2.96 19990831: i686-pc-linux-gnu: Internal compiler error in `scan_region', at except.c:2464
- From: Raja R Harinath <harinath at cs dot umn dot edu>
- Date: 01 Sep 1999 12:30:58 -0500
Hi,
The following program (bug1.cc) provokes an ICE on i686-pc-linux-gnu.
The same file compiled under sparc-sun-solaris2.6 has no problem.
This example was heavily distilled from the source code of `jade', a
free SGML/DSSSL engine. I've been seening this problem for quite some
time (i.e. various points on the GCC trunk for the past couple of
weeks) on the `jade' sources. I distilled the bug yesterday, and
tested it on a couple of versions from the past two days.
inline void * operator new[] (unsigned int, void *p) throw () { return p; }
struct t1
{
char *p;
~t1 () { delete[] p; }
} C;
bool f1 (char);
void *f2 ();
bool
f3 ()
{
t1 a; // (1)
void *b = f2 ();
for (;;)
{
t1 & c = C;
t1 d;
if (!f1 ('<'))
{
if (!f1 ('>')) b = f2 ();
if (b) break;
}
f1 ('=');
if (!b) break;
}
return 1;
}
Commenting out the line marked (1) in `bug1.cc' causes a different ICE.
The following is a sample compile run
han ~/z/z > g++ -v -c -g -O2 -da bug1.cc
Reading specs from /home/grad04/harinath/linux/lib/gcc-lib/i686-pc-linux-gnu/2.96/specs
gcc version 2.96 19990831 (experimental)
/home/grad04/harinath/linux/lib/gcc-lib/i686-pc-linux-gnu/2.96/cpp -lang-c++ -v -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=96 -D__cplusplus -D__ELF__ -Dunix -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__EXCEPTIONS -D__OPTIMIZE__ -g -da -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di686 -Dpentiumpro -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__ bug1.cc /tmp/ccsiEGLY.ii
cpp: GNU CPP version 2.96 19990831 (experimental) (i386 Linux/ELF)
cpp: ignoring nonexistent directory `/usr/local/include'
#include "..." search starts here:
#include <...> search starts here:
/home/grad04/harinath/include
/home/grad04/harinath/include/g++-3
/home/grad04/harinath/linux/i686-pc-linux-gnu/include
/home/grad04/harinath/linux/lib/gcc-lib/i686-pc-linux-gnu/2.96/include
/usr/include
End of search list.
/home/grad04/harinath/linux/lib/gcc-lib/i686-pc-linux-gnu/2.96/cc1plus /tmp/ccsiEGLY.ii -quiet -dumpbase bug1.cc -da -g -O2 -version -o /tmp/ccOMsSzO.s
GNU C++ version 2.96 19990831 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 2.96 19990831 (experimental).
bug1.cc: In function `bool f3()':
bug1.cc:30: Internal compiler error in `scan_region', at except.c:2464
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.
The relevant fragment of except.c is
/* The _BEG/_END NOTEs must match and nest. */
if (NOTE_BLOCK_NUMBER (insn) != n)
abort ();
I'm also enclosing the non-empty dump files generated by the above run.
bug1.cc.addressof.gz
bug1.cc.cse.gz
bug1.cc.cse2.gz
bug1.cc.gcse.gz
bug1.cc.jump.gz
bug1.cc.loop.gz
bug1.cc.rtl.gz
- Hari
--
Raja R Harinath ------------------------------ harinath@cs.umn.edu
"When all else fails, read the instructions." -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing." -- Roy L Ash