public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58980] New: [4.7/4.8/4.9 Regression] ICE with invalid enum declaration
@ 2013-11-03 15:15 reichelt at gcc dot gnu.org
  2013-11-19 13:34 ` [Bug c++/58980] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-11-03 15:15 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58980
           Summary: [4.7/4.8/4.9 Regression] ICE with invalid enum
                    declaration
           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 triggers an ICE since GCC 4.6.0:

==============================
template<typename> struct A
{ 
  enum A::B::C {};
};
==============================

bug.cc:3:14: internal compiler error: in is_ancestor, at cp/name-lookup.c:2721
   enum A::B::C {};
              ^
0x718fff is_ancestor(tree_node*, tree_node*)
        ../../gcc/gcc/cp/name-lookup.c:2720
0x65b41e cp_parser_enum_specifier
        ../../gcc/gcc/cp/parser.c:15348
0x645d81 cp_parser_type_specifier
        ../../gcc/gcc/cp/parser.c:14176
0x65e867 cp_parser_decl_specifier_seq
        ../../gcc/gcc/cp/parser.c:11449
0x665c33 cp_parser_member_declaration
        ../../gcc/gcc/cp/parser.c:19931
0x645fdd cp_parser_member_specification_opt
        ../../gcc/gcc/cp/parser.c:19786
0x645fdd cp_parser_class_specifier_1
        ../../gcc/gcc/cp/parser.c:19030
0x645fdd cp_parser_class_specifier
        ../../gcc/gcc/cp/parser.c:19257
0x645fdd cp_parser_type_specifier
        ../../gcc/gcc/cp/parser.c:14204
0x65e867 cp_parser_decl_specifier_seq
        ../../gcc/gcc/cp/parser.c:11449
0x664443 cp_parser_single_declaration
        ../../gcc/gcc/cp/parser.c:22748
0x66494c cp_parser_template_declaration_after_export
        ../../gcc/gcc/cp/parser.c:22624
0x670969 cp_parser_declaration
        ../../gcc/gcc/cp/parser.c:10849
0x66f4f8 cp_parser_declaration_seq_opt
        ../../gcc/gcc/cp/parser.c:10771
0x670e36 cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.c:4007
0x670e36 c_parse_file()
        ../../gcc/gcc/cp/parser.c:31045
0x791113 c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.c:1046
Please submit a full bug report, [etc.]


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

* [Bug c++/58980] [4.7/4.8/4.9 Regression] ICE with invalid enum declaration
  2013-11-03 15:15 [Bug c++/58980] New: [4.7/4.8/4.9 Regression] ICE with invalid enum declaration reichelt at gcc dot gnu.org
@ 2013-11-19 13:34 ` rguenth at gcc dot gnu.org
  2014-01-21 12:14 ` paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-19 13:34 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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

* [Bug c++/58980] [4.7/4.8/4.9 Regression] ICE with invalid enum declaration
  2013-11-03 15:15 [Bug c++/58980] New: [4.7/4.8/4.9 Regression] ICE with invalid enum declaration reichelt at gcc dot gnu.org
  2013-11-19 13:34 ` [Bug c++/58980] " rguenth at gcc dot gnu.org
@ 2014-01-21 12:14 ` paolo.carlini at oracle dot com
  2014-01-23 16:32 ` paolo at gcc dot gnu.org
  2014-01-23 16:33 ` [Bug c++/58980] [4.7/4.8 " paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-01-21 12:14 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Mine.


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

* [Bug c++/58980] [4.7/4.8/4.9 Regression] ICE with invalid enum declaration
  2013-11-03 15:15 [Bug c++/58980] New: [4.7/4.8/4.9 Regression] ICE with invalid enum declaration reichelt at gcc dot gnu.org
  2013-11-19 13:34 ` [Bug c++/58980] " rguenth at gcc dot gnu.org
  2014-01-21 12:14 ` paolo.carlini at oracle dot com
@ 2014-01-23 16:32 ` paolo at gcc dot gnu.org
  2014-01-23 16:33 ` [Bug c++/58980] [4.7/4.8 " paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo at gcc dot gnu.org @ 2014-01-23 16:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Thu Jan 23 16:31:52 2014
New Revision: 206979

URL: http://gcc.gnu.org/viewcvs?rev=206979&root=gcc&view=rev
Log:
/cp
2014-01-23  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/58980
    * parser.c (cp_parser_enum_specifier): Handle TYPENAME_TYPE as
    nested_name_specifier.

/testsuite
2014-01-23  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/58980
    * g++.dg/parse/enum11.C: New.

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


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

* [Bug c++/58980] [4.7/4.8 Regression] ICE with invalid enum declaration
  2013-11-03 15:15 [Bug c++/58980] New: [4.7/4.8/4.9 Regression] ICE with invalid enum declaration reichelt at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2014-01-23 16:32 ` paolo at gcc dot gnu.org
@ 2014-01-23 16:33 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-01-23 16:33 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
           Assignee|paolo.carlini at oracle dot com    |unassigned at gcc dot gnu.org
   Target Milestone|4.7.4                       |4.9.0
            Summary|[4.7/4.8/4.9 Regression]    |[4.7/4.8 Regression] ICE
                   |ICE with invalid enum       |with invalid enum
                   |declaration                 |declaration

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed for 4.9.0.


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

end of thread, other threads:[~2014-01-23 16:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-03 15:15 [Bug c++/58980] New: [4.7/4.8/4.9 Regression] ICE with invalid enum declaration reichelt at gcc dot gnu.org
2013-11-19 13:34 ` [Bug c++/58980] " rguenth at gcc dot gnu.org
2014-01-21 12:14 ` paolo.carlini at oracle dot com
2014-01-23 16:32 ` paolo at gcc dot gnu.org
2014-01-23 16:33 ` [Bug c++/58980] [4.7/4.8 " paolo.carlini at oracle dot com

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).