> -----Original Message-----
> From: Jakub Jelinek <[email protected]>
> Sent: Tuesday, September 22, 2026 04:22
> To: Robert Dubner <[email protected]>; James K. Lowden
<[email protected]>
> Cc: [email protected]
> Subject: [PATCH] testsuite: Use dg-require-iconv dejaGNU directive in
COBOL
> testsuite
>
> Hi!
>
> There are various implementations of iconv, in glibc, libiconv, ... and
not
> all of them support all the charsets or their exact spellings.
> All C/C++ tests (at least from what I've grepped around) do use
> dg-require-iconv directive if iconv_open supports the given encoding
> when using -fexec-charset= and similar options. IMHO COBOL tests should
> do the same.
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, verified manually
> that the test still PASS the way they did on glibc which does support
those
> encodings. Ok for trunk?
Unfortunately, that won't work.
The tests in cobol.dg/group2 are generated from a larger set of tests that
do not exist in the GCC repository. And when I say, "larger", I mean that
in contrast to the 504 tests in group2, our autoconfig/autotest suite has
894 tests, and that's growing pretty rapidly lately.
So, any changes made to those files will be overwritten the next time they
are regenerated.
I need to rewrite the generator anyway; I banged it out on a weekend a
long time ago, and it needs refining.
So, pending my automating the insertion of "*> { dg-require-iconv
"ibm1140" }", I will arrange to blacklist the five tests that you mention
here.
Thank you for looking into this.
>
> 2026-09-22 Jakub Jelinek <[email protected]>
>
> * cobol.dg/group2/CDF_Feature_.cob: Add dg-require-iconv
directive.
> *
cobol.dg/group2/CHAR_and_ORD_with_COLLATING_sequence_-_EBCDIC.cob:
> Likewise.
> * cobol.dg/group2/FIND-STRING__forward_.cob: Likewise.
> * cobol.dg/group2/FIND-STRING__reverse_.cob: Likewise.
> * cobol.dg/group2/RT3609_Unexpected_PROCESS.cob: Likewise.
>
> --- a/gcc/testsuite/cobol.dg/group2/CDF_Feature_.cob 2026-09-21
> 08:58:18.067059667 +0200
> +++ b/gcc/testsuite/cobol.dg/group2/CDF_Feature_.cob 2026-09-21
> 20:37:45.763162451 +0200
> @@ -1,6 +1,7 @@
> *> Do not edit this generated file. See README.txt
> *> { dg-do run }
> *> { dg-options "-fexec-charset=ibm1140 -dialect ibm" }
> + *> { dg-require-iconv "ibm1140" }
> *> { dg-output-file "group2/CDF_Feature_.out" }
>
> id division.
> ---
a/gcc/testsuite/cobol.dg/group2/CHAR_and_ORD_with_COLLATING_sequence_-
> _EBCDIC.cob 2026-09-21 08:58:18.067059667 +0200
> +++
b/gcc/testsuite/cobol.dg/group2/CHAR_and_ORD_with_COLLATING_sequence_-
> _EBCDIC.cob 2026-09-21 20:37:53.176065824 +0200
> @@ -1,6 +1,7 @@
> *> Do not edit this generated file. See README.txt
> *> { dg-do run }
> *> { dg-options "-fexec-charset=ibm1140" }
> + *> { dg-require-iconv "ibm1140" }
> *> { dg-output-file
"group2/CHAR_and_ORD_with_COLLATING_sequence_-
> _EBCDIC.out" }
> IDENTIFICATION DIVISION.
> PROGRAM-ID. prog.
> --- a/gcc/testsuite/cobol.dg/group2/FIND-STRING__forward_.cob 2026-09-21
> 08:58:18.067059667 +0200
> +++ b/gcc/testsuite/cobol.dg/group2/FIND-STRING__forward_.cob 2026-09-21
> 20:37:58.875991525 +0200
> @@ -1,6 +1,7 @@
> *> Do not edit this generated file. See README.txt
> *> { dg-do run }
> *> { dg-options "-fexec-charset=ibm1140" }
> + *> { dg-require-iconv "ibm1140" }
> *> { dg-output-file "group2/FIND-STRING__forward_.out" }
> IDENTIFICATION DIVISION.
> PROGRAM-ID. prog.
> --- a/gcc/testsuite/cobol.dg/group2/FIND-STRING__reverse_.cob 2026-09-21
> 08:58:18.067059667 +0200
> +++ b/gcc/testsuite/cobol.dg/group2/FIND-STRING__reverse_.cob 2026-09-21
> 20:38:04.542917656 +0200
> @@ -1,6 +1,7 @@
> *> Do not edit this generated file. See README.txt
> *> { dg-do run }
> *> { dg-options "-fexec-charset=ibm1140" }
> + *> { dg-require-iconv "ibm1140" }
> *> { dg-output-file "group2/FIND-STRING__reverse_.out" }
> IDENTIFICATION DIVISION.
> PROGRAM-ID. prog.
> --- a/gcc/testsuite/cobol.dg/group2/RT3609_Unexpected_PROCESS.cob
2026-09-03
> 09:43:55.779409851 +0200
> +++ b/gcc/testsuite/cobol.dg/group2/RT3609_Unexpected_PROCESS.cob
2026-09-21
> 20:38:14.813783777 +0200
> @@ -1,6 +1,7 @@
> *> Do not edit this generated file. See README.txt
> *> { dg-do run }
> *> { dg-options "-O0 -Wno-ibm-cdf -I copybooks
-Wno-recording-mode -
> ffixed-form -dialect ibm -fno-static-call -fexec-charset=CP037
-fexec-national-
> charset=CP037" }
> + *> { dg-require-iconv "CP037" }
>
> 00001 PROCESS FLAG(I,W) FDUMP
> 00002 IDENTIFICATION DIVISION.
>
> Jakub