From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 65363 invoked by alias); 3 Sep 2015 09:03:30 -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 65331 invoked by uid 89); 3 Sep 2015 09:03:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 03 Sep 2015 09:03:28 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id C724E8EA35; Thu, 3 Sep 2015 09:03:27 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-44.ams2.redhat.com [10.36.116.44]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t8393QFN007103 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 3 Sep 2015 05:03:27 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id t8393OpV013659; Thu, 3 Sep 2015 11:03:25 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id t8393OW2013658; Thu, 3 Sep 2015 11:03:24 +0200 Date: Thu, 03 Sep 2015 09:16:00 -0000 From: Jakub Jelinek To: Tom de Vries Cc: GCC Patches Subject: Re: [PR65637][PATCH][3/5] Fix gcc_assert in expand_omp_for_static_chunk Message-ID: <20150903090324.GL1847@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <552E6341.4040401@mentor.com> <552E6468.40403@mentor.com> <55E440BC.7020703@mentor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55E440BC.7020703@mentor.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg00226.txt.bz2 On Mon, Aug 31, 2015 at 01:55:40PM +0200, Tom de Vries wrote: > Fix gcc_assert in expand_omp_for_static_chunk > > 2015-08-31 Tom de Vries > > PR tree-optimization/65637 > * omp-low.c (expand_omp_for_static_chunk): Fix gcc_assert for the case > that head is NULL. > > * gcc.dg/autopar/pr46099-chunk-size.c: New test. > --- > gcc/ChangeLog | 6 +++ > gcc/omp-low.c | 2 +- > gcc/testsuite/gcc.dg/autopar/pr46099-chunk-size.c | 47 +++++++++++++++++++++++ > 3 files changed, 54 insertions(+), 1 deletion(-) > create mode 100644 gcc/testsuite/gcc.dg/autopar/pr46099-chunk-size.c > > diff --git a/gcc/ChangeLog b/gcc/ChangeLog > index a0123b1..5a273ba 100644 > --- a/gcc/ChangeLog > +++ b/gcc/ChangeLog > @@ -1,3 +1,9 @@ > +2015-05-18 Tom de Vries > + > + PR tree-optimization/65637 > + * omp-low.c (expand_omp_for_static_chunk): Fix gcc_assert for the case > + that head is NULL. > + > 2015-08-31 Tom de Vries > > * tree-ssa-loop-manip.c (find_uses_to_rename_use) > diff --git a/gcc/omp-low.c b/gcc/omp-low.c > index c3dfc51..4e732ae 100644 > --- a/gcc/omp-low.c > +++ b/gcc/omp-low.c > @@ -7326,7 +7326,7 @@ expand_omp_for_static_chunk (struct omp_region *region, > locus = redirect_edge_var_map_location (vm); > add_phi_arg (nphi, redirect_edge_var_map_def (vm), re, locus); > } > - gcc_assert (gsi_end_p (psi) && i == head->length ()); > + gcc_assert (gsi_end_p (psi) && (head == NULL || i == head->length ())); > redirect_edge_var_map_clear (re); > while (1) > { Ok. > diff --git a/gcc/testsuite/gcc.dg/autopar/pr46099-chunk-size.c b/gcc/testsuite/gcc.dg/autopar/pr46099-chunk-size.c > new file mode 100644 > index 0000000..709841a > --- /dev/null > +++ b/gcc/testsuite/gcc.dg/autopar/pr46099-chunk-size.c I'd name the testcase just pr46099-2.c. > @@ -0,0 +1,47 @@ > +/* PR tree-optimization/46099. */ > +/* { dg-do compile } */ > +/* { dg-options "-ftree-parallelize-loops=2 -fcompare-debug -O --param parloops-chunk-size=100" } */ But more importantly, if you haven't changed anything in the testcase beyond dg-options, just #include "pr46099.c" here rather than duplicating the whole testcase. Ok with that change. Jakub