https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79650

Volker Reichelt <reichelt at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|error-recovery              |
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-06-11
                 CC|                            |reichelt at gcc dot gnu.org
            Summary|ICE on invalid c++ code     |[5/6/7/8 Regression] ICE on
                   |with -std=c++1z in          |invalid c++ code with label
                   |convert_nontype_argument    |arithmetic in
                   |(pt.c:6515)                 |convert_nontype_argument
                   |                            |(pt.c:6515)
     Ever confirmed|0                           |1

--- Comment #2 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
Here's a reduced testcase. It ICEs with -std++0x since GCC 4.7.0:

========================================================
template<int> struct A {};

void foo()
{
L:
M:
  A<(__INTPTR_TYPE__)&&M - (__INTPTR_TYPE__)&&L> a;
};
========================================================

PR79650.cc: In function 'void foo()':
PR79650.cc:11:48: internal compiler error: in convert_nontype_argument, at
cp/pt.c:6598
   A<(__INTPTR_TYPE__)&&M - (__INTPTR_TYPE__)&&L> a;
                                                ^
0x62ba48 convert_nontype_argument
        ../../gcc/gcc/cp/pt.c:6598
0x62ba48 convert_template_argument
        ../../gcc/gcc/cp/pt.c:7753
0x960573 coerce_template_parms
        ../../gcc/gcc/cp/pt.c:8211
0x96453a lookup_template_class_1
        ../../gcc/gcc/cp/pt.c:8747
0x96453a lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
        ../../gcc/gcc/cp/pt.c:9092
0x99035d finish_template_type(tree_node*, tree_node*, int)
        ../../gcc/gcc/cp/semantics.c:3185
0x904664 cp_parser_template_id
        ../../gcc/gcc/cp/parser.c:15522
0x9047ff cp_parser_class_name
        ../../gcc/gcc/cp/parser.c:21970
0x9166d2 cp_parser_qualifying_entity
        ../../gcc/gcc/cp/parser.c:6289
0x9166d2 cp_parser_nested_name_specifier_opt
        ../../gcc/gcc/cp/parser.c:5975
0x91984f cp_parser_simple_type_specifier
        ../../gcc/gcc/cp/parser.c:16856
0x90c60d cp_parser_type_specifier
        ../../gcc/gcc/cp/parser.c:16529
0x91e5d4 cp_parser_decl_specifier_seq
        ../../gcc/gcc/cp/parser.c:13357
0x9255b1 cp_parser_simple_declaration
        ../../gcc/gcc/cp/parser.c:12682
0x926425 cp_parser_block_declaration
        ../../gcc/gcc/cp/parser.c:12629
0x926e09 cp_parser_declaration_statement
        ../../gcc/gcc/cp/parser.c:12239
0x8ff110 cp_parser_statement
        ../../gcc/gcc/cp/parser.c:10726
0x90004d cp_parser_statement_seq_opt
        ../../gcc/gcc/cp/parser.c:11058
0x90011f cp_parser_compound_statement
        ../../gcc/gcc/cp/parser.c:11012
0x919103 cp_parser_function_body
        ../../gcc/gcc/cp/parser.c:21449
Please submit a full bug report, [etc.]

Reply via email to