------- Comment #4 from jakub at gcc dot gnu dot org  2008-04-25 11:37 -------
The patch didn't come with any testcases, so it is hard to find out what
exactly is supposed to mean DECL_BASED_ON_RESTRICT_P on a decl.  Is that
supposed to
be on the same level of indirection as some TYPE_RESTRICT pointer
(i.e. say for int *** restrict p; formal decl initialized to p + 32 has
DECL_GET_RESTRICT_BASE p), or is it supposed to be one indirection different,
(e.g. formal decl initialized to *p + 32 has DECL_GET_RESTRICT_BASE p)?
>From the use in find_decl_base I'd think that it should be the same level,
as it will share the alias set with the pointer.  ATM gimplify.c sets this
as "somehow related to a restricted pointer".  Wonder if just making sure
that types_compatible_p between the DECL_GET_RESTRICT_BASE and the original
decl
in find_decl_base and only returning the restrict base if they have compatible
types would be sufficient, though that still sounds dangerous. 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36013

Reply via email to