re PR rtl-optimization/10312 (optimizer creates wrong code for loop)
PR optimization/10312 * gcc.c-torture/execute/20031214-1.c: New. From-SVN: r74625
This commit is contained in:
parent
4bb8ca281f
commit
298a037c2a
@ -1,3 +1,8 @@
|
||||
2003-12-15 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
|
||||
|
||||
PR optimization/10312
|
||||
* gcc.c-torture/execute/20031214-1.c: New.
|
||||
|
||||
2003-12-14 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/10779
|
||||
|
32
gcc/testsuite/gcc.c-torture/execute/20031214-1.c
Normal file
32
gcc/testsuite/gcc.c-torture/execute/20031214-1.c
Normal file
@ -0,0 +1,32 @@
|
||||
/* PR optimization/10312 */
|
||||
/* Originator: Peter van Hoof <p dot van-hoof at qub dot ac dot uk> */
|
||||
|
||||
/* Verify that the strength reduction pass doesn't find
|
||||
illegitimate givs. */
|
||||
|
||||
struct
|
||||
{
|
||||
double a;
|
||||
int n[2];
|
||||
} g = { 0., { 1, 2}};
|
||||
|
||||
int k = 0;
|
||||
|
||||
void
|
||||
b (int *j)
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int j;
|
||||
|
||||
for (j = 0; j < 2; j++)
|
||||
k = (k > g.n[j]) ? k : g.n[j];
|
||||
|
||||
k++;
|
||||
b (&j);
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user