-mno-direct-extern-access is used to disable direct access to external symbol in executable for x86. Add -fPIE to disable direct access to external symbol for other targets.
PR fortran/107421 PR testsuite/121848 * gfortran.dg/gomp/pr107421.f90: Pass -fPIE for non-x86 targets. Signed-off-by: H.J. Lu <hjl.to...@gmail.com> --- gcc/testsuite/gfortran.dg/gomp/pr107421.f90 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/testsuite/gfortran.dg/gomp/pr107421.f90 b/gcc/testsuite/gfortran.dg/gomp/pr107421.f90 index db98dced8ce..4440e26c936 100644 --- a/gcc/testsuite/gfortran.dg/gomp/pr107421.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/pr107421.f90 @@ -1,4 +1,7 @@ ! { dg-additional-options "-fdump-ipa-whole-program" } +! Add -fPIE or -mno-direct-extern-access to disable direct access to +! external symbol. +! { dg-additional-options "-fPIE" { target { ! { i?86-*-* x86_64-*-* } } } } ! { dg-additional-options "-mno-direct-extern-access" { target { i?86-*-* x86_64-*-* } } } integer :: i -- 2.51.0