https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119067
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P2 --- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> --- So the odr_types_equivalent_p code is obviously broken, but more interesting is why we didn't merge the two at this point identical vector types. This is because their SCC (size one) hash is different, 4263663699 vs 4287848316 and that is because of how we hash modes vs. how we stream them: if (CODE_CONTAINS_STRUCT (code, TS_TYPE_COMMON)) { hstate.add_hwi (TYPE_MODE (t)); but /* For offloading, avoid streaming out TYPE_MODE for aggregate type since it may be host-specific. For eg, aarch64 uses OImode for ARRAY_TYPE whose size is 256-bits, which is not representable on accelerator. Instead stream out VOIDmode, and while streaming-in, recompute appropriate TYPE_MODE for accelerator. */ if (lto_stream_offload_p && (AGGREGATE_TYPE_P (expr) || VECTOR_TYPE_P (expr))) bp_pack_machine_mode (bp, VOIDmode); /* for VECTOR_TYPE, TYPE_MODE reevaluates the mode using target_flags not necessary valid in a global context. Use the raw value previously set by layout_type. */ else bp_pack_machine_mode (bp, TYPE_MODE_RAW (expr)); I have a fix for the ICE, leaving the two identical type copies around.