rpms/gcc/devel gcc41-debug-fortran-array.patch, NONE, 1.1 gcc41-omp-outer-ctx.patch, NONE, 1.1 gcc41-pr34178.patch, NONE, 1.1 gcc41-pr34364.patch, NONE, 1.1 gcc41-pr34394.patch, NONE, 1.1 gcc41.spec, 1.183, 1.184 gcc41-pr34094.patch, 1.1, NONE gcc41-pr34238.patch, 1.1, NONE
Jakub Jelinek (jakub)
fedora-extras-commits at redhat.com
Wed Dec 12 14:09:59 UTC 2007
- Previous message (by thread): rpms/tar/devel tar-1.17-xattrs-conf.patch, NONE, 1.1 tar-1.17-xattrs.patch, 1.1, 1.2 tar.1, 1.1, 1.2 tar.spec, 1.64, 1.65
- Next message (by thread): rpms/tellico/devel tellico.spec,1.18,1.19
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jakub
Update of /cvs/pkgs/rpms/gcc/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1647
Modified Files:
gcc41.spec
Added Files:
gcc41-debug-fortran-array.patch gcc41-omp-outer-ctx.patch
gcc41-pr34178.patch gcc41-pr34364.patch gcc41-pr34394.patch
Removed Files:
gcc41-pr34094.patch gcc41-pr34238.patch
Log Message:
4.1.2-36
gcc41-debug-fortran-array.patch:
--- NEW FILE gcc41-debug-fortran-array.patch ---
2007-12-10 Jakub Jelinek <jakub at redhat.com>
* dwarf2out.c (gen_array_type_die, gen_descr_array_type_die): For
Fortran multi-dimensional arrays use DW_AT_ordering
DW_ORD_col_major.
--- gcc/dwarf2out.c (revision 130741)
+++ gcc/dwarf2out.c (revision 130742)
@@ -11636,6 +11636,12 @@ gen_array_type_die (tree type, dw_die_re
add_AT_flag (array_die, DW_AT_GNU_vector, 1);
}
+ /* For Fortran multidimensional arrays use DW_ORD_col_major ordering. */
+ if (is_fortran ()
+ && TREE_CODE (type) == ARRAY_TYPE
+ && TREE_CODE (TREE_TYPE (type)) == ARRAY_TYPE)
+ add_AT_unsigned (array_die, DW_AT_ordering, DW_ORD_col_major);
+
#if 0
/* We default the array ordering. SDB will probably do
the right things even if DW_AT_ordering is not present. It's not even
@@ -11787,6 +11793,11 @@ gen_descr_array_type_die (tree type, str
add_name_attribute (array_die, type_tag (type));
equate_type_number_to_die (type, array_die);
+ /* For Fortran multidimensional arrays use DW_ORD_col_major ordering. */
+ if (is_fortran ()
+ && info->ndimensions >= 2)
+ add_AT_unsigned (array_die, DW_AT_ordering, DW_ORD_col_major);
+
if (info->data_location)
add_descr_info_field (array_die, DW_AT_data_location, info->data_location,
info->base_decl);
gcc41-omp-outer-ctx.patch:
--- NEW FILE gcc41-omp-outer-ctx.patch ---
2007-12-03 Jakub Jelinek <jakub at redhat.com>
* omp-low.c (lookup_decl_in_outer_ctx): Allow calling this
with !ctx->is_nested.
(maybe_lookup_decl_in_outer_ctx): Look up in outer contexts
even if !ctx->is_nested.
(lower_copyprivate_clauses, lower_send_clauses,
lower_send_shared_vars): Call lookup_decl_in_outer_ctx
unconditionally.
* testsuite/libgomp.c/private-1.c: New test.
--- gcc/omp-low.c (revision 130589)
+++ gcc/omp-low.c (revision 130590)
@@ -1518,12 +1518,10 @@ lookup_decl_in_outer_ctx (tree decl, omp
tree t;
omp_context *up;
- gcc_assert (ctx->is_nested);
-
for (up = ctx->outer, t = NULL; up && t == NULL; up = up->outer)
t = maybe_lookup_decl (decl, up);
- gcc_assert (t || is_global_var (decl));
+ gcc_assert (!ctx->is_nested || t || is_global_var (decl));
return t ? t : decl;
}
@@ -1538,9 +1536,8 @@ maybe_lookup_decl_in_outer_ctx (tree dec
tree t = NULL;
omp_context *up;
- if (ctx->is_nested)
- for (up = ctx->outer, t = NULL; up && t == NULL; up = up->outer)
- t = maybe_lookup_decl (decl, up);
+ for (up = ctx->outer, t = NULL; up && t == NULL; up = up->outer)
+ t = maybe_lookup_decl (decl, up);
return t ? t : decl;
}
@@ -2012,7 +2009,7 @@ lower_copyprivate_clauses (tree clauses,
by_ref = use_pointer_for_field (var, false);
ref = build_sender_ref (var, ctx);
- x = (ctx->is_nested) ? lookup_decl_in_outer_ctx (var, ctx) : var;
+ x = lookup_decl_in_outer_ctx (var, ctx);
x = by_ref ? build_fold_addr_expr (x) : x;
x = build_gimple_modify_stmt (ref, x);
gimplify_and_add (x, slist);
@@ -2053,9 +2050,8 @@ lower_send_clauses (tree clauses, tree *
continue;
}
- var = val = OMP_CLAUSE_DECL (c);
- if (ctx->is_nested)
- var = lookup_decl_in_outer_ctx (val, ctx);
+ val = OMP_CLAUSE_DECL (c);
+ var = lookup_decl_in_outer_ctx (val, ctx);
if (OMP_CLAUSE_CODE (c) != OMP_CLAUSE_COPYIN
&& is_global_var (var))
@@ -2127,13 +2123,10 @@ lower_send_shared_vars (tree *ilist, tre
if (!nvar || !DECL_HAS_VALUE_EXPR_P (nvar))
continue;
- var = ovar;
-
/* If CTX is a nested parallel directive. Find the immediately
enclosing parallel or workshare construct that contains a
mapping for OVAR. */
- if (ctx->is_nested)
- var = lookup_decl_in_outer_ctx (ovar, ctx);
+ var = lookup_decl_in_outer_ctx (ovar, ctx);
if (use_pointer_for_field (ovar, true))
{
--- libgomp/testsuite/libgomp.c/private-1.c (revision 0)
+++ libgomp/testsuite/libgomp.c/private-1.c (revision 130590)
@@ -0,0 +1,54 @@
+extern void abort (void);
+
+int a = 18;
+
+void
+f1 (int i, int j, int k)
+{
+ int l = 6, m = 7, n = 8;
+#pragma omp parallel private(j, m) shared(k, n) firstprivate(i, l) \
+ num_threads(1)
+ {
+ j = 6;
+ m = 5;
+ if (++a != 19 || ++i != 9 || j != 6 || ++l != 7 || m != 5 || ++n != 9)
+ #pragma omp atomic
+ k++;
+ }
+ if (a != 19 || i != 8 || j != 26 || k != 0 || l != 6 || m != 7 || n != 9)
+ abort ();
+}
+
+int v1 = 1, v2 = 2, v5 = 5;
+int err;
+
+void
+f2 (void)
+{
+ int v3 = 3;
+#pragma omp sections private (v1) firstprivate (v2)
+ {
+ #pragma omp section
+ {
+ int v4 = 4;
+ v1 = 7;
+ #pragma omp parallel num_threads(1) firstprivate(v1, v2, v3, v4)
+ {
+ if (++v1 != 8 || ++v2 != 3 || ++v3 != 4 || ++v4 != 5 || ++v5 != 6)
+ err = 1;
+ }
+ if (v1 != 7 || v2 != 2 || v3 != 3 || v4 != 4 || v5 != 6)
+ abort ();
+ if (err)
+ abort ();
+ }
+ }
+}
+
+int
+main (void)
+{
+ f1 (8, 26, 0);
+ f2 ();
+ return 0;
+}
gcc41-pr34178.patch:
--- NEW FILE gcc41-pr34178.patch ---
2007-12-09 Jakub Jelinek <jakub at redhat.com>
PR c++/34178
PR c++/34340
* repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
Return 2 also if DECL_EXPLICIT_INSTANTIATION.
* decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
flag_use_repository and repo_emit_p returned 2.
* g++.dg/template/repo6.C: New test.
* g++.dg/template/repo7.C: New test.
* g++.dg/template/repo8.C: New test.
--- gcc/cp/decl2.c (revision 130726)
+++ gcc/cp/decl2.c (revision 130727)
@@ -2230,7 +2230,8 @@ import_export_decl (tree decl)
{
/* DECL is an implicit instantiation of a function or static
data member. */
- if (flag_implicit_templates
+ if ((flag_implicit_templates
+ && !flag_use_repository)
|| (flag_implicit_inline_templates
&& TREE_CODE (decl) == FUNCTION_DECL
&& DECL_DECLARED_INLINE_P (decl)))
--- gcc/cp/repo.c (revision 130726)
+++ gcc/cp/repo.c (revision 130727)
@@ -304,16 +304,19 @@ repo_emit_p (tree decl)
&& (!TYPE_LANG_SPECIFIC (type)
|| !CLASSTYPE_TEMPLATE_INSTANTIATION (type)))
return 2;
- /* Static data members initialized by constant expressions must
+ /* Const static data members initialized by constant expressions must
be processed where needed so that their definitions are
available. */
- if (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (decl)
+ if (DECL_INTEGRAL_CONSTANT_VAR_P (decl)
&& DECL_CLASS_SCOPE_P (decl))
return 2;
}
else if (!DECL_TEMPLATE_INSTANTIATION (decl))
return 2;
+ if (DECL_EXPLICIT_INSTANTIATION (decl))
+ return 2;
+
/* For constructors and destructors, the repository contains
information about the clones -- not the original function --
because only the clones are emitted in the object file. */
--- gcc/testsuite/g++.dg/template/repo7.C (revision 0)
+++ gcc/testsuite/g++.dg/template/repo7.C (revision 130727)
@@ -0,0 +1,23 @@
+// PR c++/34340
+// { dg-options "-frepo" }
+// { dg-final { cleanup-repo-files } }
+
+struct A
+{
+ int a;
+};
+
+template <typename T> struct D
+{
+ static const A b;
+};
+
+template<typename T> const A D<T>::b = { 2 };
+template class D<A>;
+
+const A *x = &D<A>::b;
+
+int
+main ()
+{
+}
--- gcc/testsuite/g++.dg/template/repo8.C (revision 0)
+++ gcc/testsuite/g++.dg/template/repo8.C (revision 130727)
@@ -0,0 +1,22 @@
+// PR c++/34340
+// { dg-options "-frepo" }
+// { dg-final { cleanup-repo-files } }
+
+struct A
+{
+ int a;
+};
+
+template <typename T> struct D
+{
+ static const A b;
+};
+
+template<typename T> const A D<T>::b = { 2 };
+
+const A *x = &D<A>::b;
+
+int
+main ()
+{
+}
--- gcc/testsuite/g++.dg/template/repo6.C (revision 0)
+++ gcc/testsuite/g++.dg/template/repo6.C (revision 130727)
@@ -0,0 +1,24 @@
+// PR c++/34178
+// { dg-options "-frepo" }
+// { dg-final { cleanup-repo-files } }
+
+template<typename T>
+class A
+{
+private:
+ static const int x;
+ static int y;
+
+public:
+ int getX () { return x + y; }
+};
+
+template<typename T> const int A<T>::x = 0;
+template<typename T> int A<T>::y = 0;
+
+int
+main ()
+{
+ A<int> a;
+ return a.getX();
+}
gcc41-pr34364.patch:
--- NEW FILE gcc41-pr34364.patch ---
2007-12-11 Jakub Jelinek <jakub at redhat.com>
PR c++/34364
* rtti.c (build_dynamic_cast): Call convert_from_reference even for
dynamic_cast in a template.
* g++.dg/rtti/dyncast2.C: New test.
--- gcc/cp/rtti.c (revision 130769)
+++ gcc/cp/rtti.c (revision 130770)
@@ -728,8 +728,7 @@ build_dynamic_cast (tree type, tree expr
{
expr = build_min (DYNAMIC_CAST_EXPR, type, expr);
TREE_SIDE_EFFECTS (expr) = 1;
-
- return expr;
+ return convert_from_reference (expr);
}
return convert_from_reference (build_dynamic_cast_1 (type, expr));
--- gcc/testsuite/g++.dg/rtti/dyncast2.C (revision 0)
+++ gcc/testsuite/g++.dg/rtti/dyncast2.C (revision 130770)
@@ -0,0 +1,31 @@
+// PR c++/34364
+// { dg-do run }
+
+struct A
+{
+ virtual ~A () {}
+};
+
+struct B : public A
+{
+ template <typename T> struct C
+ {
+ static void f (A &a)
+ {
+ dynamic_cast <B &>(a).g ();
+ }
+ };
+
+ B () : c (6) {}
+ void g () { c++; }
+ int c;
+};
+
+B b;
+
+int
+main (void)
+{
+ B::C<int>::f (b);
+ return b.c != 7;
+}
gcc41-pr34394.patch:
--- NEW FILE gcc41-pr34394.patch ---
2007-12-10 Jakub Jelinek <jakub at redhat.com>
PR c++/34394
* error.c (dump_expr): Handle ABS_EXPR.
* g++.dg/other/error22.C: New test.
--- gcc/cp/error.c (revision 130743)
+++ gcc/cp/error.c (revision 130744)
@@ -1757,6 +1757,7 @@ dump_expr (tree t, int flags)
break;
case SCOPE_REF:
+ case ABS_EXPR:
pp_expression (cxx_pp, t);
break;
--- gcc/testsuite/g++.dg/other/error22.C (revision 0)
+++ gcc/testsuite/g++.dg/other/error22.C (revision 130744)
@@ -0,0 +1,9 @@
+// PR c++/34394
+// { dg-do compile }
+
+extern double fabs (double);
+
+void foo (double x)
+{
+ fabs (x) (); // { dg-error "__builtin_abs" }
+}
Index: gcc41.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gcc/devel/gcc41.spec,v
retrieving revision 1.183
retrieving revision 1.184
diff -u -r1.183 -r1.184
--- gcc41.spec 2 Dec 2007 19:05:44 -0000 1.183
+++ gcc41.spec 12 Dec 2007 14:09:21 -0000 1.184
@@ -1,6 +1,6 @@
%define DATE 20071124
%define gcc_version 4.1.2
-%define gcc_release 35
+%define gcc_release 36
%define _unpackaged_files_terminate_build 0
%define multilib_64_archs sparc64 ppc64 s390x x86_64
%define include_gappletviewer 1
@@ -195,14 +195,17 @@
Patch70: gcc41-pr33962.patch
Patch71: gcc41-pr34070.patch
Patch72: gcc41-pr34089.patch
-Patch73: gcc41-pr34094.patch
+Patch73: gcc41-pr34178.patch
Patch74: gcc41-pr34130.patch
Patch75: gcc41-pr34146.patch
Patch76: gcc41-rh364001.patch
Patch77: gcc41-pr34213.patch
-Patch78: gcc41-pr34238.patch
+Patch78: gcc41-pr34364.patch
Patch79: gcc41-pr34275.patch
Patch80: gcc41-rh407281.patch
+Patch81: gcc41-pr34394.patch
+Patch82: gcc41-debug-fortran-array.patch
+Patch83: gcc41-omp-outer-ctx.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -556,14 +559,17 @@
%patch70 -p0 -b .pr33962~
%patch71 -p0 -b .pr34070~
%patch72 -p0 -b .pr34089~
-%patch73 -p0 -b .pr34094~
+%patch73 -p0 -b .pr34178~
%patch74 -p0 -b .pr34130~
%patch75 -p0 -b .pr34146~
%patch76 -p0 -b .rh364001~
%patch77 -p0 -b .pr34213~
-%patch78 -p0 -b .pr34238~
+%patch78 -p0 -b .pr34364~
%patch79 -p0 -b .pr34275~
%patch80 -p0 -b .rh407281~
+%patch81 -p0 -b .pr34394~
+%patch82 -p0 -b .debug-fortran-array~
+%patch83 -p0 -b .omp-outer-ctx~
%if %{bootstrap_java}
tar xjf %{SOURCE10}
@@ -1736,6 +1742,15 @@
%doc rpm.doc/changelogs/libmudflap/ChangeLog*
%changelog
+* Wed Dec 12 2007 Jakub Jelinek <jakub at redhat.com> 4.1.2-36
+- revert PR c++/34094 fix altogether, it was only accepts-invalid and
+ caused a bunch of valid or unclear cases to be rejected (#411871, #402521)
+- fix OpenMP handling of global vars privatized in orphaned constructs
+ with #pragma omp parallel inside them
+- -frepo fixes (#411741, PRs c++/34178, c++/34340)
+- fix dynamic_cast<C &> in templates (PR c++/34364)
+- fix error diagnostics involving ABS_EXPR (PR c++/34394)
+
* Sun Dec 2 2007 Jakub Jelinek <jakub at redhat.com> 4.1.2-35
- two ctor preevaluation fixes (Olivier Hainque,
Eric Botcazou, #407281)
--- gcc41-pr34094.patch DELETED ---
--- gcc41-pr34238.patch DELETED ---
- Previous message (by thread): rpms/tar/devel tar-1.17-xattrs-conf.patch, NONE, 1.1 tar-1.17-xattrs.patch, 1.1, 1.2 tar.1, 1.1, 1.2 tar.spec, 1.64, 1.65
- Next message (by thread): rpms/tellico/devel tellico.spec,1.18,1.19
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list