Commit f0d355dc by Richard Biener Committed by Richard Biener

re PR target/77478 (Incorrect code generated with -O3, m32, -msse2 and -ffast-math)

2016-09-27  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/77478
	* gcc.dg/torture/pr77478.c: New testcase.

From-SVN: r240530
parent 8c9434c2
2016-09-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/77478
* gcc.dg/torture/pr77478.c: New testcase.
2016-09-27 Martin Liska <mliska@suse.cz>
PR gcov-profile/7970
......
/* { dg-do run } */
/* { dg-additional-options "-ffast-math" } */
static const float A[10] = {1};
float
foo(float *f, int n)
{
int i, j;
float a = 0, b = 0;
for (i = n/2; i < n; i++)
a += f[i]*.1f;
for (i = n/2, j = 0; i < n; i++, j++)
b += f[i]*A[j]+a*A[j];
return b;
}
int main()
{
float a[21] = {0};
return foo(a+1, 20) + foo(a, 20);
}
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