diff mbox series

nvptx: Specify '-mno-alias' for 'gcc.dg/pr60797.c' [PR60797, PR104957] (was: [PATCH] Fix PR60797)

Message ID 87wmldvgif.fsf@euler.schwinge.ddns.net
State New
Headers show
Series nvptx: Specify '-mno-alias' for 'gcc.dg/pr60797.c' [PR60797, PR104957] (was: [PATCH] Fix PR60797) | expand

Commit Message

Thomas Schwinge July 22, 2024, 10:59 a.m. UTC
Hi!

On 2014-04-11T12:37:42+0200, Richard Biener <rguenther@suse.de> wrote:
> This fixes the endless error reporting for unhandled aliases [...]

> *** gcc/testsuite/gcc.dg/pr60797.c	(revision 0)
> --- gcc/testsuite/gcc.dg/pr60797.c	(working copy)
> ***************
> *** 0 ****
> --- 1,8 ----
> + /* { dg-do compile } */
> + /* { dg-skip-if "" { alias } } */
> + 
> + extern int foo __attribute__((alias("bar"))); /* { dg-error "supported" } */
> + int main()
> + {
> +   return 0;
> + }

If there's support for symbol aliases, have to 'dg-skip-if' -- unless
there's a way to disable this support, which there is for GCC/nvptx:
'-mno-alias'.  OK to push the attached
"nvptx: Specify '-mno-alias' for 'gcc.dg/pr60797.c' [PR60797, PR104957]"?


Grüße
 Thomas
diff mbox series

Patch

From 72365494b47ad43a78d190ab87eae79fe57eb006 Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <tschwinge@baylibre.com>
Date: Sun, 21 Jul 2024 22:23:40 +0200
Subject: [PATCH] nvptx: Specify '-mno-alias' for 'gcc.dg/pr60797.c' [PR60797,
 PR104957]

2014 Subversion r209299 (Git commit 8330537b5b58bd0532a0a49f9cbd59bf526a7847)
"Fix PR60797" added this test case, which we now amend so that it's able to
test its thing also in '--target=nvptx-none' configurations with symbol alias
support enabled (..., and test nvptx '-mno-alias').

	PR middle-end/60797
	PR target/104957
	gcc/testsuite/
	* gcc.dg/pr60797.c: For nvptx, specify '-mno-alias'.
---
 gcc/testsuite/gcc.dg/pr60797.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/pr60797.c b/gcc/testsuite/gcc.dg/pr60797.c
index 45090bae502..0485b2de172 100644
--- a/gcc/testsuite/gcc.dg/pr60797.c
+++ b/gcc/testsuite/gcc.dg/pr60797.c
@@ -1,5 +1,7 @@ 
-/* { dg-do compile } */
-/* { dg-skip-if "" { alias } } */
+/* If there's support for symbol aliases, have to 'dg-skip-if' -- unless
+   there's a way to disable this support.
+   { dg-additional-options -mno-alias { target nvptx-*-* } }
+   { dg-skip-if "" { { ! nvptx-*-* } && alias } } */
 
 extern int foo __attribute__((alias("bar"))); /* { dg-error "supported" } */
 int main()
-- 
2.34.1