public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60187] New: [4.7/4.8/4.9 Regression] [c++11] ICE with parameter pack as underlying type for enum
@ 2014-02-13 22:56 reichelt at gcc dot gnu.org
  2014-02-14  7:35 ` [Bug c++/60187] " jakub at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-02-13 22:56 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60187
           Summary: [4.7/4.8/4.9 Regression] [c++11] ICE with parameter
                    pack as underlying type for enum
           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 code snippet (compiled with "-std=c++11")
triggers an ICE since GCC 4.6.0:

==================================================
template<typename... T> struct A
{
  enum E : T {};
};

A<int> a;
==================================================

bug.cc: In instantiation of 'struct A<int>':
bug.cc:6:8:   required from here
bug.cc:3:8: internal compiler error: in dependent_type_p, at cp/pt.c:20283
   enum E : T {};
        ^
0x5ff408 dependent_type_p(tree_node*)
        ../../gcc/gcc/cp/pt.c:20283
0x5d1e29 start_enum(tree_node*, tree_node*, tree_node*, bool, bool*)
        ../../gcc/gcc/cp/decl.c:12604
0x624e54 lookup_template_class_1
        ../../gcc/gcc/cp/pt.c:7518
0x624e54 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
        ../../gcc/gcc/cp/pt.c:7725
0x629673 tsubst_aggr_type
        ../../gcc/gcc/cp/pt.c:10031
0x61b9f1 tsubst(tree_node*, tree_node*, int, tree_node*)
        ../../gcc/gcc/cp/pt.c:11436
0x62e0d3 tsubst_decl
        ../../gcc/gcc/cp/pt.c:10824
0x61be9f tsubst(tree_node*, tree_node*, int, tree_node*)
        ../../gcc/gcc/cp/pt.c:11357
0x64a34a instantiate_class_template_1
        ../../gcc/gcc/cp/pt.c:9010
0x64a34a instantiate_class_template(tree_node*)
        ../../gcc/gcc/cp/pt.c:9274
0x6db973 complete_type(tree_node*)
        ../../gcc/gcc/cp/typeck.c:134
0x5c4f38 start_decl_1(tree_node*, bool)
        ../../gcc/gcc/cp/decl.c:4719
0x5ede67 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int,
tree_node*, tree_node*, tree_node**)
        ../../gcc/gcc/cp/decl.c:4682
0x6c7e9e cp_parser_init_declarator
        ../../gcc/gcc/cp/parser.c:16680
0x6c9929 cp_parser_simple_declaration
        ../../gcc/gcc/cp/parser.c:11205
0x6acc13 cp_parser_block_declaration
        ../../gcc/gcc/cp/parser.c:11086
0x6d3ec2 cp_parser_declaration
        ../../gcc/gcc/cp/parser.c:10983
0x6d2bb8 cp_parser_declaration_seq_opt
        ../../gcc/gcc/cp/parser.c:10869
0x6d445a cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.c:4014
0x6d445a c_parse_file()
        ../../gcc/gcc/cp/parser.c:31536
Please submit a full bug report, [etc.]

The code was correctly rejected by GCC 4.4.0
and wrongly accepted by GCC 4.4.1-4.5.3.


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

* [Bug c++/60187] [4.7/4.8/4.9 Regression] [c++11] ICE with parameter pack as underlying type for enum
  2014-02-13 22:56 [Bug c++/60187] New: [4.7/4.8/4.9 Regression] [c++11] ICE with parameter pack as underlying type for enum reichelt at gcc dot gnu.org
@ 2014-02-14  7:35 ` jakub at gcc dot gnu.org
  2014-02-21 19:00 ` jason at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-14  7:35 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-02-14
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |jason at gcc dot gnu.org
   Target Milestone|---                         |4.7.4
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
ICE started with r165935.


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

* [Bug c++/60187] [4.7/4.8/4.9 Regression] [c++11] ICE with parameter pack as underlying type for enum
  2014-02-13 22:56 [Bug c++/60187] New: [4.7/4.8/4.9 Regression] [c++11] ICE with parameter pack as underlying type for enum reichelt at gcc dot gnu.org
  2014-02-14  7:35 ` [Bug c++/60187] " jakub at gcc dot gnu.org
@ 2014-02-21 19:00 ` jason at gcc dot gnu.org
  2014-02-21 21:48 ` jason at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2014-02-21 19:00 UTC (permalink / raw)
  To: gcc-bugs

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

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

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


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

* [Bug c++/60187] [4.7/4.8/4.9 Regression] [c++11] ICE with parameter pack as underlying type for enum
  2014-02-13 22:56 [Bug c++/60187] New: [4.7/4.8/4.9 Regression] [c++11] ICE with parameter pack as underlying type for enum reichelt at gcc dot gnu.org
  2014-02-14  7:35 ` [Bug c++/60187] " jakub at gcc dot gnu.org
  2014-02-21 19:00 ` jason at gcc dot gnu.org
@ 2014-02-21 21:48 ` jason at gcc dot gnu.org
  2014-02-21 22:15 ` jason at gcc dot gnu.org
  2014-02-22  5:03 ` jason at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2014-02-21 21:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Fri Feb 21 21:47:30 2014
New Revision: 208026

URL: http://gcc.gnu.org/viewcvs?rev=208026&root=gcc&view=rev
Log:
    PR c++/60187
    * parser.c (cp_parser_enum_specifier): Call
    check_for_bare_parameter_packs.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/enum_base2.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c


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

* [Bug c++/60187] [4.7/4.8/4.9 Regression] [c++11] ICE with parameter pack as underlying type for enum
  2014-02-13 22:56 [Bug c++/60187] New: [4.7/4.8/4.9 Regression] [c++11] ICE with parameter pack as underlying type for enum reichelt at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2014-02-21 21:48 ` jason at gcc dot gnu.org
@ 2014-02-21 22:15 ` jason at gcc dot gnu.org
  2014-02-22  5:03 ` jason at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2014-02-21 22:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Fri Feb 21 22:15:01 2014
New Revision: 208031

URL: http://gcc.gnu.org/viewcvs?rev=208031&root=gcc&view=rev
Log:
    PR c++/60187
    * parser.c (cp_parser_enum_specifier): Call
    check_for_bare_parameter_packs.

Added:
    branches/gcc-4_8-branch/gcc/testsuite/g++.dg/cpp0x/enum_base2.C
Modified:
    branches/gcc-4_8-branch/gcc/cp/ChangeLog
    branches/gcc-4_8-branch/gcc/cp/parser.c


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

* [Bug c++/60187] [4.7/4.8/4.9 Regression] [c++11] ICE with parameter pack as underlying type for enum
  2014-02-13 22:56 [Bug c++/60187] New: [4.7/4.8/4.9 Regression] [c++11] ICE with parameter pack as underlying type for enum reichelt at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2014-02-21 22:15 ` jason at gcc dot gnu.org
@ 2014-02-22  5:03 ` jason at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2014-02-22  5:03 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|4.7.4                       |4.8.3

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


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

end of thread, other threads:[~2014-02-22  5:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-13 22:56 [Bug c++/60187] New: [4.7/4.8/4.9 Regression] [c++11] ICE with parameter pack as underlying type for enum reichelt at gcc dot gnu.org
2014-02-14  7:35 ` [Bug c++/60187] " jakub at gcc dot gnu.org
2014-02-21 19:00 ` jason at gcc dot gnu.org
2014-02-21 21:48 ` jason at gcc dot gnu.org
2014-02-21 22:15 ` jason at gcc dot gnu.org
2014-02-22  5:03 ` 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).