From: Martin Liska Date: Tue, 1 Dec 2020 16:33:35 +0000 (+0100) Subject: diagnostics: ignore -fmax-errors for ICE X-Git-Tag: upstream/12.2.0~11311 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=49ca22dd67817acd196e81f7615162a88cb39587;p=platform%2Fupstream%2Fgcc.git diagnostics: ignore -fmax-errors for ICE Right now I see: ./xgcc -B. ~/Programming/testcases/json.i -c -O2 -fmax-errors=1 /home/marxin/Programming/testcases/json.i: In function ‘json_variant_type’: /home/marxin/Programming/testcases/json.i:22:1: error: non-integral type switch statement 22 | } | ^ int * switch (v_2(D)) [INV], case 0B: [INV], case 5B: [INV], case 6B: [INV], case 7B: [INV], case 8B: [INV]> compilation terminated due to -fmax-errors=1. with the patch I get: ./xgcc -B. ~/Programming/testcases/json.i -c -O2 -fmax-errors=1 -c /home/marxin/Programming/testcases/json.i: In function ‘json_variant_type’: /home/marxin/Programming/testcases/json.i:22:1: error: non-integral type switch statement 22 | } | ^ int * switch (v_2(D)) [INV], case 0B: [INV], case 5B: [INV], case 6B: [INV], case 7B: [INV], case 8B: [INV]> during GIMPLE pass: iftoswitch /home/marxin/Programming/testcases/json.i:22:1: internal compiler error: verify_gimple failed 0xe4478c verify_gimple_in_cfg(function*, bool) /home/marxin/Programming/gcc/gcc/tree-cfg.c:5467 0xd201cf execute_function_todo /home/marxin/Programming/gcc/gcc/passes.c:2042 0xd2101c do_per_function /home/marxin/Programming/gcc/gcc/passes.c:1687 0xd2101c execute_todo /home/marxin/Programming/gcc/gcc/passes.c:2096 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. gcc/ChangeLog: * diagnostic.c (diagnostic_report_diagnostic): ICE causes to terminate compiler immediately, so I guess it should be printed always. --- diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c index fe509d8..da20cdb 100644 --- a/gcc/diagnostic.c +++ b/gcc/diagnostic.c @@ -1172,7 +1172,7 @@ diagnostic_report_diagnostic (diagnostic_context *context, return false; } - if (diagnostic->kind != DK_NOTE) + if (diagnostic->kind != DK_NOTE && diagnostic->kind != DK_ICE) diagnostic_check_max_errors (context); context->lock++;