On Mon, Jul 29, 2024 at 1:20 AM Thomas Koenig <tkoe...@netcologne.de> 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?
Yes you could add it into the list of Torture options that gfortran-dg-runtest uses. Something like: ``` diff --git a/gcc/testsuite/lib/gfortran-dg.exp b/gcc/testsuite/lib/gfortran-dg.exp index fcba95dc396..0589d507382 100644 --- a/gcc/testsuite/lib/gfortran-dg.exp +++ b/gcc/testsuite/lib/gfortran-dg.exp @@ -153,6 +153,12 @@ proc gfortran-dg-runtest { testcases flags default-extra-flags } { } else { set option_list [list { -O } ] } + set old_option_list $option_list + set option_list {} + foreach option $option_list { + lappend option_list $option + lappend option_list "$option -funsigned" + } set nshort [file tail [file dirname $test]]/[file tail $test] list-module-names $test ``` should work but I am not 100% I got the TCL syntax correct. Thanks, Andrew Pinski > > Best regards > > Thomas