summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/stackalign/nested-6.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/stackalign/nested-6.c')
-rw-r--r--gcc/testsuite/gcc.dg/torture/stackalign/nested-6.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/nested-6.c b/gcc/testsuite/gcc.dg/torture/stackalign/nested-6.c
new file mode 100644
index 000000000..d853825fe
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/stackalign/nested-6.c
@@ -0,0 +1,28 @@
+/* { dg-do run } */
+
+#ifndef NO_TRAMPOLINES
+
+typedef __SIZE_TYPE__ size_t;
+extern void abort (void);
+extern void exit (int);
+extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
+
+int main ()
+{
+ __label__ nonlocal;
+ int compare (const void *a, const void *b)
+ {
+ goto nonlocal;
+ }
+
+ char array[3];
+ qsort (array, 3, 1, compare);
+ abort ();
+
+ nonlocal:
+ exit (0);
+}
+
+#else
+int main() { return 0; }
+#endif