From patchwork Wed Sep 20 11:15:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 816152 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-462574-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="yP5/5U5m"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xxxxc3TF0z9sPs for ; Wed, 20 Sep 2017 21:15:46 +1000 (AEST) 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:mime-version:content-type; q=dns; s= default; b=X3/mSCbnxqDyZVLrqv8J4kvE0EbxEPLpOmwaAa19ZSKlFVOfv7qa7 bbf26aqGvkpmbiPgh9uX9CcinL8M7NJccs4YmKRkwqzVPKfQPnUsRL1uymd5/RpY tIu7miRD8rKKgeaK4If3amS7EgRfoLZSSDmN+ZLgM+nvqtfLntZDPA= 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:mime-version:content-type; s= default; bh=UHrqHbxhPYMiq3c227BID93vN1Q=; b=yP5/5U5mWRHAPQb6TeAv 9iw4WB/aoi1Oj6ytjoKA2Zuns9oLMbXXJLOqVoCyxWd403iLUDHOLkYLxO5PxRt3 GgvoekGvW5oF24RYkvRZp9wFai3RP5ey7V7jVlecwJXvT9TYxrxomL+BxoxTT6iC mf4euoe7yDj2xbkpGW7Uooo= Received: (qmail 43926 invoked by alias); 20 Sep 2017 11:15: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 43848 invoked by uid 89); 20 Sep 2017 11:15:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:748 X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 20 Sep 2017 11:15:28 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 3A2555CD00 for ; Wed, 20 Sep 2017 11:15:26 +0000 (UTC) Date: Wed, 20 Sep 2017 13:15:26 +0200 (CEST) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Add testcase for PR77362 Message-ID: User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Which no longer fails. Tested on x86_64-unknown-linux-gnu, applied. Richard. 2017-09-20 Richard Biener PR tree-optimization/77362 * gcc.dg/graphite/pr77362.c: New testcase. Index: gcc/testsuite/gcc.dg/graphite/pr77362.c =================================================================== --- gcc/testsuite/gcc.dg/graphite/pr77362.c (nonexistent) +++ gcc/testsuite/gcc.dg/graphite/pr77362.c (working copy) @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -floop-nest-optimize" } */ + +int mc[2]; +int f2, sk; +short int hm; + +void +zm (void) +{ + int k1; + + for (k1 = 0; k1 < 2; ++k1) + { + for (sk = 0; sk < 2; ++sk) + mc[sk] = hm = ++f2; + if (hm >= 0) + ++hm; + } +} +