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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-O0 -mtune=i386 -fomit-frame-pointer" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
3
 
4
__attribute__((noreturn,noinline)) void abrt (const char *fi, const char *fu)
5
{
6
  __builtin_abort ();
7
}
8
 
9
__attribute__((noinline)) int f (int k)
10
{
11
  return k;
12
}
13
 
14
__attribute__((noinline)) int g (int t, int k)
15
{
16
  int b;
17
 
18
  switch (t)
19
    {
20
    case 0:
21
      abrt (__FILE__, __FUNCTION__);
22
 
23
    case 1:
24
      b = f (k);
25
      break;
26
 
27
    case 2:
28
      b = f (k);
29
      break;
30
 
31
    case 3:
32
      b = f (k);
33
      break;
34
 
35
    case 4:
36
      b = f (k);
37
      break;
38
 
39
    default:
40
      abrt (__FILE__, __FUNCTION__);
41
    }
42
 
43
  return b;
44
}
45
 
46
int main (void)
47
{
48
  if (g (3, 1337) != 1337)
49
      abrt (__FILE__, __FUNCTION__);
50
  return 0;
51
}

powered by: WebSVN 2.1.0

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