]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add 'gcc.target/nvptx/alias-weak-1.c'
authorThomas Schwinge <tschwinge@baylibre.com>
Wed, 4 Sep 2024 07:58:32 +0000 (09:58 +0200)
committerThomas Schwinge <tschwinge@baylibre.com>
Wed, 4 Sep 2024 09:40:39 +0000 (11:40 +0200)
... testing for the GCC/nvptx "weak alias definitions not supported" error
diagnostic (limitation of PTX).

gcc/testsuite/
* gcc.target/nvptx/alias-weak-1.c: New.

gcc/testsuite/gcc.target/nvptx/alias-weak-1.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.target/nvptx/alias-weak-1.c b/gcc/testsuite/gcc.target/nvptx/alias-weak-1.c
new file mode 100644 (file)
index 0000000..37d9543
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-add-options ptx_alias } */
+
+void __f ()
+{
+}
+
+void f () __attribute__ ((weak, alias ("__f")));
+/* { dg-error {weak alias definitions not supported} {} { target *-*-* } .-1 }
+   (limitation of PTX).  */