From patchwork Tue May 21 07:59:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 245218 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]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id F1A282C00B8 for ; Tue, 21 May 2013 17:59:43 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:reply-to:mime-version:content-type; q=dns; s=default; b=BDjlkMu7dPSW+aeCmAjK+VCyXJq7XjG4OB0ghWAoZVP HZCkygvQvH6bhhII0eJngnltvHSo7BhW2AVXnVzFGrp2gzLNg2FIzMbiIjaCtQy6 Y2wNlNLwBLmMOhAFbCf2Ni4ChjDJvjrP63Ndh9kn05WOGqTR2Bc0ORRYlEHLUAv8 = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:reply-to:mime-version:content-type; s=default; bh=pFzxqofJzrFjagsBamuCzG/4FVo=; b=Tj/NoiB/UxxM11sD8 2Og3VtPy2OMGRWVRmwEyZbCLgW+ofxvDAuA+yJsS6GKOIeUjcHe/tjPaWLWj5nw/ lMw/mZ0Uk+W2QRLsJf6+sxDqqZBP4lF26GBqpVVgR8NXltDAx5OAvyd7w/Np/xZe cq2byBkfZG9sEZb6uvhyxFDHr8= Received: (qmail 30942 invoked by alias); 21 May 2013 07:59:37 -0000 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 Received: (qmail 30929 invoked by uid 89); 21 May 2013 07:59:35 -0000 X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_HOSTKARMA_W, RCVD_IN_HOSTKARMA_WL, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 21 May 2013 07:59:35 +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 r4L7xYwv029325 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 21 May 2013 03:59:34 -0400 Received: from zalov.cz (vpn-49-15.rdu2.redhat.com [10.10.49.15]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r4L7xWWf018405 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 21 May 2013 03:59:33 -0400 Received: from zalov.cz (localhost [127.0.0.1]) by zalov.cz (8.14.5/8.14.5) with ESMTP id r4L7xVTG008173 for ; Tue, 21 May 2013 09:59:31 +0200 Received: (from jakub@localhost) by zalov.cz (8.14.5/8.14.5/Submit) id r4L7xTYo008172 for gcc-patches@gcc.gnu.org; Tue, 21 May 2013 09:59:29 +0200 Date: Tue, 21 May 2013 09:59:28 +0200 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [committed] Add testcase from PR57321 Message-ID: <20130521075928.GR1377@tucnak.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Hi! This PR has been fixed recently by PR56988 fix, but adding the testcase IMHO doesn't hurt. Committed to trunk/4.8. 2013-05-21 Jakub Jelinek PR tree-optimization/57321 * gcc.c-torture/execute/pr57321.c: New test. Jakub --- gcc/testsuite/gcc.c-torture/execute/pr57321.c.jj 2013-05-21 09:43:48.099364022 +0200 +++ gcc/testsuite/gcc.c-torture/execute/pr57321.c 2013-05-21 09:43:30.000000000 +0200 @@ -0,0 +1,24 @@ +/* PR tree-optimization/57321 */ + +int a = 1, *b, **c; + +static int +foo (int *p) +{ + if (*p == a) + { + int *i[7][5] = { { 0 } }; + int **j[1][1]; + j[0][0] = &i[0][0]; + *b = &p != c; + } + return 0; +} + +int +main () +{ + int i = 0; + foo (&i); + return 0; +}