On Thu, Feb 26, 2026 at 09:17:52AM +0100, Richard Biener wrote:
> This works around an issue resulting in link-failure of cobol1 when
> LTO bootstrap is used by removing unused <iostream> from the cobol
> frontend.
>
> LTO bootstrapped on x86_64-unknown-linux-gnu.
>
> OK for trunk?
>
> Thanks,
> Richard.
>
> PR cobol/123238
This is the wrong PR number. It's too late now to fix it in the commit, but
perhaps you could mention the correct one here and/or in the bugzilla for
future reference?
Alice
> gcc/cobol/
> * lexio.cc: Remove <iostream> include.
> (cdftext::process_file): Remove if (false) gated use of
> iostream code.
> ---
> gcc/cobol/lexio.cc | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/gcc/cobol/lexio.cc b/gcc/cobol/lexio.cc
> index 48fc8cfe6bb..8a914ae86a9 100644
> --- a/gcc/cobol/lexio.cc
> +++ b/gcc/cobol/lexio.cc
> @@ -36,8 +36,6 @@
> #include "copybook.h"
> #include "lexio.h"
>
> -#include <iostream>
> -
> extern int yy_flex_debug;
>
> source_format_t& cdf_source_format();
> @@ -1905,12 +1903,6 @@ cdftext::process_file( filespan_t mfile, int output,
> bool second_pass ) {
>
> // parse CDF directives
> while( mfile.next_line() ) {
> - if( false ) {
> - std::string line( mfile.ccur(), const_cast<const char *>(mfile.eol) );
> - std::cerr << __func__ << ": "
> - << mfile.lineno() << ":" << mfile.colno() << ": "
> - << line;
> - }
> yylloc = mfile.as_location();
> auto copied = parse_copy_directive(mfile);
> if( copied.parsed && copied.fd != -1 ) {
> --
> 2.51.0