https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96024
--- Comment #18 from anlauf at gcc dot gnu.org --- (In reply to Jakub Jelinek from comment #17) > The new testcase seems to fail on big-endian hosts. I've analyzed this on > 11 branch: > [...] > So, presumably we need in addition to the > && this_comp->ts.u.cl->length->expr_type == EXPR_CONSTANT > check also test that the constant uses value.integer union member rather > than some other one. Would > && this_comp->ts.u.cl->length->ts.type == BT_INTEGER > be the right test for it or something else? The analysis look correct to me. I've seen myself other similar cases that just seemed to work on little-endian. This affects all branches since r8-6898-g04946c6b905572, so if your 1-line addition regtests OK, it is good for all open branches. Thanks for looking into this!