Hi!

On 2022-12-02T13:03:14+0100, I wrote:
> Generally PASS with:
>
>     $ ptxas --version
>     ptxas: NVIDIA (R) Ptx optimizing assembler
>     Copyright (c) 2005-2018 NVIDIA Corporation
>     Built on Sun_Sep__9_21:06:46_CDT_2018
>     Cuda compilation tools, release 10.0, V10.0.145
>
> ..., and execution with 'Driver Version: 361.93.02'.
>
> The exceptions are 'gcc.dg/torture/stackalign/pr16660-2.c',
> 'gcc.dg/torture/stackalign/pr16660-3.c', where a few variants get XFAILed due
> to:
>
>     nvptx-as: ptxas terminated with signal 11 [Segmentation fault], core 
> dumped

The latter is gone with 'ptxas' of, for example, CUDA 11.5 and later.

Pushed to trunk branch commit 84e90b69fba1cfa2a77942251ddfd0527fb22811
"nvptx: Re-enable "Stack alignment causes use of alloca" test cases", see
attached.


Grüße
 Thomas


>From 84e90b69fba1cfa2a77942251ddfd0527fb22811 Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <tho...@codesourcery.com>
Date: Mon, 28 Nov 2022 10:37:26 +0100
Subject: [PATCH] nvptx: Re-enable "Stack alignment causes use of alloca" test
 cases

These generally PASS nowadays, without requiring 'alloca'.

There were two exceptions: 'gcc.dg/torture/stackalign/pr16660-2.c',
'gcc.dg/torture/stackalign/pr16660-3.c', where variants specifying
'-O0' or '-fpic' FAILed with 'ptxas' of, for example, CUDA 10.0 due to:

    nvptx-as: ptxas terminated with signal 11 [Segmentation fault], core dumped

That however is gone with 'ptxas' of, for example, CUDA 11.5 and later.

	gcc/testsuite/
	* gcc.dg/torture/stackalign/global-1.c: Re-enable for nvptx.
	* gcc.dg/torture/stackalign/inline-1.c: Likewise.
	* gcc.dg/torture/stackalign/nested-1.c: Likewise.
	* gcc.dg/torture/stackalign/nested-2.c: Likewise.
	* gcc.dg/torture/stackalign/nested-4.c: Likewise.
	* gcc.dg/torture/stackalign/pr16660-1.c: Likewise.
	* gcc.dg/torture/stackalign/pr16660-2.c: Likewise.
	* gcc.dg/torture/stackalign/pr16660-3.c: Likewise.
	* gcc.dg/torture/stackalign/ret-struct-1.c: Likewise.
	* gcc.dg/torture/stackalign/struct-1.c: Likewise.
---
 gcc/testsuite/gcc.dg/torture/stackalign/global-1.c     | 1 -
 gcc/testsuite/gcc.dg/torture/stackalign/inline-1.c     | 1 -
 gcc/testsuite/gcc.dg/torture/stackalign/nested-1.c     | 1 -
 gcc/testsuite/gcc.dg/torture/stackalign/nested-2.c     | 1 -
 gcc/testsuite/gcc.dg/torture/stackalign/nested-4.c     | 2 +-
 gcc/testsuite/gcc.dg/torture/stackalign/pr16660-1.c    | 1 -
 gcc/testsuite/gcc.dg/torture/stackalign/pr16660-2.c    | 1 -
 gcc/testsuite/gcc.dg/torture/stackalign/pr16660-3.c    | 1 -
 gcc/testsuite/gcc.dg/torture/stackalign/ret-struct-1.c | 1 -
 gcc/testsuite/gcc.dg/torture/stackalign/struct-1.c     | 1 -
 10 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/global-1.c b/gcc/testsuite/gcc.dg/torture/stackalign/global-1.c
index 66bec64a0f58..a7cbfa74d165 100644
--- a/gcc/testsuite/gcc.dg/torture/stackalign/global-1.c
+++ b/gcc/testsuite/gcc.dg/torture/stackalign/global-1.c
@@ -1,6 +1,5 @@
 /* { dg-do run } */
 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } } */
-/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } } */
 
 #include "check.h"
 
diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/inline-1.c b/gcc/testsuite/gcc.dg/torture/stackalign/inline-1.c
index 912581e9ca84..6aed4398cb19 100644
--- a/gcc/testsuite/gcc.dg/torture/stackalign/inline-1.c
+++ b/gcc/testsuite/gcc.dg/torture/stackalign/inline-1.c
@@ -1,6 +1,5 @@
 /* { dg-do run } */
 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } } */
-/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } } */
 
 #include "check.h"
 
diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/nested-1.c b/gcc/testsuite/gcc.dg/torture/stackalign/nested-1.c
index ae9047e783d9..25343757c9ce 100644
--- a/gcc/testsuite/gcc.dg/torture/stackalign/nested-1.c
+++ b/gcc/testsuite/gcc.dg/torture/stackalign/nested-1.c
@@ -1,6 +1,5 @@
 /* { dg-do run } */
 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } } */
-/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } } */
 
 #include "check.h"
 
diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/nested-2.c b/gcc/testsuite/gcc.dg/torture/stackalign/nested-2.c
index d083d6695b11..397a34fb661f 100644
--- a/gcc/testsuite/gcc.dg/torture/stackalign/nested-2.c
+++ b/gcc/testsuite/gcc.dg/torture/stackalign/nested-2.c
@@ -1,6 +1,5 @@
 /* { dg-do run } */
 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } } */
-/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } } */
 
 #include "check.h"
 
diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/nested-4.c b/gcc/testsuite/gcc.dg/torture/stackalign/nested-4.c
index a46104b9df0a..4d18ba9ad397 100644
--- a/gcc/testsuite/gcc.dg/torture/stackalign/nested-4.c
+++ b/gcc/testsuite/gcc.dg/torture/stackalign/nested-4.c
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } } */
-/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } } */
+/* { dg-require-effective-target nonlocal_goto } */
 
 #include "check.h"
 
diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/pr16660-1.c b/gcc/testsuite/gcc.dg/torture/stackalign/pr16660-1.c
index 459b3df26964..3818e5c32cd6 100644
--- a/gcc/testsuite/gcc.dg/torture/stackalign/pr16660-1.c
+++ b/gcc/testsuite/gcc.dg/torture/stackalign/pr16660-1.c
@@ -1,6 +1,5 @@
 /* { dg-do run } */
 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } } */
-/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } } */
 
 #include "check.h"
 
diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/pr16660-2.c b/gcc/testsuite/gcc.dg/torture/stackalign/pr16660-2.c
index 2aaff4001091..9a039eb2bf50 100644
--- a/gcc/testsuite/gcc.dg/torture/stackalign/pr16660-2.c
+++ b/gcc/testsuite/gcc.dg/torture/stackalign/pr16660-2.c
@@ -1,5 +1,4 @@
 /* { dg-do run } */
-/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } } */
 
 #include "check.h"
 
diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/pr16660-3.c b/gcc/testsuite/gcc.dg/torture/stackalign/pr16660-3.c
index ceb626682f89..1c1ddd1dd74c 100644
--- a/gcc/testsuite/gcc.dg/torture/stackalign/pr16660-3.c
+++ b/gcc/testsuite/gcc.dg/torture/stackalign/pr16660-3.c
@@ -1,5 +1,4 @@
 /* { dg-do run } */
-/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } } */
 
 #include "check.h"
 
diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/ret-struct-1.c b/gcc/testsuite/gcc.dg/torture/stackalign/ret-struct-1.c
index ff0488dc956c..e56def4e7c3a 100644
--- a/gcc/testsuite/gcc.dg/torture/stackalign/ret-struct-1.c
+++ b/gcc/testsuite/gcc.dg/torture/stackalign/ret-struct-1.c
@@ -1,6 +1,5 @@
 /* { dg-do run } */
 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } } */
-/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } } */
 
 #include "check.h"
 
diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/struct-1.c b/gcc/testsuite/gcc.dg/torture/stackalign/struct-1.c
index 4e9796f7826f..12262ebbe692 100644
--- a/gcc/testsuite/gcc.dg/torture/stackalign/struct-1.c
+++ b/gcc/testsuite/gcc.dg/torture/stackalign/struct-1.c
@@ -1,6 +1,5 @@
 /* { dg-do run } */
 /* { dg-skip-if "Stack alignment is too small" { hppa*-*-hpux* } } */
-/* { dg-skip-if "Stack alignment causes use of alloca" { nvptx-*-* } } */
 
 #include "check.h"
 
-- 
2.34.1

Reply via email to