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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [i386/] [pr46226.c] - Blame information for rev 691

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-Os -fomit-frame-pointer -mno-accumulate-outgoing-args -fno-asynchronous-unwind-tables" } */
3
/* { dg-options "-Os -fomit-frame-pointer -fno-asynchronous-unwind-tables" { target *-*-mingw* *-*-cygwin* } } */
4
 
5
extern void abort(void);
6
 
7
static void *p[2];
8
 
9
void __attribute__((noinline))
10
g(int x, ...)
11
{
12
  asm volatile ("" : : "g"(x));
13
}
14
 
15
void __attribute__((noinline))
16
f(int x)
17
{
18
  p[0] = __builtin_return_address (0);
19
  if (x == 0)
20
    g(0);
21
  g(1, 2, 3, 4, 5, 6, 7);
22
 
23
  asm goto ("jmp %l0" : : : : label);
24
  abort ();
25
 
26
 label:
27
  p[1] = __builtin_return_address (0);
28
}
29
 
30
int main()
31
{
32
  f(1);
33
  if (p[0] != p[1])
34
    abort ();
35
  return 0;
36
}

powered by: WebSVN 2.1.0

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