public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58632] New: [4.8/4.9 Regression] ICE reusing template parameter name as class name
@ 2013-10-05 19:54 reichelt at gcc dot gnu.org
  2013-10-10 11:45 ` [Bug c++/58632] " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-10-05 19:54 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58632
           Summary: [4.8/4.9 Regression] ICE reusing template parameter
                    name as class name
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org

The following invalid line of code triggers an ICE since GCC 4.8.0:

=================================================
template<template<int> class A> class A {};
=================================================

bug.cc:1:39: internal compiler error: tree check: expected record_type or
union_type or qual_union_type, have template_template_parm in xref_basetypes,
at cp/decl.c:12220
 template<template<int> class A> class A {};
                                       ^
0xcd860a tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc/gcc/tree.c:9176
0x560941 tree_check3
        ../../gcc/gcc/tree.h:2649
0x560941 xref_basetypes(tree_node*, tree_node*)
        ../../gcc/gcc/cp/decl.c:12220
0x63776f cp_parser_class_head
        ../../gcc/gcc/cp/parser.c:19541
0x63776f cp_parser_class_specifier_1
        ../../gcc/gcc/cp/parser.c:18842
0x638230 cp_parser_class_specifier
        ../../gcc/gcc/cp/parser.c:19111
0x638230 cp_parser_type_specifier
        ../../gcc/gcc/cp/parser.c:14090
0x64d739 cp_parser_decl_specifier_seq
        ../../gcc/gcc/cp/parser.c:11337
0x651dc3 cp_parser_single_declaration
        ../../gcc/gcc/cp/parser.c:22591
0x654be8 cp_parser_template_declaration_after_export
        ../../gcc/gcc/cp/parser.c:22467
0x65c9d9 cp_parser_declaration
        ../../gcc/gcc/cp/parser.c:10737
0x65b5aa cp_parser_declaration_seq_opt
        ../../gcc/gcc/cp/parser.c:10659
0x65ce76 cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.c:3939
0x65ce76 c_parse_file()
        ../../gcc/gcc/cp/parser.c:28911
0x7708b3 c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.c:1046
Please submit a full bug report, [etc.]


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

* [Bug c++/58632] [4.8/4.9 Regression] ICE reusing template parameter name as class name
  2013-10-05 19:54 [Bug c++/58632] New: [4.8/4.9 Regression] ICE reusing template parameter name as class name reichelt at gcc dot gnu.org
@ 2013-10-10 11:45 ` rguenth at gcc dot gnu.org
  2013-10-16  9:51 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-10-10 11:45 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.8.2


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

* [Bug c++/58632] [4.8/4.9 Regression] ICE reusing template parameter name as class name
  2013-10-05 19:54 [Bug c++/58632] New: [4.8/4.9 Regression] ICE reusing template parameter name as class name reichelt at gcc dot gnu.org
  2013-10-10 11:45 ` [Bug c++/58632] " rguenth at gcc dot gnu.org
@ 2013-10-16  9:51 ` jakub at gcc dot gnu.org
  2013-11-05 14:51 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-10-16  9:51 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.2                       |4.8.3

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.8.2 has been released.


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

* [Bug c++/58632] [4.8/4.9 Regression] ICE reusing template parameter name as class name
  2013-10-05 19:54 [Bug c++/58632] New: [4.8/4.9 Regression] ICE reusing template parameter name as class name reichelt at gcc dot gnu.org
  2013-10-10 11:45 ` [Bug c++/58632] " rguenth at gcc dot gnu.org
  2013-10-16  9:51 ` jakub at gcc dot gnu.org
@ 2013-11-05 14:51 ` rguenth at gcc dot gnu.org
  2014-01-27 17:38 ` jason at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-05 14:51 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-11-05
     Ever confirmed|0                           |1

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.


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

* [Bug c++/58632] [4.8/4.9 Regression] ICE reusing template parameter name as class name
  2013-10-05 19:54 [Bug c++/58632] New: [4.8/4.9 Regression] ICE reusing template parameter name as class name reichelt at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2013-11-05 14:51 ` rguenth at gcc dot gnu.org
@ 2014-01-27 17:38 ` jason at gcc dot gnu.org
  2014-01-28 21:05 ` jason at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-27 17:38 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |jason at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org


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

* [Bug c++/58632] [4.8/4.9 Regression] ICE reusing template parameter name as class name
  2013-10-05 19:54 [Bug c++/58632] New: [4.8/4.9 Regression] ICE reusing template parameter name as class name reichelt at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2014-01-27 17:38 ` jason at gcc dot gnu.org
@ 2014-01-28 21:05 ` jason at gcc dot gnu.org
  2014-01-28 21:34 ` jason at gcc dot gnu.org
  2014-01-28 21:34 ` jason at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-28 21:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Tue Jan 28 21:04:29 2014
New Revision: 207208

URL: http://gcc.gnu.org/viewcvs?rev=207208&root=gcc&view=rev
Log:
    PR c++/58632
    * decl.c (lookup_and_check_tag): Ignore template parameters if
    scope == ts_current.
    * pt.c (check_template_shadow): Don't complain about the injected
    class name.

Added:
    trunk/gcc/testsuite/g++.dg/template/shadow1.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/decl.c
    trunk/gcc/cp/pt.c


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

* [Bug c++/58632] [4.8/4.9 Regression] ICE reusing template parameter name as class name
  2013-10-05 19:54 [Bug c++/58632] New: [4.8/4.9 Regression] ICE reusing template parameter name as class name reichelt at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2014-01-28 21:34 ` jason at gcc dot gnu.org
@ 2014-01-28 21:34 ` jason at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-28 21:34 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 4.8.3/4.9.


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

* [Bug c++/58632] [4.8/4.9 Regression] ICE reusing template parameter name as class name
  2013-10-05 19:54 [Bug c++/58632] New: [4.8/4.9 Regression] ICE reusing template parameter name as class name reichelt at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2014-01-28 21:05 ` jason at gcc dot gnu.org
@ 2014-01-28 21:34 ` jason at gcc dot gnu.org
  2014-01-28 21:34 ` jason at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-28 21:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Tue Jan 28 21:33:55 2014
New Revision: 207213

URL: http://gcc.gnu.org/viewcvs?rev=207213&root=gcc&view=rev
Log:
    PR c++/58632
    * decl.c (lookup_and_check_tag): Ignore template parameters if
    scope == ts_current.
    * pt.c (check_template_shadow): Don't complain about the injected
    class name.

Added:
    branches/gcc-4_8-branch/gcc/testsuite/g++.dg/template/shadow1.C
Modified:
    branches/gcc-4_8-branch/gcc/cp/ChangeLog
    branches/gcc-4_8-branch/gcc/cp/decl.c
    branches/gcc-4_8-branch/gcc/cp/pt.c


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

end of thread, other threads:[~2014-01-28 21:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-05 19:54 [Bug c++/58632] New: [4.8/4.9 Regression] ICE reusing template parameter name as class name reichelt at gcc dot gnu.org
2013-10-10 11:45 ` [Bug c++/58632] " rguenth at gcc dot gnu.org
2013-10-16  9:51 ` jakub at gcc dot gnu.org
2013-11-05 14:51 ` rguenth at gcc dot gnu.org
2014-01-27 17:38 ` jason at gcc dot gnu.org
2014-01-28 21:05 ` jason at gcc dot gnu.org
2014-01-28 21:34 ` jason at gcc dot gnu.org
2014-01-28 21:34 ` jason 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).