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

            Bug ID: 68259
           Summary: [6 Regression][UBSAN] ICE tree check: expected
                    record_type or union_type or qual_union_type or
                    array_type, have reference_type in
                    reverse_storage_order_for_component_p, at tree.h:4392
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
                CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
                    jakub at gcc dot gnu.org, kcc at gcc dot gnu.org
  Target Milestone: ---

Created attachment 36670
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36670&action=edit
test.ii, compile with: g++ -S -O0 -fsanitize=undefined

Compiling attached test case with today's GCC trunk using
  g++ -S -O0 -fsanitize=undefined
fails as follows:

test.ii:77:1: internal compiler error: tree check: expected record_type or
union_type or qual_union_type or array_type, have reference_type in
reverse_storage_order_for_component_p, at tree.h:4392
 }
 ^

0xf7589c tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc/tree.c:9587
0xa10907 tree_check4(tree_node*, char const*, int, char const*, tree_code,
tree_code, tree_code, tree_code)
        ../../gcc/tree.h:3002
0xa10907 reverse_storage_order_for_component_p
        ../../gcc/tree.h:4392
0xa10907 get_inner_reference(tree_node*, long*, long*, tree_node**,
machine_mode*, int*, int*, int*, bool)
        ../../gcc/expr.c:6901
0x8e6182 get_object_alignment_2
        ../../gcc/builtins.c:261
0x8e5f63 get_pointer_alignment_1(tree_node*, unsigned int*, unsigned long*)
        ../../gcc/builtins.c:429
0x8e687b get_pointer_alignment(tree_node*)
        ../../gcc/builtins.c:498
0x8c80e1 ubsan_maybe_instrument_reference_or_call
        ../../gcc/c-family/c-ubsan.c:414
0x8c9c02 ubsan_maybe_instrument_reference(tree_node*)
        ../../gcc/c-family/c-ubsan.c:441
0x81d6ca cp_genericize_r
        ../../gcc/cp/cp-gimplify.c:1319

Reply via email to