public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/34059]  New: [4.1/4.2/4.3 regression] ICE with invalid base type for class member
@ 2007-11-10 20:22 reichelt at gcc dot gnu dot org
  2007-11-10 20:22 ` [Bug c++/34059] " reichelt at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-11-10 20:22 UTC (permalink / raw)
  To: gcc-bugs

The following invalid code snippet triggers an ICE since GCC 4.1.2:

===============================
struct A
{
  template<int> void foo();
};

struct B : A {};
struct C : A {};

void bar()
{
  B().C::foo<0>();
}
===============================

bug.cc: In function 'void bar()':
bug.cc:11: internal compiler error: in build_base_path, at cp/class.c:272
Please submit a full bug report, [etc.]

Before GCC 3.4.0 we generated a correct diagnostic:
bug.cc:11: error: type `C' is not a base type for type `B'

GCC 3.4.0 - 4.1.1 wrongly accepted the code.


-- 
           Summary: [4.1/4.2/4.3 regression] ICE with invalid base type for
                    class member
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34059


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-12-10 23:03 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-10 20:22 [Bug c++/34059] New: [4.1/4.2/4.3 regression] ICE with invalid base type for class member reichelt at gcc dot gnu dot org
2007-11-10 20:22 ` [Bug c++/34059] " reichelt at gcc dot gnu dot org
2007-11-13 17:23 ` janis at gcc dot gnu dot org
2007-11-19  4:11 ` pinskia at gcc dot gnu dot org
2007-11-26 19:38 ` simartin at gcc dot gnu dot org
2007-11-27 20:27 ` simartin at gcc dot gnu dot org
2007-11-27 22:22 ` mmitchel at gcc dot gnu dot org
2007-12-10 22:40 ` simartin at gcc dot gnu dot org
2007-12-10 22:50 ` [Bug c++/34059] [4.1/4.2 " jakub at gcc dot gnu dot org
2007-12-10 22:54 ` simartin at gcc dot gnu dot org
2007-12-10 23:03 ` simartin 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).