This commit is contained in:
Jakub Jelinek 2007-07-23 12:23:41 +00:00
parent 6ca4426344
commit 59ad88b1b6
7 changed files with 172 additions and 115 deletions

View File

@ -1 +1 @@
gcc-4.1.2-20070704.tar.bz2
gcc-4.1.2-20070723.tar.bz2

74
gcc41-build-id.patch Normal file
View File

@ -0,0 +1,74 @@
2007-07-22 Roland McGrath <roland@redhat.com>
* config/rs6000/sysv4.h (LINK_EH_SPEC): Add --build-id for
non-relocatable link.
* config/linux.h (LINK_EH_SPEC): Likewise.
* config/sparc/linux.h (LINK_EH_SPEC): Likewise.
* config/sparc/linux64.h (LINK_EH_SPEC): Likewise.
* config/alpha/elf.h (LINK_EH_SPEC): Likewise.
* config/ia64/linux.h (LINK_EH_SPEC): Likewise.
--- gcc/config/rs6000/sysv4.h.~1~
+++ gcc/config/rs6000/sysv4.h
@@ -1044,7 +1044,7 @@ extern int fixuplabelno;
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
#if defined(HAVE_LD_EH_FRAME_HDR)
-# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
+# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} "
#endif
#define CPP_OS_LINUX_SPEC "-D__unix__ -D__gnu_linux__ -D__linux__ \
--- gcc/config/linux.h.~1~
+++ gcc/config/linux.h
@@ -85,7 +85,7 @@ Boston, MA 02110-1301, USA. */
} while (0)
#if defined(HAVE_LD_EH_FRAME_HDR)
-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
+#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} "
#endif
/* Define this so we can compile MS code for use with WINE. */
--- gcc/config/sparc/linux64.h.~1~
+++ gcc/config/sparc/linux64.h
@@ -316,7 +316,7 @@ do { \
#define DITF_CONVERSION_LIBFUNCS 1
#if defined(HAVE_LD_EH_FRAME_HDR)
-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
+#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} "
#endif
#ifdef HAVE_AS_TLS
--- gcc/config/sparc/linux.h.~1~
+++ gcc/config/sparc/linux.h
@@ -188,7 +188,7 @@ do { \
#define DITF_CONVERSION_LIBFUNCS 1
#if defined(HAVE_LD_EH_FRAME_HDR)
-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
+#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} "
#endif
#ifdef HAVE_AS_TLS
--- gcc/config/alpha/elf.h.~1~
+++ gcc/config/alpha/elf.h
@@ -453,5 +453,5 @@ extern int alpha_this_gpdisp_sequence_nu
I imagine that other systems will catch up. In the meantime, it
doesn't harm to make sure that the data exists to be used later. */
#if defined(HAVE_LD_EH_FRAME_HDR)
-#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
+#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} %{!r:--build-id} "
#endif
--- gcc/config/ia64/linux.h.~1~
+++ gcc/config/ia64/linux.h
@@ -56,7 +56,7 @@ do { \
Signalize that because we have fde-glibc, we don't need all C shared libs
linked against -lgcc_s. */
#undef LINK_EH_SPEC
-#define LINK_EH_SPEC ""
+#define LINK_EH_SPEC "%{!r:--build-id}"
#define MD_UNWIND_SUPPORT "config/ia64/linux-unwind.h"

View File

@ -1,107 +0,0 @@
2007-07-02 Jakub Jelinek <jakub@redhat.com>
PR fortran/32550
* trans.h (GFC_POINTER_TYPE_P): Define.
* trans-types.c (gfc_sym_type): Set it for types on attr->sym.pointer.
* trans-openmp.c (gfc_omp_privatize_by_reference): Return false
if GFC_POINTER_TYPE_P is set on the type.
* testsuite/libgomp.fortran/pr32550.f90: New test.
* testsuite/libgomp.fortran/crayptr2.f90: New test.
--- gcc/fortran/trans.h.jj 2007-05-30 14:54:52.000000000 +0200
+++ gcc/fortran/trans.h 2007-07-02 13:02:08.000000000 +0200
@@ -603,6 +603,8 @@ struct lang_decl GTY(())
#define GFC_DESCRIPTOR_TYPE_P(node) TYPE_LANG_FLAG_1(node)
/* An array without a descriptor. */
#define GFC_ARRAY_TYPE_P(node) TYPE_LANG_FLAG_2(node)
+/* Fortran POINTER type. */
+#define GFC_POINTER_TYPE_P(node) TYPE_LANG_FLAG_3(node)
/* The GFC_TYPE_ARRAY_* members are present in both descriptor and
descriptorless array types. */
#define GFC_TYPE_ARRAY_LBOUND(node, dim) \
--- gcc/fortran/trans-openmp.c.jj 2007-05-30 14:54:52.000000000 +0200
+++ gcc/fortran/trans-openmp.c 2007-07-02 13:10:19.000000000 +0200
@@ -50,9 +50,12 @@ gfc_omp_privatize_by_reference (tree dec
if (TREE_CODE (type) == POINTER_TYPE)
{
- /* POINTER/ALLOCATABLE have aggregate types, all user variables
- that have POINTER_TYPE type are supposed to be privatized
- by reference. */
+ /* Array POINTER/ALLOCATABLE have aggregate types, all user variables
+ that have POINTER_TYPE type and don't have GFC_POINTER_TYPE_P
+ set are supposed to be privatized by reference. */
+ if (GFC_POINTER_TYPE_P (type))
+ return false;
+
if (!DECL_ARTIFICIAL (decl))
return true;
--- gcc/fortran/trans-types.c.jj 2007-06-13 17:38:49.000000000 +0200
+++ gcc/fortran/trans-types.c 2007-07-02 13:03:22.000000000 +0200
@@ -1364,6 +1364,8 @@ gfc_sym_type (gfc_symbol * sym)
{
if (sym->attr.allocatable || sym->attr.pointer)
type = gfc_build_pointer_type (sym, type);
+ if (sym->attr.pointer)
+ GFC_POINTER_TYPE_P (type) = 1;
}
/* We currently pass all parameters by reference.
--- libgomp/testsuite/libgomp.fortran/crayptr2.f90.jj 2007-07-02 13:23:11.000000000 +0200
+++ libgomp/testsuite/libgomp.fortran/crayptr2.f90 2007-07-02 13:38:34.000000000 +0200
@@ -0,0 +1,30 @@
+! { dg-do run }
+! { dg-options "-fopenmp -fcray-pointer" }
+
+ use omp_lib
+ integer :: a, b, c, d, p
+ logical :: l
+ pointer (ip, p)
+ save ip
+!$omp threadprivate (ip)
+ a = 1
+ b = 2
+ c = 3
+ l = .false.
+!$omp parallel num_threads (3) reduction (.or.:l)
+ if (omp_get_thread_num () .eq. 0) then
+ ip = loc (a)
+ elseif (omp_get_thread_num () .eq. 1) then
+ ip = loc (b)
+ else
+ ip = loc (c)
+ end if
+ l = p .ne. omp_get_thread_num () + 1
+!$omp single
+ d = omp_get_thread_num ()
+!$omp end single copyprivate (d, ip)
+ l = l .or. (p .ne. d + 1)
+!$omp end parallel
+
+ if (l) call abort
+end
--- libgomp/testsuite/libgomp.fortran/pr32550.f90.jj 2007-07-02 13:17:59.000000000 +0200
+++ libgomp/testsuite/libgomp.fortran/pr32550.f90 2007-07-02 13:18:10.000000000 +0200
@@ -0,0 +1,20 @@
+! PR fortran/32550
+! { dg-do run }
+
+ integer, pointer, save :: ptr
+ integer, target :: targ
+ integer :: e
+!$omp threadprivate(ptr)
+ e = 0
+ targ = 42
+!$omp parallel shared(targ)
+!$omp single
+ ptr => targ
+!$omp end single copyprivate(ptr)
+ if (ptr.ne.42) then
+!$omp atomic
+ e = e + 1
+ end if
+!$omp end parallel
+ if (e.ne.0) call abort
+ end

42
gcc41-rh247256.patch Normal file
View File

@ -0,0 +1,42 @@
2007-07-10 Jakub Jelinek <jakub@redhat.com>
* simplify-rtx.c (simplify_plus_minus_op_data_cmp): If both operands
are REGs and TARGET_INDEX_OPERAND_FIRST, sort lower REGNOs first.
* gcc.dg/20070710-1.c: New test.
--- gcc/simplify-rtx.c.jj 2006-08-11 17:32:05.000000000 +0200
+++ gcc/simplify-rtx.c 2007-07-09 22:53:26.000000000 +0200
@@ -2608,6 +2608,12 @@ simplify_plus_minus_op_data_cmp (const v
- commutative_operand_precedence (d1->op));
if (result)
return result;
+
+ /* Group together equal REGs to do more simplification. */
+ if (TARGET_INDEX_OPERAND_FIRST && REG_P (d1->op) && REG_P (d2->op)
+ && REGNO (d1->op) != REGNO (d2->op))
+ return REGNO (d1->op) - REGNO (d2->op);
+
return d1->ix - d2->ix;
}
--- gcc/testsuite/gcc.dg/20070710-1.c.jj 2007-07-10 09:32:43.000000000 +0200
+++ gcc/testsuite/gcc.dg/20070710-1.c 2007-07-10 09:31:39.000000000 +0200
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ffast-math" } */
+
+extern float sqrtf (float);
+
+float
+foo (const float *m)
+{
+ float x = m[0] + m[1] + m[2] + 1.0f;
+ float s;
+
+ if (x > 0.001)
+ s = 0.5f / sqrtf (x);
+ else
+ s = 2.0f * sqrtf (1.0f + m[0] - m[1] - m[2]);
+ return s;
+}

View File

@ -1,6 +1,6 @@
%define DATE 20070704
%define DATE 20070723
%define gcc_version 4.1.2
%define gcc_release 15
%define gcc_release 16
%define _unpackaged_files_terminate_build 0
%define multilib_64_archs sparc64 ppc64 s390x x86_64
%define include_gappletviewer 1
@ -40,7 +40,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
# Need binutils which support .weakref >= 2.16.91.0.3-1
# Need binutils which support --hash-style=gnu >= 2.17.50.0.2-7
# Need binutils which support mffgpr and mftgpr >= 2.17.50.0.2-8
BuildRequires: binutils >= 2.17.50.0.2-8
# Need binutils which support --build-id >= 2.17.50.0.17-3
BuildRequires: binutils >= binutils-2.17.50.0.17-3
BuildRequires: zlib-devel, gettext, dejagnu, bison, flex, texinfo, sharutils
%if %{build_java}
BuildRequires: gcc-java, libgcj, /usr/share/java/eclipse-ecj.jar, zip, unzip
@ -75,7 +76,8 @@ Requires: cpp = %{version}-%{release}
# Need binutils that support .weakref
# Need binutils that supports --hash-style=gnu
# Need binutils that support mffgpr/mftgpr
Requires: binutils >= 2.17.50.0.2-8
# Need binutils that support --build-id
Requires: binutils >= binutils-2.17.50.0.17-3
# Make sure gdb will understand DW_FORM_strp
Conflicts: gdb < 5.1-2
Requires: glibc-devel >= 2.2.90-12
@ -130,10 +132,15 @@ Patch18: gcc41-libjava-visibility.patch
Patch19: gcc41-pr32139.patch
Patch20: gcc41-rh236895.patch
Patch21: gcc41-rh235008.patch
Patch22: gcc41-pr32550.patch
Patch22: gcc41-build-id.patch
Patch23: gcc41-pr28690.patch
Patch24: gcc41-rh247256.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
%ifnarch %{arm}
%define _gnu %{nil}
%endif
%ifarch sparc
%define gcc_target_platform sparc64-%{_vendor}-%{_target_os}
%endif
@ -432,8 +439,9 @@ which are required to run programs compiled with the GNAT.
%patch19 -p0 -b .pr32139~
%patch20 -p0 -b .rh236895~
%patch21 -p0 -b .rh235008~
%patch22 -p0 -b .pr32550~
%patch22 -p0 -b .build-id~
%patch23 -p0 -b .pr28690~
%patch24 -p0 -b .rh247256~
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
@ -1557,6 +1565,17 @@ fi
%doc rpm.doc/changelogs/libmudflap/ChangeLog*
%changelog
* Mon Jul 23 2007 Jakub Jelinek <jakub@redhat.com> 4.1.2-16
- update from gcc-4_1-branch (-r126302:126830)
- PRs rtl-optimization/32450, target/31331, target/32641, target/32660,
tree-optimization/32681
- pass --build-id to ld for all linking but ld -r, update {,Build}Requires
to binutils that support it (Roland McGrath)
- backport ARM fixes from trunk (#246800)
- PRs middle-end/24998, target/28516, target/30486
- fix simplify_plus_minus with ppc{,64} power6 tuning (regression from
4.1.1-52.el5.2, #247256)
* Wed Jul 4 2007 Jakub Jelinek <jakub@redhat.com> 4.1.2-15
- update from gcc-4_1-branch (-r126008:126302)
- PRs boehm-gc/21940, boehm-gc/21942, target/28307, target/32506,

View File

@ -387,6 +387,35 @@ register void *__thread_self __asm ("g7");
: inline_syscall_clobbers, "$20", "$21"); \
_sc_ret = _sc_0, _sc_err = _sc_19; \
}
#elif defined __arm__ && defined __ARM_EABI__
# define INTERNAL_SYSCALL_DECL(err) do { } while (0)
# define INTERNAL_SYSCALL(name, err, nr, args...) \
({ \
register int _r0 __asm__("r0"); \
register int _nr __asm__("r7"); \
LOAD_ARGS_##nr(args) \
_nr = __NR_##name; \
asm volatile ("swi\t0\t@ syscall " #name "\n\t" \
: "=r" (_r0) \
: "r" (_nr) ASM_ARGS_##nr \
: "memory"); \
_r0; })
# define INTERNAL_SYSCALL_ERROR_P(val, err) \
((unsigned int) (val) >= 0xfffff001u)
# define ASM_ARGS_0
# define ASM_ARGS_1 , "r" (_r0)
# define ASM_ARGS_2 , "r" (_r0), "r" (_r1)
# define ASM_ARGS_3 , "r" (_r0), "r" (_r1), "r" (_r2)
# define LOAD_ARGS_0()
# define LOAD_ARGS_1(r0) \
_r0 = (int)r0;
# define LOAD_ARGS_2(r0, r1) \
_r0 = (int)r0; \
register int _r1 __asm__("r1") = (int)r1;
# define LOAD_ARGS_3(r0, r1, r2) \
_r0 = (int)r0; \
register int _r1 __asm__("r1") = (int)r1; \
register int _r2 __asm__("r2") = (int)r2;
#endif
int main (int argc, char **argv)

View File

@ -1 +1 @@
96b1b8c5dc4f0b9c354586a58d4e43e2 gcc-4.1.2-20070704.tar.bz2
1fbcf4ea119fcc5c93a5229b20af30fc gcc-4.1.2-20070723.tar.bz2