Hi Thomas! On 2024-07-29T10:18:49+0200, Thomas Koenig via Gcc <gcc@gcc.gnu.org> wrote: > for the fortran-unsigned branch
By the way: I did see your recent announcement; wow -- Fortran finally getting an UNSIGNED type! :-) > 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? Hard-code it to enabled in 'gcc/fortran/lang.opt'... ;-) Or: '-Wno-complain-wrong-lang' ought to help your case: $ make check-fortran RUNTESTFLAGS="--target_board=unix/-funsigned/-Wno-complain-wrong-lang" ..., which I added for a very similar scenario, a while ago. (See <https://inbox.sourceware.org/87cz63xqrk....@euler.schwinge.homeip.net> "[PING, v2] Add '-Wno-complain-wrong-lang', and use it in 'gcc/testsuite/lib/target-supports.exp:check_compile' and elsewhere".) However, be prepared that the baseline: $ make check-fortran RUNTESTFLAGS="--target_board=unix/-Wno-complain-wrong-lang" ... may have a number of "false FAILs". For example (random), 'gfortran.dg/c-interop/allocate-errors.f90': ! { dg-additional-sources "allocate-errors-c.c dump-descriptors.c" } ! { dg-additional-options "-Wno-error -fcheck=all" } ! { dg-warning "command-line option '-fcheck=all' is valid for Fortran but not for C" "" { target *-*-* } 0 } That 'dg-warning' will turn FAIL with '-Wno-complain-wrong-lang'. Maybe there's a point to be made to clean all these up; replace such '-Wno-error's and 'dg-warning's with '-Wno-complain-wrong-lang'? Exception would be a few test cases that are meant to check "command-line option '[...]' is valid for [...] but not for [...]" diagnostic, which should thus get '-Wcomplain-wrong-lang' added via 'dg-additional-sources'. Grüße Thomas