------- Comment #2 from reichelt at gcc dot gnu dot org 2006-07-13 15:31
-------
Reduced testcase that crashes when compiled with
"g++ --param ggc-min-expand=0 --param ggc-min-heapsize=0 -O":
=============================================
extern "C" int verbose;
struct A
{
char const* foo() const { return p; }
char* p;
};
struct B
{
char const* foo() const { return p; }
char const* p;
};
void foo(int);
void bar(A& q)
{
{
extern int verbose;
foo(verbose);
}
q.foo();
q.foo();
if (verbose)
q.foo();
}
void baz(B& q)
{
if (verbose)
q.foo();
else
q.foo();
}
=============================================
However, I can reproduce the crash (with the original testcase and
the reduced one) only with GCC 4.1.1. GCC 4.1.0, current 4.1 branch
and mainline do not seem to be affected.
Therefore I'm closing the PR as fixed.
If it still crashes for you, feel free to reopen the PR again.
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
Status|UNCONFIRMED |RESOLVED
Keywords| |GC, monitored
Resolution| |FIXED
Target Milestone|--- |4.1.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28210