From: Jakub Jelinek <jakub@redhat.com>
To: Tom de Vries <Tom_deVries@mentor.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PR65637][PATCH][3/5] Fix gcc_assert in expand_omp_for_static_chunk
Date: Thu, 03 Sep 2015 09:16:00 -0000 [thread overview]
Message-ID: <20150903090324.GL1847@tucnak.redhat.com> (raw)
In-Reply-To: <55E440BC.7020703@mentor.com>
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 <tom@codesourcery.com>
>
> 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 <tom@codesourcery.com>
> +
> + 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 <tom@codesourcery.com>
>
> * 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
next prev parent reply other threads:[~2015-09-03 9:03 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-15 13:10 [PR65637] Fix ssa-handling code " Tom de Vries
2015-04-15 13:15 ` [PR65637][PATCH][1/3] Fix gcc_assert " Tom de Vries
2015-08-31 12:00 ` [PR65637][PATCH][3/5] " Tom de Vries
2015-09-03 9:16 ` Jakub Jelinek [this message]
2015-04-15 13:17 ` [PR65637][PATCH][2/3] Fix inner loop phi " Tom de Vries
2015-08-31 12:03 ` [PR65637][PATCH][4/5] " Tom de Vries
2015-09-03 9:20 ` Jakub Jelinek
2015-04-15 13:23 ` [PR65637][PATCH][3/3] Handle 2 preds for fin_bb " Tom de Vries
2015-08-31 12:26 ` [PR65637][PATCH][5/5] " Tom de Vries
2015-09-03 9:40 ` Jakub Jelinek
2015-05-18 13:13 ` [PING][PR65637] Fix ssa-handling code " Tom de Vries
2015-05-18 14:19 ` Tom de Vries
2015-06-08 12:34 ` [PING^2][PR65637] " Tom de Vries
2015-08-31 11:44 ` [PR65637] " Tom de Vries
2015-08-31 11:51 ` [PATCH][1/5] Add param parloops-chunk-size Tom de Vries
2015-09-03 8:57 ` Jakub Jelinek
2015-08-31 11:55 ` [PATCH][2/5] Handle simple latch bb in expand_omp_for_static_chunk Tom de Vries
2015-09-03 9:02 ` Jakub Jelinek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150903090324.GL1847@tucnak.redhat.com \
--to=jakub@redhat.com \
--cc=Tom_deVries@mentor.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).