On Mon, 29 Jul 2024 at 10:20, Jonathan Wakely <jwakely....@gmail.com> wrote: > > On Mon, 29 Jul 2024 at 09:20, Thomas Koenig via Gcc <gcc@gcc.gnu.org> wrote: > > > > Hi, > > > > for the fortran-unsigned branch, I would like to be able to run all > > existing Fortran tests also with -funsigned, to make sure the option > > does not break anything on existing code. > > > > Question is: How? > > > > I came as far as > > > > $ make check-fortran RUNTESTFLAGS="--target_board=unix/-funsigned" > > > > but that causes testsuite failures because C does not recognize > > the option. > > > > Any other possibilites? > > I haven't tested it, but based on testsuite/gfortran.dg/dg.exp it > looks like you could add this in ~/.dejagnurc > > set DEFAULT_FFLAGS "-funsigned -pedantic-errors" > > (The -pedantic-errors is what dg.exp uses if the variable doesn't > already exist, so this preserves that.) > > If you're using a site.exp you could add this there instead of ~/.dejagnurc
Oh but the comment suggests that will only be used for tests that don't use dg-options: # If a testcase doesn't have special options, use these. global DEFAULT_FFLAGS if ![info exists DEFAULT_FFLAGS] then { set DEFAULT_FFLAGS " -pedantic-errors" } I don't know if that's correct, or if the dg-options flags get appended to these default flags. You might also need a leading space in the string, like dg.exp uses (or maybe that's not needed in dg.exp anyway).