public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11860] New: internal compiler error: in lookup_template_class
@ 2003-08-08 23:06 utke at mcs dot anl dot gov
2003-08-08 23:09 ` [Bug c++/11860] " utke at mcs dot anl dot gov
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: utke at mcs dot anl dot gov @ 2003-08-08 23:06 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11860
Summary: internal compiler error: in lookup_template_class
Product: gcc
Version: 3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: utke at mcs dot anl dot gov
CC: gcc-bugs at gcc dot gnu dot org
while trying solve a different issue I came across this problem where the
existence of a class derived from a template class causes the
problem in the lookup.
In the attached source things are ok when the definition of
class A1 is commented out. So I guess the confusion is between
the the two specialization of A, one in the definition of A1 and
the other on the declaration of b;
tmf.cpp: In instantiation of `B<A<int> >':
tmf.cpp:29: instantiated from here
tmf.cpp:20: internal compiler error: in lookup_template_class, at cp/pt.c:4219
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
compiler version:
Reading specs from
/m_home/m_utkej/gcc-3.3_inst/lib/gcc-lib/i686-pc-linux-gnu/3.3/specs
Configured with: ../gcc-3.3/configure --prefix=/m_home/m_utkej/gcc-3.3_inst
--enable-languages=c,c++,f77
Thread model: posix
gcc version 3.3
Source
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
template <class T>
class A {
public:
A(){};
~A(){};
protected:
template<class X> friend class B;
void foo(){};
};
// when the A1 class is commented out
// the compile doesn't fail
class A1: public A<int> {
public:
A1(){};
~A1(){};
};
template <class T>
class B {
public:
B(){};
~B(){};
T myT;
void bar() { myT.foo();};
};
int main() {
B<A<int> > b;
// this works only as long as the
// the entire definition of A1 is commented out
// what I really wanted to do is
// B<A1> b;
// which was trying to reproduce a situation
// where somehow it complains that foo is protected
// even though B is declared a friend in A...
// but that is another issue :-(
b.bar();
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/11860] internal compiler error: in lookup_template_class
2003-08-08 23:06 [Bug c++/11860] New: internal compiler error: in lookup_template_class utke at mcs dot anl dot gov
@ 2003-08-08 23:09 ` utke at mcs dot anl dot gov
2003-08-08 23:24 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: utke at mcs dot anl dot gov @ 2003-08-08 23:09 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11860
------- Additional Comments From utke at mcs dot anl dot gov 2003-08-08 23:09 -------
Created an attachment (id=4580)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4580&action=view)
source code for problem case
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/11860] internal compiler error: in lookup_template_class
2003-08-08 23:06 [Bug c++/11860] New: internal compiler error: in lookup_template_class utke at mcs dot anl dot gov
2003-08-08 23:09 ` [Bug c++/11860] " utke at mcs dot anl dot gov
@ 2003-08-08 23:24 ` pinskia at gcc dot gnu dot org
2003-08-23 1:13 ` dhazeghi at yahoo dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-08 23:24 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11860
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2003-08-08 23:24:17
date| |
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-08-08 23:24 -------
I can confirm this on the mainline (20030808).
This ICEs in all the compilers I have (except for 2.91.66), 2.95.3, 3.0.4, 3.2.3, 3.2.2.
This might or might no be related to bug 495.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/11860] internal compiler error: in lookup_template_class
2003-08-08 23:06 [Bug c++/11860] New: internal compiler error: in lookup_template_class utke at mcs dot anl dot gov
2003-08-08 23:09 ` [Bug c++/11860] " utke at mcs dot anl dot gov
2003-08-08 23:24 ` pinskia at gcc dot gnu dot org
@ 2003-08-23 1:13 ` dhazeghi at yahoo dot com
2003-08-29 3:05 ` reichelt at gcc dot gnu dot org
2003-09-19 22:00 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-08-23 1:13 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11860
dhazeghi at yahoo dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4 |---
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/11860] internal compiler error: in lookup_template_class
2003-08-08 23:06 [Bug c++/11860] New: internal compiler error: in lookup_template_class utke at mcs dot anl dot gov
` (2 preceding siblings ...)
2003-08-23 1:13 ` dhazeghi at yahoo dot com
@ 2003-08-29 3:05 ` reichelt at gcc dot gnu dot org
2003-09-19 22:00 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2003-08-29 3:05 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11860
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
Keywords| |monitored
------- Additional Comments From reichelt at gcc dot gnu dot org 2003-08-29 03:05 -------
A shorter testcase is the following:
================================================================
template <int> struct A
{
template <typename> friend struct B;
};
struct C : A<0> {};
template <typename> struct B {};
B<void> b;
================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/11860] internal compiler error: in lookup_template_class
2003-08-08 23:06 [Bug c++/11860] New: internal compiler error: in lookup_template_class utke at mcs dot anl dot gov
` (3 preceding siblings ...)
2003-08-29 3:05 ` reichelt at gcc dot gnu dot org
@ 2003-09-19 22:00 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-19 22:00 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11860
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-09-19 21:30 -------
In fact this was not just related to bug 495 but rather a dup of that bug, closing as so.
*** This bug has been marked as a duplicate of 495 ***
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-09-19 21:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-08 23:06 [Bug c++/11860] New: internal compiler error: in lookup_template_class utke at mcs dot anl dot gov
2003-08-08 23:09 ` [Bug c++/11860] " utke at mcs dot anl dot gov
2003-08-08 23:24 ` pinskia at gcc dot gnu dot org
2003-08-23 1:13 ` dhazeghi at yahoo dot com
2003-08-29 3:05 ` reichelt at gcc dot gnu dot org
2003-09-19 22:00 ` pinskia at gcc dot gnu dot org
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).