This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Aliasing brokenness (Was: Re: [patch RFC] SH: Use FRAME_GROWS_DOWNWARD)


Ian Lance Taylor wrote:
Mark Mitchell <mark@codesourcery.com> writes:


Mark Mitchell wrote:


That's the rule we've tried to use in GCC, as well; that if "p" and
"q" pointer to distinct types (not part of the same alias set) then
modifying "*p" cannot change the value of "*q", unless both accesses
are directly through a union.  I don't know that the front ends and
optimizers are careful about preserving the user's access through
unions, but they could in theory be appropriately careful.

That is, I think 6.5.2.3 is an explicit statement of a restricted form of the rule you describe in the first paragraph. It does not go beyond what you described already.

How do you read the "visibility" language? The idea that the visibility of the union is all that is required seemed to imply a stronger statement to me.


--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]