From patchwork Wed Nov 7 10:53:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kaz Kojima X-Patchwork-Id: 197646 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 1E87A2C00FE for ; Wed, 7 Nov 2012 21:53:55 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1352890436; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Date:Message-Id:To:Cc:Subject:From:In-Reply-To:References: Mime-Version:Content-Type:Content-Transfer-Encoding:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=KL5SF5zXwrRja4ZEcwKM0dnsoHw=; b=Xog8GgEGtkkgdZTXdFYptQygs/ii42svvnDyjEFennPWMZ1ehFTCahVEYbODKa iFHdaryzuCKLiqd4LQ7RWplPTznzuCQHOb/G5BT7xZvsW7P0gF+oydv6oINvX0Hj QjSdVCalC/H7xp2V/6w546qNV+rAkZeuzkxT/5GDwcZtE= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Date:Message-Id:To:Cc:Subject:From:In-Reply-To:References:Mime-Version:Content-Type:Content-Transfer-Encoding:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=uJAMYjvF3yMiaBPeguuJe8h/0VV6qSY4GIgmIAZQtAadWCtDh2oqkslPqLKhEe h868VQN8U9NmHFDsV4Csrsi+9JHIKJ+XqTQz9mDW6TDgH6iR1C+70//wh73rifv0 rg0KNILXsEBotX23auNAtycHsySNudw+zSXV9s/Jdoz6g=; Received: (qmail 1966 invoked by alias); 7 Nov 2012 10:53:48 -0000 Received: (qmail 1958 invoked by uid 22791); 7 Nov 2012 10:53:47 -0000 X-SWARE-Spam-Status: No, hits=-3.0 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KHOP_THREADED, RCVD_VIA_APNIC, RP_MATCHES_RCVD, SPF_HELO_PASS, TW_ZJ X-Spam-Check-By: sourceware.org Received: from mo10.iij4u.or.jp (HELO mo.iij4u.or.jp) (210.138.174.78) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 07 Nov 2012 10:53:38 +0000 Received: by mo.iij4u.or.jp (mo10) id qA7Araor005099; Wed, 7 Nov 2012 19:53:36 +0900 Received: from localhost (238.152.138.210.bn.2iij.net [210.138.152.238]) by mbox.iij4u.or.jp (mbox10) id qA7Araus002390; Wed, 7 Nov 2012 19:53:36 +0900 Date: Wed, 07 Nov 2012 19:53:34 +0900 (JST) Message-Id: <20121107.195334.420788682.kkojima@rr.iij4u.or.jp> To: ubizjak@gmail.com Cc: gcc-patches@gcc.gnu.org Subject: Re: [patch RFA middle-end] Fix PR middle-end/49220 From: Kaz Kojima In-Reply-To: References: <20121107.182318.296903589.kkojima@rr.iij4u.or.jp> <2691053.Zu11KecAgP@polaris> Mime-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Uros Bizjak wrote: > Please also add the testcase from the PR to the testsuite. For the record, I've committed the testcase below from the PR. Regards, kaz --- 2012-11-07 Kaz Kojima * gcc.c-torture/compile/pr49220.c: New test. --- ORIG/trunk/gcc/testsuite/gcc.c-torture/compile/pr49220.c 1970-01-01 09:00:00.000000000 +0900 +++ trunk/gcc/testsuite/gcc.c-torture/compile/pr49220.c 2012-11-07 19:29:26.000000000 +0900 @@ -0,0 +1,25 @@ +int array[2]; + +static int +func1 (int b) +{ + return b; +} + +static int +func2 (int a, int b) +{ + return b == 0 ? a : b; +} + +int +func3 (int a) +{ +} + +int * +func4 (int *arg) +{ + *arg = func1 ((func2 (func3 (array[0]), *arg)) | array[0]); + return &array[1]; +}