------- Comment #5 from dberlin at gcc dot gnu dot org 2006-11-04 04:15 ------- This was something that slipped in, IIRC. I was of Ian's viewpoint, that may_alias_p should handle it, and it shouldn't be special to data-references. But it can't, at least in it's current state, because it somehow gets stripped.
I forget the exact details, but diego has explained this to me before :). Diego, what was the deal with restrict and stripping qualifications that caused us to not see restrict when it comes time for may_alias_p? Anyway, what exactly does "based on" mean? is the following legal? int *whee(int *__restrict a) { return a - 2; } void with_restrict(int * __restrict p) { int i; int *q = whee(p); for (i = 0; i < 1000; ++i) { p[i] = q[i]; } If so, we'll never be able to get restrict right on a intraprocedural basis, and it makes restrict completely useless for almost all cases that restricted pointers escape :) -- dberlin at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dnovillo at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29145