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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pr48774.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* PR target/48774 */
2
/* { dg-do run } */
3
/* { dg-skip-if "PR 52125" { mips_rel } { "*" } { "" } } */
4
/* { dg-options "-O2 -funroll-loops" } */
5
 
6
extern void abort (void);
7
unsigned long int s[24]
8
  = { 12, ~1, 12, ~2, 12, ~4, 12, ~8, 12, ~16, 12, ~32,
9
      12, ~64, 12, ~128, 12, ~256, 12, ~512, 12, ~1024, 12, ~2048 };
10
struct { int n; unsigned long *e[12]; } g
11
  = { 12, { &s[0], &s[2], &s[4], &s[6], &s[8], &s[10], &s[12], &s[14],
12
            &s[16], &s[18], &s[20], &s[22] } };
13
int c[12];
14
 
15
__attribute__((noinline, noclone)) void
16
foo (void)
17
{
18
  int i, j;
19
  for (i = 0; i < g.n; i++)
20
    for (j = 0; j < g.n; j++)
21
      {
22
        if (i == j && j < g.e[0][0] && (g.e[i][1] & (1UL << j)))
23
          abort ();
24
        if (j < g.e[0][0] && (g.e[i][1] & (1UL << j)))
25
          c[i]++;
26
      }
27
}
28
 
29
int
30
main ()
31
{
32
  int i;
33
  asm volatile ("" : "+m" (s), "+m" (g), "+m" (c));
34
  foo ();
35
  for (i = 0; i < 12; i++)
36
    if (c[i] != 11)
37
      abort ();
38
  return 0;
39
}

powered by: WebSVN 2.1.0

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