https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69960
Bernd Schmidt <bernds at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bernds at gcc dot gnu.org --- Comment #6 from Bernd Schmidt <bernds at gcc dot gnu.org> --- I'm also curious why this wouldn't be considered constant. I only have an old draft C standard, but I see no language forbidding this, and it can be evaluated at compile-time. We even have a fold_read_from_constant_string, but for whatever reason it's not called when folding an ARRAY_REF.