[Bug libstdc++/41763] valarray_array.h seems to overuse __restrict__

2009-10-20 Thread paolo dot carlini at oracle dot com
--- Comment #10 from paolo dot carlini at oracle dot com 2009-10-20 22:15 --- I meant info about __restrict__ of course. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41763

[Bug libstdc++/41763] valarray_array.h seems to overuse __restrict__

2009-10-20 Thread paolo dot carlini at oracle dot com
--- Comment #9 from paolo dot carlini at oracle dot com 2009-10-20 22:14 --- Fixed, anyway. -- paolo dot carlini at oracle dot com changed: What|Removed |Added

[Bug libstdc++/41763] valarray_array.h seems to overuse __restrict__

2009-10-20 Thread paolo dot carlini at oracle dot com
--- Comment #8 from paolo dot carlini at oracle dot com 2009-10-20 22:14 --- Ok, thanks Jakub. By the way, I was looking for some info about export, beyond C99 and the GCC specifics, and found docs about the IBM compiler saying that in case of pointers to const, it is still safe to use

[Bug libstdc++/41763] valarray_array.h seems to overuse __restrict__

2009-10-20 Thread paolo at gcc dot gnu dot org
--- Comment #7 from paolo at gcc dot gnu dot org 2009-10-20 21:21 --- Subject: Bug 41763 Author: paolo Date: Tue Oct 20 21:21:11 2009 New Revision: 153039 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153039 Log: 2009-10-20 Paolo Carlini PR libstdc++/41763 *

[Bug libstdc++/41763] valarray_array.h seems to overuse __restrict__

2009-10-20 Thread jakub at gcc dot gnu dot org
--- Comment #6 from jakub at gcc dot gnu dot org 2009-10-20 21:15 --- Not compared with other arguments to be precise. It is fine to have void foo (int *__restrict__ p, int *__restrict__ q) { int *r = p + 10; while (p != r) *p++ = *q++; } Although p is compared here, it is compa

[Bug libstdc++/41763] valarray_array.h seems to overuse __restrict__

2009-10-20 Thread paolo dot carlini at oracle dot com
--- Comment #5 from paolo dot carlini at oracle dot com 2009-10-20 18:12 --- Ok, thanks, now I have a better picture. As a matter of fact, in *most* of the cases we should be *only* comparing pointers to the same object, I think this is the only case guaranteed to behave sanely under th

[Bug libstdc++/41763] valarray_array.h seems to overuse __restrict__

2009-10-20 Thread jakub at gcc dot gnu dot org
--- Comment #4 from jakub at gcc dot gnu dot org 2009-10-20 17:48 --- Well, make sure we don't use it when two different pointers point into the same object. As in this example, both __b and __e are begin and end pointers within the same object or one byte after the end of it. And __re

[Bug libstdc++/41763] valarray_array.h seems to overuse __restrict__

2009-10-20 Thread paolo dot carlini at oracle dot com
--- Comment #3 from paolo dot carlini at oracle dot com 2009-10-20 17:28 --- Thanks Gaby. Thus, if I understand the issue correctly, we have to be less aggressive about __restrict__ and make sure we don't use it when we compare pointers to different objects. I can work on the change.

[Bug libstdc++/41763] valarray_array.h seems to overuse __restrict__

2009-10-20 Thread gdr at cs dot tamu dot edu
--- Comment #2 from gdr at cs dot tamu dot edu 2009-10-20 16:42 --- Subject: Re: valarray_array.h seems to overuse __restrict__ "paolo dot carlini at oracle dot com" writes: | I think this line, in general all the uses of __restrict__ in valarray are | *very* old... Let's CC Gaby, in

[Bug libstdc++/41763] valarray_array.h seems to overuse __restrict__

2009-10-20 Thread paolo dot carlini at oracle dot com
--- Comment #1 from paolo dot carlini at oracle dot com 2009-10-20 16:32 --- I think this line, in general all the uses of __restrict__ in valarray are *very* old... Let's CC Gaby, in case he has some comments. -- paolo dot carlini at oracle dot com changed: What|Rem