[nvptx, testsuite] Add -mptx=_ in nvptx.exp test-cases

When running with target board nvptx-none-run/-mptx=3.1, I run into:
...
cc1: error: PTX version (-mptx) needs to be at least 4.2 to support selected \
  -misa (sm_53)^M
compiler exited with status 1
FAIL: gcc.target/nvptx/atomic-store-1.c (test for excess errors)
...

Fix this and similar cases by adding an explicit -mptx=_ setting.

Tested on nvptx.

gcc/testsuite/ChangeLog:

2022-02-28  Tom de Vries  <tdevries@suse.de>

	* gcc.target/nvptx/atomic-store-1.c: Add -mptx=_.
	* gcc.target/nvptx/atomic-store-2.c: Same.
	* gcc.target/nvptx/float16-1.c: Same.
	* gcc.target/nvptx/float16-2.c: Same.
	* gcc.target/nvptx/float16-3.c: Same.
	* gcc.target/nvptx/float16-4.c: Same.
	* gcc.target/nvptx/float16-5.c: Same.
	* gcc.target/nvptx/float16-6.c: Same.
	* gcc.target/nvptx/tanh-1.c: Same.
	* gcc.target/nvptx/uniform-simt-1.c: Same.
	* gcc.target/nvptx/uniform-simt-3.c: Same.
This commit is contained in:
Tom de Vries 2022-02-25 16:37:59 +01:00
parent 9d87ad0ca5
commit 01cc75e3b6
11 changed files with 11 additions and 11 deletions

View file

@ -2,7 +2,7 @@
shared state space. */
/* { dg-do compile } */
/* { dg-options "-misa=sm_53" } */
/* { dg-options "-misa=sm_53 -mptx=_" } */
enum memmodel
{

View file

@ -2,7 +2,7 @@
shared state space. */
/* { dg-do compile } */
/* { dg-options "-misa=sm_70" } */
/* { dg-options "-misa=sm_70 -mptx=_" } */
enum memmodel
{

View file

@ -1,5 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-O2 -misa=sm_53 -ffast-math" } */
/* { dg-options "-O2 -ffast-math -misa=sm_53 -mptx=_" } */
_Float16 var;

View file

@ -1,5 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ffast-math -misa=sm_80" } */
/* { dg-options "-O2 -ffast-math -misa=sm_80 -mptx=_" } */
_Float16 x;
_Float16 y;

View file

@ -1,5 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-O2 -misa=sm_53" } */
/* { dg-options "-O2 -misa=sm_53 -mptx=_" } */
_Float16 var;

View file

@ -1,5 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-O2 -misa=sm_53 -ffast-math" } */
/* { dg-options "-O2 -ffast-math -misa=sm_53 -mptx=_" } */
_Float16 var;

View file

@ -1,5 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-O2 -misa=sm_53 -ffast-math" } */
/* { dg-options "-O2 -ffast-math -misa=sm_53 -mptx=_" } */
_Float16 a;
_Float16 b;

View file

@ -1,5 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-O2 -misa=sm_53" } */
/* { dg-options "-O2 -misa=sm_53 -mptx=_" } */
_Float16 x;
_Float16 y;

View file

@ -1,5 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-O2 -ffast-math -misa=sm_75" } */
/* { dg-options "-O2 -ffast-math -misa=sm_75 -mptx=_" } */
float foo(float x)
{

View file

@ -1,4 +1,4 @@
/* { dg-options "-O2 -muniform-simt" } */
/* { dg-options "-O2 -muniform-simt -misa=sm_70 -mptx=_" } */
enum memmodel
{

View file

@ -1,4 +1,4 @@
/* { dg-do compile } */
/* { dg-options "-O2 -muniform-simt -misa=sm_70" } */
/* { dg-options "-O2 -muniform-simt -misa=sm_70 -mptx=_" } */
#include "atomic-store-2.c"