From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5918 invoked by alias); 30 Jun 2011 08:17:11 -0000 Received: (qmail 5906 invoked by uid 22791); 30 Jun 2011 08:17:08 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 30 Jun 2011 08:16:49 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5U8GmNf017313 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 30 Jun 2011 04:16:48 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p5U8GlVn020962 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 30 Jun 2011 04:16:48 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (localhost.localdomain [127.0.0.1]) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4) with ESMTP id p5U8Glt4015824 for ; Thu, 30 Jun 2011 10:16:47 +0200 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id p5U8GkYQ015822 for gcc-patches@gcc.gnu.org; Thu, 30 Jun 2011 10:16:46 +0200 Date: Thu, 30 Jun 2011 10:12:00 -0000 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix tree-ssa-structalias.c bug with BUILT_IN_{MEM,ST}PCPY_CHK Message-ID: <20110630081646.GW16443@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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 X-SW-Source: 2011-06/txt/msg02320.txt.bz2 Hi! In my recent patch http://gcc.gnu.org/ml/gcc-patches/2011-06/msg01609.html I've missed a spot where it was special casing the builtins that don't return their first argument, but instead of that return their first argument plus something. Fixed thusly, committed as obvious. 2011-06-30 Jakub Jelinek * tree-ssa-structalias.c (find_func_aliases_for_builtin_call): Fix handling of BUILT_IN_MEMPCPY_CHK and BUILT_IN_STPCPY_CHK. --- gcc/tree-ssa-structalias.c (revision 175681) +++ gcc/tree-ssa-structalias.c (working copy) @@ -4014,7 +4014,9 @@ find_func_aliases_for_builtin_call (gimp get_constraint_for (res, &lhsc); if (DECL_FUNCTION_CODE (fndecl) == BUILT_IN_MEMPCPY || DECL_FUNCTION_CODE (fndecl) == BUILT_IN_STPCPY - || DECL_FUNCTION_CODE (fndecl) == BUILT_IN_STPNCPY) + || DECL_FUNCTION_CODE (fndecl) == BUILT_IN_STPNCPY + || DECL_FUNCTION_CODE (fndecl) == BUILT_IN_MEMPCPY_CHK + || DECL_FUNCTION_CODE (fndecl) == BUILT_IN_STPCPY_CHK) get_constraint_for_ptr_offset (dest, NULL_TREE, &rhsc); else get_constraint_for (dest, &rhsc); Jakub