public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/27397]  New: [4.2 regression] ICE on invalid template argument
@ 2006-05-02 19:21 reichelt at gcc dot gnu dot org
  2006-05-02 21:04 ` [Bug c++/27397] " pinskia at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-05-02 19:21 UTC (permalink / raw)
  To: gcc-bugs

The following invalid code snippet causes an ICE on mainline:

=============================
template<int(> struct A;
=============================

bugA.cc:1: error: expected `)' before '>' token
bugA.cc:1: internal compiler error: tree check: accessed elt 1 of tree_vec with
0 elts in get_innermost_template_args, at cp/pt.c:490
Please submit a full bug report, [etc.]


A similar testcase causes an ICE in a different function:

=============================
template<typename> struct A
{
    template<int(> struct B;
};

A<char> a;
=============================

bugB.cc:3: error: expected `)' before '>' token
bugB.cc: In instantiation of 'A<char>':
bugB.cc:6:   instantiated from here
bugB.cc:3: internal compiler error: tree check: accessed elt 1 of tree_vec with
0 elts in add_outermost_template_args, at cp/pt.c:459
Please submit a full bug report, [etc.]

The second testcase also ICEd before GCC 3.4.0.


-- 
           Summary: [4.2 regression] ICE on invalid template argument
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery, 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=27397


^ permalink raw reply	[flat|nested] 13+ messages in thread
[parent not found: <bug-27397-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2021-05-03 12:01 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-02 19:21 [Bug c++/27397] New: [4.2 regression] ICE on invalid template argument reichelt at gcc dot gnu dot org
2006-05-02 21:04 ` [Bug c++/27397] " pinskia at gcc dot gnu dot org
2006-05-03 16:00 ` bangerth at dealii dot org
2006-05-04 15:21 ` pinskia at gcc dot gnu dot org
2006-06-04 18:45 ` mmitchel at gcc dot gnu dot org
2006-07-05 18:29 ` jason at gcc dot gnu dot org
2006-07-06  0:57 ` reichelt at gcc dot gnu dot org
2006-07-17  3:22 ` mmitchel at gcc dot gnu dot org
2006-08-12 21:31 ` janis at gcc dot gnu dot org
2006-08-30 20:52 ` lmillward at gcc dot gnu dot org
2006-09-02 14:16 ` lmillward at gcc dot gnu dot org
2006-09-02 14:17 ` lmillward at gcc dot gnu dot org
     [not found] <bug-27397-4@http.gcc.gnu.org/bugzilla/>
2021-05-03 12:01 ` cvs-commit at gcc dot gnu.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).