This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
optimization/4226: 3.1 ICE in remove_unnecessary_notes
- To: gcc-gnats at gcc dot gnu dot org
- Subject: optimization/4226: 3.1 ICE in remove_unnecessary_notes
- From: snyder at fnal dot gov
- Date: Tue, 4 Sep 2001 12:32:28 -0500
- Reply-To: snyder at fnal dot gov
>Number: 4226
>Category: optimization
>Synopsis: 3.1 ICE in remove_unnecessary_notes
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-legal-code
>Submitter-Id: net
>Arrival-Date: Tue Sep 04 10:56:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: scott snyder
>Release: 3.1 20010902 (experimental)
>Organization:
>Environment:
System: Linux karma 2.4.3-12 #1 Fri Jun 8 13:35:30 EDT 2001 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../egcs/configure --prefix=/usr/local/egcs --enable-threads=posix --enable-long-long
>Description:
gcc 3.1 crashes when compiling the example with -O2.
>How-To-Repeat:
$ g++ -c -O2 x.cc
x.cc: In constructor `HepHistoHist1D::HepHistoHist1D(HepObj*)':
x.cc:38: Internal compiler error in remove_unnecessary_notes, at emit-rtl.c:
2987
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
------------------------------------------------------------
// g++ -c -O2
template <class _Tp>
class allocator {
public:
allocator() {}
~allocator();
};
class X
{
public:
typedef allocator<char> Alloc;
X (const char*, const Alloc& = Alloc());
};
class HepObj
{
public:
virtual ~HepObj ();
X * dir_;
X dir() const
{return (dir_ ) ? *dir_ : "";}
};
class HepHistoHist1D
: public HepObj
{
public:
HepHistoHist1D(HepObj* original);
};
HepHistoHist1D::HepHistoHist1D (HepObj* original)
{
original->dir();
}
------------------------------------------------------------
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: