rpms/gcc/F-12 gcc44-rh533181.patch, NONE, 1.1 .cvsignore, 1.349, 1.350 gcc.spec, 1.138, 1.139 sources, 1.358, 1.359

Jakub Jelinek jakub at fedoraproject.org
Mon Jul 26 09:09:00 UTC 2010


Author: jakub

Update of /cvs/pkgs/rpms/gcc/F-12
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv2168

Modified Files:
	.cvsignore gcc.spec sources 
Added Files:
	gcc44-rh533181.patch 
Log Message:
4.4.4-13

gcc44-rh533181.patch:
 fortran/trans-openmp.c        |   12 ++++++++++++
 gimplify.c                    |   31 ++++++++++++++++++++++++++-----
 omp-low.c                     |   11 +++++++++++
 testsuite/gcc.dg/gomp/tls-3.c |   21 +++++++++++++++++++++
 4 files changed, 70 insertions(+), 5 deletions(-)

--- NEW FILE gcc44-rh533181.patch ---
2010-07-22  Jakub Jelinek  <jakub at redhat.com>

	* gimplify.c (enum gimplify_omp_var_data): Add
	GOVD_THREADPRIVATE_WARNED.
	(gimplify_bind_expr): Add GOVD_LOCAL | GOVD_SEEN even for global vars.
	(omp_notice_threadprivate_variable): Note used threadprivate vars
	with current function's context in shared clauses.
	(gimplify_adjust_omp_clauses_1): Allow globals with current function's
	context in taskreg shared clause.
	* omp-low.c (lower_rec_input_clauses): For function-local is_global_var
	VAR_DECLs in shared clauses add a decl copy with DECL_VALUE_EXPR
	pointing to the original.

	* trans-openmp.c (gfc_omp_private_debug_clause): Return false for
	threadprivate decls.

	* gcc.dg/gomp/tls-3.c: New test.

--- gcc/fortran/trans-openmp.c.jj	2010-06-24 21:47:09.908230044 +0200
+++ gcc/fortran/trans-openmp.c	2010-07-26 10:45:15.830229443 +0200
@@ -351,6 +351,18 @@ gfc_omp_disregard_value_expr (tree decl,
 bool
 gfc_omp_private_debug_clause (tree decl, bool shared)
 {
+  if (TREE_STATIC (decl) || DECL_EXTERNAL (decl))
+    {
+      if (DECL_THREAD_LOCAL_P (decl))
+	return false;
+      if (DECL_HAS_VALUE_EXPR_P (decl))
+	{
+	  tree value = get_base_address (DECL_VALUE_EXPR (decl));
+	  if (value && DECL_P (value) && DECL_THREAD_LOCAL_P (value))
+	    return false;
+	}
+    }
+
   if (GFC_DECL_CRAY_POINTEE (decl))
     return true;
 
--- gcc/gimplify.c.jj	2010-07-09 09:01:37.049604412 +0200
+++ gcc/gimplify.c	2010-07-26 10:50:05.646291216 +0200
@@ -66,6 +66,7 @@ enum gimplify_omp_var_data
   GOVD_LOCAL = 128,
   GOVD_DEBUG_PRIVATE = 256,
   GOVD_PRIVATE_OUTER_REF = 512,
+  GOVD_THREADPRIVATE_WARNED = 1024,
   GOVD_DATA_SHARE_CLASS = (GOVD_SHARED | GOVD_PRIVATE | GOVD_FIRSTPRIVATE
 			   | GOVD_LASTPRIVATE | GOVD_REDUCTION | GOVD_LOCAL)
 };
@@ -1234,7 +1235,7 @@ gimplify_bind_expr (tree *expr_p, gimple
 	  struct gimplify_omp_ctx *ctx = gimplify_omp_ctxp;
 
 	  /* Mark variable as local.  */
-	  if (ctx && !is_global_var (t)
+	  if (ctx
 	      && (! DECL_SEEN_IN_BIND_EXPR_P (t)
 		  || splay_tree_lookup (ctx->variables,
 					(splay_tree_key) t) == NULL))
@@ -5339,18 +5340,36 @@ omp_notice_threadprivate_variable (struc
 {
   splay_tree_node n;
 
-  if (ctx->region_type != ORT_UNTIED_TASK)
+  while (ctx && ctx->region_type == ORT_WORKSHARE)
+    {
+      n = splay_tree_lookup (ctx->variables, (splay_tree_key)decl);
+      if (n != NULL)
+	{
+	  gcc_assert (n->value & GOVD_LOCAL);
+	  return false;
+	}
+      ctx = ctx->outer_context;
+    }
+  if (ctx == NULL)
     return false;
+
   n = splay_tree_lookup (ctx->variables, (splay_tree_key)decl);
   if (n == NULL)
+    n = splay_tree_insert (ctx->variables, (splay_tree_key)decl,
+			   DECL_CONTEXT (decl) == current_function_decl
+			   ? GOVD_SHARED | GOVD_SEEN : 0);
+  if (ctx->region_type == ORT_UNTIED_TASK
+      && (n->value & GOVD_THREADPRIVATE_WARNED) == 0)
     {
       error ("threadprivate variable %qs used in untied task",
 	     IDENTIFIER_POINTER (DECL_NAME (decl)));
       error ("%Henclosing task", &ctx->location);
-      splay_tree_insert (ctx->variables, (splay_tree_key)decl, 0);
+      n->value |= GOVD_THREADPRIVATE_WARNED;
     }
   if (decl2)
-    splay_tree_insert (ctx->variables, (splay_tree_key)decl2, 0);
+    splay_tree_insert (ctx->variables, (splay_tree_key)decl2,
+		       DECL_CONTEXT (decl2) == current_function_decl
+		       ? GOVD_SHARED | GOVD_SEEN : 0);
   return false;
 }
 
@@ -5779,7 +5798,9 @@ gimplify_adjust_omp_clauses_1 (splay_tre
 		break;
 	      ctx = ctx->outer_context;
 	    }
-	  if (ctx == NULL)
+	  if (ctx == NULL
+	      && (DECL_CONTEXT (decl) != current_function_decl
+		  || gimplify_omp_ctxp->region_type == ORT_WORKSHARE))
 	    return 0;
 	}
       code = OMP_CLAUSE_SHARED;
--- gcc/omp-low.c.jj	2010-06-11 11:06:00.913659301 +0200
+++ gcc/omp-low.c	2010-07-26 10:45:15.866229447 +0200
@@ -2222,6 +2222,17 @@ lower_rec_input_clauses (tree clauses, g
 		continue;
 	      break;
 	    case OMP_CLAUSE_SHARED:
+	      if (pass == 0
+		  && is_global_var (OMP_CLAUSE_DECL (c))
+		  && (DECL_CONTEXT (OMP_CLAUSE_DECL (c))
+		      == current_function_decl)
+		  && is_taskreg_ctx (ctx)
+		  && !DECL_IGNORED_P (OMP_CLAUSE_DECL (c)))
+		{
+		  new_var = omp_copy_decl_1 (OMP_CLAUSE_DECL (c), ctx);
+		  SET_DECL_VALUE_EXPR (new_var, OMP_CLAUSE_DECL (c));
+		  DECL_HAS_VALUE_EXPR_P (new_var) = 1;
+		}
 	      if (maybe_lookup_decl (OMP_CLAUSE_DECL (c), ctx) == NULL)
 		{
 		  gcc_assert (is_global_var (OMP_CLAUSE_DECL (c)));
--- gcc/testsuite/gcc.dg/gomp/tls-3.c.jj	2010-07-26 10:45:15.868228753 +0200
+++ gcc/testsuite/gcc.dg/gomp/tls-3.c	2010-07-26 10:45:15.868228753 +0200
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target tls_native } */
+
+int thr;
+#pragma omp threadprivate(thr)
+
+void
+foo (void)
+{
+  #pragma omp task untied	/* { dg-error "enclosing task" } */
+  {
+    static int thr2;
+    #pragma omp threadprivate(thr2)
+    static int thr3;
+    #pragma omp threadprivate(thr3)
+    thr++;	/* { dg-error "used in untied task" } */
+    thr2++;	/* { dg-error "used in untied task" } */
+    thr++;
+    thr2++;
+  }
+}


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/gcc/F-12/.cvsignore,v
retrieving revision 1.349
retrieving revision 1.350
diff -u -p -r1.349 -r1.350
--- .cvsignore	13 Jul 2010 21:25:10 -0000	1.349
+++ .cvsignore	26 Jul 2010 09:09:00 -0000	1.350
@@ -1,2 +1,2 @@
 fastjar-0.97.tar.gz
-gcc-4.4.4-20100713.tar.bz2
+gcc-4.4.4-20100726.tar.bz2


Index: gcc.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gcc/F-12/gcc.spec,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -p -r1.138 -r1.139
--- gcc.spec	13 Jul 2010 21:25:10 -0000	1.138
+++ gcc.spec	26 Jul 2010 09:09:00 -0000	1.139
@@ -1,9 +1,9 @@
-%global DATE 20100713
-%global SVNREV 162154
+%global DATE 20100726
+%global SVNREV 162526
 %global gcc_version 4.4.4
 # Note, gcc_release must be integer, if you want to add suffixes to
 # %{release}, append them after %{gcc_release} on Release: line.
-%global gcc_release 12
+%global gcc_release 13
 %global _unpackaged_files_terminate_build 0
 %global multilib_64_archs sparc64 ppc64 s390x x86_64
 %if 0%{?fedora} >= 13 || 0%{?rhel} >= 6
@@ -176,6 +176,7 @@ Patch16: gcc44-ppc64-aixdesc.patch
 Patch17: gcc44-no-add-needed.patch
 Patch18: gcc44-pr44542.patch
 Patch19: gcc44-rh610785.patch
+Patch20: gcc44-rh533181.patch
 
 Patch1000: fastjar-0.97-segfault.patch
 Patch1001: fastjar-0.97-len1.patch
@@ -516,6 +517,7 @@ GNAT is a GNU Ada 95 front-end to GCC. T
 %endif
 %patch18 -p0 -b .pr44542~
 %patch19 -p0 -b .rh610785~
+%patch20 -p0 -b .rh533181~
 
 # This testcase doesn't compile.
 rm libjava/testsuite/libjava.lang/PR35020*
@@ -2002,6 +2004,15 @@ fi
 %endif
 
 %changelog
+* Mon Jul 26 2010 Jakub Jelinek <jakub at redhat.com> 4.4.4-13
+- update from gcc-4_4-branch
+  - PRs fortran/45019, target/42869, target/44942, testsuite/38946
+- VTA backports
+  - PRs debug/45015, bootstrap/45028
+  - var-tracking improvements (#616050, PR debug/45003, PR debug/45006)
+- fix fortran SELECT CASE handling with CHARACTER type (PR fortran/40206)
+- small OpenMP debug info improvements (#533181)
+
 * Tue Jul 13 2010 Jakub Jelinek <jakub at redhat.com> 4.4.4-12
 - update from gcc-4_4-branch
   - PRs fortran/44582, fortran/44773, fortran/44847, pch/14940, target/33743


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/gcc/F-12/sources,v
retrieving revision 1.358
retrieving revision 1.359
diff -u -p -r1.358 -r1.359
--- sources	13 Jul 2010 21:25:10 -0000	1.358
+++ sources	26 Jul 2010 09:09:00 -0000	1.359
@@ -1,2 +1,2 @@
 2659f09c2e43ef8b7d4406321753f1b2  fastjar-0.97.tar.gz
-cde3a182cf99c529597bdc2bf50073c4  gcc-4.4.4-20100713.tar.bz2
+618d68882881c344eb25220955803260  gcc-4.4.4-20100726.tar.bz2



More information about the scm-commits mailing list