public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58987] New: [c++11] ICE with template alias
@ 2013-11-04 20:06 reichelt at gcc dot gnu.org
  0 siblings, 0 replies; only message in thread
From: reichelt at gcc dot gnu.org @ 2013-11-04 20:06 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58987
           Summary: [c++11] ICE with template alias
           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 valid code snippet (compiled with "-std=c++11") triggers an ICE
since GCC 4.7.3:

=================================================
template<typename T> using A = T*;

template<typename T, int = A<T>::X> struct B;
=================================================

bug.cc:3:28: internal compiler error: in cp_parser_type_name, at
cp/parser.c:14658
 template<typename T, int = A<T>::X> struct B;
                            ^
0x65fc8c cp_parser_type_name
        ../../gcc/gcc/cp/parser.c:14658
0x65027f cp_parser_qualifying_entity
        ../../gcc/gcc/cp/parser.c:5532
0x65027f cp_parser_nested_name_specifier_opt
        ../../gcc/gcc/cp/parser.c:5241
0x668459 cp_parser_simple_type_specifier
        ../../gcc/gcc/cp/parser.c:14517
0x64eddf cp_parser_postfix_expression
        ../../gcc/gcc/cp/parser.c:5805
0x65156d cp_parser_unary_expression
        ../../gcc/gcc/cp/parser.c:7097
0x6520df cp_parser_binary_expression
        ../../gcc/gcc/cp/parser.c:7801
0x6525af cp_parser_assignment_expression
        ../../gcc/gcc/cp/parser.c:8039
0x652a14 cp_parser_assignment_expression
        ../../gcc/gcc/cp/parser.c:8089
0x652a14 cp_parser_constant_expression
        ../../gcc/gcc/cp/parser.c:8299
0x6545cb cp_parser_default_argument
        ../../gcc/gcc/cp/parser.c:18442
0x660cf0 cp_parser_parameter_declaration
        ../../gcc/gcc/cp/parser.c:18368
0x66121b cp_parser_template_parameter
        ../../gcc/gcc/cp/parser.c:12886
0x66121b cp_parser_template_parameter_list
        ../../gcc/gcc/cp/parser.c:12789
0x6648a1 cp_parser_template_declaration_after_export
        ../../gcc/gcc/cp/parser.c:22605
0x6709b9 cp_parser_declaration
        ../../gcc/gcc/cp/parser.c:10849
0x66f548 cp_parser_declaration_seq_opt
        ../../gcc/gcc/cp/parser.c:10771
0x670e86 cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.c:4007
0x670e86 c_parse_file()
        ../../gcc/gcc/cp/parser.c:31057
0x7914e3 c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.c:1046
Please submit a full bug report, [etc.]

In GCC 4.7.0 - 4.7.2 the code was wrongly rejected.
(Template aliases were introduced in GCC 4.7.0).


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-11-04 20:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-04 20:06 [Bug c++/58987] New: [c++11] ICE with template alias reichelt 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).