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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [ext/] [cleanup-2.C] - Blame information for rev 715

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

Line No. Rev Author Line
1 693 jeremybenn
/* { dg-do run } */
2
/* { dg-options "" } */
3
/* Verify that cleanup works in the most basic of ways.  */
4
 
5
extern "C" void exit(int);
6
extern "C" void abort(void);
7
 
8
static void handler(void *p __attribute__((unused)))
9
{
10
  exit (0);
11
}
12
 
13
static void doit(void)
14
{
15
  int x __attribute__((cleanup (handler)));
16
}
17
 
18
int main()
19
{
20
  doit ();
21
  abort ();
22
}

powered by: WebSVN 2.1.0

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