public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "reichelt at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/58980] New: [4.7/4.8/4.9 Regression] ICE with invalid enum declaration
Date: Sun, 03 Nov 2013 15:15:00 -0000	[thread overview]
Message-ID: <bug-58980-4@http.gcc.gnu.org/bugzilla/> (raw)

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


             reply	other threads:[~2013-11-03 15:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-03 15:15 reichelt at gcc dot gnu.org [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-58980-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).