aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/cleanup-7.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/cleanup-7.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/cleanup-7.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/cleanup-7.c b/gcc-4.9/gcc/testsuite/gcc.dg/cleanup-7.c
new file mode 100644
index 000000000..eae3d5298
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/cleanup-7.c
@@ -0,0 +1,22 @@
+/* { dg-do run } */
+/* { dg-options "" } */
+/* Verify that the search for function happens in the proper scope. */
+
+extern void exit(int);
+extern void abort(void);
+
+int main()
+{
+ auto void xyzzy(void *p __attribute__((unused)))
+ {
+ exit (0);
+ }
+
+ auto void doit ()
+ {
+ int x __attribute__((cleanup (xyzzy)));
+ }
+
+ doit ();
+ abort ();
+}