diff --git a/gcc/cobol/parse_ante.h b/gcc/cobol/parse_ante.h index c8c8c1b8b4677e674f5f6b52e38b568353f54332..ae35a37e3e647bd9dc08791fe064fb5cd69e41aa 100644 --- a/gcc/cobol/parse_ante.h +++ b/gcc/cobol/parse_ante.h @@ -365,7 +365,7 @@ struct evaluate_elem_t { typedef list<case_t>::iterator case_iter; case_iter pcase; -void dump() const { + void dump() const { warnx( "nother=%zu label '%s', %zu cases", nother, label.name, cases.size() ); std::for_each( cases.begin(), cases.end(), case_t::Dump ); } diff --git a/gcc/cobol/symbols.cc b/gcc/cobol/symbols.cc index 0fb7ee0889dab346996dd4a10d6552a91b2def63..d02a01c3dc118f49440fce4a993f1f7e6ea2b184 100644 --- a/gcc/cobol/symbols.cc +++ b/gcc/cobol/symbols.cc @@ -3187,7 +3187,13 @@ symbol_temporaries_free() { auto freed = std::inserter(temporaries.freed[type], temporaries.freed[type].begin()); - std::copy( used.begin(), used.end(), freed ); + std::transform( used.begin(), used.end(), freed, + []( auto field ) { + if( field->type == FldConditional ) { + field->attr &= temporary_e; + } + return field; + } ); used.clear(); } }