https://gcc.gnu.org/g:2267d254eb6ad782cef7b462f2bb2128bc8ace30
commit r15-3444-g2267d254eb6ad782cef7b462f2bb2128bc8ace30 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. Diff: --- gcc/testsuite/gcc.target/nvptx/alias-weak-1.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 00000000000..37d9543fc7f --- /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). */