Hi! On Thu, 28 Feb 2019 20:22:08 +0100, I wrote: > While looking for something else -- isn't that always how it happens ;-) > -- I noticed one thing here: > > On Wed, 25 Jun 2014 01:41:02 +0200, FX <fxcoud...@gmail.com> wrote: > > I’ll wait a few more days to commit, so others can comment/review and I am > > sure to be around if there is fallout. > > (This got committed to trunk in r212102.) > > > --- gcc/testsuite/gfortran.dg/ieee/ieee.exp (revision 0) > > +++ gcc/testsuite/gfortran.dg/ieee/ieee.exp (revision 0) > > @@ -0,0 +1,59 @@ > > +[...] > > +global DEFAULT_FFLAGS > > +if ![info exists DEFAULT_FFLAGS] then { > > + set DEFAULT_FFLAGS "" > > +} > > +[...] > > Per my understanding of DejaGnu (and please correct me if that's wrong), > in the same 'runtest' instance, 'global' variables persist from one > '*.exp' file to another. (Which is something debatable, in my > opinion...) > > All other '*.exp' files that back then did define 'DEFAULT_FFLAGS' (using > this same construct as shown above), and it's still the same now, are > using " -pedantic-errors" instead of the empty string. Thus this setting > of 'DEFAULT_FFLAGS' is not idempotent, depends on whether > 'gfortran.dg/ieee/ieee.exp', or an other defining '*.exp' file is > executed first. > > By default, first comes 'gfortran.dg/coarray/caf.exp' (nowadays, did not > yet exist back then), then 'gfortran.dg/dg.exp', then > 'gfortran.dg/ieee/ieee.exp'. (And, sometimes also > 'gcc.target/powerpc/ppc-fortran/ppc-fortran.exp'.) > > And, as I just noticed, 'runtest' seems to always sort the specified > '*.exp' files (?!), so even when you invoke something like > "check-gcc-fortran RUNTESTFLAGS='ieee.exp dg.exp'" to try to provoke some > regressions to appear, you'd still get 'dg.exp' executed first. The > empty string setting in 'ieee.exp' was never really active -- only if > executed on its own, etc. > > Fortunately, 'ieee.exp' seems to behave the same way whether running with > or without '-pedantic-errors', so I propose to simply unify that setting, > see attached.
I convinced myself that this is the right thing to do, and committed "[testsuite, Fortran] Consistently set 'DEFAULT_FFLAGS'" to trunk in r269845, to gcc-8-branch in r269846, and to gcc-7-branch in r269847, see attached. Grüße Thomas
>From c1769f9f2a8314e610c7a3534ee8fc74fe2c8c60 Mon Sep 17 00:00:00 2001 From: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Thu, 21 Mar 2019 18:54:50 +0000 Subject: [PATCH] [testsuite, Fortran] Consistently set 'DEFAULT_FFLAGS' In the same 'runtest' instance, 'global' variables persist from one '*.exp' file to another. All other '*.exp' files are using " -pedantic-errors" instead of the empty string as the default for 'DEFAULT_FFLAGS'. Thus this setting of 'DEFAULT_FFLAGS' is not idempotent, depends on whether 'gfortran.dg/ieee/ieee.exp', or an other defining '*.exp' file is executed first. gcc/testsuite/ PR fortran/29383 * gfortran.dg/ieee/ieee.exp (DEFAULT_FFLAGS): Set the same as in other '*.exp' files. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269845 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gfortran.dg/ieee/ieee.exp | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c8f9492130e1..914ba7237033 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2019-03-21 Thomas Schwinge <tho...@codesourcery.com> + + PR fortran/29383 + * gfortran.dg/ieee/ieee.exp (DEFAULT_FFLAGS): Set the same as in + other '*.exp' files. + 2019-03-21 Richard Biener <rguent...@suse.de> PR tree-optimization/89779 diff --git a/gcc/testsuite/gfortran.dg/ieee/ieee.exp b/gcc/testsuite/gfortran.dg/ieee/ieee.exp index 05383ce94331..68d4b7816144 100644 --- a/gcc/testsuite/gfortran.dg/ieee/ieee.exp +++ b/gcc/testsuite/gfortran.dg/ieee/ieee.exp @@ -22,15 +22,15 @@ load_lib gfortran-dg.exp load_lib target-supports.exp -# Initialize `dg'. -dg-init - -# Flags specified in each test +# If a testcase doesn't have special options, use these. global DEFAULT_FFLAGS if ![info exists DEFAULT_FFLAGS] then { - set DEFAULT_FFLAGS "" + set DEFAULT_FFLAGS " -pedantic-errors" } +# Initialize `dg'. +dg-init + # Flags for finding the IEEE modules if [info exists TOOL_OPTIONS] { set specpath [get_multilibs ${TOOL_OPTIONS}] -- 2.17.1
>From e18146b75cb782483c996bf58b96a40f622715a1 Mon Sep 17 00:00:00 2001 From: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Thu, 21 Mar 2019 18:57:39 +0000 Subject: [PATCH] [testsuite, Fortran] Consistently set 'DEFAULT_FFLAGS' In the same 'runtest' instance, 'global' variables persist from one '*.exp' file to another. All other '*.exp' files are using " -pedantic-errors" instead of the empty string as the default for 'DEFAULT_FFLAGS'. Thus this setting of 'DEFAULT_FFLAGS' is not idempotent, depends on whether 'gfortran.dg/ieee/ieee.exp', or an other defining '*.exp' file is executed first. gcc/testsuite/ PR fortran/29383 * gfortran.dg/ieee/ieee.exp (DEFAULT_FFLAGS): Set the same as in other '*.exp' files. trunk r269845 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@269846 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gfortran.dg/ieee/ieee.exp | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b09ab29affff..9aa82da9a4aa 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2019-03-21 Thomas Schwinge <tho...@codesourcery.com> + + PR fortran/29383 + * gfortran.dg/ieee/ieee.exp (DEFAULT_FFLAGS): Set the same as in + other '*.exp' files. + 2019-03-19 Eric Botcazou <ebotca...@adacore.com> * c-c++-common/unroll-7.c: New test. diff --git a/gcc/testsuite/gfortran.dg/ieee/ieee.exp b/gcc/testsuite/gfortran.dg/ieee/ieee.exp index 987ecaf4bcd3..2ccf2493dc4f 100644 --- a/gcc/testsuite/gfortran.dg/ieee/ieee.exp +++ b/gcc/testsuite/gfortran.dg/ieee/ieee.exp @@ -22,15 +22,15 @@ load_lib gfortran-dg.exp load_lib target-supports.exp -# Initialize `dg'. -dg-init - -# Flags specified in each test +# If a testcase doesn't have special options, use these. global DEFAULT_FFLAGS if ![info exists DEFAULT_FFLAGS] then { - set DEFAULT_FFLAGS "" + set DEFAULT_FFLAGS " -pedantic-errors" } +# Initialize `dg'. +dg-init + # Flags for finding the IEEE modules if [info exists TOOL_OPTIONS] { set specpath [get_multilibs ${TOOL_OPTIONS}] -- 2.17.1
>From 72a927a66e52304e1b05dff680de4ed7c8080b37 Mon Sep 17 00:00:00 2001 From: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Thu, 21 Mar 2019 18:57:56 +0000 Subject: [PATCH] [testsuite, Fortran] Consistently set 'DEFAULT_FFLAGS' In the same 'runtest' instance, 'global' variables persist from one '*.exp' file to another. All other '*.exp' files are using " -pedantic-errors" instead of the empty string as the default for 'DEFAULT_FFLAGS'. Thus this setting of 'DEFAULT_FFLAGS' is not idempotent, depends on whether 'gfortran.dg/ieee/ieee.exp', or an other defining '*.exp' file is executed first. gcc/testsuite/ PR fortran/29383 * gfortran.dg/ieee/ieee.exp (DEFAULT_FFLAGS): Set the same as in other '*.exp' files. trunk r269845 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@269847 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gfortran.dg/ieee/ieee.exp | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 28756b1f6bee..ca849083d7f4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2019-03-21 Thomas Schwinge <tho...@codesourcery.com> + + PR fortran/29383 + * gfortran.dg/ieee/ieee.exp (DEFAULT_FFLAGS): Set the same as in + other '*.exp' files. + 2019-03-21 Matthias Klose <d...@ubuntu.com> Backport from mainline diff --git a/gcc/testsuite/gfortran.dg/ieee/ieee.exp b/gcc/testsuite/gfortran.dg/ieee/ieee.exp index 14741b768c53..1d6eab18e140 100644 --- a/gcc/testsuite/gfortran.dg/ieee/ieee.exp +++ b/gcc/testsuite/gfortran.dg/ieee/ieee.exp @@ -22,15 +22,15 @@ load_lib gfortran-dg.exp load_lib target-supports.exp -# Initialize `dg'. -dg-init - -# Flags specified in each test +# If a testcase doesn't have special options, use these. global DEFAULT_FFLAGS if ![info exists DEFAULT_FFLAGS] then { - set DEFAULT_FFLAGS "" + set DEFAULT_FFLAGS " -pedantic-errors" } +# Initialize `dg'. +dg-init + # Flags for finding the IEEE modules if [info exists TOOL_OPTIONS] { set specpath [get_multilibs ${TOOL_OPTIONS}] -- 2.17.1