public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/9649: gcc hangs when static declared twice in templated class
@ 2003-02-10 21:57 ehrhardt
0 siblings, 0 replies; 2+ messages in thread
From: ehrhardt @ 2003-02-10 21:57 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, gendzwil, nobody
Synopsis: gcc hangs when static declared twice in templated class
State-Changed-From-To: open->analyzed
State-Changed-By: cae
State-Changed-When: Mon Feb 10 21:57:45 2003
State-Changed-Why:
Confrimed. All supported versions fail to compile this, 3.2.2 gives
an endless loop, 3.3 and 3.4 give an ICE at the same place. Here's
a minimal legal example, it is possible to remove the out of class
definition of the static member without the ICE going away.
---------------- cut -----------------
template <class R>
struct A {
static int _test;
static int _test;
};
template <class R> int A<R>::_test = 0;
struct B : public A <int> { };
---------------- cut -----------------
9649.cc: In instantiation of `A<int>':
9649.cc:7: instantiated from here
9649.cc:4: internal compiler error: in finish_member_declaration, at
cp/semantics.c:1868
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9649
^ permalink raw reply [flat|nested] 2+ messages in thread
* c++/9649: gcc hangs when static declared twice in templated class
@ 2003-02-10 20:26 gendzwil
0 siblings, 0 replies; 2+ messages in thread
From: gendzwil @ 2003-02-10 20:26 UTC (permalink / raw)
To: gcc-gnats
>Number: 9649
>Category: c++
>Synopsis: gcc hangs when static declared twice in templated class
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Feb 10 20:26:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: gendzwil@sedsystems.ca
>Release: 2.96
>Organization:
>Environment:
Red Hat Linux 7.3 2.96-110
>Description:
If you declare a static data member twice, gcc will hang while compiling. Looks like stuck in a loop to me - top shows gcc sucking 99.9% of cpu.
aaa.h
----------
template <class R, class I> class Aaa
{
public: // methods
Aaa() {}
virtual ~Aaa() {}
static int _test;
static int _test;
};
template < class R, class I > int Aaa<R,I>::_test;
-----------
aab.h
-----------
#include "aaa.h"
class Aab : public Aaa< int, float >
{
public: // methods
Aab();
virtual ~Aab();
};
------------
aab.cpp
------------
#include "aab.h"
Aab::Aab(){}
Aab::~Aab(){}
>How-To-Repeat:
Compile the code included in the description:
gcc aab.cpp
>Fix:
Unknown
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-02-10 21:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-10 21:57 c++/9649: gcc hangs when static declared twice in templated class ehrhardt
-- strict thread matches above, loose matches on Subject: below --
2003-02-10 20:26 gendzwil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).