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

            Bug ID: 89520
           Summary: ICE tree check: accessed operand 4 of call_expr with 3
                    operands in convert_to_integer_1, at convert.c:668
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Affects versions down to at least gcc-4.1, at -O[gs123] :
(which means: compiles at -O0)


$ cat z1.c
double ceil ();
double floor ();
double trunc ();
long aceil () { return ceil (); }
long afloor () { return floor (); }
long atrunc () { return trunc (); }


$ gcc-9-20190224 -c z1.c -O2
z1.c: In function 'aceil':
z1.c:4:24: warning: too few arguments to built-in function 'ceil' expecting 1
[-Wbuiltin-declaration-mismatch]
    4 | long aceil () { return ceil (); }
      |                        ^~~~
z1.c:1:8: note: declared here
    1 | double ceil ();
      |        ^~~~
z1.c:4:1: internal compiler error: tree check: accessed operand 4 of call_expr
with 3 operands in convert_to_integer_1, at convert.c:668
    4 | long aceil () { return ceil (); }
      | ^~~~
0x5cfb6c tree_operand_check_failed(int, tree_node const*, char const*, int,
char const*)
        ../../gcc/tree.c:10059
0x7c49d6 tree_operand_check(tree_node*, int, char const*, int, char const*)
        ../../gcc/tree.h:3676
0x7c49d6 convert_to_integer_1
        ../../gcc/convert.c:668
0x65cc8b convert(tree_node*, tree_node*)
        ../../gcc/c/c-convert.c:125
0x69cca5 convert_and_check(unsigned int, tree_node*, tree_node*)
        ../../gcc/c-family/c-common.c:1641
0x635362 convert_for_assignment
        ../../gcc/c/c-typeck.c:6812
0x6387d0 c_finish_return(unsigned int, tree_node*, tree_node*)
        ../../gcc/c/c-typeck.c:10568
0x68345a c_parser_statement_after_labels
        ../../gcc/c/c-parser.c:5523
0x684ffe c_parser_compound_statement_nostart
        ../../gcc/c/c-parser.c:5148
0x685786 c_parser_compound_statement
        ../../gcc/c/c-parser.c:4982
0x68706b c_parser_declaration_or_fndef
        ../../gcc/c/c-parser.c:2354
0x68f633 c_parser_external_declaration
        ../../gcc/c/c-parser.c:1653
0x6900f9 c_parser_translation_unit
        ../../gcc/c/c-parser.c:1534
0x6900f9 c_parse_file()
        ../../gcc/c/c-parser.c:19854
0x6f0110 c_common_parse_file()
        ../../gcc/c-family/c-opts.c:1155

Reply via email to