public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58873] New: [c++11] ICE with __underlying_type for broken enum
@ 2013-10-25 9:38 reichelt at gcc dot gnu.org
2013-10-25 9:46 ` [Bug c++/58873] [4.7/4.8/4.9 Regression] " mpolacek at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-10-25 9:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58873
Bug ID: 58873
Summary: [c++11] ICE with __underlying_type for broken 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.7.0 (when __underlying_type was introduced):
===================================
enum A : enum { };
template<typename> struct B {};
B<__underlying_type(A)> b;
===================================
bug.cc:1:17: error: underlying type '<anonymous enum>' of 'A' must be an
integral type
enum A : enum { };
^
bug.cc:5:22: internal compiler error: Segmentation fault
B<__underlying_type(A)> b;
^
0xb1988f crash_signal
../../gcc/gcc/toplev.c:335
0x654b3a cp_parser_functional_cast
../../gcc/gcc/cp/parser.c:22866
0x64ef5d cp_parser_postfix_expression
../../gcc/gcc/cp/parser.c:5792
0x65171d cp_parser_unary_expression
../../gcc/gcc/cp/parser.c:7066
0x6522ef cp_parser_binary_expression
../../gcc/gcc/cp/parser.c:7758
0x6527cf cp_parser_assignment_expression
../../gcc/gcc/cp/parser.c:7996
0x652c24 cp_parser_assignment_expression
../../gcc/gcc/cp/parser.c:8046
0x652c24 cp_parser_constant_expression
../../gcc/gcc/cp/parser.c:8256
0x65cc73 cp_parser_template_argument
../../gcc/gcc/cp/parser.c:13859
0x65cc73 cp_parser_template_argument_list
../../gcc/gcc/cp/parser.c:13582
0x65cc73 cp_parser_enclosed_template_argument_list
../../gcc/gcc/cp/parser.c:22998
0x65dc2a cp_parser_template_id
../../gcc/gcc/cp/parser.c:13280
0x65e252 cp_parser_class_name
../../gcc/gcc/cp/parser.c:18853
0x65026f cp_parser_qualifying_entity
../../gcc/gcc/cp/parser.c:5499
0x65026f cp_parser_nested_name_specifier_opt
../../gcc/gcc/cp/parser.c:5224
0x65eac7 cp_parser_constructor_declarator_p
../../gcc/gcc/cp/parser.c:22204
0x65eac7 cp_parser_decl_specifier_seq
../../gcc/gcc/cp/parser.c:11393
0x6654f9 cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:10998
0x6495e0 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:10947
0x6708fe cp_parser_declaration
../../gcc/gcc/cp/parser.c:10844
Please submit a full bug report, [etc.]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/58873] [4.7/4.8/4.9 Regression] [c++11] ICE with __underlying_type for broken enum
2013-10-25 9:38 [Bug c++/58873] New: [c++11] ICE with __underlying_type for broken enum reichelt at gcc dot gnu.org
@ 2013-10-25 9:46 ` mpolacek at gcc dot gnu.org
2014-02-20 16:03 ` ktietz at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-10-25 9:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58873
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P5
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-10-25
CC| |mpolacek at gcc dot gnu.org
Target Milestone|--- |4.7.4
Summary|[c++11] ICE with |[4.7/4.8/4.9 Regression]
|__underlying_type for |[c++11] ICE with
|broken enum |__underlying_type for
| |broken enum
Ever confirmed|0 |1
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/58873] [4.7/4.8/4.9 Regression] [c++11] ICE with __underlying_type for broken enum
2013-10-25 9:38 [Bug c++/58873] New: [c++11] ICE with __underlying_type for broken enum reichelt at gcc dot gnu.org
2013-10-25 9:46 ` [Bug c++/58873] [4.7/4.8/4.9 Regression] " mpolacek at gcc dot gnu.org
@ 2014-02-20 16:03 ` ktietz at gcc dot gnu.org
2014-02-20 16:04 ` ktietz at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: ktietz at gcc dot gnu.org @ 2014-02-20 16:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58873
--- Comment #3 from Kai Tietz <ktietz at gcc dot gnu.org> ---
Author: ktietz
Date: Thu Feb 20 16:02:24 2014
New Revision: 207961
URL: http://gcc.gnu.org/viewcvs?rev=207961&root=gcc&view=rev
Log:
PR c++/58873
* parser.c (cp_parser_functional_cast): Treat NULL_TREE
valued type argument as error_mark_node.
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/58873] [4.7/4.8/4.9 Regression] [c++11] ICE with __underlying_type for broken enum
2013-10-25 9:38 [Bug c++/58873] New: [c++11] ICE with __underlying_type for broken enum reichelt at gcc dot gnu.org
2013-10-25 9:46 ` [Bug c++/58873] [4.7/4.8/4.9 Regression] " mpolacek at gcc dot gnu.org
2014-02-20 16:03 ` ktietz at gcc dot gnu.org
@ 2014-02-20 16:04 ` ktietz at gcc dot gnu.org
2014-02-20 16:05 ` ktietz at gcc dot gnu.org
2014-02-20 16:06 ` ktietz at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: ktietz at gcc dot gnu.org @ 2014-02-20 16:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58873
--- Comment #4 from Kai Tietz <ktietz at gcc dot gnu.org> ---
Author: ktietz
Date: Thu Feb 20 16:03:38 2014
New Revision: 207962
URL: http://gcc.gnu.org/viewcvs?rev=207962&root=gcc&view=rev
Log:
PR c++/58873
* parser.c (cp_parser_functional_cast): Treat NULL_TREE
valued type argument as error_mark_node.
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++/58873] [4.7/4.8/4.9 Regression] [c++11] ICE with __underlying_type for broken enum
2013-10-25 9:38 [Bug c++/58873] New: [c++11] ICE with __underlying_type for broken enum reichelt at gcc dot gnu.org
` (2 preceding siblings ...)
2014-02-20 16:04 ` ktietz at gcc dot gnu.org
@ 2014-02-20 16:05 ` ktietz at gcc dot gnu.org
2014-02-20 16:06 ` ktietz at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: ktietz at gcc dot gnu.org @ 2014-02-20 16:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58873
--- Comment #5 from Kai Tietz <ktietz at gcc dot gnu.org> ---
Author: ktietz
Date: Thu Feb 20 16:04:37 2014
New Revision: 207963
URL: http://gcc.gnu.org/viewcvs?rev=207963&root=gcc&view=rev
Log:
PR c++/58873
* parser.c (cp_parser_functional_cast): Treat NULL_TREE
valued type argument as error_mark_node.
Modified:
branches/gcc-4_7-branch/gcc/cp/ChangeLog
branches/gcc-4_7-branch/gcc/cp/parser.c
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/58873] [4.7/4.8/4.9 Regression] [c++11] ICE with __underlying_type for broken enum
2013-10-25 9:38 [Bug c++/58873] New: [c++11] ICE with __underlying_type for broken enum reichelt at gcc dot gnu.org
` (3 preceding siblings ...)
2014-02-20 16:05 ` ktietz at gcc dot gnu.org
@ 2014-02-20 16:06 ` ktietz at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: ktietz at gcc dot gnu.org @ 2014-02-20 16:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58873
Kai Tietz <ktietz at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Kai Tietz <ktietz at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-02-20 16:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-25 9:38 [Bug c++/58873] New: [c++11] ICE with __underlying_type for broken enum reichelt at gcc dot gnu.org
2013-10-25 9:46 ` [Bug c++/58873] [4.7/4.8/4.9 Regression] " mpolacek at gcc dot gnu.org
2014-02-20 16:03 ` ktietz at gcc dot gnu.org
2014-02-20 16:04 ` ktietz at gcc dot gnu.org
2014-02-20 16:05 ` ktietz at gcc dot gnu.org
2014-02-20 16:06 ` ktietz 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).