------- Comment #1 from rguenth at gcc dot gnu dot org 2009-11-01 20:59 -------
Without __restrict__ we don't optimize the call to link_error either. Because
the stores may alias - they are only redundant because of the identical
RHS. See PR23094 for that missed optimization.
But restrict indeed doesn't help here. Testcase that can be optimized
only because of restrict:
int * __restrict__ a[1];
int * __restrict__ b[1];
extern void link_error (void);
int main()
{
a[0][0] = 0;
b[0][0] = 1;
if (a[0][0] != 0)
link_error ();
return 0;
}
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-11-01 20:59:25
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41898