From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp5-g21.free.fr (smtp5-g21.free.fr [IPv6:2a01:e0c:1:1599::14]) by sourceware.org (Postfix) with ESMTPS id B16873851C34 for ; Thu, 2 Jul 2020 08:51:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B16873851C34 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=libertysurf.fr Authentication-Results: sourceware.org; spf=none smtp.mailfrom=ebotcazou@libertysurf.fr Received: from polaris.localnet (unknown [IPv6:2a01:e0a:41b:9230:1a03:73ff:fe45:373a]) by smtp5-g21.free.fr (Postfix) with ESMTPS id C8CFE5FF6C; Thu, 2 Jul 2020 10:51:23 +0200 (CEST) From: Eric Botcazou To: richard.sandiford@arm.com Cc: Jonathan Wakely , gcc-bugs@gcc.gnu.org, haoxintu@gmail.com Subject: Re: How GCC treats ice-on-invalid-code? Date: Thu, 02 Jul 2020 10:51:23 +0200 Message-ID: <4346527.u1zSKOHnED@polaris> In-Reply-To: References: <20200630143847.GA3488494@redhat.com> <2976657.y7V46JpDgB@polaris> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no 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-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2020 08:51:30 -0000 > You mean, an ICE is perfectly valid as the first (and obviously then > only) error diagnostic the compiler prints for =E2=80=9Cgarbage input=E2= =80=9D? > If so, I don't think that's true. What counts as =E2=80=9Cgarbage=E2=80= =9D seems > a bit too subjective for that anyway. When the input is totally nonsensical, e.g. generated by a machine for the= =20 sole purpose of torturing the compiler, an ICE is good enough and IMO the b= ug=20 report should essentially be ignored. We have hundreds of open bug reports= =20 for perfectly sensible code and any of them should have higher priority. > E.g. deleting a chunk of lines from a file creates something that makes > no sense and might be considered garbage, but that can easily happen > with a botched resolution to a merge conflict (or being too trigger-happy > with git rerere :-)). I don't think it's OK for the compiler simply to > crash without first giving the user an idea of what's wrong. Sure, if the input originally comes from a real program, it's not garbage. =2D-=20 Eric Botcazou