This commit is contained in:
Jakub Jelinek 2008-03-07 09:08:38 +00:00
parent aa92b34140
commit d3981481e5
7 changed files with 11 additions and 3995 deletions

View File

@ -1,2 +1,2 @@
gcc-4.3.0-20080229.tar.bz2
gcc-4.3.0-20080307.tar.bz2
fastjar-0.95.tar.gz

File diff suppressed because it is too large Load Diff

View File

@ -1,104 +0,0 @@
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)

View File

@ -1,50 +0,0 @@
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++;
+}

View File

@ -1,68 +0,0 @@
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,6 +1,6 @@
%define DATE 20080229
%define DATE 20080307
%define gcc_version 4.3.0
%define gcc_release 0.13
%define gcc_release 1
%define _unpackaged_files_terminate_build 0
%define multilib_64_archs sparc64 ppc64 s390x x86_64
%define include_gappletviewer 1
@ -140,10 +140,6 @@ Patch10: gcc43-rh330771.patch
Patch11: gcc43-rh341221.patch
Patch12: gcc43-cpp-pragma.patch
Patch13: gcc43-java-debug-iface-type.patch
Patch14: gcc43-pr34964.patch
Patch15: gcc43-pr35028.patch
Patch16: gcc43-pr35078.patch
Patch17: gcc43-baselist-update.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@ -440,10 +436,6 @@ 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 .pr34964~
%patch15 -p0 -b .pr35028~
%patch16 -p0 -b .pr35078~
%patch17 -p0 -b .baselist-update~
tar xzf %{SOURCE4}
@ -451,7 +443,7 @@ tar xzf %{SOURCE4}
tar xjf %{SOURCE10}
%endif
sed -i -e 's/4\.3\.0/4.3.0/' gcc/BASE-VER
sed -i -e 's/4\.3\.1/4.3.0/' gcc/BASE-VER
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
cp -a libstdc++-v3/config/cpu/i{4,3}86/atomicity.h
@ -1657,6 +1649,12 @@ fi
%doc rpm.doc/changelogs/libmudflap/ChangeLog*
%changelog
* Fri Mar 7 2008 Jakub Jelinek <jakub@redhat.com> 4.3.0-1
- gcc 4.3.0 release
- PRs c++/35244, c++/35315, c++/35323, c++/35333, c++/35338, driver/35420,
libfortran/35355, libstdc++/35480, target/33963, target/35189,
target/35222, target/35401, target/35453
* Fri Feb 29 2008 Jakub Jelinek <jakub@redhat.com> 4.3.0-0.13
- update from gcc-4_3-branch
- PRs middle-end/19984, target/25477

View File

@ -1,2 +1,2 @@
d482ca8757d55c91ea709bce300a1d59 gcc-4.3.0-20080229.tar.bz2
634cd8d08cee6315a4091ec4fadc3b95 gcc-4.3.0-20080307.tar.bz2
92a70f9e56223b653bce0f58f90cf950 fastjar-0.95.tar.gz