Hi!

On 2019-10-16T18:52:55+0200, Jakub Jelinek <ja...@redhat.com> wrote:
> On Wed, Oct 16, 2019 at 03:22:52PM +0200, Thomas Schwinge wrote:
>> Stumbled over this while reviewing Julian's "Factor out duplicate code in
>> gimplify_scan_omp_clauses":
>
>> ..., which here gets writte to...
>> 
>> > +                      if (base != decl)
>> > +                        break;
>> > +                      gcc_assert (offset == NULL_TREE
>> > +                                  || TREE_CODE (offset) == INTEGER_CST);
>> 
>> ..., but here we again check 'offset', not 'offset2'...
>
> Yes, it indeed [...]

Thanks.  See attached; committed "Assert 'offset2' instead of 'offset' in
'gcc/gimplify.c:gimplify_scan_omp_clauses'" to trunk in r278038,
gcc-9-branch in r278039, gcc-8-branch in r278040, gcc-7-branch (slightly
different patch) omitted as that one's frozen for the final release, and
this fix isn't important enough.


Grüße
 Thomas


From c88bb56e02340083d10a728c2ca05748df5c6218 Mon Sep 17 00:00:00 2001
From: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Mon, 11 Nov 2019 08:18:46 +0000
Subject: [PATCH] Assert 'offset2' instead of 'offset' in
 'gcc/gimplify.c:gimplify_scan_omp_clauses'

... to fix a long-time typo/copy'n'past-o.

	gcc/
	* gimplify.c (gimplify_scan_omp_clauses): Assert 'offset2' instead
	of 'offset'.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@278038 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog  | 3 +++
 gcc/gimplify.c | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a1e928bf804d..ca0cebc20180 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
 2019-11-11  Thomas Schwinge  <tho...@codesourcery.com>
 
+	* gimplify.c (gimplify_scan_omp_clauses): Assert 'offset2' instead
+	of 'offset'.
+
 	* Makefile.in (LANG_CONFIGUREFRAGS): Define.
 	(config.status): Use/depend on it.
 	* configure.ac (all_lang_configurefrags): Track, 'AC_SUBST'.
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 5fa0ba6dda60..2bc41cf98ae9 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -8890,8 +8890,8 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p,
 			      break;
 			    if (scp)
 			      continue;
-			    gcc_assert (offset == NULL_TREE
-					|| poly_int_tree_p (offset));
+			    gcc_assert (offset2 == NULL_TREE
+					|| poly_int_tree_p (offset2));
 			    tree d1 = OMP_CLAUSE_DECL (*sc);
 			    tree d2 = OMP_CLAUSE_DECL (c);
 			    while (TREE_CODE (d1) == ARRAY_REF)
-- 
2.17.1

From a3174355911ea11b2e1f2786a7bffe2c5489e128 Mon Sep 17 00:00:00 2001
From: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Mon, 11 Nov 2019 08:19:23 +0000
Subject: [PATCH] Assert 'offset2' instead of 'offset' in
 'gcc/gimplify.c:gimplify_scan_omp_clauses'

... to fix a long-time typo/copy'n'past-o.

	gcc/
	* gimplify.c (gimplify_scan_omp_clauses): Assert 'offset2' instead
	of 'offset'.

Backport from trunk r278038.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-9-branch@278039 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog  | 4 ++++
 gcc/gimplify.c | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 52d867db50a1..fc19dae278d4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
 2019-11-11  Thomas Schwinge  <tho...@codesourcery.com>
 
+	Backport from trunk:
+	* gimplify.c (gimplify_scan_omp_clauses): Assert 'offset2' instead
+	of 'offset'.
+
 	Backport from trunk:
 	* Makefile.in (LANG_CONFIGUREFRAGS): Define.
 	(config.status): Use/depend on it.
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 28e13a710215..a0cb6c402bcf 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -8718,8 +8718,8 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p,
 			      break;
 			    if (scp)
 			      continue;
-			    gcc_assert (offset == NULL_TREE
-					|| poly_int_tree_p (offset));
+			    gcc_assert (offset2 == NULL_TREE
+					|| poly_int_tree_p (offset2));
 			    tree d1 = OMP_CLAUSE_DECL (*sc);
 			    tree d2 = OMP_CLAUSE_DECL (c);
 			    while (TREE_CODE (d1) == ARRAY_REF)
-- 
2.17.1

From 2c1fdb6ef7fc5fbde790143c9c58b0f10241f9d8 Mon Sep 17 00:00:00 2001
From: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Mon, 11 Nov 2019 08:19:41 +0000
Subject: [PATCH] Assert 'offset2' instead of 'offset' in
 'gcc/gimplify.c:gimplify_scan_omp_clauses'

... to fix a long-time typo/copy'n'past-o.

	gcc/
	* gimplify.c (gimplify_scan_omp_clauses): Assert 'offset2' instead
	of 'offset'.

Backport from trunk r278038.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@278040 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog  | 4 ++++
 gcc/gimplify.c | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 80bf2e121c63..29441ada5dd3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
 2019-11-11  Thomas Schwinge  <tho...@codesourcery.com>
 
+	Backport from trunk:
+	* gimplify.c (gimplify_scan_omp_clauses): Assert 'offset2' instead
+	of 'offset'.
+
 	Backport from trunk:
 	* Makefile.in (LANG_CONFIGUREFRAGS): Define.
 	(config.status): Use/depend on it.
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index fcb50c8e0476..3bfd0692103b 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -8181,8 +8181,8 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p,
 			      break;
 			    if (scp)
 			      continue;
-			    gcc_assert (offset == NULL_TREE
-					|| poly_int_tree_p (offset));
+			    gcc_assert (offset2 == NULL_TREE
+					|| poly_int_tree_p (offset2));
 			    tree d1 = OMP_CLAUSE_DECL (*sc);
 			    tree d2 = OMP_CLAUSE_DECL (c);
 			    while (TREE_CODE (d1) == ARRAY_REF)
-- 
2.17.1

Attachment: signature.asc
Description: PGP signature

Reply via email to