------- Comment #2 from apl at alum dot mit dot edu 2006-08-07 18:34 ------- Amending the "description"
attribute ((may_alias)) in a union causes ICE. I'm using the 7/15/2006 snapshot of 4.2 I realize that unions are implicitly 'aliased', but in fact this problem was encountered while I was trying to debug a more complex situation. I have a template class that tries to deposit smaller addressable units into a larger POD type. The alias analysis code in gcc3.4 thru 4.2 optimizes this code in ways that produce "wrong results". I've tried a number of workarounds, including use of volatile asm instructions to deal with that without any success - and since I'm in the realm of undefined behavior, I don't expect anything from GCC developers. But, regardless of the optimization issues, an ICE on what should be legal code is something that needs fixing... -- apl at alum dot mit dot edu changed: What |Removed |Added ---------------------------------------------------------------------------- Known to fail| |3.4.3 4.2.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28642