From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id CEC303844041 for ; Tue, 1 Dec 2020 16:35:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CEC303844041 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mliska@suse.cz X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id C0F1EAE93 for ; Tue, 1 Dec 2020 16:35:51 +0000 (UTC) From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Subject: [PATCH] diagnostics: ignore -fmax-errors for ICE To: gcc-patches@gcc.gnu.org Message-ID: <518a8939-5b1a-6717-6a11-ca2ce73ff5fa@suse.cz> Date: Tue, 1 Dec 2020 17:35:51 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_SHORT, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2020 16:35:54 -0000 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. --- gcc/diagnostic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c index fe509d88e6d..da20cdb2703 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++; -- 2.29.2