This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/14319] incorrect optimization of union of structs with common initial sequences
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Feb 2004 15:19:36 -0000
- Subject: [Bug c/14319] incorrect optimization of union of structs with common initial sequences
- References: <20040227052920.14319.jsturm@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-02-27 15:19 -------
I can't believe the wording means what you imply. Assume that caller
and callee are in different translation units, then there is no
way for the compiler to see that the two arguments to the called function
may in fact be members of the same union.
So the only way to assume that they could alias each other is to
search the universe for a union type in which both of them are members.
That certainly can't be the intent of the standard or DR. It only makes
sense, if as RTH says the access is through such a union.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14319