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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [ipa/] [ipa-pta-10.c] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-O2 -fipa-pta -fdump-ipa-pta-details" } */
3
 
4
#include <stdarg.h>
5
 
6
static void __attribute__((noinline,noclone))
7
foo (int i, ...)
8
{
9
  va_list ap;
10
  int *p;
11
  va_start (ap, i);
12
  p = va_arg (ap, int *);
13
  *p = 1;
14
  va_end (ap);
15
}
16
extern void abort (void);
17
int main()
18
{
19
  int i = 0;
20
  foo (0, &i);
21
  if (i != 1)
22
    abort ();
23
  return 0;
24
}
25
 
26
/* Verify we properly handle variadic arguments and do not let escape
27
   stuff through it.  */
28
 
29
/* { dg-final { scan-ipa-dump "ESCAPED = { (ESCAPED )?(NONLOCAL )?}" "pta" } } */
30
/* { dg-final { cleanup-ipa-dump "pta" } } */

powered by: WebSVN 2.1.0

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