On Wed, Apr 11, 2018 at 08:18:35PM +0200, Thomas Koenig wrote: > Am 11.04.2018 um 17:44 schrieb Jakub Jelinek: > > On Tue, Apr 10, 2018 at 11:50:44PM +0200, Thomas Koenig wrote: > > > Hi Jakub, > > > > > > > > > > The new test FAILs everywhere, gfortran.dg doesn't have infrastructure > > > > to > > > > run -fopenmp, -fopenacc nor -ftree-parallelize-loops= tests. > > > > You need to put such tests into libgomp/testsuite/libgomp.fortran/ > > > > > > I put the test case in the attached form into the libgomp.fortran > > > directory, but it failed execution, without error message. > > > > > > Anything I could have done differently? > > > > Avoid using that much stack? > > Well, I don't think stack use is excessive :-) > > $ gfortran -S -Ofast do_concurrent_5.f90 > $ fgrep ', %rsp' do_concurrent_5.s > subq $136, %rsp > addq $136, %rsp
The test is not compiled with those options in the testsuite though, but with -fopenmp -O0 -O3 -ftree-parallelize-loops=2 to select the important ones. And with these options grep ', %rsp' do_concurrent_5.s | sort -u addq $160000176, %rsp addq $8, %rsp subq $160000176, %rsp subq $8, %rsp -fopenmp is added in the default flags and implies -frecursive and thus -fautomatic. You could add -fno-openmp to dg-additional-options if it is ok for the large vars to be static. Another thing which can be seen from the above "-O0 -O3" is that libgomp.fortran/ tests cycle through optimization options, if you only want -O3 only, then better just dg-skip-if if it isn't -O3, instead of running the test effectively with -O3 6 or how many times. Or if you want to test all optimization levels, take -O3 out of the dg-additional-options. > I have attached updated patch which moves the test case to > gfortran.dg/gomp (where it actually passes). How could it pass there? dg-do run tests don't belong into g*.dg/gomp/, nothing adds the -B etc. options needed to find libgomp.spec or libgomp as a library, or adds it to LD_LIBRARY_PATH etc. There are zero dg-do run tests in gfortran.dg/gomp/, there are 4 dg-do run tests in c-c++-common/gomp/, but those work fine because they use -fopenmp-simd option rather than -fopenmp/-fopenacc/-ftree-parallelize-loops= etc. Jakub