From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38671 invoked by alias); 6 Feb 2018 15:52:45 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 38573 invoked by uid 89); 6 Feb 2018 15:52:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 06 Feb 2018 15:52:40 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BE5CB80484 for ; Tue, 6 Feb 2018 15:52:38 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-117-22.ams2.redhat.com [10.36.117.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5791A51DD8; Tue, 6 Feb 2018 15:52:34 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id w16FqV75027153; Tue, 6 Feb 2018 16:52:32 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id w16FqUAV026845; Tue, 6 Feb 2018 16:52:30 +0100 Date: Tue, 06 Feb 2018 15:52:00 -0000 From: Jakub Jelinek To: Aldy Hernandez Cc: gcc-patches Subject: Re: PR tree-optimization/84225: do not pass non-integers to operation_no_trapping_overflow Message-ID: <20180206155230.GB5867@tucnak> Reply-To: Jakub Jelinek References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-IsSubscribed: yes X-SW-Source: 2018-02/txt/msg00245.txt.bz2 On Tue, Feb 06, 2018 at 10:43:21AM -0500, Aldy Hernandez wrote: > In this PR we are ICEing here: > > bool > operation_no_trapping_overflow (tree type, enum tree_code code) > { > gcc_checking_assert (ANY_INTEGRAL_TYPE_P (type)); > > ...because we are being passed a pointer type from find_trapping_overflow. > > Fixed by avoiding passing non-integrals from find_trapping_overflow. > > Pre-approved by Jakub. Committed. > > Tested on x86-64 Linux. > gcc/ > > PR tree-optimization/84225 > * tree-eh.c (find_trapping_overflow): Only call > operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P. Can you please add a testcase too? While the reported ICE was on an existing testcase, it was with non-standard options on it. So e.g. gcc.dg/pr84225.c that would contain: /* PR tree-optimization/84225 */ /* { dg-do compile { target int32plus } } */ /* { dg-options "-Ofast -ftrapv" } */ #include "torture/pr69714.c" or so should hopefully do the job, just test with cc1 before and after this change to verify it ICEd and doesn't ICE anymore. Jakub