From: Thomas Schwinge Date: Wed, 4 Sep 2024 07:58:32 +0000 (+0200) Subject: Add 'gcc.target/nvptx/alias-weak-1.c' X-Git-Tag: basepoints/gcc-16~6109 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2267d254eb6ad782cef7b462f2bb2128bc8ace30;p=thirdparty%2Fgcc.git 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 --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). */