This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC not (optimally) exploiting restrict pointers?


On Dec 15, 2004, at 4:34 AM, Richard Guenther wrote:
Now, if I read 6.7.3 (7) correct, the second output is correct for the
first case, too. And in fact, the Intel compiler produces the
optimized output in _both_ cases.
Agreed.

Is GCC right in not doing the optimization in the first case,
No.

or has it just missed the optimization opportunity?
Just missed it.

I found http://www.lysator.liu.se/c/restrict.html an informative read...

I think:

 [#3] In what follows, a pointer expression E is said to be
 based on object P if (at some sequence point in the
 execution of B prior to the evaluation of E) modifying P to
 point to a copy of the array object into which it formerly
 pointed would change the value of E.106) Note that |
 ``based'' is defined only for expressions with pointer
 types.


is pretty clear as is 3.6 from the above link.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]