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

--- Comment #8 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #7)
> Well, you have 3 objects, str1, str2 and the string literal, if the compiler
> thinks all 3 are needed, it emits all of them.  Without
> -fmerge-all-constants str1 can't be merged with str2 nor with any other
> object.

Whatever you call it -- .LC0 is shared between fun1 and fun2 and the result is
wrong code.  This even happens with -fno-merge-constants
-fno-merge-all-constants.

Reply via email to