https://gcc.gnu.org/g:eb605b21796b83cbe1bda5c4c8f25b9f340ac5b7

commit eb605b21796b83cbe1bda5c4c8f25b9f340ac5b7
Author: Thomas Schwinge <tschwi...@baylibre.com>
Date:   Wed Sep 4 09:58:32 2024 +0200

    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.
    
    (cherry picked from commit 2267d254eb6ad782cef7b462f2bb2128bc8ace30)

Diff:
---
 gcc/testsuite/ChangeLog.omp                   |  7 +++++++
 gcc/testsuite/gcc.target/nvptx/alias-weak-1.c | 10 ++++++++++
 2 files changed, 17 insertions(+)

diff --git a/gcc/testsuite/ChangeLog.omp b/gcc/testsuite/ChangeLog.omp
index 3df8cf8b3b87..0393d74ec16f 100644
--- a/gcc/testsuite/ChangeLog.omp
+++ b/gcc/testsuite/ChangeLog.omp
@@ -1,3 +1,10 @@
+2024-12-18  Thomas Schwinge  <tschwi...@baylibre.com>
+
+       Backported from trunk:
+       2024-09-04  Thomas Schwinge  <tschwi...@baylibre.com>
+
+       * gcc.target/nvptx/alias-weak-1.c: New.
+
 2024-07-30  Tobias Burnus  <tbur...@baylibre.com>
 
        Backported from master:
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
index 000000000000..37d9543fc7f8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/alias-weak-1.c
@@ -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).  */

Reply via email to