Commit 02de68e1 by H.J. Lu Committed by H.J. Lu

Add gcc.dg/pr44838.c.

2010-07-08  H.J. Lu  <hongjiu.lu@intel.com>

	PR rtl-optimization/44838
	* gcc.dg/pr44838.c: New.

From-SVN: r161953
parent 2de710b9
2010-07-08 H.J. Lu <hongjiu.lu@intel.com>
PR rtl-optimization/44838
* gcc.dg/pr44838.c: New.
2010-07-08 Richard Guenther <rguenther@suse.de>
PR tree-optimization/44831
......
/* PR rtl-optimization/44838 */
/* { dg-do run } */
/* { dg-options "-O2 -funroll-loops" } */
extern void abort ();
void
foo (int *a, int n)
{
int *lasta = a + n;
for (; a != lasta; a++)
{
*a *= 2;
a[1] = a[-1] + a[-2];
}
}
int a[16];
int ref[16] = { 0, 1, 4, 2, 10, 12, 24, 44,
72, 136, 232, 416, 736, 1296, 2304, 2032 };
int
main ()
{
int i;
for (i = 0; i < 16; i++)
a[i] = i;
foo (a + 2, 16 - 3);
for (i = 0; i < 16; i++)
if (ref[i] != a[i])
abort ();
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment