aboutsummaryrefslogtreecommitdiff
path: root/libcpp/files.cc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2025-03-28 20:29:31 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2025-03-28 20:29:31 +0100
commit2cb728e14b5640849dad7571b9bbb0091ff5fcab (patch)
treea05e2287145543bae4a13a93db469b84cef8fae6 /libcpp/files.cc
parent7e7ac815d2051308ccb7a7469f7e7a1f0b69f7e5 (diff)
downloadgcc-2cb728e14b5640849dad7571b9bbb0091ff5fcab.zip
gcc-2cb728e14b5640849dad7571b9bbb0091ff5fcab.tar.gz
gcc-2cb728e14b5640849dad7571b9bbb0091ff5fcab.tar.bz2
testsuite: Don't cycle through option list for gfortran.dg and libgomp.fortran dg-do run tests with -O in dg*options
Here is a new version of the patch. The current behavior in gfortran.dg/ and libgomp.fortran/libgomp.oacc-fortran is that tests without any dg-do directive are implicitly dg-do compile and tests with dg-do compile or without dg-do don't cycle through options (-O is implicitly added but can be overridden), while test with dg-do run cycle through the optimization options. The following patch modifies this, so that even tests with dg-do run with -O in dg-options or dg-additional-options (after [ \t"{]) don't cycle either and also get implicit -O which is overridden by that -O{,0,1,2,3,s,z,g,fast} in dg-{,additional-}options. Previously we were mostly wasting test time on those, because e.g. -O0 -O2 -O1 -O2 -O2 -O2 -Os -O2 are still effectively -O2 and so the same thing, while -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions -O2 and -O3 -g -O2 are not the same thing (effectively -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions -O2 and -g -O2) I think it isn't worth to test those combinations (especially when with e.g. -O0 in dg-options it mostly doesn't do much). Tested with make check-gfortran where this results in slight decrease of tests: # of expected passes 73809 # of expected failures 343 # of unsupported tests 78 with unmodified trunk vs. # of expected passes 72734 # of expected failures 343 # of unsupported tests 73 with the patch, and on the libgomp side # of expected passes 11162 # of expected failures 238 # of unsupported tests 274 to # of expected passes 11092 # of expected failures 238 # of unsupported tests 274 (when counting just fortran.exp tests). Before the patch I see grep -- '-O[^ ].*-O' testsuite/gfortran/gfortran.log | grep -v '/vect/\|/graphite/' | wc -l 1008 and with the patch grep -- '-O[^ ].*-O' testsuite/gfortran/gfortran.log | grep -v '/vect/\|/graphite/' | wc -l 0 (vect and graphite have a few occurrences, but not too much). 2025-03-28 Jakub Jelinek <jakub@redhat.com> * lib/gfortran-dg.exp: Don't cycle through the option list if dg-options or dg-additional-options contains -O after space, tab, double quote or open curly bracket. * gfortran.dg/cray_pointers_2.f90: Remove extraneous space between dg-do and run and remove comment about it.
Diffstat (limited to 'libcpp/files.cc')
0 files changed, 0 insertions, 0 deletions