This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fixing PR32765


   Mike Stump looked at PR32765 and suggested several
ways to fix it. On the link line for the failing tests
libgomp.fortran/pr32550.f90 and libgomp.fortran/crayptr2.f90
we can either use -static-libgcc, -lgcc_s or libgomp.a.
I prefer using -static-libgcc and verified that both
testcases pass when that flag is passed for darwin. The
pr32550.f90 testcase will be trivial to patch. The change...

ndex: libgomp/testsuite/libgomp.fortran/pr32550.f90
===================================================================
--- libgomp/testsuite/libgomp.fortran/pr32550.f90	(revision 127350)
+++ libgomp/testsuite/libgomp.fortran/pr32550.f90	(working copy)
@@ -1,5 +1,6 @@
 ! PR fortran/32550
 ! { dg-do run }
+! { dg-options "-static-libgcc" { target *-*-darwin* } }
 
       integer, pointer, save :: ptr
       integer, target :: targ

will suffice. However the crayptr2.f90 testcase is more
problematic since we already have a dg-options comment line.
In c/c++ sources, multiple comment lines for dg-options seem
to co-exist with each being executed. However, I am finding
that when I add...

Index: libgomp/testsuite/libgomp.fortran/crayptr2.f90
===================================================================
--- libgomp/testsuite/libgomp.fortran/crayptr2.f90	(revision 127350)
+++ libgomp/testsuite/libgomp.fortran/crayptr2.f90	(working copy)
@@ -1,5 +1,6 @@
 ! { dg-do run }
 ! { dg-options "-fopenmp -fcray-pointer" }
+! { dg-options "-static-libgcc" { target *-*-darwin* } }
 
   use omp_lib
   integer :: a, b, c, d, p

Only the second dg-options line seems to be used. This makes me wonder
if the dejagnu harnesses for fortran are broken for such multiple
dg-options lines. If so, we will need to find out how to craft a
single dg-options line that achieves both. In any case, if I add...

 ! { dg-options "-fopenmp -fcray-pointer -static-libgcc" { target *-*-darwin* } }

to the crayptr2.f90 testcase it passes so we have the fix as soon
as we figure out the dejagnu syntax appropriate for these fortran
source files.
           Jack


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]