diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2023-03-28 22:26:30 +0200 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2023-03-28 23:02:39 +0200 |
commit | b3c5933ee726004e4e47291d422dfe7ac3345062 (patch) | |
tree | 99d1be725d71412005b175b6f680befa749c5754 /gcc | |
parent | cb6f663f9d79d7134ae6ecaff9a25342c40aeb5d (diff) | |
download | gcc-b3c5933ee726004e4e47291d422dfe7ac3345062.zip gcc-b3c5933ee726004e4e47291d422dfe7ac3345062.tar.gz gcc-b3c5933ee726004e4e47291d422dfe7ac3345062.tar.bz2 |
Enable 'gfortran.dg/weak-2.f90' for nvptx target
Follow-up to commit bcbeebc498126c50d73809ec8a4bd0bff27ee97b
"Fortran: Add support for WEAK attribute for variables".
gcc/testsuite/
* gfortran.dg/weak-2.f90: Enable for nvptx target.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/gfortran.dg/weak-2.f90 | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/testsuite/gfortran.dg/weak-2.f90 b/gcc/testsuite/gfortran.dg/weak-2.f90 index 3e0e877..ab273a1 100644 --- a/gcc/testsuite/gfortran.dg/weak-2.f90 +++ b/gcc/testsuite/gfortran.dg/weak-2.f90 @@ -1,10 +1,10 @@ ! { dg-do compile } ! { dg-require-weak "" } ! { dg-skip-if "" { x86_64-*-mingw* } } -! { dg-skip-if "" { nvptx-*-* } } ! 1. -! { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?__foo_MOD_abc" } } +! { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?__foo_MOD_abc" { target { ! nvptx-*-* } } } } +! { dg-final { scan-assembler-times "\\.weak \\.global \\.align 4 \\.u32 __foo_MOD_abc" 1 { target nvptx-*-* } } } module foo implicit none !GCC$ ATTRIBUTES weak :: abc @@ -12,14 +12,16 @@ real :: abc(7) end module ! 2. -! { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?impl1" } } +! { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?impl1" { target { ! nvptx-*-* } } } } +! { dg-final { scan-assembler-times "\\.weak \\.func \\(\\.param\\.u32 %value_out\\) impl1" 2 { target nvptx-*-* } } } integer function impl1() implicit none !GCC$ ATTRIBUTES weak :: impl1 end function ! 3. -! { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?bar__" } } +! { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?bar__" { target { ! nvptx-*-* } } } } +! { dg-final { scan-assembler-times "\\.weak \\.func \\(\\.param\\.u32 %value_out\\) bar__" 2 { target nvptx-*-* } } } integer function impl2() bind(c,name='bar__') implicit none !GCC$ ATTRIBUTES weak :: impl2 |