This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/4500
- To: Ulrich dot Hagen at Siemens dot com, gcc-gnats at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org
- Subject: Re: c++/4500
- From: Reichelt <reichelt at igpm dot rwth-aachen dot de>
- Date: Tue, 9 Oct 2001 11:59:02 +0200
Hi,
the problem seems to be the interaction between optimization and dwarf2
output. I distilled the following testcase from the PR:
int e();
struct A
{
A (int);
~A ();
};
struct B
{
void f (int);
};
template <class T> struct C
{
void g () { A a(0); h(); }
void h () { if (!(e() && e()>0)) { B b; b.f(e()); } }
};
template struct C<void>;
It crashes gcc 3.0.2 20010903 (prerelease) on mips-sgi-irix6.5
using "g++ -O2 -g -c <filename>" and gcc 3.0 on i686-pc-linux-gnu
using "g++ -O2 -gdwarf-2 -c <filename>". I cannot test the original
system "alphaev67-unknown-linux-gnu" however.
Remark: With i686-pc-linux-gnu you can change the conditional
expression in the if-statement to "e()" and still get the crash.
Greetings,
Volker Reichelt
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=4500&database=gcc