From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3033 invoked by alias); 3 Dec 2018 13:35:23 -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 3012 invoked by uid 89); 3 Dec 2018 13:35:22 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.4 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_NUMSUBJECT,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=yg 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 ESMTP; Mon, 03 Dec 2018 13:35:20 +0000 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DCB86308FB85 for ; Mon, 3 Dec 2018 13:35:18 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-117-214.ams2.redhat.com [10.36.117.214]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 80F1626DD4 for ; Mon, 3 Dec 2018 13:35:18 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id wB3DZGt9012735 for ; Mon, 3 Dec 2018 14:35:16 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id wB3DZEus012734 for gcc-patches@gcc.gnu.org; Mon, 3 Dec 2018 14:35:14 +0100 Date: Mon, 03 Dec 2018 13:35:00 -0000 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [committed] Add testcase from PR tree-optimization/71109 Message-ID: <20181203133514.GV12380@tucnak> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg00072.txt.bz2 Hi! This testcase broke on x86_64-linux with -O3 with r227775 and got fixed or went latent with r236372. I've just committed the testcase to the testsuite as obvious, let's close the PR now. 2018-12-03 Jakub Jelinek PR tree-optimization/71109 * gcc.c-torture/compile/pr71109.c: New test. --- gcc/testsuite/gcc.c-torture/compile/pr71109.c.jj 2018-12-03 14:28:42.678952260 +0100 +++ gcc/testsuite/gcc.c-torture/compile/pr71109.c 2018-12-03 14:28:38.928013113 +0100 @@ -0,0 +1,31 @@ +/* PR tree-optimization/71109 */ + +struct S { int g, h; signed char i; int j; signed char k; int l[4]; } a, c; +struct T { signed char g; } e; +int *b, d; +static void foo (); + +void +bar (void) +{ + while (d) + { + int k; + struct T f[3]; + foo (bar, a); + for (k = 0;; k++) + f[k] = e; + } +} + +static inline void +foo (int x, struct S y, struct T z) +{ + for (z.g = 2; z.g; z.g--) + { + c = a = y; + *b |= 6; + if (y.g) + break; + } +} Jakub