[Bug tree-optimization/89479] __restrict on a pointer ignored when disambiguating against a call

marc@nieper-wisskirchen.de gcc-bugzilla@gcc.gnu.org
Wed Feb 16 21:56:35 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89479

--- Comment #11 from Marc Nieper-Wißkirchen <marc@nieper-wisskirchen.de> ---
(In reply to Richard Biener from comment #1 of bug 94416)
> I think there's a duplicate somewhere.  We currently cannot encode "restrict"
> into the "accesses" implied by a call.
> 
> Note there's slight complication when g (b) eventually recurses into 'f'
> passing this 'b' as 'a'.  Recursion makes the interpretation of the
> lexically defined restrict concept a bit weird.
> 
> So I think this bug can be closed as duplicate of the "restrict and calls"
> bug.
> 
> *** This bug has been marked as a duplicate of bug 89479 ***

What do you mean by that the restrict concept is lexically defined? If I read
the standard correctly, restrict makes an assumption about the dynamic extent
of an executed block. This seems obvious from section 6.7.3.1 (of ISO C18)
which speaks of the block of main in paragraph 2 and the lifetime of objects in
paragraph 5.


More information about the Gcc-bugs mailing list