public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/28341]  New: [4.0/4.1/4.2 regression] ICE with references as template parameters
@ 2006-07-11 13:43 reichelt at gcc dot gnu dot org
  2006-07-11 13:43 ` [Bug c++/28341] " reichelt at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-07-11 13:43 UTC (permalink / raw)
  To: gcc-bugs

The following (IMHO invalid) code snippet triggers an ICE since GCC 4.0.0:

=========================================
template<const int&> struct A {};

template<typename T> struct B
{
  A<T(0)> a;
};

B<const int&> b;
=========================================

bug.cc: In instantiation of 'B<const int&>':
bug.cc:8:   instantiated from here
bug.cc:5: internal compiler error: tree check: expected tree that contains
'decl minimal' structure, have 'indirect_ref'  in decl_linkage, at
cp/tree.c:2191
Please submit a full bug report, [etc.]

Before GCC 4.0.0 the following (not too helpful, if not bogus) error
message was issued:

bug.cc: In instantiation of `B<const int&>':
bug.cc:8:   instantiated from here
bug.cc:5: error: `0' is not a valid template argument


-- 
           Summary: [4.0/4.1/4.2 regression] ICE with references as template
                    parameters
           Product: gcc
           Version: 4.2.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=28341


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

end of thread, other threads:[~2008-07-04 15:41 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-11 13:43 [Bug c++/28341] New: [4.0/4.1/4.2 regression] ICE with references as template parameters reichelt at gcc dot gnu dot org
2006-07-11 13:43 ` [Bug c++/28341] " reichelt at gcc dot gnu dot org
2006-07-17  3:13 ` mmitchel at gcc dot gnu dot org
2006-08-12 21:40 ` janis at gcc dot gnu dot org
2006-08-14 19:04 ` reichelt at gcc dot gnu dot org
2006-08-17  3:41 ` mmitchel at gcc dot gnu dot org
2006-08-20 23:53 ` mmitchel at gcc dot gnu dot org
2006-08-20 23:59 ` [Bug c++/28341] [4.0/4.1 " mmitchel at gcc dot gnu dot org
2007-02-03 18:01 ` gdr at gcc dot gnu dot org
2007-02-03 20:49 ` pinskia at gcc dot gnu dot org
2007-02-14  9:13 ` mmitchel at gcc dot gnu dot org
2008-07-04 15:41 ` [Bug c++/28341] [4.1 " jsm28 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).