This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/30088] [4.1 Regression] Unexpected compilation results: -O1 vs. -O1 -fstrict-aliasing
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Feb 2007 12:30:38 -0000
- Subject: [Bug tree-optimization/30088] [4.1 Regression] Unexpected compilation results: -O1 vs. -O1 -fstrict-aliasing
- References: <bug-30088-13701@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from rguenth at gcc dot gnu dot org 2007-02-05 12:30 -------
We have (alias1):
Type memory tags
TMT.89, UID 17988, struct
basic_string<char,std::char_traits<char>,std::allocator<char> >, is an alias
tag, is addressable, is global, call clobbered
...
TMT.95, UID 17994, float, is addressable, may aliases: { SFT.74 SFT.75 }
a, UID 16758, struct A, is addressable, sub-vars: { SFT.75 SFT.74 }
Variable: SFT.74, UID 17973, float, is addressable, call clobbered, default
def: SFT.74_11, may aliases: { TMT.89 }
Variable: SFT.75, UID 17974, float, is addressable, call clobbered, default
def: SFT.75_9, may aliases: { TMT.89 }
I believe this is all caused because we cannot prove that the string data
cannot point to a.
Note that the testcase passes if you change the signature from A::f() to
get 'i' as value and not reference.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30088