[Bug middle-end/83805] [8 Regression] Wrong constant merging for objects in different address spaces
gjl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jan 11 16:28:00 GMT 2018
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.
More information about the Gcc-bugs
mailing list