------- 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