This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/49367] missed optimization with __restrict field
- From: "vries at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 29 Sep 2015 07:56:38 +0000
- Subject: [Bug tree-optimization/49367] missed optimization with __restrict field
- Auto-submitted: auto-generated
- References: <bug-49367-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49367
vries at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vries at gcc dot gnu.org
--- Comment #4 from vries at gcc dot gnu.org ---
(In reply to Richard Biener from comment #3)
> As for the first example the only case that would work is by passing
> the argument in a way that the FE sets DECL_BY_REFERENCE and uses a
> restrict qualified pointer for it. Which it does when the source passes
> it by value I think. That's the only case where we can assume something
> about the pointed-to type.
The restricts in the first example of comment 2 are effective in current trunk,
and the call to g is optimized away.