rpms/gcc/devel gcc41-omp-nesting-warn.patch, NONE, 1.1 gcc41-pr27416.patch, NONE, 1.1 gcc41-pr27446.patch, NONE, 1.1 gcc41-pr27499.patch, NONE, 1.1 gcc41-pr26881.patch, 1.1, 1.2 gcc41.spec, 1.62, 1.63
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Sat May 13 08:48:23 UTC 2006
- Previous message (by thread): rpms/metacity/devel metacity.spec,1.71,1.72
- Next message (by thread): rpms/vim/devel 7.0.013, NONE, 1.1 7.0.014, NONE, 1.1 7.0.015, NONE, 1.1 7.0.016, NONE, 1.1 README.patches, 1.43, 1.44 vim.spec, 1.116, 1.117
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jakub
Update of /cvs/dist/rpms/gcc/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv10503
Modified Files:
gcc41-pr26881.patch gcc41.spec
Added Files:
gcc41-omp-nesting-warn.patch gcc41-pr27416.patch
gcc41-pr27446.patch gcc41-pr27499.patch
Log Message:
4.1.0-16
gcc41-omp-nesting-warn.patch:
omp-low.c | 82 +++++++++++++++++++++++
testsuite/gcc.dg/gomp/appendix-a/a.35.1.c | 2
testsuite/gcc.dg/gomp/appendix-a/a.35.3.c | 2
testsuite/gcc.dg/gomp/critical-4.c | 28 +++++++
testsuite/gfortran.dg/gomp/appendix-a/a.35.1.f90 | 3
testsuite/gfortran.dg/gomp/appendix-a/a.35.3.f90 | 3
6 files changed, 116 insertions(+), 4 deletions(-)
--- NEW FILE gcc41-omp-nesting-warn.patch ---
2006-05-12 Jakub Jelinek <jakub at redhat.com>
* omp-low.c (check_omp_nesting_restrictions): New function.
(scan_omp_1): Call it.
* gcc.dg/gomp/critical-4.c: New test.
* gcc.dg/gomp/appendix-a/a.35.1.c: Add dg-warning.
* gcc.dg/gomp/appendix-a/a.35.3.c: Likewise.
* gfortran.dg/gomp/appendix-a/a.35.1.f90: Likewise.
* gfortran.dg/gomp/appendix-a/a.35.3.f90: Likewise.
--- gcc/omp-low.c.jj 2006-05-12 14:21:19.000000000 +0200
+++ gcc/omp-low.c 2006-05-12 16:11:52.000000000 +0200
@@ -1245,6 +1245,84 @@ scan_omp_single (tree *stmt_p, omp_conte
}
+/* Check OpenMP nesting restrictions. */
+static void
+check_omp_nesting_restrictions (tree t, omp_context *ctx)
+{
+ switch (TREE_CODE (t))
+ {
+ case OMP_FOR:
+ case OMP_SECTIONS:
+ case OMP_SINGLE:
+ for (; ctx != NULL; ctx = ctx->outer)
+ switch (TREE_CODE (ctx->stmt))
+ {
+ case OMP_FOR:
+ case OMP_SECTIONS:
+ case OMP_SINGLE:
+ case OMP_ORDERED:
+ case OMP_MASTER:
+ warning (0, "work-sharing region may not be closely nested inside "
+ "of work-sharing, critical, ordered or master region");
+ return;
+ case OMP_PARALLEL:
+ return;
+ default:
+ break;
+ }
+ break;
+ case OMP_MASTER:
+ for (; ctx != NULL; ctx = ctx->outer)
+ switch (TREE_CODE (ctx->stmt))
+ {
+ case OMP_FOR:
+ case OMP_SECTIONS:
+ case OMP_SINGLE:
+ warning (0, "master region may not be closely nested inside "
+ "of work-sharing region");
+ return;
+ case OMP_PARALLEL:
+ return;
+ default:
+ break;
+ }
+ break;
+ case OMP_ORDERED:
+ for (; ctx != NULL; ctx = ctx->outer)
+ switch (TREE_CODE (ctx->stmt))
+ {
+ case OMP_CRITICAL:
+ warning (0, "ordered region may not be closely nested inside "
+ "of critical region");
+ return;
+ case OMP_FOR:
+ if (find_omp_clause (OMP_CLAUSES (ctx->stmt),
+ OMP_CLAUSE_ORDERED) == NULL)
+ warning (0, "ordered region must be closely nested inside "
+ "a loop region with an ordered clause");
+ return;
+ case OMP_PARALLEL:
+ return;
+ default:
+ break;
+ }
+ break;
+ case OMP_CRITICAL:
+ for (; ctx != NULL; ctx = ctx->outer)
+ if (TREE_CODE (ctx->stmt) == OMP_CRITICAL
+ && OMP_CRITICAL_NAME (t) == OMP_CRITICAL_NAME (ctx->stmt))
+ {
+ warning (0, "critical region may not be nested inside a critical "
+ "region with the same name");
+ return;
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+
/* Callback for walk_stmts used to scan for OpenMP directives at TP. */
static tree
@@ -1257,6 +1335,10 @@ scan_omp_1 (tree *tp, int *walk_subtrees
if (EXPR_HAS_LOCATION (t))
input_location = EXPR_LOCATION (t);
+ /* Check the OpenMP nesting restrictions. */
+ if (OMP_DIRECTIVE_P (t) && ctx != NULL)
+ check_omp_nesting_restrictions (t, ctx);
+
*walk_subtrees = 0;
switch (TREE_CODE (t))
{
--- gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.1.c.jj 2006-01-27 08:31:32.000000000 +0100
+++ gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.1.c 2006-05-12 16:15:50.000000000 +0200
@@ -15,7 +15,7 @@ wrong1 (int n)
for (i = 0; i < n; i++)
{
/* incorrect nesting of loop regions */
-#pragma omp for
+#pragma omp for /* { dg-warning "may not be closely nested" } */
for (j = 0; j < n; j++)
work (i, j);
}
--- gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.3.c.jj 2006-01-27 08:31:32.000000000 +0100
+++ gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.3.c 2006-05-12 16:15:39.000000000 +0200
@@ -12,7 +12,7 @@ wrong3 (int n)
for (i = 0; i < n; i++)
{
/* incorrect nesting of regions */
-#pragma omp single
+#pragma omp single /* { dg-warning "may not be closely nested" } */
work (i, 0);
}
}
--- gcc/testsuite/gcc.dg/gomp/critical-4.c.jj 2006-05-12 16:36:12.000000000 +0200
+++ gcc/testsuite/gcc.dg/gomp/critical-4.c 2006-05-12 16:38:21.000000000 +0200
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+
+extern void bar(int);
+
+void
+foo1 (void)
+{
+ #pragma omp critical
+ #pragma omp critical(foo)
+ #pragma omp critical(bar)
+ bar (0);
+}
+
+void
+foo2 (void)
+{
+ #pragma omp critical
+ #pragma omp critical /* { dg-warning "with the same name" } */
+ bar (0);
+}
+
+void
+foo3 (void)
+{
+ #pragma omp critical(foo)
+ #pragma omp critical(foo) /* { dg-warning "with the same name" } */
+ bar (0);
+}
--- gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.1.f90.jj 2006-02-16 08:17:38.000000000 +0100
+++ gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.1.f90 2006-05-12 16:17:07.000000000 +0200
@@ -9,7 +9,8 @@
!$OMP PARALLEL DEFAULT(SHARED)
!$OMP DO
DO I = 1, N
-!$OMP DO ! incorrect nesting of loop regions
+ ! incorrect nesting of loop regions
+!$OMP DO ! { dg-warning "may not be closely nested" }
DO J = 1, N
CALL WORK(I,J)
END DO
--- gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.3.f90.jj 2006-02-16 08:17:38.000000000 +0100
+++ gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.3.f90 2006-05-12 16:17:42.000000000 +0200
@@ -6,7 +6,8 @@
!$OMP PARALLEL DEFAULT(SHARED)
!$OMP DO
DO I = 1, N
-!$OMP SINGLE ! incorrect nesting of regions
+ ! incorrect nesting of regions
+!$OMP SINGLE ! { dg-warning "may not be closely nested" }
CALL WORK(I, 1)
!$OMP END SINGLE
END DO
gcc41-pr27416.patch:
gcc/omp-low.c | 4 ++++
libgomp/testsuite/libgomp.fortran/pr27416-1.f90 | 19 +++++++++++++++++++
2 files changed, 23 insertions(+)
--- NEW FILE gcc41-pr27416.patch ---
2006-05-12 Jakub Jelinek <jakub at redhat.com>
PR middle-end/27416
* omp-low.c (build_outer_var_ref): If VAR is reference in orphaned
construct, return *VAR.
* libgomp.fortran/pr27416-1.f90: New test.
--- gcc/omp-low.c.jj 2006-05-10 14:07:01.000000000 +0200
+++ gcc/omp-low.c 2006-05-12 16:11:52.000000000 +0200
@@ -577,6 +577,10 @@ build_outer_var_ref (tree var, omp_conte
}
else if (ctx->outer)
x = lookup_decl (var, ctx->outer);
+ else if (is_reference (var))
+ /* This can happen with orphaned constructs. If var is reference, it is
+ possible it is shared and as such valid. */
+ x = var;
else
gcc_unreachable ();
--- libgomp/testsuite/libgomp.fortran/pr27416-1.f90.jj 2006-05-12 16:26:14.000000000 +0200
+++ libgomp/testsuite/libgomp.fortran/pr27416-1.f90 2006-05-12 14:35:41.000000000 +0200
@@ -0,0 +1,19 @@
+! PR middle-end/27416
+! { dg-do run }
+
+ integer :: j
+ j = 6
+!$omp parallel num_threads (4)
+ call foo (j)
+!$omp end parallel
+ if (j.ne.6+16) call abort
+end
+
+subroutine foo (j)
+ integer :: i, j
+
+!$omp do firstprivate (j) lastprivate (j)
+ do i = 1, 16
+ if (i.eq.16) j = j + i
+ end do
+end subroutine foo
gcc41-pr27446.patch:
trans-openmp.c | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
--- NEW FILE gcc41-pr27446.patch ---
2006-05-12 Jakub Jelinek <jakub at redhat.com>
PR fortran/27446
* trans-openmp.c (gfc_trans_omp_array_reduction): Ensure
OMP_CLAUSE_REDUCTION_{INIT,MERGE} are set to BIND_EXPR.
--- gcc/fortran/trans-openmp.c.jj 2006-04-15 00:14:38.000000000 +0200
+++ gcc/fortran/trans-openmp.c 2006-05-12 13:53:25.000000000 +0200
@@ -262,7 +262,7 @@ gfc_trans_omp_array_reduction (tree c, g
gfc_symbol init_val_sym, outer_sym, intrinsic_sym;
gfc_expr *e1, *e2, *e3, *e4;
gfc_ref *ref;
- tree decl, backend_decl;
+ tree decl, backend_decl, stmt;
locus old_loc = gfc_current_locus;
const char *iname;
try t;
@@ -400,10 +400,22 @@ gfc_trans_omp_array_reduction (tree c, g
gcc_assert (t == SUCCESS);
/* Create the init statement list. */
- OMP_CLAUSE_REDUCTION_INIT (c) = gfc_trans_assignment (e1, e2);
+ pushlevel (0);
+ stmt = gfc_trans_assignment (e1, e2);
+ if (TREE_CODE (stmt) != BIND_EXPR)
+ stmt = build3_v (BIND_EXPR, NULL, stmt, poplevel (1, 0, 0));
+ else
+ poplevel (0, 0, 0);
+ OMP_CLAUSE_REDUCTION_INIT (c) = stmt;
/* Create the merge statement list. */
- OMP_CLAUSE_REDUCTION_MERGE (c) = gfc_trans_assignment (e3, e4);
+ pushlevel (0);
+ stmt = gfc_trans_assignment (e3, e4);
+ if (TREE_CODE (stmt) != BIND_EXPR)
+ stmt = build3_v (BIND_EXPR, NULL, stmt, poplevel (1, 0, 0));
+ else
+ poplevel (0, 0, 0);
+ OMP_CLAUSE_REDUCTION_MERGE (c) = stmt;
/* And stick the placeholder VAR_DECL into the clause as well. */
OMP_CLAUSE_REDUCTION_PLACEHOLDER (c) = outer_sym.backend_decl;
gcc41-pr27499.patch:
gimplify.c | 1 -
testsuite/g++.dg/gomp/pr27499.C | 13 +++++++++++++
testsuite/gcc.dg/gomp/pr27499.c | 13 +++++++++++++
3 files changed, 26 insertions(+), 1 deletion(-)
--- NEW FILE gcc41-pr27499.patch ---
2006-05-12 Jakub Jelinek <jakub at redhat.com>
PR c/27499
* gimplify.c (gimplify_omp_for): Remove assertion that iteration var
is signed.
* gcc.dg/gomp/pr27499.c: New test.
* g++.dg/gomp/pr27499.C: New test.
--- gcc/gimplify.c.jj 2006-05-10 14:07:01.000000000 +0200
+++ gcc/gimplify.c 2006-05-12 22:13:05.000000000 +0200
@@ -4750,7 +4750,6 @@ gimplify_omp_for (tree *expr_p, tree *pr
decl = TREE_OPERAND (t, 0);
gcc_assert (DECL_P (decl));
gcc_assert (INTEGRAL_TYPE_P (TREE_TYPE (decl)));
- gcc_assert (!TYPE_UNSIGNED (TREE_TYPE (decl)));
/* Make sure the iteration variable is private. */
if (omp_is_private (gimplify_omp_ctxp, decl))
--- gcc/testsuite/gcc.dg/gomp/pr27499.c.jj 2006-05-12 22:22:37.000000000 +0200
+++ gcc/testsuite/gcc.dg/gomp/pr27499.c 2006-05-12 22:22:26.000000000 +0200
@@ -0,0 +1,13 @@
+/* PR c/27499 */
+/* { dg-do compile } */
+
+extern void bar (unsigned int);
+
+void
+foo (void)
+{
+ unsigned int i;
+#pragma omp parallel for
+ for (i = 0; i < 64; ++i) /* { dg-warning "is unsigned" } */
+ bar (i);
+}
--- gcc/testsuite/g++.dg/gomp/pr27499.C.jj 2006-05-12 22:23:14.000000000 +0200
+++ gcc/testsuite/g++.dg/gomp/pr27499.C 2006-05-12 22:24:06.000000000 +0200
@@ -0,0 +1,13 @@
+// PR c/27499
+// { dg-do compile }
+
+extern void bar (unsigned int);
+
+void
+foo (void)
+{
+ unsigned int i;
+#pragma omp for
+ for (i = 0; i < 64; ++i) // { dg-warning "is unsigned" }
+ bar (i);
+}
gcc41-pr26881.patch:
Makefile.in | 7 ++++---
cgraphunit.c | 23 ++++++++++++++++++++---
testsuite/gcc.dg/debug/pr26881.c | 15 +++++++++++++++
3 files changed, 39 insertions(+), 6 deletions(-)
Index: gcc41-pr26881.patch
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/gcc41-pr26881.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gcc41-pr26881.patch 12 May 2006 17:58:32 -0000 1.1
+++ gcc41-pr26881.patch 13 May 2006 08:48:19 -0000 1.2
@@ -80,8 +80,8 @@
+#include "gt-cgraphunit.h"
--- gcc/Makefile.in.jj 2006-04-10 15:03:43.000000000 +0200
+++ gcc/Makefile.in 2006-05-12 19:36:03.000000000 +0200
-@@ -2170,7 +2170,8 @@ cgraphunit.o : cgraphunit.c $(CONFIG_H)
- $(TREE_H) langhooks.h tree-inline.h toplev.h $(FLAGS_H) $(GGC_H) \
+@@ -2179,7 +2179,8 @@ cgraphunit.o : cgraphunit.c $(CONFIG_H)
+ $(TREE_H) langhooks.h $(TREE_INLINE_H) toplev.h $(FLAGS_H) $(GGC_H) \
$(TARGET_H) $(CGRAPH_H) intl.h pointer-set.h function.h $(TREE_GIMPLE_H) \
$(TREE_FLOW_H) tree-pass.h $(C_COMMON_H) debug.h $(DIAGNOSTIC_H) \
- $(FIBHEAP_H) output.h $(PARAMS_H) $(RTL_H) $(TIMEVAR_H) ipa-prop.h
@@ -90,7 +90,7 @@
ipa.o : ipa.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(CGRAPH_H)
ipa-prop.o : ipa-prop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
langhooks.h $(GGC_H) target.h $(CGRAPH_H) ipa-prop.h \
-@@ -2739,7 +2740,7 @@ GTFILES = $(srcdir)/input.h $(srcdir)/co
+@@ -2748,7 +2749,7 @@ GTFILES = $(srcdir)/input.h $(srcdir)/co
$(srcdir)/cselib.h $(srcdir)/basic-block.h $(srcdir)/cgraph.h \
$(srcdir)/c-common.h $(srcdir)/c-tree.h $(srcdir)/reload.h \
$(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c $(srcdir)/cgraph.c \
@@ -99,13 +99,13 @@
$(srcdir)/dbxout.c $(srcdir)/dwarf2out.c $(srcdir)/dwarf2asm.c \
$(srcdir)/dojump.c $(srcdir)/tree-profile.c \
$(srcdir)/emit-rtl.c $(srcdir)/except.c $(srcdir)/explow.c $(srcdir)/expr.c \
-@@ -2781,7 +2782,7 @@ gt-tree-profile.h gt-tree-ssa-address.h
+@@ -2791,7 +2792,7 @@ gt-tree-profile.h gt-tree-ssa-address.h
gt-tree-ssanames.h gt-tree-iterator.h gt-gimplify.h \
gt-tree-phinodes.h gt-tree-nested.h \
gt-tree-ssa-operands.h gt-tree-ssa-propagate.h \
-gt-tree-ssa-structalias.h \
+gt-tree-ssa-structalias.h gt-cgraphunit.h \
- gt-stringpool.h gt-targhooks.h : s-gtype ; @true
+ gt-stringpool.h gt-targhooks.h gt-omp-low.h : s-gtype ; @true
define echo_quoted_to_gtyp
--- gcc/testsuite/gcc.dg/debug/pr26881.c.jj 2006-05-12 19:40:54.000000000 +0200
Index: gcc41.spec
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/gcc41.spec,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- gcc41.spec 12 May 2006 17:58:32 -0000 1.62
+++ gcc41.spec 13 May 2006 08:48:20 -0000 1.63
@@ -123,6 +123,10 @@
Patch26: gcc41-pr27532.patch
Patch27: gcc41-pr27549.patch
Patch28: gcc41-pr27548.patch
+Patch29: gcc41-omp-nesting-warn.patch
+Patch30: gcc41-pr27446.patch
+Patch31: gcc41-pr27416.patch
+Patch32: gcc41-pr27499.patch
%define _gnu %{nil}
%ifarch sparc
%define gcc_target_platform sparc64-%{_vendor}-%{_target_os}
@@ -429,6 +433,10 @@
%patch26 -p0 -b .pr27532~
%patch27 -p0 -b .pr27549~
%patch28 -p0 -b .pr27548~
+%patch29 -p0 -b .omp-nesting-warn~
+%patch30 -p0 -b .pr27446~
+%patch31 -p0 -b .pr27416~
+%patch32 -p0 -b .pr27499~
sed -i -e 's/4\.1\.1/4.1.0/' gcc/BASE-VER gcc/version.c
sed -i -e 's/" (Red Hat[^)]*)"/" (Red Hat %{version}-%{gcc_release})"/' gcc/version.c
@@ -1471,7 +1479,7 @@
%doc rpm.doc/changelogs/libmudflap/ChangeLog*
%changelog
-* Fri May 12 2006 Jakub Jelinek <jakub at redhat.com> 4.1.0-16
+* Sat May 13 2006 Jakub Jelinek <jakub at redhat.com> 4.1.0-16
- update from gcc-4_1-branch (-r113637:113722)
- PRs bootstrap/26872, c++/27547, fortran/20460, fortran/24549,
middle-end/27384, middle-end/27488, target/26545, target/27158
@@ -1485,6 +1493,11 @@
- fix ICEs with conflicts across abnormal edges (Zdenek Dvorak,
PRs tree-optimization/27283, tree-optimization/27548,
tree-optimization/27549)
+- warn about OpenMP section 2.9 region nesting violations
+- fix OpenMP fortran array REDUCTION with -fbounds-check (PR fortran/27446)
+- fix OpenMP {{FIRST,LAST}PRIVATE,REDUCTION} in orphaned construct on
+ Fortran dummy argument (PR middle-end/27416)
+- fix ICE on #pragma omp for unsigned iteration variable (PR c/27499)
* Tue May 9 2006 Jakub Jelinek <jakub at redhat.com> 4.1.0-15
- update from gcc-4_1-branch (-r113623:113637)
- Previous message (by thread): rpms/metacity/devel metacity.spec,1.71,1.72
- Next message (by thread): rpms/vim/devel 7.0.013, NONE, 1.1 7.0.014, NONE, 1.1 7.0.015, NONE, 1.1 7.0.016, NONE, 1.1 README.patches, 1.43, 1.44 vim.spec, 1.116, 1.117
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list