4.3.0-0.10

This commit is contained in:
Jakub Jelinek 2008-02-18 15:35:44 +00:00
parent 9acf9331f9
commit 7112ded666
9 changed files with 252 additions and 230 deletions

View File

@ -1,2 +1,2 @@
gcc-4.3.0-20080214.tar.bz2
gcc-4.3.0-20080218.tar.bz2
fastjar-0.95.tar.gz

104
gcc43-pr34964.patch Normal file
View File

@ -0,0 +1,104 @@
2008-02-18 Jakub Jelinek <jakub@redhat.com>
PR c++/34964
PR c++/35244
* semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
vars. Afterwards ensure v is VAR_DECL.
* gcc.dg/gomp/pr34964.c: New test.
* g++.dg/gomp/pr34964.C: New test.
* gcc.dg/gomp/pr35244.c: New test.
* g++.dg/gomp/pr35244.C: New test.
--- gcc/cp/semantics.c.jj 2008-02-18 10:51:04.000000000 +0100
+++ gcc/cp/semantics.c 2008-02-18 13:53:58.000000000 +0100
@@ -3742,9 +3742,14 @@ finish_omp_threadprivate (tree vars)
{
tree v = TREE_PURPOSE (t);
+ if (error_operand_p (v))
+ ;
+ else if (TREE_CODE (v) != VAR_DECL)
+ error ("%<threadprivate%> %qD is not file, namespace "
+ "or block scope variable", v);
/* If V had already been marked threadprivate, it doesn't matter
whether it had been used prior to this point. */
- if (TREE_USED (v)
+ else if (TREE_USED (v)
&& (DECL_LANG_SPECIFIC (v) == NULL
|| !CP_DECL_THREADPRIVATE_P (v)))
error ("%qE declared %<threadprivate%> after first use", v);
--- gcc/testsuite/gcc.dg/gomp/pr35244.c.jj 2008-02-18 14:08:00.000000000 +0100
+++ gcc/testsuite/gcc.dg/gomp/pr35244.c 2008-02-18 14:07:44.000000000 +0100
@@ -0,0 +1,20 @@
+/* PR c++/35244 */
+/* { dg-do compile } */
+/* { dg-require-effective-target tls_native } */
+/* { dg-options "-fopenmp" } */
+
+int v1;
+typedef struct A A;
+typedef int i;
+#pragma omp threadprivate (i) /* { dg-error "expected identifier before" } */
+#pragma omp threadprivate (A) /* { dg-error "expected identifier before" } */
+#pragma omp threadprivate (v1)
+
+void foo ()
+{
+ static int v4;
+ {
+ static int v5;
+#pragma omp threadprivate (v4, v5)
+ }
+}
--- gcc/testsuite/gcc.dg/gomp/pr34964.c.jj 2008-02-18 13:23:42.000000000 +0100
+++ gcc/testsuite/gcc.dg/gomp/pr34964.c 2008-02-18 14:08:08.000000000 +0100
@@ -0,0 +1,6 @@
+/* PR c++/34964 */
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+char x[] = 0; /* { dg-error "invalid initializer" } */
+#pragma omp threadprivate (x)
--- gcc/testsuite/g++.dg/gomp/pr35244.C.jj 2008-02-18 14:05:37.000000000 +0100
+++ gcc/testsuite/g++.dg/gomp/pr35244.C 2008-02-18 14:07:16.000000000 +0100
@@ -0,0 +1,30 @@
+// PR c++/35244
+// { dg-do compile }
+// { dg-require-effective-target tls_native }
+// { dg-options "-fopenmp" }
+
+int v1;
+namespace N1
+{
+ int v2;
+}
+namespace N2
+{
+ int v3;
+}
+using N1::v2;
+using namespace N2;
+struct A;
+typedef int i;
+#pragma omp threadprivate (i) // { dg-error "is not file, namespace or block scope variable" }
+#pragma omp threadprivate (A) // { dg-error "is not file, namespace or block scope variable" }
+#pragma omp threadprivate (v1, v2, v3)
+
+void foo ()
+{
+ static int v4;
+ {
+ static int v5;
+#pragma omp threadprivate (v4, v5)
+ }
+}
--- gcc/testsuite/g++.dg/gomp/pr34964.C.jj 2008-02-18 13:23:25.000000000 +0100
+++ gcc/testsuite/g++.dg/gomp/pr34964.C 2008-02-18 13:23:03.000000000 +0100
@@ -0,0 +1,6 @@
+// PR c++/34964
+// { dg-do compile }
+// { dg-options "-fopenmp" }
+
+char x[] = 0; // { dg-error "initializer fails to determine size" }
+#pragma omp threadprivate (x)

50
gcc43-pr35028.patch Normal file
View File

@ -0,0 +1,50 @@
2008-02-18 Jakub Jelinek <jakub@redhat.com>
PR c++/35028
* cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
* g++.dg/gomp/pr35028.C: New test.
--- gcc/cp/cp-gimplify.c.jj 2008-02-11 14:45:57.000000000 +0100
+++ gcc/cp/cp-gimplify.c 2008-02-18 14:27:59.000000000 +0100
@@ -844,7 +844,8 @@ cxx_omp_clause_apply_fn (tree fn, tree a
if (arg2)
argarray[i++] = p2;
/* Handle default arguments. */
- for (parm = defparm; parm != void_list_node; parm = TREE_CHAIN (parm), i++)
+ for (parm = defparm; parm && parm != void_list_node;
+ parm = TREE_CHAIN (parm), i++)
argarray[i] = convert_default_arg (TREE_VALUE (parm),
TREE_PURPOSE (parm), fn, i);
t = build_call_a (fn, i, argarray);
@@ -875,7 +876,7 @@ cxx_omp_clause_apply_fn (tree fn, tree a
if (arg2)
argarray[i++] = build_fold_addr_expr (arg2);
/* Handle default arguments. */
- for (parm = defparm; parm != void_list_node;
+ for (parm = defparm; parm && parm != void_list_node;
parm = TREE_CHAIN (parm), i++)
argarray[i] = convert_default_arg (TREE_VALUE (parm),
TREE_PURPOSE (parm),
--- gcc/testsuite/g++.dg/gomp/pr35028.C.jj 2008-02-18 14:40:42.000000000 +0100
+++ gcc/testsuite/g++.dg/gomp/pr35028.C 2008-02-18 14:40:10.000000000 +0100
@@ -0,0 +1,19 @@
+// PR c++/35028
+// { dg-do compile }
+// { dg-options "-fopenmp" }
+
+struct A
+{
+ A ();
+ A (const A &, ...);
+ ~A ();
+ A operator++ (int);
+};
+
+void
+foo ()
+{
+ A a;
+ #pragma omp parallel firstprivate (a)
+ a++;
+}

68
gcc43-pr35078.patch Normal file
View File

@ -0,0 +1,68 @@
2008-02-18 Jakub Jelinek <jakub@redhat.com>
PR c++/35078
* parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
call cp_finish_decl.
* semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
early.
* g++.dg/gomp/pr35078.C: New test.
--- gcc/cp/parser.c.jj 2008-02-13 21:20:19.000000000 +0100
+++ gcc/cp/parser.c 2008-02-18 11:05:25.000000000 +0100
@@ -20074,8 +20074,11 @@ cp_parser_omp_for_loop (cp_parser *parse
init = cp_parser_assignment_expression (parser, false);
- cp_finish_decl (decl, NULL_TREE, /*init_const_expr_p=*/false,
- asm_specification, LOOKUP_ONLYCONVERTING);
+ if (TREE_CODE (TREE_TYPE (decl)) == REFERENCE_TYPE)
+ init = error_mark_node;
+ else
+ cp_finish_decl (decl, NULL_TREE, /*init_const_expr_p=*/false,
+ asm_specification, LOOKUP_ONLYCONVERTING);
if (pushed_scope)
pop_scope (pushed_scope);
--- gcc/cp/semantics.c.jj 2008-02-13 20:58:57.000000000 +0100
+++ gcc/cp/semantics.c 2008-02-18 10:51:04.000000000 +0100
@@ -3903,6 +3903,16 @@ finish_omp_for (location_t locus, tree d
return NULL;
}
+ if (!INTEGRAL_TYPE_P (TREE_TYPE (decl)))
+ {
+ location_t elocus = locus;
+
+ if (EXPR_HAS_LOCATION (init))
+ elocus = EXPR_LOCATION (init);
+ error ("%Hinvalid type for iteration variable %qE", &elocus, decl);
+ return NULL;
+ }
+
if (pre_body == NULL || IS_EMPTY_STMT (pre_body))
pre_body = NULL;
else if (! processing_template_decl)
--- gcc/testsuite/g++.dg/gomp/pr35078.C.jj 2008-02-18 11:07:21.000000000 +0100
+++ gcc/testsuite/g++.dg/gomp/pr35078.C 2008-02-18 11:07:04.000000000 +0100
@@ -0,0 +1,20 @@
+// PR c++/35078
+// { dg-do compile }
+// { dg-options "-fopenmp" }
+
+template<int> void
+foo ()
+{
+#pragma omp parallel for
+ for (int& i = 0; i < 10; ++i) // { dg-error "invalid type for iteration variable" }
+ ;
+}
+
+void
+bar ()
+{
+ int j = 0;
+#pragma omp parallel for
+ for (int& i = j; i < 10; ++i) // { dg-error "invalid type for iteration variable" }
+ ;
+}

View File

@ -1,178 +0,0 @@
2008-02-11 Jakub Jelinek <jakub@redhat.com>
PR middle-end/35130
* tree-nested.c (convert_call_expr): Put FRAME.* vars into
OMP_CLAUSE_SHARED rather than OMP_CLAUSE_FIRSTPRIVATE clause.
* testsuite/libgomp.fortran/pr35130.f90: New test.
* testsuite/libgomp.c/pr35130.c: New test.
--- gcc/tree-nested.c.jj 2008-02-11 14:48:12.000000000 +0100
+++ gcc/tree-nested.c 2008-02-11 17:09:23.000000000 +0100
@@ -1739,7 +1739,8 @@ convert_call_expr (tree *tp, int *walk_s
break;
if (c == NULL)
{
- c = build_omp_clause (OMP_CLAUSE_FIRSTPRIVATE);
+ c = build_omp_clause (i ? OMP_CLAUSE_FIRSTPRIVATE
+ : OMP_CLAUSE_SHARED);
OMP_CLAUSE_DECL (c) = decl;
OMP_CLAUSE_CHAIN (c) = OMP_PARALLEL_CLAUSES (t);
OMP_PARALLEL_CLAUSES (t) = c;
--- libgomp/testsuite/libgomp.fortran/pr35130.f90.jj 2008-02-11 17:15:58.000000000 +0100
+++ libgomp/testsuite/libgomp.fortran/pr35130.f90 2008-02-11 17:16:07.000000000 +0100
@@ -0,0 +1,20 @@
+! PR middle-end/35130
+
+program pr35130
+ implicit none
+ real, dimension(20) :: a
+ integer :: k
+ a(:) = 0.0
+!$omp parallel do private(k)
+ do k=1,size(a)
+ call inner(k)
+ end do
+!$omp end parallel do
+ if (any (a.ne.42)) call abort
+contains
+ subroutine inner(i)
+ implicit none
+ integer :: i
+ a(i) = 42
+ end subroutine inner
+end program pr35130
--- libgomp/testsuite/libgomp.c/pr35130.c.jj 2008-02-11 17:12:18.000000000 +0100
+++ libgomp/testsuite/libgomp.c/pr35130.c 2008-02-11 17:12:03.000000000 +0100
@@ -0,0 +1,131 @@
+/* PR middle-end/35130 */
+
+extern void abort (void);
+
+void
+f1 (void)
+{
+ int a[4], k;
+ void nested (int x)
+ {
+ a[x] = 42;
+ }
+
+ for (k = 0; k < 4; k++)
+ a[k] = 0;
+#pragma omp parallel for
+ for (k = 0; k < 4; k++)
+ nested (k);
+
+ if (a[0] != 42 || a[1] != 42 || a[2] != 42 || a[3] != 42)
+ abort ();
+}
+
+void
+f2 (void)
+{
+ int a[4], k;
+ void nested (void)
+ {
+ int l;
+ void nested2 (int x)
+ {
+ a[x] = 42;
+ }
+#pragma omp parallel for
+ for (l = 0; l < 4; l++)
+ nested2 (l);
+ }
+
+ for (k = 0; k < 4; k++)
+ a[k] = 0;
+
+ nested ();
+
+ if (a[0] != 42 || a[1] != 42 || a[2] != 42 || a[3] != 42)
+ abort ();
+}
+
+void
+f3 (void)
+{
+ int a[4], b[4], c[4], k;
+ void nested (int x)
+ {
+ a[x] = b[x] = c[x] = 42;
+ }
+
+ for (k = 0; k < 4; k++)
+ a[k] = b[k] = c[k] = 0;
+ nested (0);
+
+#pragma omp parallel
+ {
+ #pragma omp single
+ {
+ a[1] = 43;
+ b[1] = 43;
+ }
+ #pragma omp parallel
+ {
+ #pragma omp single
+ {
+ b[2] = 44;
+ c[2] = 44;
+ }
+ }
+ }
+
+ if (a[0] != 42 || a[1] != 43 || a[2] != 0 || a[3] != 0)
+ abort ();
+ if (b[0] != 42 || b[1] != 43 || b[2] != 44 || b[3] != 0)
+ abort ();
+ if (c[0] != 42 || c[1] != 0 || c[2] != 44 || c[3] != 0)
+ abort ();
+}
+
+void
+f4 (void)
+{
+ int a[4], b[4], c[4], k;
+ void nested ()
+ {
+ #pragma omp parallel
+ {
+ #pragma omp single
+ {
+ a[1] = 43;
+ b[1] = 43;
+ }
+ #pragma omp parallel
+ {
+ #pragma omp single
+ {
+ b[2] = 44;
+ c[2] = 44;
+ }
+ }
+ }
+ }
+
+ for (k = 0; k < 4; k++)
+ a[k] = b[k] = c[k] = k == 0 ? 42 : 0;
+ nested ();
+
+ if (a[0] != 42 || a[1] != 43 || a[2] != 0 || a[3] != 0)
+ abort ();
+ if (b[0] != 42 || b[1] != 43 || b[2] != 44 || b[3] != 0)
+ abort ();
+ if (c[0] != 42 || c[1] != 0 || c[2] != 44 || c[3] != 0)
+ abort ();
+}
+
+int
+main (void)
+{
+ f1 ();
+ f2 ();
+ f3 ();
+ f4 ();
+ return 0;
+}

View File

@ -1,38 +0,0 @@
2008-02-14 Eric Botcazou <ebotcazou@adacore.com>
PR middle-end/35136
* gimplify.c (force_gimple_operand_bsi): Revert 2008-02-12 change.
(force_gimple_operand): Likewise.
--- gcc/gimplify.c (revision 132267)
+++ gcc/gimplify.c (working copy)
@@ -6629,14 +6629,6 @@ force_gimple_operand (tree expr, tree *s
pop_gimplify_context (NULL);
- if (*stmts && gimple_in_ssa_p (cfun))
- {
- tree_stmt_iterator tsi;
-
- for (tsi = tsi_start (*stmts); !tsi_end_p (tsi); tsi_next (&tsi))
- mark_symbols_for_renaming (tsi_stmt (tsi));
- }
-
return expr;
}
@@ -6656,6 +6648,14 @@ force_gimple_operand_bsi (block_stmt_ite
expr = force_gimple_operand (expr, &stmts, simple_p, var);
if (stmts)
{
+ if (gimple_in_ssa_p (cfun))
+ {
+ tree_stmt_iterator tsi;
+
+ for (tsi = tsi_start (stmts); !tsi_end_p (tsi); tsi_next (&tsi))
+ mark_symbols_for_renaming (tsi_stmt (tsi));
+ }
+
if (before)
bsi_insert_before (bsi, stmts, m);
else

View File

@ -4,8 +4,8 @@
* doc/cp-hacking.texinfo (@direntry): Likewise.
* doc/cp-vmintegration.texinfo (@direntry): Likewise.
--- gcc/libjava/classpath/doc/cp-tools.texinfo.jj 2007-04-01 20:16:54.000000000 +0200
+++ gcc/libjava/classpath/doc/cp-tools.texinfo 2008-02-18 15:19:12.000000000 +0100
--- libjava/classpath/doc/cp-tools.texinfo.jj 2007-04-01 20:16:54.000000000 +0200
+++ libjava/classpath/doc/cp-tools.texinfo 2008-02-18 15:19:12.000000000 +0100
@@ -27,7 +27,7 @@ Copyright (C) 2006, 2007 Free Software F
@ifnotplaintext
@dircategory GNU Libraries
@ -15,8 +15,8 @@
@end direntry
@end ifnotplaintext
@end ifinfo
--- gcc/libjava/classpath/doc/cp-hacking.texinfo.jj 2007-06-06 12:54:50.000000000 +0200
+++ gcc/libjava/classpath/doc/cp-hacking.texinfo 2008-02-18 15:19:00.000000000 +0100
--- libjava/classpath/doc/cp-hacking.texinfo.jj 2007-06-06 12:54:50.000000000 +0200
+++ libjava/classpath/doc/cp-hacking.texinfo 2008-02-18 15:19:00.000000000 +0100
@@ -16,7 +16,7 @@ Copyright (C) 1998,1999,2000,2001,2002,2
@ifnotplaintext
@dircategory GNU Libraries
@ -26,8 +26,8 @@
@end direntry
@end ifnotplaintext
@end ifinfo
--- gcc/libjava/classpath/doc/cp-vmintegration.texinfo.jj 2007-06-06 12:54:50.000000000 +0200
+++ gcc/libjava/classpath/doc/cp-vmintegration.texinfo 2008-02-18 15:19:29.000000000 +0100
--- libjava/classpath/doc/cp-vmintegration.texinfo.jj 2007-06-06 12:54:50.000000000 +0200
+++ libjava/classpath/doc/cp-vmintegration.texinfo 2008-02-18 15:19:29.000000000 +0100
@@ -17,7 +17,7 @@ Copyright (C) 1998-2002, 2004, 2005, 200
@ifnotplaintext
@dircategory GNU Libraries

View File

@ -1,6 +1,6 @@
%define DATE 20080214
%define DATE 20080218
%define gcc_version 4.3.0
%define gcc_release 0.9
%define gcc_release 0.10
%define _unpackaged_files_terminate_build 0
%define multilib_64_archs sparc64 ppc64 s390x x86_64
%define include_gappletviewer 1
@ -140,8 +140,10 @@ Patch10: gcc43-rh330771.patch
Patch11: gcc43-rh341221.patch
Patch12: gcc43-cpp-pragma.patch
Patch13: gcc43-java-debug-iface-type.patch
Patch14: gcc43-pr35130.patch
Patch15: gcc43-pr35136-revert.patch
Patch14: gcc43-pr34964.patch
Patch15: gcc43-pr35028.patch
Patch16: gcc43-pr35078.patch
Patch17: gcc43-rh433222.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@ -438,8 +440,10 @@ which are required to run programs compiled with the GNAT.
%patch11 -p0 -b .rh341221~
%patch12 -p0 -b .cpp-pragma~
%patch13 -p0 -b .java-debug-iface-type~
%patch14 -p0 -b .pr35130~
%patch15 -p0 -b .pr35136-revert~
%patch14 -p0 -b .pr34964~
%patch15 -p0 -b .pr35028~
%patch16 -p0 -b .pr35078~
%patch17 -p0 -b .rh433222~
tar xzf %{SOURCE4}
@ -1653,6 +1657,18 @@ fi
%doc rpm.doc/changelogs/libmudflap/ChangeLog*
%changelog
* Mon Feb 18 2008 Jakub Jelinek <jakub@redhat.com> 4.3.0-0.10
- update to trunk
- PRs c++/11159, c++/28743, c++/34050, c++/35023, c++/35024, c++/35026,
c++/5645, c/28368, documentation/15479, fortran/34952,
fortran/35150, libgcj/33085, libstdc++/34797, libstdc++/35209,
libstdc++/35221, middle-end/34621, middle-end/35149, middle-end/35196,
middle-end/35227, preprocessor/35061, target/34930, target/35088,
testsuite/35119, testsuite/35208, tree-optimization/35164,
tree-optimization/35231
- some OpenMP fixes (PRs c++/34964, c++/35028, c++/35078)
- fix cp-tools.info* @direntry (#433222)
* Thu Feb 14 2008 Jakub Jelinek <jakub@redhat.com> 4.3.0-0.9
- update to trunk
- PRs middle-end/29673, ada/35143, c++/34774, c++/34824, c++/34962, c++/34937,

View File

@ -1,2 +1,2 @@
69ddc7e3f6dbfc7128a6b9f92022f579 gcc-4.3.0-20080214.tar.bz2
17b1f5e44e464967b5d3451345049321 gcc-4.3.0-20080218.tar.bz2
92a70f9e56223b653bce0f58f90cf950 fastjar-0.95.tar.gz