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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [builtin-apply3.c] - Blame information for rev 399

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* PR middle-end/12210 */
2
/* Origin: Ossadchy Yury A. <waspcoder@mail.ru> */
3
 
4
/* This used to fail on i686 because the argument was not copied
5
   to the right location by __builtin_apply after the direct call.  */
6
 
7
/* { dg-do run } */
8
 
9
 
10
#define INTEGER_ARG  5
11
 
12
extern void abort(void);
13
 
14
void foo(int arg)
15
{
16
  if (arg != INTEGER_ARG)
17
    abort();
18
}
19
 
20
void bar(int arg)
21
{
22
  foo(arg);
23
  __builtin_apply(foo, __builtin_apply_args(), 16);
24
}
25
 
26
int main(void)
27
{
28 399 jeremybenn
  char dummy[16]; /* Make sure we have 16 bytes of stack to copy.  */
29
 
30 298 jeremybenn
  bar(INTEGER_ARG);
31
 
32
  return 0;
33
}

powered by: WebSVN 2.1.0

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