4.1.2-13
This commit is contained in:
parent
a1271c1402
commit
1c109062ac
@ -1 +1 @@
|
||||
gcc-4.1.2-20070503.tar.bz2
|
||||
gcc-4.1.2-20070615.tar.bz2
|
||||
|
@ -1,89 +0,0 @@
|
||||
2007-05-03 Ulrich Drepper <drepper@redhat.com>
|
||||
Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* crtstuff.c (HIDDEN_DTOR_LIST_END): New macro.
|
||||
(__do_global_dtors_aux): Use more paranoid loop to run
|
||||
destructors if HIDDEN_DTOR_LIST_END.
|
||||
(__DTOR_END__): Export as a hidden symbol when HIDDEN_DTOR_LIST_END.
|
||||
|
||||
--- gcc/crtstuff.c.jj 2007-01-24 22:24:21.000000000 +0100
|
||||
+++ gcc/crtstuff.c 2007-05-03 10:40:29.000000000 +0200
|
||||
@@ -106,6 +107,11 @@ call_ ## FUNC (void) \
|
||||
# define EH_FRAME_SECTION_CONST
|
||||
#endif
|
||||
|
||||
+#if !defined(DTOR_LIST_END) && defined(OBJECT_FORMAT_ELF) \
|
||||
+ && defined(HAVE_GAS_HIDDEN) && !defined(FINI_ARRAY_SECTION_ASM_OP)
|
||||
+# define HIDDEN_DTOR_LIST_END
|
||||
+#endif
|
||||
+
|
||||
/* We do not want to add the weak attribute to the declarations of these
|
||||
routines in unwind-dw2-fde.h because that will cause the definition of
|
||||
these symbols to be weak as well.
|
||||
@@ -265,10 +271,6 @@ extern void __cxa_finalize (void *) TARG
|
||||
static void __attribute__((used))
|
||||
__do_global_dtors_aux (void)
|
||||
{
|
||||
-#ifndef FINI_ARRAY_SECTION_ASM_OP
|
||||
- static func_ptr *p = __DTOR_LIST__ + 1;
|
||||
- func_ptr f;
|
||||
-#endif /* !defined(FINI_ARRAY_SECTION_ASM_OP) */
|
||||
static _Bool completed;
|
||||
|
||||
if (__builtin_expect (completed, 0))
|
||||
@@ -282,12 +284,32 @@ __do_global_dtors_aux (void)
|
||||
#ifdef FINI_ARRAY_SECTION_ASM_OP
|
||||
/* If we are using .fini_array then destructors will be run via that
|
||||
mechanism. */
|
||||
+#elif defined(HIDDEN_DTOR_LIST_END)
|
||||
+ {
|
||||
+ /* Safer version that makes sure only .dtors function pointers are
|
||||
+ called even if the static variable is maliciously changed. */
|
||||
+ extern func_ptr __DTOR_END__[] __attribute__((visibility ("hidden")));
|
||||
+ static size_t dtor_idx;
|
||||
+ const size_t max_idx = __DTOR_END__ - __DTOR_LIST__ - 1;
|
||||
+ func_ptr f;
|
||||
+
|
||||
+ while (dtor_idx < max_idx)
|
||||
+ {
|
||||
+ f = __DTOR_LIST__[++dtor_idx];
|
||||
+ f ();
|
||||
+ }
|
||||
+ }
|
||||
#else /* !defined (FINI_ARRAY_SECTION_ASM_OP) */
|
||||
- while ((f = *p))
|
||||
- {
|
||||
- p++;
|
||||
- f ();
|
||||
- }
|
||||
+ {
|
||||
+ static func_ptr *p = __DTOR_LIST__ + 1;
|
||||
+ func_ptr f;
|
||||
+
|
||||
+ while ((f = *p))
|
||||
+ {
|
||||
+ p++;
|
||||
+ f ();
|
||||
+ }
|
||||
+ }
|
||||
#endif /* !defined(FINI_ARRAY_SECTION_ASM_OP) */
|
||||
|
||||
#ifdef USE_EH_FRAME_REGISTRY
|
||||
@@ -471,6 +493,17 @@ STATIC func_ptr __CTOR_END__[1]
|
||||
|
||||
#ifdef DTOR_LIST_END
|
||||
DTOR_LIST_END;
|
||||
+#elif defined(HIDDEN_DTOR_LIST_END)
|
||||
+#ifdef DTORS_SECTION_ASM_OP
|
||||
+asm (DTORS_SECTION_ASM_OP);
|
||||
+#endif
|
||||
+func_ptr __DTOR_END__[1]
|
||||
+ __attribute__ ((unused,
|
||||
+#ifndef DTORS_SECTION_ASM_OP
|
||||
+ section(".dtors"),
|
||||
+#endif
|
||||
+ aligned(sizeof(func_ptr)), visibility ("hidden")))
|
||||
+ = { (func_ptr) 0 };
|
||||
#elif defined(DTORS_SECTION_ASM_OP)
|
||||
asm (DTORS_SECTION_ASM_OP);
|
||||
STATIC func_ptr __DTOR_END__[1]
|
@ -1,186 +0,0 @@
|
||||
2007-05-02 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* config/linux/proc.c: New file.
|
||||
|
||||
--- libgomp/config/linux/proc.c.jj 2007-05-02 13:50:37.000000000 +0200
|
||||
+++ libgomp/config/linux/proc.c 2007-05-02 16:00:47.000000000 +0200
|
||||
@@ -0,0 +1,179 @@
|
||||
+/* Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
+ Contributed by Jakub Jelinek <jakub@redhat.com>.
|
||||
+
|
||||
+ This file is part of the GNU OpenMP Library (libgomp).
|
||||
+
|
||||
+ Libgomp is free software; you can redistribute it and/or modify it
|
||||
+ under the terms of the GNU Lesser General Public License as published by
|
||||
+ the Free Software Foundation; either version 2.1 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
+ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
|
||||
+ more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Lesser General Public License
|
||||
+ along with libgomp; see the file COPYING.LIB. If not, write to the
|
||||
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
+ MA 02110-1301, USA. */
|
||||
+
|
||||
+/* As a special exception, if you link this library with other files, some
|
||||
+ of which are compiled with GCC, to produce an executable, this library
|
||||
+ does not by itself cause the resulting executable to be covered by the
|
||||
+ GNU General Public License. This exception does not however invalidate
|
||||
+ any other reasons why the executable file might be covered by the GNU
|
||||
+ General Public License. */
|
||||
+
|
||||
+/* This file contains system specific routines related to counting
|
||||
+ online processors and dynamic load balancing. */
|
||||
+
|
||||
+#ifndef _GNU_SOURCE
|
||||
+#define _GNU_SOURCE 1
|
||||
+#endif
|
||||
+#include "libgomp.h"
|
||||
+#include <sched.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <unistd.h>
|
||||
+#ifdef HAVE_GETLOADAVG
|
||||
+# ifdef HAVE_SYS_LOADAVG_H
|
||||
+# include <sys/loadavg.h>
|
||||
+# endif
|
||||
+#endif
|
||||
+
|
||||
+#ifdef HAVE_PTHREAD_AFFINITY_NP
|
||||
+static unsigned long
|
||||
+cpuset_popcount (cpu_set_t *cpusetp)
|
||||
+{
|
||||
+#ifdef CPU_COUNT
|
||||
+ /* glibc 2.6 and above provide a macro for this. */
|
||||
+ return CPU_COUNT (cpusetp);
|
||||
+#else
|
||||
+ size_t i;
|
||||
+ unsigned long ret = 0;
|
||||
+ extern int check[sizeof (cpusetp->__bits[0]) == sizeof (unsigned long int)];
|
||||
+
|
||||
+ (void) check;
|
||||
+ for (i = 0; i < sizeof (*cpusetp) / sizeof (cpusetp->__bits[0]); i++)
|
||||
+ {
|
||||
+ unsigned long int mask = cpusetp->__bits[i];
|
||||
+ if (mask == 0)
|
||||
+ continue;
|
||||
+ ret += __builtin_popcountl (mask);
|
||||
+ }
|
||||
+ return ret;
|
||||
+#endif
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+/* At startup, determine the default number of threads. It would seem
|
||||
+ this should be related to the number of cpus online. */
|
||||
+
|
||||
+void
|
||||
+gomp_init_num_threads (void)
|
||||
+{
|
||||
+#ifdef HAVE_PTHREAD_AFFINITY_NP
|
||||
+ cpu_set_t cpuset;
|
||||
+
|
||||
+ if (pthread_getaffinity_np (pthread_self (), sizeof (cpuset), &cpuset) == 0)
|
||||
+ {
|
||||
+ /* Count only the CPUs this process can use. */
|
||||
+ gomp_nthreads_var = cpuset_popcount (&cpuset);
|
||||
+ if (gomp_nthreads_var == 0)
|
||||
+ gomp_nthreads_var = 1;
|
||||
+ return;
|
||||
+ }
|
||||
+#endif
|
||||
+#ifdef _SC_NPROCESSORS_ONLN
|
||||
+ gomp_nthreads_var = sysconf (_SC_NPROCESSORS_ONLN);
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+get_num_procs (void)
|
||||
+{
|
||||
+#ifdef HAVE_PTHREAD_AFFINITY_NP
|
||||
+ cpu_set_t cpuset;
|
||||
+
|
||||
+ if (gomp_cpu_affinity == NULL)
|
||||
+ {
|
||||
+ /* Count only the CPUs this process can use. */
|
||||
+ if (pthread_getaffinity_np (pthread_self (), sizeof (cpuset),
|
||||
+ &cpuset) == 0)
|
||||
+ {
|
||||
+ int ret = cpuset_popcount (&cpuset);
|
||||
+ return ret != 0 ? ret : 1;
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ size_t idx;
|
||||
+ static int affinity_cpus;
|
||||
+
|
||||
+ /* We can't use pthread_getaffinity_np in this case
|
||||
+ (we have changed it ourselves, it binds to just one CPU).
|
||||
+ Count instead the number of different CPUs we are
|
||||
+ using. */
|
||||
+ CPU_ZERO (&cpuset);
|
||||
+ if (affinity_cpus == 0)
|
||||
+ {
|
||||
+ int cpus = 0;
|
||||
+ for (idx = 0; idx < gomp_cpu_affinity_len; idx++)
|
||||
+ if (! CPU_ISSET (gomp_cpu_affinity[idx], &cpuset))
|
||||
+ {
|
||||
+ cpus++;
|
||||
+ CPU_SET (gomp_cpu_affinity[idx], &cpuset);
|
||||
+ }
|
||||
+ affinity_cpus = cpus;
|
||||
+ }
|
||||
+ return affinity_cpus;
|
||||
+ }
|
||||
+#endif
|
||||
+#ifdef _SC_NPROCESSORS_ONLN
|
||||
+ return sysconf (_SC_NPROCESSORS_ONLN);
|
||||
+#else
|
||||
+ return gomp_nthreads_var;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+/* When OMP_DYNAMIC is set, at thread launch determine the number of
|
||||
+ threads we should spawn for this team. */
|
||||
+/* ??? I have no idea what best practice for this is. Surely some
|
||||
+ function of the number of processors that are *still* online and
|
||||
+ the load average. Here I use the number of processors online
|
||||
+ minus the 15 minute load average. */
|
||||
+
|
||||
+unsigned
|
||||
+gomp_dynamic_max_threads (void)
|
||||
+{
|
||||
+ unsigned n_onln, loadavg;
|
||||
+
|
||||
+ n_onln = get_num_procs ();
|
||||
+ if (n_onln > gomp_nthreads_var)
|
||||
+ n_onln = gomp_nthreads_var;
|
||||
+
|
||||
+ loadavg = 0;
|
||||
+#ifdef HAVE_GETLOADAVG
|
||||
+ {
|
||||
+ double dloadavg[3];
|
||||
+ if (getloadavg (dloadavg, 3) == 3)
|
||||
+ {
|
||||
+ /* Add 0.1 to get a kind of biased rounding. */
|
||||
+ loadavg = dloadavg[2] + 0.1;
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
+ if (loadavg >= n_onln)
|
||||
+ return 1;
|
||||
+ else
|
||||
+ return n_onln - loadavg;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+omp_get_num_procs (void)
|
||||
+{
|
||||
+ return get_num_procs ();
|
||||
+}
|
||||
+
|
||||
+ialias (omp_get_num_procs)
|
@ -1,19 +0,0 @@
|
||||
2007-05-02 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR libgomp/28482
|
||||
* configure.tgt: Don't link with -Wl,-z,nodlopen even on Linux.
|
||||
|
||||
--- libgomp/configure.tgt.jj 2007-04-20 12:55:40.000000000 +0200
|
||||
+++ libgomp/configure.tgt 2007-05-02 17:32:15.000000000 +0200
|
||||
@@ -11,11 +11,8 @@
|
||||
# XLDFLAGS Add extra link flags to use.
|
||||
|
||||
# Optimize TLS usage by avoiding the overhead of dynamic allocation.
|
||||
-# This does require that the library be present during process
|
||||
-# startup, so mark the library as not to be dlopened.
|
||||
if test $have_tls = yes && test "$with_gnu_ld" = "yes"; then
|
||||
XCFLAGS="${XCFLAGS} -ftls-model=initial-exec"
|
||||
- XLDFLAGS="${XLDFLAGS} -Wl,-z,nodlopen"
|
||||
fi
|
||||
|
||||
# Since we require POSIX threads, assume a POSIX system by default.
|
68
gcc41-pr31809.patch
Normal file
68
gcc41-pr31809.patch
Normal file
@ -0,0 +1,68 @@
|
||||
2007-05-31 Jakub Jelinek <jakub@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@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;
|
||||
+}
|
58
gcc41-pr32139.patch
Normal file
58
gcc41-pr32139.patch
Normal file
@ -0,0 +1,58 @@
|
||||
2007-06-01 Jakub Jelinek <jakub@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;
|
||||
+}
|
73
gcc41-pr32285.patch
Normal file
73
gcc41-pr32285.patch
Normal file
@ -0,0 +1,73 @@
|
||||
2007-06-14 Jakub Jelinek <jakub@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;
|
||||
+}
|
64
gcc41-pr32353.patch
Normal file
64
gcc41-pr32353.patch
Normal file
@ -0,0 +1,64 @@
|
||||
2007-06-15 Jakub Jelinek <jakub@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 ();
|
||||
+}
|
@ -1,33 +0,0 @@
|
||||
2007-05-03 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* varasm.c (align_variable): Don't increase alignment for
|
||||
DECL_THREAD_LOCAL_P variables above BITS_PER_WORD through
|
||||
DATA_ALIGNMENT or CONSTANT_ALIGNMENT.
|
||||
|
||||
--- gcc/varasm.c.jj 2007-04-14 14:55:25.000000000 +0200
|
||||
+++ gcc/varasm.c 2007-05-03 11:23:56.000000000 +0200
|
||||
@@ -1097,11 +1097,22 @@ align_variable (tree decl, bool dont_out
|
||||
if (! DECL_USER_ALIGN (decl))
|
||||
{
|
||||
#ifdef DATA_ALIGNMENT
|
||||
- align = DATA_ALIGNMENT (TREE_TYPE (decl), align);
|
||||
+ unsigned int data_align = DATA_ALIGNMENT (TREE_TYPE (decl), align);
|
||||
+ /* Don't increase alignment too much for TLS variables - TLS space
|
||||
+ is too precious. */
|
||||
+ if (! DECL_THREAD_LOCAL_P (decl) || data_align <= BITS_PER_WORD)
|
||||
+ align = data_align;
|
||||
#endif
|
||||
#ifdef CONSTANT_ALIGNMENT
|
||||
if (DECL_INITIAL (decl) != 0 && DECL_INITIAL (decl) != error_mark_node)
|
||||
- align = CONSTANT_ALIGNMENT (DECL_INITIAL (decl), align);
|
||||
+ {
|
||||
+ unsigned int const_align = CONSTANT_ALIGNMENT (DECL_INITIAL (decl),
|
||||
+ align);
|
||||
+ /* Don't increase alignment too much for TLS variables - TLS space
|
||||
+ is too precious. */
|
||||
+ if (! DECL_THREAD_LOCAL_P (decl) || const_align <= BITS_PER_WORD)
|
||||
+ align = const_align;
|
||||
+ }
|
||||
#endif
|
||||
}
|
||||
|
39
gcc41.spec
39
gcc41.spec
@ -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 @@ Patch25: gcc41-pr29299.patch
|
||||
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 @@ which are required to run programs compiled with the GNAT.
|
||||
%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 @@ fi
|
||||
%doc rpm.doc/changelogs/libmudflap/ChangeLog*
|
||||
|
||||
%changelog
|
||||
* Fri Jun 15 2007 Jakub Jelinek <jakub@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@redhat.com> 4.1.2-12
|
||||
- update from gcc-4_1-branch (-r124100:124365)
|
||||
- PRs c++/30016, c++/30221, middle-end/30761, target/18989,
|
||||
|
Loading…
Reference in New Issue
Block a user