aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr70484.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr70484.c')
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr70484.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr70484.c b/gcc/testsuite/gcc.dg/torture/pr70484.c
new file mode 100644
index 00000000000..7604c654fbe
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr70484.c
@@ -0,0 +1,19 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+int __attribute__((noinline,noclone))
+f(int *pi, long *pl)
+{
+ *pi = 1;
+ *pl = 0;
+ return *(char *)pi;
+}
+
+int main()
+{
+ union { long l; int i; } a;
+ if (f (&a.i, &a.l) != 0)
+ abort ();
+ return 0;
+}