This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/29145] unsafe use of restrict qualifier
- From: "dorit at il dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Feb 2007 08:18:39 -0000
- Subject: [Bug tree-optimization/29145] unsafe use of restrict qualifier
- References: <bug-29145-12972@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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