re PR tree-optimization/48571 (Missed data-dependence for (bogus?) reconstructed array-refs)

PR middle-end/48571
	* gcc.c-torture/execute/pr48571-1.c (bar): Use offsets sizeof(int)
	instead of 4.

From-SVN: r178655
This commit is contained in:
Georg-Johann Lay 2011-09-07 17:31:01 +00:00 committed by Georg-Johann Lay
parent 3023956508
commit d14e12290a
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2011-09-07 Georg-Johann Lay <avr@gjlay.de>
PR middle-end/48571
* gcc.c-torture/execute/pr48571-1.c (bar): Use offsets sizeof(int)
instead of 4.
2011-09-07 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50309

View File

@ -1,3 +1,5 @@
#define S (sizeof (int))
unsigned int c[624];
void __attribute__((noinline))
bar (void)
@ -5,9 +7,9 @@ bar (void)
unsigned int i;
/* Obfuscated c[i] = c[i-1] * 2. */
for (i = 1; i < 624; ++i)
*(unsigned int *)((void *)c + (__SIZE_TYPE__)i * 4)
*(unsigned int *)((void *)c + (__SIZE_TYPE__)i * S)
= 2 * *(unsigned int *)((void *)c + ((__SIZE_TYPE__)i +
((__SIZE_TYPE__)-4)/4) * 4);
((__SIZE_TYPE__)-S)/S) * S);
}
extern void abort (void);
int