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

            Bug ID: 79515
           Summary: ICE: tree check: expected class 'type', have
                    'exceptional' (error_mark) in
                    do_warn_double_promotion, at c-family/c-warn.c:1867
           Product: gcc
           Version: 7.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gerhard.steinmetz.fort...@t-online.de
  Target Milestone: ---

A test run with -Wdouble-promotion (on x86_64 GNU/Linux) gives
ICEs down to 4.9 (configured with --enable-checking=yes) for a few
testsuite files :
  ./gcc.dg/dfp/floatn.c
  ./gcc.dg/dfp/usual-arith-conv-bad-2.c
  ./gcc.dg/dfp/usual-arith-conv-bad.c


$ cat usual-arith-conv-bad-2.c
extern _Decimal64 x;
extern int i;
void
foo (void)
{
  if (x <= 2.0)
    i++;
}


$ gcc-7-20170212 -Wdouble-promotion -c usual-arith-conv-bad-2.c
usual-arith-conv-bad-2.c: In function 'foo':
usual-arith-conv-bad-2.c:6:3: error: can't mix operands of decimal float and
other float types
   if (x <= 2.0)
   ^~
usual-arith-conv-bad-2.c:6:3: internal compiler error: tree check: expected
class 'type', have 'exceptional' (error_mark) in do_warn_double_promotion, at
c-family/c-warn.c:1867
0xe9f207 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
        ../../gcc/tree.c:9866
0x764c29 tree_class_check(tree_node*, tree_code_class, char const*, int, char
const*)
        ../../gcc/tree.h:3187
0x764c29 do_warn_double_promotion(tree_node*, tree_node*, tree_node*, char
const*, unsigned int)
        ../../gcc/c-family/c-warn.c:1867
0x699dbb build_binary_op(unsigned int, tree_code, tree_node*, tree_node*, int)
        ../../gcc/c/c-typeck.c:11568
0x69d836 parser_build_binary_op(unsigned int, tree_code, c_expr, c_expr)
        ../../gcc/c/c-typeck.c:3633
0x6bae1a c_parser_binary_expression
        ../../gcc/c/c-parser.c:6818
0x6bb2b5 c_parser_conditional_expression
        ../../gcc/c/c-parser.c:6458
0x6bba10 c_parser_expr_no_commas
        ../../gcc/c/c-parser.c:6375
0x6bbc92 c_parser_expression
        ../../gcc/c/c-parser.c:8597
0x6be519 c_parser_expression_conv
        ../../gcc/c/c-parser.c:8630
0x6be592 c_parser_condition
        ../../gcc/c/c-parser.c:5421
0x6be627 c_parser_paren_condition
        ../../gcc/c/c-parser.c:5440
0x6d2a89 c_parser_if_statement
        ../../gcc/c/c-parser.c:5602
0x6d2a89 c_parser_statement_after_labels
        ../../gcc/c/c-parser.c:5222
0x6d3f47 c_parser_compound_statement_nostart
        ../../gcc/c/c-parser.c:4907
0x6d469e c_parser_compound_statement
        ../../gcc/c/c-parser.c:4740
0x6cfadc c_parser_declaration_or_fndef
        ../../gcc/c/c-parser.c:2112
0x6d7aeb c_parser_external_declaration
        ../../gcc/c/c-parser.c:1468
0x6d8549 c_parser_translation_unit
        ../../gcc/c/c-parser.c:1348
0x6d8549 c_parse_file()
        ../../gcc/c/c-parser.c:18190

Reply via email to