[Bug tree-optimization/29145] unsafe use of restrict qualifier

dorit at il dot ibm dot com gcc-bugzilla@gcc.gnu.org
Tue Feb 6 08:18:00 GMT 2007



------- Comment #11 from dorit at il dot ibm dot com  2007-02-06 08:18 -------
(In reply to comment #10)
> One thing I can think of that this description misses is that the two 
> pointers must be based-on *different* restrict-qualified pointers, unless 
> that case is already handled elsewhere.

yes, at the beginning of this function we check if the two pointers are the
same, and if so - we don't reach this part of the code. Since our
implementation of "based on" is the pointer itself (i.e. "is ptr_a based on
some restricted pointer ptr_b" is implemented as "is ptr_a a restricted
pointer", we are safe. You're right though that when the implementation of
"based on" is extended, we'd need to compare the two restricted pointers (we
now compare the two ptr_a's, we'd need to compare the two ptr_b's). 


-- 


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



More information about the Gcc-bugs mailing list