https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90085
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2019-04-16 00:00:00 |2021-8-4 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The problem in the deduction case, the decl is not being marked as TREE_READONLY. As you can see if you have a function which returns &Colors::names. And look at the generated section for Colors::names: .section .rodata.Colors::names,"aG",@progbits,Colors::names,comdat vs .section .data.Colors::names,"awG",@progbits,Colors::names,comdat