OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [loop-37.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do link } */
2
/* { dg-options "-O2 -fdump-tree-optimized" } */
3
 
4
extern void link_error (void);
5
static const int my_array [3] = { 4, 5, 6 };
6
 
7
void f0 (void)
8
{
9
  int j, sum = 0;
10
  for (j = 0; j < 3; j ++)
11
    sum += my_array [j];
12
  if (15 != sum)
13
    link_error ();
14
}
15
 
16
int f1 (int a [])
17
{
18
  int j, sum = 0;
19
  for (j = 0; j < 3; j ++)
20
    sum += a [j] + my_array [j];
21
  return sum;
22
}
23
 
24
int main() { }
25
 
26
/* { dg-final { scan-tree-dump-not "my_array" "optimized" } } */
27
/* { dg-final { cleanup-tree-dump "optimized" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.