From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15782 invoked by alias); 3 Jun 2016 07:06:47 -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 15744 invoked by uid 89); 3 Jun 2016 07:06:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:745, respond 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 03 Jun 2016 07:06:45 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 00AA862668; Fri, 3 Jun 2016 07:06:44 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-51.ams2.redhat.com [10.36.116.51]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5376f7V010124 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 3 Jun 2016 03:06:43 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id u5376e68007411; Fri, 3 Jun 2016 09:06:40 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id u5376bO6007410; Fri, 3 Jun 2016 09:06:37 +0200 Date: Fri, 03 Jun 2016 07:06:00 -0000 From: Jakub Jelinek To: Martin Sebor Cc: Gcc Patch List , Jason Merrill , "Joseph S. Myers" Subject: Re: [PATCH] integer overflow checking builtins in constant expressions Message-ID: <20160603070637.GA7387@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <57263154.5080401@gmail.com> <20160531215025.GK28550@tucnak.redhat.com> <574E13DD.9040401@gmail.com> <20160601075212.GL28550@tucnak.redhat.com> <574EFC8F.2040400@gmail.com> <574FA3BC.8090603@gmail.com> <20160602072316.GY28550@tucnak.redhat.com> <5750BF82.5030203@gmail.com> <5750CF25.1080801@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5750CF25.1080801@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes X-SW-Source: 2016-06/txt/msg00240.txt.bz2 Hi! On Thu, Jun 02, 2016 at 06:28:21PM -0600, Martin Sebor wrote: First of all, can you please respond to the mail I've sent about NULL argument issues (and proposal for __builtin_*_overflow_p)? This patch as well as the nonnull attribute patch then depends on that decision... > + { > + tree type = TREE_TYPE (TREE_TYPE (t)); > + tree vflow = arith_overflowed_p (opcode, type, arg0, arg1) > + ? integer_one_node : integer_zero_node; This looks incorrect, the return type is TREE_TYPE (t), some complex integer type, therefore vflow needs to be tree vflow = build_int_cst (TREE_TYPE (TREE_TYPE (t)), arith_overflowed_p (opcode, type, arg0, arg1) ? 1 : 0); no? Jakub