re PR c++/82414 (Issue with ODR/LTO in G++)
authorJakub Jelinek <jakub@redhat.com>
Wed, 11 Oct 2017 20:50:27 +0000 (22:50 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 11 Oct 2017 20:50:27 +0000 (22:50 +0200)
PR c++/82414
* g++.dg/lto/pr82414_0.C: New test.

From-SVN: r253660

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/lto/pr82414_0.C [new file with mode: 0644]

index 4d08108323d31e47b848eb84d7ce679a7661b215..f1364730db8fa2d3704b1ca51802a92920d49e58 100644 (file)
@@ -1,5 +1,8 @@
 2017-10-11  Jakub Jelinek  <jakub@redhat.com>
 
+       PR c++/82414
+       * g++.dg/lto/pr82414_0.C: New test.
+
        PR c++/78523
        * g++.dg/cpp1y/pr78523.C: New test.
 
diff --git a/gcc/testsuite/g++.dg/lto/pr82414_0.C b/gcc/testsuite/g++.dg/lto/pr82414_0.C
new file mode 100644 (file)
index 0000000..2975371
--- /dev/null
@@ -0,0 +1,13 @@
+// PR c++/82414
+// { dg-lto-do link }
+// { dg-lto-options { { -flto -g } } }
+
+typedef __attribute__ ((__aligned__ (16))) struct S { __extension__ unsigned long long Part[2]; } T; // bogus warning "violates one definition rule"
+
+int
+main ()
+{
+  T tf;
+  asm volatile ("" : : "g" (__alignof__(tf)), "g" (__alignof__ (struct S)), "g" (__alignof__ (T)));
+  return 0;
+}