summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/compat/abi/pr38736_main.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/compat/abi/pr38736_main.C')
-rw-r--r--gcc/testsuite/g++.dg/compat/abi/pr38736_main.C18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/compat/abi/pr38736_main.C b/gcc/testsuite/g++.dg/compat/abi/pr38736_main.C
new file mode 100644
index 000000000..b9f6ac898
--- /dev/null
+++ b/gcc/testsuite/g++.dg/compat/abi/pr38736_main.C
@@ -0,0 +1,18 @@
+/* PR target/38736 */
+/* { dg-skip-if "attribute ((aligned))" { ! { i?86-*-* x86_64-*-* } } } */
+/* { dg-require-effective-target avx } */
+
+/* Test compatibility of attribute ((aligned)) with and without -mavx. */
+
+extern int aligned_x (void);
+extern int aligned_y_avx (void);
+extern "C" void abort (void);
+
+int
+main ()
+{
+ if (aligned_x () != aligned_y_avx ())
+ abort ();
+
+ return 0;
+}