This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/28778] [4.0/4.1/4.2 Regression] alias bug with cast and call clobbered
- From: "mmitchel at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Aug 2006 20:28:48 -0000
- Subject: [Bug tree-optimization/28778] [4.0/4.1/4.2 Regression] alias bug with cast and call clobbered
- References: <bug-28778-1447@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #26 from mmitchel at gcc dot gnu dot org 2006-08-27 20:28 -------
I don't understand how TBAA is interacting with the may-alias information.
In particular, TBAA doesn't say anything about casts; it says something about
loads and stores. In particular, TBAA forbids accessing storage of type A
through a pointer to type B, given certain constraints on A and B. It does not
forbid casting an A* to a B*.
Why are the optimizers pruning may-alias sets on casts? Why isn't the fix just
to stop them from doing that?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28778