On Tue, 11 Mar 2025, Jakub Jelinek wrote: > On Tue, Mar 11, 2025 at 10:50:41AM +0100, Richard Biener wrote: > > --- a/gcc/cobol/Make-lang.in > > +++ b/gcc/cobol/Make-lang.in > > @@ -364,3 +364,5 @@ cobol.stagefeedback: stagefeedback-start > > -mv cobol/*$(objext) stagefeedback/cobol > > > > selftest-cobol: > > + > > +lang_checks += check-cobol > > diff --git a/gcc/cobol/gcobolspec.cc b/gcc/cobol/gcobolspec.cc > > index 20ca757fa87..f3f9c327cd0 100644 > > --- a/gcc/cobol/gcobolspec.cc > > +++ b/gcc/cobol/gcobolspec.cc > > @@ -406,6 +406,18 @@ lang_specific_driver (struct cl_decoded_option > > **in_decoded_options, > > n_mains += 1; > > break; > > > > + case OPT_print_search_dirs: > > + case OPT_print_file_name_: > > + case OPT_print_prog_name_: > > + case OPT_print_multi_lib: > > + case OPT_print_multi_directory: > > + case OPT_print_sysroot: > > + case OPT_print_multi_os_directory: > > + case OPT_print_multiarch: > > + case OPT_print_sysroot_headers_suffix: > > + no_files_error = false; > > + break; > > + > > case OPT_v: > > no_files_error = false; > > verbose = true; > > These look good to me, the second part could be even committed separately.
Will split out and push. > > --- /dev/null > > +++ b/gcc/testsuite/cobol.dg/dg.exp > > What is this based on? This is based on gfortran.dg/dg.exp > > @@ -0,0 +1,41 @@ > > +# Copyright (C) 2004-2025 Free Software Foundation, Inc. > > + > > +# This program is free software; you can redistribute it and/or modify > > +# it under the terms of the GNU General Public License as published by > > +# the Free Software Foundation; either version 3 of the License, or > > +# (at your option) any later version. > > +# > > +# This program is distributed in the hope that it will be useful, > > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > > +# GNU General Public License for more details. > > +# > > +# You should have received a copy of the GNU General Public License > > +# along with GCC; see the file COPYING3. If not see > > +# <http://www.gnu.org/licenses/>. > > + > > +# GCC testsuite that uses the `dg.exp' driver. > > + > > +# Load support procs. > > +load_lib cobol-dg.exp > > + > > +# If a testcase doesn't have special options, use these. > > +global DEFAULT_FFLAGS > > +if ![info exists DEFAULT_FFLAGS] then { > > + set DEFAULT_FFLAGS " " > > +} > > + > > +# Initialize `dg'. > > +dg-init > > + > > +global cobol_test_path > > +set cobol_test_path $srcdir/$subdir > > + > > +set all_flags $DEFAULT_FFLAGS > > FFLAGS smell too Fortran-ish, I'd have expected something like > DEFAULT_COBFLAGS or similar. Will adjust. > > --- /dev/null > > +++ b/gcc/testsuite/cobol.dg/pass.cob > > @@ -0,0 +1,6 @@ > > +*> { dg-do run } > > +IDENTIFICATION DIVISION. > > +PROGRAM-ID. pass. > > +ENVIRONMENT DIVISION. > > +PROCEDURE DIVISION. > > + STOP RUN. > > Defer that definitely to the Cobol maintainers. > > > diff --git a/gcc/testsuite/lib/cobol-dg.exp b/gcc/testsuite/lib/cobol-dg.exp > > new file mode 100644 > > index 00000000000..7a97a4d07a5 > > --- /dev/null > > +++ b/gcc/testsuite/lib/cobol-dg.exp > > Again, what is this based on? > I don't see much of stuff like that in say gm2-dg.exp or gdc-dg.exp etc. It's based on gfortran-dg.exp and gfortran.exp. > > + foreach flags_t $option_list { > > + verbose "Testing $nshort, $flags $flags_t" 1 > > + dg-test $test "$flags $flags_t" ${default-extra-flags} > > +# fortran-delete-unit-files $test > > +# cleanup-modules "" > > E.g. the above 2 lines should be certainly dropped. Will do and re-post. Richard.