[Bug c/65892] gcc fails to implement N685 aliasing of union members

rguenther at suse dot de gcc-bugzilla@gcc.gnu.org
Sun Apr 29 16:42:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65892

--- Comment #41 from rguenther at suse dot de <rguenther at suse dot de> ---
On April 29, 2018 1:51:58 PM GMT+02:00, "aph at gcc dot gnu.org"
<gcc-bugzilla@gcc.gnu.org> wrote:
>https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65892
>
>--- Comment #40 from Andrew Haley <aph at gcc dot gnu.org> ---
>(In reply to rguenther@suse.de from comment #29)
>
>> Note I repeatedly said this part of the standard is just stupid.  It
>makes
>> most if not all type-based alias analysis useless.
>
>I don't think so.  It does mean that we'd have to feed all declared
>union types (or, at least the ones containing structs with common
>initial sequences) into the alias oracle.  While unpleasant, in that
>simply declaring a type without even declaring an object of that type
>changes code generation, it doesn't render all type-based alias
>analysis useless.

How do you handle this within the LTO framework?

>> Which means I'll refuse any patches implementing it in a way that
>affects
>> default behavior.
>
>Maybe --pedantic or even --pedantic-aliasing?

Whatever you call it I doubt any working solution will fit nicely into our
existing TBAA framework. 

When I read the language text then a union declaration in between two accesses
will change the semantic of the second?


More information about the Gcc-bugs mailing list