Commit a0c58ea9 by Alan Modra Committed by Alan Modra

New test.

From-SVN: r55599
parent 8b583747
2002-07-20 Alan Modra <amodra@bigpond.net.au>
* gcc.c-torture/execute/loop-13.c: New test.
2002-07-19 Neil Booth <neil@daikokuya.co.uk>
* gcc.dg/cpp/expr.c: New tests.
......
/* PR opt/7130 */
#define TYPE long
void
scale (TYPE *alpha, TYPE *x, int n)
{
int i, ix;
if (*alpha != 1)
for (i = 0, ix = 0; i < n; i++, ix += 2)
{
TYPE tmpr, tmpi;
tmpr = *alpha * x[ix];
tmpi = *alpha * x[ix + 1];
x[ix] = tmpr;
x[ix + 1] = tmpi;
}
}
int
main (void)
{
int i;
TYPE x[10];
TYPE alpha = 2;
for (i = 0; i < 10; i++)
x[i] = i;
scale (&alpha, x, 5);
if (x[9] != 18)
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