rpms/gcc/devel gcc41-pr31809.patch, NONE, 1.1 gcc41-pr32139.patch, NONE, 1.1 gcc41-pr32285.patch, NONE, 1.1 gcc41-pr32353.patch, NONE, 1.1 .cvsignore, 1.206, 1.207 gcc41.spec, 1.160, 1.161 sources, 1.208, 1.209 gcc41-dtor-relro.patch, 1.1, NONE gcc41-libgomp-ncpus.patch, 1.1, NONE gcc41-pr28482.patch, 1.2, NONE gcc41-tls-data-alignment.patch, 1.1, NONE
Jakub Jelinek (jakub)
fedora-extras-commits at redhat.com
Fri Jun 15 17:42:58 UTC 2007
Author: jakub
Update of /cvs/pkgs/rpms/gcc/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8845
Modified Files:
.cvsignore gcc41.spec sources
Added Files:
gcc41-pr31809.patch gcc41-pr32139.patch gcc41-pr32285.patch
gcc41-pr32353.patch
Removed Files:
gcc41-dtor-relro.patch gcc41-libgomp-ncpus.patch
gcc41-pr28482.patch gcc41-tls-data-alignment.patch
Log Message:
4.1.2-13
gcc41-pr31809.patch:
--- NEW FILE gcc41-pr31809.patch ---
2007-05-31 Jakub Jelinek <jakub at redhat.com>
PR c++/31806
* decl.c (cp_finish_decl): Also clear was_readonly if a static var
needs runtime initialization.
2007-05-30 Jakub Jelinek <jakub at redhat.com>
PR c++/31809
* decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
variables that need runtime initialization.
* g++.dg/opt/static5.C: New test.
--- gcc/cp/decl.c (revision 125200)
+++ gcc/cp/decl.c (revision 125229)
@@ -5357,7 +5357,18 @@ cp_finish_decl (tree decl, tree init, bo
initializer. It is not legal to redeclare a static data
member, so this issue does not arise in that case. */
if (var_definition_p && TREE_STATIC (decl))
- expand_static_init (decl, init);
+ {
+ /* If a TREE_READONLY variable needs initialization
+ at runtime, it is no longer readonly and we need to
+ avoid MEM_READONLY_P being set on RTL created for it. */
+ if (init)
+ {
+ if (TREE_READONLY (decl))
+ TREE_READONLY (decl) = 0;
+ was_readonly = 0;
+ }
+ expand_static_init (decl, init);
+ }
}
}
--- gcc/testsuite/g++.dg/opt/static5.C (revision 0)
+++ gcc/testsuite/g++.dg/opt/static5.C (revision 125229)
@@ -0,0 +1,29 @@
+// PR c++/31809
+// { dg-do run }
+// { dg-options "-O2" }
+
+struct S
+{
+ unsigned v;
+ static inline S f (unsigned a);
+};
+
+inline S
+S::f (unsigned a)
+{
+ static S t = { a };
+ return t;
+}
+
+const static S s = S::f (26);
+
+extern "C" void abort (void);
+
+int
+main ()
+{
+ S t = s;
+ if (t.v != 26)
+ abort ();
+ return 0;
+}
gcc41-pr32139.patch:
--- NEW FILE gcc41-pr32139.patch ---
2007-06-01 Jakub Jelinek <jakub at redhat.com>
PR tree-optimization/32139
* c-typeck.c (common_pointer_type): Set TYPE_READONLY
and TYPE_VOLATILE on the merged pointed to FUNCTION_TYPE
only if both pointed_to_1 and pointed_to_2 are TYPE_READONLY
resp. TYPE_VOLATILE.
* gcc.c-torture/compile/20070531-1.c: New test.
--- gcc/c-typeck.c.jj 2007-04-25 10:13:52.000000000 +0200
+++ gcc/c-typeck.c 2007-06-01 10:51:53.000000000 +0200
@@ -499,6 +499,7 @@ common_pointer_type (tree t1, tree t2)
tree pointed_to_1, mv1;
tree pointed_to_2, mv2;
tree target;
+ int type_quals;
/* Save time if the two types are the same. */
@@ -526,10 +527,19 @@ common_pointer_type (tree t1, tree t2)
if (TREE_CODE (mv2) != ARRAY_TYPE)
mv2 = TYPE_MAIN_VARIANT (pointed_to_2);
target = composite_type (mv1, mv2);
- t1 = build_pointer_type (c_build_qualified_type
- (target,
- TYPE_QUALS (pointed_to_1) |
- TYPE_QUALS (pointed_to_2)));
+ type_quals = TYPE_QUALS (pointed_to_1) | TYPE_QUALS (pointed_to_2);
+ if (TREE_CODE (pointed_to_1) == FUNCTION_TYPE)
+ {
+ /* TYPE_READONLY and TYPE_VOLATILE on FUNCTION_TYPE should be
+ logically ANDed, not ORed, as if one function is
+ __attribute__((const)) and the other is not, the common type
+ must be conservatively not __attribute__((const))
+ and similarly for __attribute__((noreturn)). */
+ type_quals &= ~(TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE);
+ type_quals |= (TYPE_QUALS (pointed_to_1) & TYPE_QUALS (pointed_to_2))
+ & (TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE);
+ }
+ t1 = build_pointer_type (c_build_qualified_type (target, type_quals));
return build_type_attribute_variant (t1, attributes);
}
--- gcc/testsuite/gcc.c-torture/compile/20070531-1.c.jj 2007-05-31 13:47:22.000000000 +0200
+++ gcc/testsuite/gcc.c-torture/compile/20070531-1.c 2007-06-01 10:57:15.000000000 +0200
@@ -0,0 +1,11 @@
+/* PR tree-optimization/32139 */
+int foo (void);
+int bar (void) __attribute__ ((const));
+
+int
+test (int x)
+{
+ int a = (x == 10000 ? foo : bar) ();
+ int b = (x == 10000 ? foo : bar) ();
+ return a + b;
+}
gcc41-pr32285.patch:
--- NEW FILE gcc41-pr32285.patch ---
2007-06-14 Jakub Jelinek <jakub at redhat.com>
PR middle-end/32285
* calls.c (precompute_arguments): Also precompute CALL_EXPR arguments
if ACCUMULATE_OUTGOING_ARGS.
* gcc.c-torture/execute/20070614-1.c: New test.
--- gcc/calls.c.jj 2007-06-13 17:38:55.000000000 +0200
+++ gcc/calls.c 2007-06-14 14:50:56.000000000 +0200
@@ -1269,13 +1269,25 @@ precompute_arguments (int flags, int num
/* If this is a libcall, then precompute all arguments so that we do not
get extraneous instructions emitted as part of the libcall sequence. */
- if ((flags & ECF_LIBCALL_BLOCK) == 0)
+
+ /* If we preallocated the stack space, and some arguments must be passed
+ on the stack, then we must precompute any parameter which contains a
+ function call which will store arguments on the stack.
+ Otherwise, evaluating the parameter may clobber previous parameters
+ which have already been stored into the stack. (we have code to avoid
+ such case by saving the outgoing stack arguments, but it results in
+ worse code) */
+ if ((flags & ECF_LIBCALL_BLOCK) == 0 && !ACCUMULATE_OUTGOING_ARGS)
return;
for (i = 0; i < num_actuals; i++)
{
enum machine_mode mode;
+ if ((flags & ECF_LIBCALL_BLOCK) == 0
+ && TREE_CODE (args[i].tree_value) != CALL_EXPR)
+ continue;
+
/* If this is an addressable type, we cannot pre-evaluate it. */
gcc_assert (!TREE_ADDRESSABLE (TREE_TYPE (args[i].tree_value)));
--- gcc/testsuite/gcc.c-torture/execute/20070614-1.c.jj 2007-06-14 15:32:28.000000000 +0200
+++ gcc/testsuite/gcc.c-torture/execute/20070614-1.c 2007-06-11 13:23:19.000000000 +0200
@@ -0,0 +1,33 @@
+extern void abort (void);
+
+_Complex v = 3.0 + 1.0iF;
+
+void
+foo (_Complex z, int *x)
+{
+ if (z != v)
+ abort ();
+}
+
+_Complex bar (_Complex z) __attribute__ ((pure));
+_Complex
+bar (_Complex z)
+{
+ return v;
+}
+
+int
+baz (void)
+{
+ int a, i;
+ for (i = 0; i < 6; i++)
+ foo (bar (1.0iF * i), &a);
+ return 0;
+}
+
+int
+main ()
+{
+ baz ();
+ return 0;
+}
gcc41-pr32353.patch:
--- NEW FILE gcc41-pr32353.patch ---
2007-06-15 Jakub Jelinek <jakub at redhat.com>
PR tree-optimization/32353
* tree-ssa-structalias.c (set_uids_in_ptset): Also handle RESULT_DECL.
* g++.dg/opt/nrv13.C: New test.
--- gcc/tree-ssa-structalias.c.jj 2007-06-11 11:12:27.000000000 +0200
+++ gcc/tree-ssa-structalias.c 2007-06-15 16:40:29.000000000 +0200
@@ -4343,7 +4343,8 @@ set_uids_in_ptset (tree ptr, bitmap into
bitmap_set_bit (into, DECL_UID (sv->var));
}
else if (TREE_CODE (vi->decl) == VAR_DECL
- || TREE_CODE (vi->decl) == PARM_DECL)
+ || TREE_CODE (vi->decl) == PARM_DECL
+ || TREE_CODE (vi->decl) == RESULT_DECL)
{
if (var_can_have_subvars (vi->decl)
&& get_subvars_for_var (vi->decl))
--- gcc/testsuite/g++.dg/opt/nrv13.C.jj 2007-06-15 16:59:02.000000000 +0200
+++ gcc/testsuite/g++.dg/opt/nrv13.C 2007-06-15 17:03:39.000000000 +0200
@@ -0,0 +1,42 @@
+// PR tree-optimization/32353
+// { dg-do run }
+// { dg-options "-O2" }
+
+extern "C" void abort ();
+
+struct A
+{
+ int f;
+ A (int x) : f (x) {}
+};
+
+A
+foo (const A &x, const A &y)
+{
+ A r (0);
+ r = x.f == -111 ? y : (y.f == -111 || x.f > y.f) ? x : y;
+ A s (0);
+ r = r.f == -111 ? s : (r.f > s.f) ? r : s;
+ return r;
+}
+
+int
+main ()
+{
+ if (foo (A (0), A (1)).f != 1)
+ abort ();
+ if (foo (A (1), A (9)).f != 9)
+ abort ();
+ if (foo (A (9), A (1)).f != 9)
+ abort ();
+ if (foo (A (-4), A (-5)).f != 0)
+ abort ();
+ if (foo (A (-111), A (-111)).f != 0)
+ abort ();
+ if (foo (A (2), A (-111)).f != 2)
+ abort ();
+ if (foo (A (-111), A (6)).f != 6)
+ abort ();
+ if (foo (A (-111), A (-4)).f != 0)
+ abort ();
+}
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/gcc/devel/.cvsignore,v
retrieving revision 1.206
retrieving revision 1.207
diff -u -r1.206 -r1.207
--- .cvsignore 3 May 2007 21:56:10 -0000 1.206
+++ .cvsignore 15 Jun 2007 17:42:21 -0000 1.207
@@ -1 +1 @@
-gcc-4.1.2-20070503.tar.bz2
+gcc-4.1.2-20070615.tar.bz2
Index: gcc41.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gcc/devel/gcc41.spec,v
retrieving revision 1.160
retrieving revision 1.161
diff -u -r1.160 -r1.161
--- gcc41.spec 3 May 2007 21:56:10 -0000 1.160
+++ gcc41.spec 15 Jun 2007 17:42:21 -0000 1.161
@@ -1,6 +1,6 @@
-%define DATE 20070503
+%define DATE 20070615
%define gcc_version 4.1.2
-%define gcc_release 12
+%define gcc_release 13
%define _unpackaged_files_terminate_build 0
%define multilib_64_archs sparc64 ppc64 s390x x86_64
%define include_gappletviewer 1
@@ -137,14 +137,14 @@
Patch26: gcc41-java-bogus-debugline.patch
Patch27: gcc41-libjava-visibility.patch
Patch28: gcc41-pr31187.patch
-Patch29: gcc41-dtor-relro.patch
+Patch29: gcc41-pr31809.patch
Patch30: gcc41-rh234515.patch
-Patch31: gcc41-libgomp-ncpus.patch
+Patch31: gcc41-pr32139.patch
Patch32: gcc41-rh236895.patch
-Patch33: gcc41-pr28482.patch
+Patch33: gcc41-pr32285.patch
Patch34: gcc41-rh235008.patch
Patch35: gcc41-pr31748.patch
-Patch36: gcc41-tls-data-alignment.patch
+Patch36: gcc41-pr32353.patch
%define _gnu %{nil}
%ifarch sparc
@@ -452,14 +452,14 @@
%patch26 -p0 -b .java-bogus-debugline~
%patch27 -p0 -b .libjava-visibility~
%patch28 -p0 -b .pr31187~
-%patch29 -p0 -b .dtor-relro~
+%patch29 -p0 -b .pr31809~
%patch30 -p0 -b .rh234515~
-%patch31 -p0 -b .libgomp-ncpus~
+%patch31 -p0 -b .pr32139~
%patch32 -p0 -b .rh236895~
-%patch33 -p0 -b .pr28482~
+%patch33 -p0 -b .pr32285~
%patch34 -p0 -b .rh235008~
%patch35 -p0 -b .pr31748~
-%patch36 -p0 -b .tls-data-alignment~
+%patch36 -p0 -b .pr32353~
sed -i -e 's/4\.1\.3/4.1.2/' gcc/BASE-VER gcc/version.c
sed -i -e 's/" (Red Hat[^)]*)"/" (Red Hat %{version}-%{gcc_release})"/' gcc/version.c
@@ -1583,6 +1583,25 @@
%doc rpm.doc/changelogs/libmudflap/ChangeLog*
%changelog
+* Fri Jun 15 2007 Jakub Jelinek <jakub at redhat.com> 4.1.2-13
+- update from gcc-4_1-branch (-r124365:125727)
+ - PRs libfortran/31409, libfortran/31880, libfortran/31964,
+ rtl-optimization/31691, target/31022, target/31480, target/31701,
+ target/31876, target/32163, tree-optimization/26998
+- gomp updates from the trunk (-r125541:125542, -r125543:125544) and
+ from gcc-4_2-branch (-r125184:125185)
+ - PRs tree-optimization/31769, c++/32177
+- don't set TREE_READONLY on C++ objects that need runtime initialization
+ (PRs c++/31806, c++/31809)
+- fix computation of common pointer type (PR tree-optimization/32139)
+- precompute const and pure fn calls inside another fn call arguments
+ with accumulating outgoing args
+ (PRs middle-end/32285, tree-optimization/30493)
+- fix handling of RESULT_DECLs in points-to analysis
+ (#243438, PR tree-optimization/32353)
+- work around java.lang.reflect.Modifier.INTERPRETED clash with
+ java.lang.reflect.Modifier.SYNTHETIC (Andrew Haley, #240720)
+
* Thu May 3 2007 Jakub Jelinek <jakub at redhat.com> 4.1.2-12
- update from gcc-4_1-branch (-r124100:124365)
- PRs c++/30016, c++/30221, middle-end/30761, target/18989,
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/gcc/devel/sources,v
retrieving revision 1.208
retrieving revision 1.209
diff -u -r1.208 -r1.209
--- sources 3 May 2007 21:56:10 -0000 1.208
+++ sources 15 Jun 2007 17:42:21 -0000 1.209
@@ -1 +1 @@
-f592f2e4d5779b970a7050a864131e69 gcc-4.1.2-20070503.tar.bz2
+746cc04ccc1ff19913d6b81a072ea526 gcc-4.1.2-20070615.tar.bz2
--- gcc41-dtor-relro.patch DELETED ---
--- gcc41-libgomp-ncpus.patch DELETED ---
--- gcc41-pr28482.patch DELETED ---
--- gcc41-tls-data-alignment.patch DELETED ---
More information about the fedora-extras-commits
mailing list