This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/50199] [4.7 Regression] wrong code with -flto -fno-merge-constants
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 27 Aug 2011 08:20:47 +0000
- Subject: [Bug middle-end/50199] [4.7 Regression] wrong code with -flto -fno-merge-constants
- Auto-submitted: auto-generated
- References: <bug-50199-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50199
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011-08-27
CC| |hubicka at gcc dot gnu.org,
| |jsm28 at gcc dot gnu.org,
| |rguenth at gcc dot gnu.org
Target Milestone|--- |4.7.0
Ever Confirmed|0 |1
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-27 08:20:47 UTC ---
Hmmm. Partitioning unshares string constants and I suppose ipa-cp propagates
one of it to the callee.
Not sure if this is a well-defined testcase though. If it is we'd probably
need to add CONST_DECLs for address-taken constants and register them with
the varpool (and disallow &"..." in gimple).
It should be possible to make a non-LTO testcase that fails similarly
by instructing the assembler/linker not to merge strings.
Joseph, does C require that a string literal "..." has a single underlying
object or would the testcase be undefined?