https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67460
--- Comment #3 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> --- (In reply to Manuel López-Ibáñez from comment #2) > Again a problem caused by buffering. Some warnings converted into error may > get buffered and then discarded but that doesn't reset > ->some_warnings_are_errors. However, we probably do not need this variable > at all, since we now count explicitly how many warnings were converted into > errors and this number is kept up to date for buffered diagnostics. I think > this patch should fix it, but I have not tested it yet: yes, fixes the testcase.