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

            Bug ID: 81231
           Summary: ICE with invalid argument to __atomic_*
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

$ cat ice.c
enum E;

void
foo (void)
{
  __atomic_load_n ((enum E *) 0, 0);
  __atomic_load_n ((enum X *) 0, 0);
}

$ ./cc1 -quiet ice.c
ice.c: In function ‘foo’:
ice.c:6:26: internal compiler error: in tree_to_uhwi, at tree.c:7396
   __atomic_load_n ((enum E *) 0, 0);
                          ^
0x127bb0c tree_to_uhwi(tree_node const*)
        /home/marek/src/gcc/gcc/tree.c:7396
0x8869b6 sync_resolve_size
        /home/marek/src/gcc/gcc/c-family/c-common.c:6491
0x887fc5 resolve_overloaded_builtin(unsigned int, tree_node*, vec<tree_node*,
va_gc, vl_embed>*)
        /home/marek/src/gcc/gcc/c-family/c-common.c:7195
0x7d4575 c_build_function_call_vec(unsigned int, vec<unsigned int, va_heap,
vl_ptr>, tree_node*, vec<tree_node*, va_gc, vl_embed>*, vec<tree_node*, va_gc,
vl_embed>*)
        /home/marek/src/gcc/gcc/c/c-typeck.c:3180
0x81b187 c_parser_postfix_expression_after_primary
        /home/marek/src/gcc/gcc/c/c-parser.c:8509
0x81a8db c_parser_postfix_expression
        /home/marek/src/gcc/gcc/c/c-parser.c:8322
0x8168b4 c_parser_unary_expression
        /home/marek/src/gcc/gcc/c/c-parser.c:7135
0x815d2d c_parser_cast_expression
        /home/marek/src/gcc/gcc/c/c-parser.c:6964
0x81442d c_parser_binary_expression
        /home/marek/src/gcc/gcc/c/c-parser.c:6771
0x813ca5 c_parser_conditional_expression
        /home/marek/src/gcc/gcc/c/c-parser.c:6512
0x8139b5 c_parser_expr_no_commas
        /home/marek/src/gcc/gcc/c/c-parser.c:6429
0x81b973 c_parser_expression
        /home/marek/src/gcc/gcc/c/c-parser.c:8660
0x81bbc8 c_parser_expression_conv
        /home/marek/src/gcc/gcc/c/c-parser.c:8693
0x8114ed c_parser_statement_after_labels
        /home/marek/src/gcc/gcc/c/c-parser.c:5414
0x810509 c_parser_compound_statement_nostart
        /home/marek/src/gcc/gcc/c/c-parser.c:4926
0x80fee5 c_parser_compound_statement
        /home/marek/src/gcc/gcc/c/c-parser.c:4759
0x80a7ed c_parser_declaration_or_fndef
        /home/marek/src/gcc/gcc/c/c-parser.c:2127
0x808f89 c_parser_external_declaration
        /home/marek/src/gcc/gcc/c/c-parser.c:1471
0x808add c_parser_translation_unit
        /home/marek/src/gcc/gcc/c/c-parser.c:1351
0x83cbf8 c_parse_file()
        /home/marek/src/gcc/gcc/c/c-parser.c:18168
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Reply via email to