[Bug tree-optimization/102360] ICE in can_native_interpret_type_p at gcc/fold-const.c:8800
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Sep 16 09:18:51 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102360
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Last reconfirmed| |2021-09-16
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.
Program received signal SIGSEGV, Segmentation fault.
0x00000000012f2e6b in can_native_interpret_type_p (type=<tree 0x0>)
at ../../src/trunk/gcc/fold-const.c:8800
8800 switch (TREE_CODE (type))
3049 if (!can_native_interpret_type_p (var_type))
3050 {
3051 alt_type
3052 = lang_hooks.types.type_for_mode (TYPE_MODE (var_type),
3053 TYPE_UNSIGNED
(var_type));
3054 gcc_assert (can_native_interpret_type_p (alt_type));
3055 }
alt_type doesn't need to exist. TYPE_MODE is OImode here.
Another issue will be that native_interpret_int refuses to interpret
types bigger than 128bit. So using
alt_type = build_nonstandard_integer_type
(GET_MODE_BITSIZE (TYPE_MODE (var_type)), 1);
will likely not help. But if we know we're using an integer type
we can natively interpret ourselves.
Note there's another hole with variable-size and SVE vector modes I think.
I'm testing something.
More information about the Gcc-bugs
mailing list