public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-1064] Fix C++ libgomp regressions
@ 2021-05-26  8:03 Eric Botcazou
  0 siblings, 0 replies; only message in thread
From: Eric Botcazou @ 2021-05-26  8:03 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:a0d371a25148d113f7c3657f36fbf7dcb5e1f63d

commit r12-1064-ga0d371a25148d113f7c3657f36fbf7dcb5e1f63d
Author: Eric Botcazou <ebotcazou@adacore.com>
Date:   Wed May 26 09:51:36 2021 +0200

    Fix C++ libgomp regressions
    
    This is only a stopgap fix.
    
    gcc/
            * gimplify.c (gimplify_decl_expr): Do not clear TREE_READONLY on a
            DECL which is a reference for OMP.

Diff:
---
 gcc/gimplify.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index ed825a93aa1..54bf59ab9d0 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -1829,7 +1829,7 @@ gimplify_decl_expr (tree *stmt_p, gimple_seq *seq_p)
 	      gimplify_and_add (init, seq_p);
 	      ggc_free (init);
 	      /* Clear TREE_READONLY if we really have an initialization.  */
-	      if (!DECL_INITIAL (decl))
+	      if (!DECL_INITIAL (decl) && !omp_is_reference (decl))
 		TREE_READONLY (decl) = 0;
 	    }
 	  else


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-26  8:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-26  8:03 [gcc r12-1064] Fix C++ libgomp regressions Eric Botcazou

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).