rpms/gcc/devel gcc41-pr25261.patch, NONE, 1.1 .cvsignore, 1.172, 1.173 gcc41-strncat-chk.patch, 1.1, 1.2 gcc41.spec, 1.105, 1.106 sources, 1.174, 1.175 gcc41-ppc64-ldouble-stdarg.patch, 1.3, NONE gcc41-pr25795.patch, 1.1, NONE gcc41-pr26026.patch, 1.1, NONE gcc41-pr26885.patch, 1.2, NONE gcc41-pr28600.patch, 1.1, NONE gcc41-pr28659.patch, 1.1, NONE gcc41-pr28706.patch, 1.1, NONE gcc41-pr28725.patch, 1.1, NONE gcc41-pr28744.patch, 1.1, NONE gcc41-rh200887.patch, 1.3, NONE gcc41-x86_64-kernel-ssp.patch, 1.1, NONE gcc41-x86_64-sse3.patch, 1.1, NONE
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Sat Sep 23 12:02:35 UTC 2006
- Previous message (by thread): rpms/glibc/devel .cvsignore, 1.176, 1.177 glibc-fedora.patch, 1.184, 1.185 glibc.spec, 1.271, 1.272 sources, 1.200, 1.201
- Next message (by thread): rpms/gcc/devel gcc41-mni.patch,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jakub
Update of /cvs/dist/rpms/gcc/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv10147
Modified Files:
.cvsignore gcc41-strncat-chk.patch gcc41.spec sources
Added Files:
gcc41-pr25261.patch
Removed Files:
gcc41-ppc64-ldouble-stdarg.patch gcc41-pr25795.patch
gcc41-pr26026.patch gcc41-pr26885.patch gcc41-pr28600.patch
gcc41-pr28659.patch gcc41-pr28706.patch gcc41-pr28725.patch
gcc41-pr28744.patch gcc41-rh200887.patch
gcc41-x86_64-kernel-ssp.patch gcc41-x86_64-sse3.patch
Log Message:
4.1.1-25
gcc41-pr25261.patch:
gcc/testsuite/gcc.dg/gomp/nestedfn-1.c | 53 +++++++++++++++++++
gcc/tree-nested.c | 41 ++++++++++++++-
libgomp/testsuite/libgomp.c/nestedfn-4.c | 65 ++++++++++++++++++++++++
libgomp/testsuite/libgomp.c/nestedfn-5.c | 38 ++++++++++++++
libgomp/testsuite/libgomp.fortran/nestedfn3.f90 | 24 ++++++++
5 files changed, 218 insertions(+), 3 deletions(-)
--- NEW FILE gcc41-pr25261.patch ---
On Fri, Sep 22, 2006 at 12:33:39PM -0400, Jakub Jelinek wrote:
> My question whether nested functions are supposed to see the original
> or OpenMP remapped variables was answered:
> http://www.openmp.org/pipermail/omp/2006/000532.html
> that they are supposed to see the original ones (and thus if they
> are privatized, the code is undefined), which is certainly much easier
> to implement, especially for nested function pointers.
>
> So, here is a patch that fixes the testcases from the 2 PRs and also
> fixes #pragma omp section handling.
Further testing revealed that sometimes FRAME.* is already present
in the clauses when convert_call_expr is called, as OMP_CLAUSE_SHARED
(or could be OMP_CLAUSE_FIRSTPRIVATE too). The following updated
patch adds it only if it is not mentioned in any of the clauses.
Ok?
2006-09-22 Jakub Jelinek <jakub at redhat.com>
PR middle-end/25261
PR middle-end/28790
* tree-nested.c (struct nesting_info): Added static_chain_added.
(convert_call_expr): Set static_chain_added when adding static
chain. Handle OMP_PARALLEL and OMP_SECTION.
* gcc.dg/gomp/nestedfn-1.c: New test.
* testsuite/libgomp.c/nestedfn-4.c: New test.
* testsuite/libgomp.c/nestedfn-5.c: New test.
* testsuite/libgomp.fortran/nestedfn3.f90: New test.
--- gcc/tree-nested.c.jj 2006-07-20 08:26:15.000000000 +0200
+++ gcc/tree-nested.c 2006-09-22 20:14:56.000000000 +0200
@@ -1,5 +1,5 @@
/* Nested function decomposition for trees.
- Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GCC.
@@ -104,6 +104,7 @@ struct nesting_info GTY ((chain_next ("%
bool any_parm_remapped;
bool any_tramp_created;
+ char static_chain_added;
};
@@ -1626,6 +1627,8 @@ convert_call_expr (tree *tp, int *walk_s
struct walk_stmt_info *wi = (struct walk_stmt_info *) data;
struct nesting_info *info = wi->info;
tree t = *tp, decl, target_context;
+ char save_static_chain_added;
+ int i;
*walk_subtrees = 0;
switch (TREE_CODE (t))
@@ -1636,8 +1639,12 @@ convert_call_expr (tree *tp, int *walk_s
break;
target_context = decl_function_context (decl);
if (target_context && !DECL_NO_STATIC_CHAIN (decl))
- TREE_OPERAND (t, 2)
- = get_static_chain (info, target_context, &wi->tsi);
+ {
+ TREE_OPERAND (t, 2)
+ = get_static_chain (info, target_context, &wi->tsi);
+ info->static_chain_added
+ |= (1 << (info->context != target_context));
+ }
break;
case RETURN_EXPR:
@@ -1647,8 +1654,36 @@ convert_call_expr (tree *tp, int *walk_s
*walk_subtrees = 1;
break;
+ case OMP_PARALLEL:
+ save_static_chain_added = info->static_chain_added;
+ info->static_chain_added = 0;
+ walk_body (convert_call_expr, info, &OMP_PARALLEL_BODY (t));
+ for (i = 0; i < 2; i++)
+ {
+ tree c, decl;
+ if ((info->static_chain_added & (1 << i)) == 0)
+ continue;
+ decl = i ? get_chain_decl (info) : info->frame_decl;
+ /* Don't add CHAIN.* or FRAME.* twice. */
+ for (c = OMP_PARALLEL_CLAUSES (t); c; c = OMP_CLAUSE_CHAIN (c))
+ if ((OMP_CLAUSE_CODE (c) == OMP_CLAUSE_FIRSTPRIVATE
+ || OMP_CLAUSE_CODE (c) == OMP_CLAUSE_SHARED)
+ && OMP_CLAUSE_DECL (c) == decl)
+ break;
+ if (c == NULL)
+ {
+ c = build_omp_clause (OMP_CLAUSE_FIRSTPRIVATE);
+ OMP_CLAUSE_DECL (c) = decl;
+ OMP_CLAUSE_CHAIN (c) = OMP_PARALLEL_CLAUSES (t);
+ OMP_PARALLEL_CLAUSES (t) = c;
+ }
+ }
+ info->static_chain_added |= save_static_chain_added;
+ break;
+
case OMP_FOR:
case OMP_SECTIONS:
+ case OMP_SECTION:
case OMP_SINGLE:
case OMP_MASTER:
case OMP_ORDERED:
--- gcc/testsuite/gcc.dg/gomp/nestedfn-1.c.jj 2006-09-22 20:22:56.000000000 +0200
+++ gcc/testsuite/gcc.dg/gomp/nestedfn-1.c 2006-09-22 20:21:48.000000000 +0200
@@ -0,0 +1,53 @@
+/* This testcase violates the OpenMP requirements, as nested functions
+ access the original variables.
+ We test it just to make sure we don't ICE on it. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fopenmp" } */
+
+extern void abort (void);
+extern int omp_get_thread_num ();
+extern void omp_set_dynamic (int);
+
+int
+main (void)
+{
+ int j = 0, k = 6, l = 7, m = 8;
+ void foo (void)
+ {
+ int i = 5;
+ int bar (void)
+ {
+ return i + 1 + (j > 100 ? 10000 : 0);
+ }
+#pragma omp sections private (i)
+ {
+#pragma omp section
+ {
+ i = 6;
+ if (bar () != 6)
+#pragma omp atomic
+ ++j;
+ }
+#pragma omp section
+ {
+ if (bar () != 6)
+#pragma omp atomic
+ ++j;
+ }
+ }
+ if (k != 6 || l != 7 || m != 8)
+#pragma omp atomic
+ ++j;
+ }
+ omp_set_dynamic (0);
+#pragma omp parallel num_threads (2) firstprivate (k) shared (l) private (m)
+ {
+ if (omp_get_thread_num () != 0)
+ k += omp_get_thread_num ();
+ m = 9;
+ foo ();
+ }
+ if (j)
+ abort ();
+ return 0;
+}
--- libgomp/testsuite/libgomp.c/nestedfn-4.c.jj 2006-09-22 17:38:43.000000000 +0200
+++ libgomp/testsuite/libgomp.c/nestedfn-4.c 2006-09-22 17:38:54.000000000 +0200
@@ -0,0 +1,65 @@
+/* PR middle-end/25261 */
+/* { dg-do run } */
+
+#include <omp.h>
+
+extern void abort (void);
+
+int
+main (void)
+{
+ int i = 5, j, l = 0;
+ int foo (void)
+ {
+ return i == 6;
+ }
+ int bar (void)
+ {
+ return i - 3;
+ }
+
+ omp_set_dynamic (0);
+
+#pragma omp parallel if (foo ()) num_threads (2)
+ if (omp_get_num_threads () != 1)
+#pragma omp atomic
+ l++;
+
+#pragma omp parallel for schedule (static, bar ()) num_threads (2) \
+ reduction (|:l)
+ for (j = 0; j < 4; j++)
+ if (omp_get_thread_num () != (j >= 2))
+#pragma omp atomic
+ l++;
+
+ i++;
+
+#pragma omp parallel if (foo ()) num_threads (2)
+ if (omp_get_num_threads () != 2)
+#pragma omp atomic
+ l++;
+
+#pragma omp parallel for schedule (static, bar ()) num_threads (2) \
+ reduction (|:l)
+ for (j = 0; j < 6; j++)
+ if (omp_get_thread_num () != (j >= 3))
+#pragma omp atomic
+ l++;
+
+#pragma omp parallel num_threads (4) reduction (|:l)
+ if (!foo () || bar () != 3)
+#pragma omp atomic
+ l++;
+
+ i++;
+
+#pragma omp parallel num_threads (4) reduction (|:l)
+ if (foo () || bar () != 4)
+#pragma omp atomic
+ l++;
+
+ if (l)
+ abort ();
+
+ return 0;
+}
--- libgomp/testsuite/libgomp.c/nestedfn-5.c.jj 2006-09-22 18:06:21.000000000 +0200
+++ libgomp/testsuite/libgomp.c/nestedfn-5.c 2006-09-22 18:04:50.000000000 +0200
@@ -0,0 +1,38 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+extern void abort (void);
+
+void
+foo (int *j)
+{
+ int i = 5;
+ int bar (void) { return i + 1; }
+#pragma omp sections
+ {
+ #pragma omp section
+ {
+ if (bar () != 6)
+ #pragma omp atomic
+ ++*j;
+ }
+ #pragma omp section
+ {
+ if (bar () != 6)
+ #pragma omp atomic
+ ++*j;
+ }
+ }
+}
+
+int
+main (void)
+{
+ int j = 0;
+#pragma omp parallel num_threads (2)
+ foo (&j);
+ if (j)
+ abort ();
+ return 0;
+}
+
--- libgomp/testsuite/libgomp.fortran/nestedfn3.f90.jj 2006-09-22 17:39:27.000000000 +0200
+++ libgomp/testsuite/libgomp.fortran/nestedfn3.f90 2006-09-22 17:42:59.000000000 +0200
@@ -0,0 +1,24 @@
+! PR middle-end/28790
+! { dg-do run }
+
+program nestomp
+ integer :: j
+ j = 8
+ call bar
+ if (j.ne.10) call abort
+contains
+ subroutine foo (i)
+ integer :: i
+ !$omp atomic
+ j = j + i - 5
+ end subroutine
+ subroutine bar
+ use omp_lib
+ integer :: i
+ i = 6
+ call omp_set_dynamic (.false.)
+ !$omp parallel num_threads (2)
+ call foo(i)
+ !$omp end parallel
+ end subroutine
+end
Jakub
Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/.cvsignore,v
retrieving revision 1.172
retrieving revision 1.173
diff -u -r1.172 -r1.173
--- .cvsignore 20 Sep 2006 17:51:14 -0000 1.172
+++ .cvsignore 23 Sep 2006 12:02:33 -0000 1.173
@@ -1 +1 @@
-gcc-4.1.1-20060920.tar.bz2
+gcc-4.1.1-20060923.tar.bz2
gcc41-strncat-chk.patch:
builtins.c | 22 +++++++++++++++++
testsuite/gcc.dg/builtin-strncat-chk-1.c | 38 +++++++++++++++++++++++++++++++
2 files changed, 60 insertions(+)
Index: gcc41-strncat-chk.patch
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/gcc41-strncat-chk.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gcc41-strncat-chk.patch 20 Sep 2006 17:51:14 -0000 1.1
+++ gcc41-strncat-chk.patch 23 Sep 2006 12:02:33 -0000 1.2
@@ -1,29 +1,10 @@
2006-09-18 Jakub Jelinek <jakub at redhat.com>
- * tree-ssa-propagate.c (set_rhs): Copy EXPR_LOCATION if
- needed.
-
* builtins.c (expand_builtin, maybe_emit_chk_warning): Handle
BUILT_IN_STRNCAT_CHK.
* gcc.dg/builtin-strncat-chk-1.c: New test.
---- gcc/tree-ssa-propagate.c.jj 2006-04-06 11:33:59.000000000 +0200
-+++ gcc/tree-ssa-propagate.c 2006-09-18 14:49:57.000000000 +0200
-@@ -591,6 +591,13 @@ set_rhs (tree *stmt_p, tree expr)
- else if (code == COMPOUND_EXPR)
- return false;
-
-+ if (EXPR_HAS_LOCATION (stmt)
-+ && EXPR_P (expr)
-+ && ! EXPR_HAS_LOCATION (expr)
-+ && TREE_SIDE_EFFECTS (expr)
-+ && TREE_CODE (expr) != LABEL_EXPR)
-+ SET_EXPR_LOCATION (expr, EXPR_LOCATION (stmt));
-+
- switch (TREE_CODE (stmt))
- {
- case RETURN_EXPR:
--- gcc/builtins.c.jj 2006-09-02 08:54:22.000000000 +0200
+++ gcc/builtins.c 2006-09-18 16:54:57.000000000 +0200
@@ -6437,6 +6437,7 @@ expand_builtin (tree exp, rtx target, rt
Index: gcc41.spec
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/gcc41.spec,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -r1.105 -r1.106
--- gcc41.spec 20 Sep 2006 17:51:14 -0000 1.105
+++ gcc41.spec 23 Sep 2006 12:02:33 -0000 1.106
@@ -1,6 +1,6 @@
-%define DATE 20060920
+%define DATE 20060923
%define gcc_version 4.1.1
-%define gcc_release 24
+%define gcc_release 25
%define _unpackaged_files_terminate_build 0
%define multilib_64_archs sparc64 ppc64 s390x x86_64
%ifarch %{ix86} x86_64 ia64
@@ -115,38 +115,27 @@
Patch7: gcc41-ada-tweaks.patch
Patch8: gcc41-java-slow_pthread_self.patch
Patch9: gcc41-ppc32-retaddr.patch
-Patch10: gcc41-x86_64-sse3.patch
-Patch11: gcc41-mni.patch
-Patch12: gcc41-dsohandle.patch
-Patch13: gcc41-rh184446.patch
-Patch14: gcc41-pr20297-test.patch
-Patch15: gcc41-objc-rh185398.patch
-Patch16: gcc41-tests.patch
-Patch17: gcc41-ppc64-ldouble-stdarg.patch
-Patch18: gcc41-pr25874.patch
-Patch19: gcc41-pr26881.patch
-Patch20: gcc41-i386-tune-geode.patch
-Patch21: gcc41-pr26885.patch
-Patch22: gcc41-hash-style-gnu.patch
-Patch23: gcc41-power6.patch
-Patch24: gcc41-power6-2.patch
-Patch25: gcc41-java-libdotdotlib.patch
-Patch26: gcc41-pr28600.patch
-Patch27: gcc41-rh200887.patch
-Patch28: gcc41-pr25795.patch
-Patch29: gcc41-pr28706.patch
-Patch30: gcc41-pr28725.patch
-Patch31: gcc41-pr28709.patch
-Patch32: gcc41-pr28744.patch
-Patch33: gcc41-x86_64-kernel-ssp.patch
-Patch34: gcc41-pr28755.patch
-Patch35: gcc41-pr27898.patch
-Patch36: gcc41-pr26026.patch
-Patch37: gcc41-pr28659.patch
-Patch38: gcc41-pr27567.patch
-Patch39: gcc41-pr29097.patch
-Patch40: gcc41-pr29059.patch
-Patch41: gcc41-strncat-chk.patch
+Patch10: gcc41-mni.patch
+Patch11: gcc41-dsohandle.patch
+Patch12: gcc41-rh184446.patch
+Patch13: gcc41-pr20297-test.patch
+Patch14: gcc41-objc-rh185398.patch
+Patch15: gcc41-tests.patch
+Patch16: gcc41-pr25874.patch
+Patch17: gcc41-pr26881.patch
+Patch18: gcc41-i386-tune-geode.patch
+Patch19: gcc41-hash-style-gnu.patch
+Patch20: gcc41-power6.patch
+Patch21: gcc41-power6-2.patch
+Patch22: gcc41-java-libdotdotlib.patch
+Patch23: gcc41-pr28709.patch
+Patch24: gcc41-pr28755.patch
+Patch25: gcc41-pr27898.patch
+Patch26: gcc41-pr27567.patch
+Patch27: gcc41-pr29097.patch
+Patch28: gcc41-pr29059.patch
+Patch29: gcc41-strncat-chk.patch
+Patch30: gcc41-pr25261.patch
%define _gnu %{nil}
%ifarch sparc
@@ -439,38 +428,27 @@
%patch7 -p0 -b .ada-tweaks~
%patch8 -p0 -b .java-slow_pthread_self~
%patch9 -p0 -b .ppc32-retaddr~
-%patch10 -p0 -b .x86_64-sse3~
-%patch11 -p0 -b .mni~
-%patch12 -p0 -b .dsohandle~
-%patch13 -p0 -b .rh184446~
-%patch14 -p0 -E -b .pr20297-test~
-%patch15 -p0 -b .objc-rh185398~
-%patch16 -p0 -b .tests~
-%patch17 -p0 -b .ppc64-ldouble-stdarg~
-%patch18 -p0 -b .pr25874~
-%patch19 -p0 -b .pr26881~
-%patch20 -p0 -b .i386-tune-geode~
-%patch21 -p0 -b .pr26885~
-%patch22 -p0 -b .hash-style-gnu~
-%patch23 -p0 -b .power6~
-%patch24 -p0 -b .power6-2~
-%patch25 -p0 -b .java-libdotdotlib~
-%patch26 -p0 -b .pr28600~
-%patch27 -p0 -b .rh200887~
-%patch28 -p0 -b .pr25795~
-%patch29 -p0 -b .pr28706~
-%patch30 -p0 -b .pr28725~
-%patch31 -p0 -b .pr28709~
-%patch32 -p0 -b .pr28744~
-%patch33 -p0 -b .x86_64-kernel-ssp~
-%patch34 -p0 -b .pr28755~
-%patch35 -p0 -b .pr27898~
-%patch36 -p0 -b .pr26026~
-%patch37 -p0 -b .pr28659~
-%patch38 -p0 -b .pr27567~
-%patch39 -p0 -b .pr29097~
-%patch40 -p0 -b .pr29059~
-%patch41 -p0 -b .strncat-chk~
+%patch10 -p0 -b .mni~
+%patch11 -p0 -b .dsohandle~
+%patch12 -p0 -b .rh184446~
+%patch13 -p0 -E -b .pr20297-test~
+%patch14 -p0 -b .objc-rh185398~
+%patch15 -p0 -b .tests~
+%patch16 -p0 -b .pr25874~
+%patch17 -p0 -b .pr26881~
+%patch18 -p0 -b .i386-tune-geode~
+%patch19 -p0 -b .hash-style-gnu~
+%patch20 -p0 -b .power6~
+%patch21 -p0 -b .power6-2~
+%patch22 -p0 -b .java-libdotdotlib~
+%patch23 -p0 -b .pr28709~
+%patch24 -p0 -b .pr28755~
+%patch25 -p0 -b .pr27898~
+%patch26 -p0 -b .pr27567~
+%patch27 -p0 -b .pr29097~
+%patch28 -p0 -b .pr29059~
+%patch29 -p0 -b .strncat-chk~
+%patch30 -p0 -b .pr25261~
sed -i -e 's/4\.1\.2/4.1.1/' gcc/BASE-VER gcc/version.c
sed -i -e 's/" (Red Hat[^)]*)"/" (Red Hat %{version}-%{gcc_release})"/' gcc/version.c
@@ -1532,6 +1510,14 @@
%doc rpm.doc/changelogs/libmudflap/ChangeLog*
%changelog
+* Sat Sep 23 2006 Jakub Jelinek <jakub at redhat.com> 4.1.1-25
+- update from gcc-4_1-branch (-r117069:117162)
+ - PRs c++/28996, c++/29087, middle-end/26983
+- fix -fprofile-use with anonymous namespaces (Jan Hubicka, PRs profile/20815,
+ profile/26399)
+- fix #pragma omp parallel and #pragma omp section that call nested
+ functions (PRs middle-end/25261, middle-end/28790)
+
* Wed Sep 20 2006 Jakub Jelinek <jakub at redhat.com> 4.1.1-24
- update from gcc-4_1-branch (-r117000:117069)
- PRs fortran/21918, fortran/28526, fortran/28817, fortran/29060,
Index: sources
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/sources,v
retrieving revision 1.174
retrieving revision 1.175
diff -u -r1.174 -r1.175
--- sources 20 Sep 2006 17:51:14 -0000 1.174
+++ sources 23 Sep 2006 12:02:33 -0000 1.175
@@ -1 +1 @@
-555f825257d7a7976d77ac4e80ec5ca5 gcc-4.1.1-20060920.tar.bz2
+3c0c54ab8d5ad9c435accf4361db4c47 gcc-4.1.1-20060923.tar.bz2
--- gcc41-ppc64-ldouble-stdarg.patch DELETED ---
--- gcc41-pr25795.patch DELETED ---
--- gcc41-pr26026.patch DELETED ---
--- gcc41-pr26885.patch DELETED ---
--- gcc41-pr28600.patch DELETED ---
--- gcc41-pr28659.patch DELETED ---
--- gcc41-pr28706.patch DELETED ---
--- gcc41-pr28725.patch DELETED ---
--- gcc41-pr28744.patch DELETED ---
--- gcc41-rh200887.patch DELETED ---
--- gcc41-x86_64-kernel-ssp.patch DELETED ---
--- gcc41-x86_64-sse3.patch DELETED ---
- Previous message (by thread): rpms/glibc/devel .cvsignore, 1.176, 1.177 glibc-fedora.patch, 1.184, 1.185 glibc.spec, 1.271, 1.272 sources, 1.200, 1.201
- Next message (by thread): rpms/gcc/devel gcc41-mni.patch,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list