From 2267d254eb6ad782cef7b462f2bb2128bc8ace30 Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <tschwinge@baylibre.com>
Date: Wed, 4 Sep 2024 09:58:32 +0200
Subject: [PATCH] Add 'gcc.target/nvptx/alias-weak-1.c'
... 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 | 10 ++++++++++
1 file changed, 10 insertions(+)
create mode 100644 gcc/testsuite/gcc.target/nvptx/alias-weak-1.c
new file mode 100644
@@ -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). */
--
2.34.1