This commit is contained in:
Jakub Jelinek 2011-09-08 09:24:03 +02:00
parent 6a7b527727
commit 56208957a2
6 changed files with 192 additions and 120 deletions

1
.gitignore vendored
View File

@ -12,3 +12,4 @@
/gcc-4.6.1-20110802.tar.bz2
/gcc-4.6.1-20110804.tar.bz2
/gcc-4.6.1-20110824.tar.bz2
/gcc-4.6.1-20110908.tar.bz2

View File

@ -1,9 +1,9 @@
%global DATE 20110824
%global SVNREV 178027
%global DATE 20110908
%global SVNREV 178678
%global gcc_version 4.6.1
# Note, gcc_release must be integer, if you want to add suffixes to
# %{release}, append them after %{gcc_release} on Release: line.
%global gcc_release 8
%global gcc_release 9
%global _unpackaged_files_terminate_build 0
%global multilib_64_archs sparc64 ppc64 s390x x86_64
%ifarch %{ix86} x86_64 ia64 ppc ppc64 alpha
@ -107,7 +107,7 @@ BuildRequires: gcc-gnat >= 3.1, libgnat >= 3.1
BuildRequires: libunwind >= 0.98
%endif
%if %{build_cloog}
%if 0%{?fedora} >= 15
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
BuildRequires: ppl >= 0.11.2, ppl-devel >= 0.11.2
%else
BuildRequires: ppl >= 0.10, ppl-devel >= 0.10
@ -169,8 +169,7 @@ Patch15: gcc46-libstdc++-docs.patch
Patch17: gcc46-no-add-needed.patch
Patch18: gcc46-ppl-0.10.patch
Patch19: gcc46-pr47858.patch
Patch20: gcc46-pr48722.patch
Patch21: gcc46-rh713800.patch
Patch20: gcc46-pr50299.patch
Patch1000: fastjar-0.97-segfault.patch
Patch1001: fastjar-0.97-len1.patch
@ -638,12 +637,11 @@ package or when debugging this package.
%patch15 -p0 -b .libstdc++-docs~
%endif
%patch17 -p0 -b .no-add-needed~
%if 0%{?fedora} < 15
%if 0%{?fedora} < 15 || 0%{?rhel} < 7
%patch18 -p0 -b .ppl-0.10~
%endif
%patch19 -p0 -b .pr47858~
%patch20 -p0 -b .pr48722~
%patch21 -p0 -b .rh713800~
%patch20 -p0 -b .pr50299~
%if 0%{?_enable_debug_packages}
cat > split-debuginfo.sh <<\EOF
@ -710,7 +708,7 @@ tar xjf %{SOURCE10}
sed -i -e 's/4\.6\.2/4.6.1/' gcc/BASE-VER
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
%if 0%{fedora} >= 16
%if 0%{?fedora} >= 16 || 0%{?rhel} >= 7
# Default to -gdwarf-4 -fno-debug-types-section rather than -gdwarf-2
sed -i '/UInteger Var(dwarf_version)/s/Init(2)/Init(4)/' gcc/common.opt
sed -i '/flag_debug_types_section/s/Init(1)/Init(0)/' gcc/common.opt
@ -1149,6 +1147,14 @@ echo '/* GNU ld script
OUTPUT_FORMAT(elf32-powerpc)
GROUP ( /lib/libgcc_s.so.1 libgcc.a )' > $FULLPATH/32/libgcc_s.so
%endif
%ifarch %{arm}
rm -f $FULLPATH/libgcc_s.so
echo '/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
OUTPUT_FORMAT(elf32-littlearm)
GROUP ( /lib/libgcc_s.so.1 libgcc.a )' > $FULLPATH/libgcc_s.so
%endif
mv -f %{buildroot}%{_prefix}/%{_lib}/libgomp.spec $FULLPATH/
@ -2454,6 +2460,20 @@ fi
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin
%changelog
* Thu Sep 8 2011 Jakub Jelinek <jakub@redhat.com> 4.6.1-9
- update from the 4.6 branch
- PRs c++/49267, c++/50089, c++/50157, c++/50207, c++/50220, c++/50224,
c++/50234, c++/50255, c++/50309, c/50179, fortran/50163,
libffi/49594, libfortran/50192, libstdc++/50268, middle-end/50116,
middle-end/50266, target/50090, target/50202, target/50289,
target/50310, tree-optimization/50178
- debug info related backports from the trunk
- PRs debug/50191, debug/50215
- fix call site debug info on big endian targets (PR debug/50299)
- put libgcc.a into libgcc_s.so linker script also on arm (#733549)
- use %%{?fedora} instead of %%{fedora}, handle 0%%{?rhel} >= 7 like
0%%{?fedora} >= 16
* Wed Aug 24 2011 Jakub Jelinek <jakub@redhat.com> 4.6.1-8
- update from the 4.6 branch
- PRs c++/46862, c++/48993, c++/49669, c++/49921, c++/49988, c++/50024,
@ -2483,7 +2503,7 @@ fi
- PRs c++/49260, c++/49924, libstdc++/49925, target/47908, target/49920
- fix libquadmath on i686 (#726909)
- OpenMP 3.1 support (PR fortran/42041, PR fortran/46752)
%if 0%{fedora} >= 16
%if 0%{?fedora} >= 16 || 0%{?rhel} >= 7
- make -grecord-gcc-switches the default
%endif
@ -2504,7 +2524,7 @@ fi
- require gmp-devel, mpfr-devel and libmpc-devel in gcc-plugin-devel
(#725569)
- backport -grecord-gcc-switches (#507759, PR other/32998)
%if 0%{fedora} >= 16
%if 0%{?fedora} >= 16 || 0%{?rhel} >= 7
- more compact debug macro info for -g3 - .debug_macro section
- improve call site debug info for some floating point parameters
passed on the stack (PR debug/49846)
@ -2518,7 +2538,7 @@ fi
target/49487, target/49541, target/49621, tree-opt/49309,
tree-optimization/49094, tree-optimization/49651
- backport -march=bdver2 and -mtune=bdver2 support
%if 0%{fedora} < 16
%if 0%{?fedora} < 16 || 0%{?rhel} >= 7
- use ENTRY_VALUE RTLs internally to improve generated debug info,
just make sure to remove it from possible options before emitting
var-tracking notes
@ -2562,7 +2582,7 @@ fi
- fix GCSE (#712480, PR rtl-optimization/49390)
- use rm -f and mv -f in split-debuginfo.sh (#716664)
- backport some debuginfo improvements and bugfixes
%if 0%{fedora} >= 16
%if 0%{?fedora} >= 16 || 0%{?rhel} >= 7
- improve debug info for IPA-SRA through DW_OP_GNU_parameter_ref
(PR debug/47858)
- emit DW_OP_GNU_convert <0> as convert to untyped
@ -2591,7 +2611,7 @@ fi
target/43700, target/43995, target/44643, target/45263,
tree-optimization/44897, tree-optimization/49161,
tree-optimization/49217, tree-optimization/49218
%if 0%{fedora} >= 16
%if 0%{?fedora} >= 16 || 0%{?rhel} >= 7
- default to -gdwarf-4 -fno-debug-types-section instead of -gdwarf-3
- backport DW_OP_GNU_entry_value support
(PRs rtl-optimization/48826, debug/48902, bootstrap/48148,

View File

@ -1,76 +0,0 @@
2011-08-22 Jakub Jelinek <jakub@redhat.com>
PR middle-end/48722
* emit-rtl.c (unshare_all_rtl_again): For CALL_INSNs,
reset_used_flags also in CALL_INSN_FUNCTION_USAGE.
(verify_rtl_sharing): Likewise and verify_rtx_sharing
in there too.
(unshare_all_rtl_in_chain): For CALL_INSNs
copy_rtx_if_shared also CALL_INSN_FUNCTION_USAGE.
* gcc.target/i386/pr48722.c: New test.
--- gcc/emit-rtl.c.jj 2011-08-18 08:36:00.000000000 +0200
+++ gcc/emit-rtl.c 2011-08-22 08:48:27.000000000 +0200
@@ -2444,6 +2444,8 @@ unshare_all_rtl_again (rtx insn)
{
reset_used_flags (PATTERN (p));
reset_used_flags (REG_NOTES (p));
+ if (CALL_P (p))
+ reset_used_flags (CALL_INSN_FUNCTION_USAGE (p));
}
/* Make sure that virtual stack slots are not shared. */
@@ -2610,6 +2612,8 @@ verify_rtl_sharing (void)
{
reset_used_flags (PATTERN (p));
reset_used_flags (REG_NOTES (p));
+ if (CALL_P (p))
+ reset_used_flags (CALL_INSN_FUNCTION_USAGE (p));
if (GET_CODE (PATTERN (p)) == SEQUENCE)
{
int i;
@@ -2621,6 +2625,8 @@ verify_rtl_sharing (void)
gcc_assert (INSN_P (q));
reset_used_flags (PATTERN (q));
reset_used_flags (REG_NOTES (q));
+ if (CALL_P (q))
+ reset_used_flags (CALL_INSN_FUNCTION_USAGE (q));
}
}
}
@@ -2630,6 +2636,8 @@ verify_rtl_sharing (void)
{
verify_rtx_sharing (PATTERN (p), p);
verify_rtx_sharing (REG_NOTES (p), p);
+ if (CALL_P (p))
+ verify_rtx_sharing (CALL_INSN_FUNCTION_USAGE (p), p);
}
timevar_pop (TV_VERIFY_RTL_SHARING);
@@ -2646,6 +2654,9 @@ unshare_all_rtl_in_chain (rtx insn)
{
PATTERN (insn) = copy_rtx_if_shared (PATTERN (insn));
REG_NOTES (insn) = copy_rtx_if_shared (REG_NOTES (insn));
+ if (CALL_P (insn))
+ CALL_INSN_FUNCTION_USAGE (insn)
+ = copy_rtx_if_shared (CALL_INSN_FUNCTION_USAGE (insn));
}
}
--- gcc/testsuite/gcc.target/i386/pr48722.c.jj 2011-08-22 08:53:10.000000000 +0200
+++ gcc/testsuite/gcc.target/i386/pr48722.c 2011-08-22 08:52:37.000000000 +0200
@@ -0,0 +1,13 @@
+/* PR middle-end/48722 */
+/* { dg-do compile } */
+/* { dg-options "-Os -mno-push-args" } */
+
+extern long long a;
+extern int b;
+void bar (int, long long);
+
+void
+foo (void)
+{
+ bar (a > 0x85, b);
+}

155
gcc46-pr50299.patch Normal file
View File

@ -0,0 +1,155 @@
2011-09-06 Jakub Jelinek <jakub@redhat.com>
PR debug/50299
* calls.c (load_register_parameters): Use use_reg_mode instead
of use_reg when adding a single register CALL_INSN_FUNCTION_USAGE
entry.
(expand_call): Set EXPR_LIST mode to TYPE_MODE of the argument
for stack CALL_INSN_FUNCTION_USAGE uses.
* expr.h (use_reg_mode): New prototype.
(use_reg): Changed into inline around use_reg_mode.
* expr.c (use_reg): Renamed to...
(use_reg_mode): ... this. Added MODE argument, set EXPR_LIST
mode to that mode instead of VOIDmode.
* var-tracking.c (prepare_call_arguments): Don't track parameters
whose EXPR_LIST mode is VOIDmode, BLKmode or X mode isn't convertible
to it using lowpart_subreg. Convert VALUE and REG/MEM to the
EXPR_LIST mode.
--- gcc/calls.c.jj 2011-08-22 08:17:07.000000000 +0200
+++ gcc/calls.c 2011-09-05 19:47:47.000000000 +0200
@@ -1756,7 +1756,8 @@ load_register_parameters (struct arg_dat
if (GET_CODE (reg) == PARALLEL)
use_group_regs (call_fusage, reg);
else if (nregs == -1)
- use_reg (call_fusage, reg);
+ use_reg_mode (call_fusage, reg,
+ TYPE_MODE (TREE_TYPE (args[i].tree_value)));
else if (nregs > 0)
use_regs (call_fusage, REGNO (reg), nregs);
}
@@ -2815,10 +2816,10 @@ expand_call (tree exp, rtx target, int i
}
if (args[i].stack)
- call_fusage = gen_rtx_EXPR_LIST (VOIDmode,
- gen_rtx_USE (VOIDmode,
- args[i].stack),
- call_fusage);
+ call_fusage
+ = gen_rtx_EXPR_LIST (TYPE_MODE (TREE_TYPE (args[i].tree_value)),
+ gen_rtx_USE (VOIDmode, args[i].stack),
+ call_fusage);
}
/* If we have a parm that is passed in registers but not in memory
--- gcc/expr.h.jj 2011-07-27 23:25:36.000000000 +0200
+++ gcc/expr.h 2011-09-05 18:05:31.000000000 +0200
@@ -321,8 +321,16 @@ extern void emit_group_store (rtx, rtx,
/* Copy BLKmode object from a set of registers. */
extern rtx copy_blkmode_from_reg (rtx, rtx, tree);
+/* Mark REG as holding a parameter for the next CALL_INSN.
+ Mode is TYPE_MODE of the non-promoted parameter, or VOIDmode. */
+extern void use_reg_mode (rtx *, rtx, enum machine_mode);
+
/* Mark REG as holding a parameter for the next CALL_INSN. */
-extern void use_reg (rtx *, rtx);
+static inline void
+use_reg (rtx *fusage, rtx reg)
+{
+ use_reg_mode (fusage, reg, VOIDmode);
+}
/* Mark NREGS consecutive regs, starting at REGNO, as holding parameters
for the next CALL_INSN. */
--- gcc/expr.c.jj 2011-09-02 16:29:39.000000000 +0200
+++ gcc/expr.c 2011-09-05 19:47:32.000000000 +0200
@@ -2184,13 +2184,12 @@ copy_blkmode_from_reg (rtx tgtblk, rtx s
to by CALL_FUSAGE. REG must denote a hard register. */
void
-use_reg (rtx *call_fusage, rtx reg)
+use_reg_mode (rtx *call_fusage, rtx reg, enum machine_mode mode)
{
gcc_assert (REG_P (reg) && REGNO (reg) < FIRST_PSEUDO_REGISTER);
*call_fusage
- = gen_rtx_EXPR_LIST (VOIDmode,
- gen_rtx_USE (VOIDmode, reg), *call_fusage);
+ = gen_rtx_EXPR_LIST (mode, gen_rtx_USE (VOIDmode, reg), *call_fusage);
}
/* Add USE expressions to *CALL_FUSAGE for each of NREGS consecutive regs,
--- gcc/var-tracking.c.jj 2011-08-30 10:52:41.000000000 +0200
+++ gcc/var-tracking.c 2011-09-05 19:48:10.000000000 +0200
@@ -5730,11 +5730,18 @@ prepare_call_arguments (basic_block bb,
{
rtx item = NULL_RTX;
x = XEXP (XEXP (link, 0), 0);
- if (REG_P (x))
+ if (GET_MODE (link) == VOIDmode
+ || GET_MODE (link) == BLKmode
+ || (GET_MODE (link) != GET_MODE (x)
+ && (GET_MODE_CLASS (GET_MODE (link)) != MODE_INT
+ || GET_MODE_CLASS (GET_MODE (x)) != MODE_INT)))
+ /* Can't do anything for these, if the original type mode
+ isn't known or can't be converted. */;
+ else if (REG_P (x))
{
cselib_val *val = cselib_lookup (x, GET_MODE (x), 0, VOIDmode);
if (val && cselib_preserved_value_p (val))
- item = gen_rtx_CONCAT (GET_MODE (x), x, val->val_rtx);
+ item = val->val_rtx;
else if (GET_MODE_CLASS (GET_MODE (x)) == MODE_INT)
{
enum machine_mode mode = GET_MODE (x);
@@ -5749,10 +5756,7 @@ prepare_call_arguments (basic_block bb,
val = cselib_lookup (reg, mode, 0, VOIDmode);
if (val && cselib_preserved_value_p (val))
{
- item = gen_rtx_CONCAT (GET_MODE (x), x,
- lowpart_subreg (GET_MODE (x),
- val->val_rtx,
- mode));
+ item = val->val_rtx;
break;
}
}
@@ -5776,7 +5780,7 @@ prepare_call_arguments (basic_block bb,
}
val = cselib_lookup (mem, GET_MODE (mem), 0, VOIDmode);
if (val && cselib_preserved_value_p (val))
- item = gen_rtx_CONCAT (GET_MODE (x), copy_rtx (x), val->val_rtx);
+ item = val->val_rtx;
else if (GET_MODE_CLASS (GET_MODE (mem)) != MODE_INT)
{
/* For non-integer stack argument see also if they weren't
@@ -5787,15 +5791,22 @@ prepare_call_arguments (basic_block bb,
val = cselib_lookup (adjust_address_nv (mem, imode, 0),
imode, 0, VOIDmode);
if (val && cselib_preserved_value_p (val))
- item = gen_rtx_CONCAT (GET_MODE (x), copy_rtx (x),
- lowpart_subreg (GET_MODE (x),
- val->val_rtx,
- imode));
+ item = lowpart_subreg (GET_MODE (x), val->val_rtx,
+ imode);
}
}
}
if (item)
- call_arguments = gen_rtx_EXPR_LIST (VOIDmode, item, call_arguments);
+ {
+ rtx x2 = x;
+ if (GET_MODE (item) != GET_MODE (link))
+ item = lowpart_subreg (GET_MODE (link), item, GET_MODE (item));
+ if (GET_MODE (x2) != GET_MODE (link))
+ x2 = lowpart_subreg (GET_MODE (link), x2, GET_MODE (x2));
+ item = gen_rtx_CONCAT (GET_MODE (link), x2, item);
+ call_arguments
+ = gen_rtx_EXPR_LIST (VOIDmode, item, call_arguments);
+ }
if (t && t != void_list_node)
{
tree argtype = TREE_VALUE (t);

View File

@ -1,28 +0,0 @@
2011-08-04 Jakub Jelinek <jakub@redhat.com>
* gthr-posix.h (__gthread_active_p): Do not use preprocessor
conditionals and comments inside macro arguments.
--- gcc/gthr-posix.h.jj 2011-07-18 13:17:56.000000000 +0200
+++ gcc/gthr-posix.h 2011-08-04 11:22:40.000000000 +0200
@@ -244,16 +244,15 @@ __gthread_active_p (void)
static inline int
__gthread_active_p (void)
{
- static void *const __gthread_active_ptr
- = __extension__ (void *) &__gthrw_(
/* Android's C library does not provide pthread_cancel, check for
`pthread_create' instead. */
#ifndef __BIONIC__
- pthread_cancel
+ static void *const __gthread_active_ptr
+ = __extension__ (void *) &__gthrw_(pthread_cancel);
#else
- pthread_create
+ static void *const __gthread_active_ptr
+ = __extension__ (void *) &__gthrw_(pthread_create);
#endif
- );
return __gthread_active_ptr != 0;
}

View File

@ -1,2 +1,2 @@
2659f09c2e43ef8b7d4406321753f1b2 fastjar-0.97.tar.gz
bb9c5e409658f09ff4cd6679c637bb08 gcc-4.6.1-20110824.tar.bz2
5bb1baf5cbb43be9d7c952a00c2c750f gcc-4.6.1-20110908.tar.bz2