[Bug c/83801] [8 Regression][avr] String constant in __flash not put into .progmem

gjl at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jan 12 14:35:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83801

--- Comment #9 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #8)
> Created attachment 43115 [details]
> gcc8-pr83801.patch
> 
> Untested patch, that if !is_init kind of restores the 7.x behavior of not
> using DECL_INITIAL if it is BLKmode or has ARRAY_TYPE, on the other hand if
> is_init it tries even harder now to optimize more cases.  But these are
> non-lval, so not even inside of ADDR_EXPR and in initializers e.g. array
> indices should be constant too and so it really should fold into something
> usable in the initializer.

Great, thanks.  Appears to work for me.  At least I couln't find code that
breaks.  And it also fixes ICE PR83729.


More information about the Gcc-bugs mailing list