From: Marcin Krol Date: Tue, 29 Jul 2014 20:37:08 +0000 (+0000) Subject: - merged and tldized 4.8.3 from PLD X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=8ce225594fd3019d12802a02a959ac4de4f502b1;p=packages%2Fgcc.git - merged and tldized 4.8.3 from PLD --- diff --git a/gcc-ada-link.patch b/gcc-ada-link.patch index 82cf03f..7583d8c 100644 --- a/gcc-ada-link.patch +++ b/gcc-ada-link.patch @@ -16,15 +16,15 @@ unsigned char __gnat_separate_run_path_options = 0; --- a/gcc/ada/gcc-interface/Make-lang.in 2004-09-01 12:46:47.000000000 +0200 +++ b/gcc/ada/gcc-interface/Make-lang.in 2004-09-26 12:21:15.135188144 +0200 -@@ -378,7 +378,7 @@ +@@ -625,7 +625,7 @@ ada.tags: force ada/doctools/xgnatugn$(build_exeext): ada/xgnatugn.adb -$(MKDIR) ada/doctools $(CP) $^ ada/doctools -- cd ada/doctools && $(GNATMAKE) -q xgnatugn -+ cd ada/doctools && $(GNATMAKE) -q xgnatugn -aO../rts +- cd ada/doctools && gnatmake -q xgnatugn ++ cd ada/doctools && gnatmake -q xgnatugn -aO../rts - # Note that gnat_ugn_unw.texi does not depend on xgnatugn - # being built so we can distribute a pregenerated gnat_ugn_unw.info + # Note that doc/gnat_ugn.texi and doc/projects.texi do not depend on + # xgnatugn being built so we can distribute a pregenerated doc/gnat_ugn.info --- a/gcc/ada/gcc-interface/Makefile.in 2005-05-26 10:48:40.000000000 +0000 +++ b/gcc/ada/gcc-interface/Makefile.in 2005-05-26 10:59:25.000000000 +0000 @@ -126,7 +126,7 @@ diff --git a/gcc-branch.diff b/gcc-branch.diff deleted file mode 100644 index 6dc898c..0000000 --- a/gcc-branch.diff +++ /dev/null @@ -1,2149 +0,0 @@ -Index: libstdc++-v3/ChangeLog -=================================================================== ---- libstdc++-v3/ChangeLog (.../tags/gcc_4_7_3_release) (revision 198690) -+++ libstdc++-v3/ChangeLog (.../branches/gcc-4_7-branch) (revision 198690) -@@ -1,3 +1,20 @@ -+2013-04-15 Jack Howarth -+ -+ Backport from mainline -+ -+ 2012-10-10 Jack Howarth -+ Jonathan Wakely -+ -+ PR libstdc++/54847 -+ * config/os/bsd/darwin/os_defines.h: Define _GLIBCXX_USE_NANOSLEEP -+ and _GLIBCXX_USE_SCHED_YIELD. -+ * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Add comment. -+ -+2013-04-15 Rainer Orth -+ -+ * testsuite/30_threads/condition_variable/members/53841.cc: Add -+ -std=gnu++0x -pthread on alpha*-*-osf*, mips-sgi-irix6*. -+ - 2013-04-11 Release Manager - - * GCC 4.7.3 released. -Index: libstdc++-v3/testsuite/30_threads/condition_variable/members/53841.cc -=================================================================== ---- libstdc++-v3/testsuite/30_threads/condition_variable/members/53841.cc (.../tags/gcc_4_7_3_release) (revision 198690) -+++ libstdc++-v3/testsuite/30_threads/condition_variable/members/53841.cc (.../branches/gcc-4_7-branch) (revision 198690) -@@ -1,5 +1,5 @@ - // { dg-do compile } --// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* powerpc-ibm-aix* hppa*-hp-hpux11* } } -+// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* alpha*-*-osf* mips-sgi-irix6* powerpc-ibm-aix* hppa*-hp-hpux11* } } - // { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } } - // { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } } - // { dg-require-cstdint "" } -Index: libstdc++-v3/config/os/bsd/darwin/os_defines.h -=================================================================== ---- libstdc++-v3/config/os/bsd/darwin/os_defines.h (.../tags/gcc_4_7_3_release) (revision 198690) -+++ libstdc++-v3/config/os/bsd/darwin/os_defines.h (.../branches/gcc-4_7-branch) (revision 198690) -@@ -42,4 +42,9 @@ - // Static initializer macro is buggy in darwin, see libstdc++/51906 - #define _GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC - -+// Configure checks for nanosleep fail on Darwin, but nanosleep and -+// sched_yield are always available, so use them. -+#define _GLIBCXX_USE_NANOSLEEP 1 -+#define _GLIBCXX_USE_SCHED_YIELD 1 -+ - #endif -Index: libstdc++-v3/acinclude.m4 -=================================================================== ---- libstdc++-v3/acinclude.m4 (.../tags/gcc_4_7_3_release) (revision 198690) -+++ libstdc++-v3/acinclude.m4 (.../branches/gcc-4_7-branch) (revision 198690) -@@ -1132,6 +1132,11 @@ - dnl --disable-libstdcxx-time - dnl disables the checks completely - dnl -+dnl N.B. Darwin provides nanosleep but doesn't support the whole POSIX -+dnl Timers option, so doesn't define _POSIX_TIMERS. Because the test -+dnl below fails Darwin unconditionally defines _GLIBCXX_USE_NANOSLEEP in -+dnl os_defines.h and also defines _GLIBCXX_USE_SCHED_YIELD. -+dnl - AC_DEFUN([GLIBCXX_ENABLE_LIBSTDCXX_TIME], [ - - AC_MSG_CHECKING([for clock_gettime, nanosleep and sched_yield]) -Index: libgcc/ChangeLog -=================================================================== ---- libgcc/ChangeLog (.../tags/gcc_4_7_3_release) (revision 198690) -+++ libgcc/ChangeLog (.../branches/gcc-4_7-branch) (revision 198690) -@@ -1,3 +1,10 @@ -+2013-04-11 Julian Brown -+ -+ * config/arm/linux-atomic.c (SUBWORD_SYNC_OP, SUBWORD_VAL_CAS) -+ (SUBWORD_TEST_AND_SET): Use signed char/short types instead of -+ unsigned char/unsigned short. -+ (__sync_val_compare_and_swap_{1,2}): Handle signed argument. -+ - 2013-04-11 Release Manager - - * GCC 4.7.3 released. -Index: libgcc/config/arm/linux-atomic.c -=================================================================== ---- libgcc/config/arm/linux-atomic.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ libgcc/config/arm/linux-atomic.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -97,19 +97,19 @@ - return (RETURN & mask) >> shift; \ - } - --SUBWORD_SYNC_OP (add, , +, unsigned short, 2, oldval) --SUBWORD_SYNC_OP (sub, , -, unsigned short, 2, oldval) --SUBWORD_SYNC_OP (or, , |, unsigned short, 2, oldval) --SUBWORD_SYNC_OP (and, , &, unsigned short, 2, oldval) --SUBWORD_SYNC_OP (xor, , ^, unsigned short, 2, oldval) --SUBWORD_SYNC_OP (nand, ~, &, unsigned short, 2, oldval) -+SUBWORD_SYNC_OP (add, , +, short, 2, oldval) -+SUBWORD_SYNC_OP (sub, , -, short, 2, oldval) -+SUBWORD_SYNC_OP (or, , |, short, 2, oldval) -+SUBWORD_SYNC_OP (and, , &, short, 2, oldval) -+SUBWORD_SYNC_OP (xor, , ^, short, 2, oldval) -+SUBWORD_SYNC_OP (nand, ~, &, short, 2, oldval) - --SUBWORD_SYNC_OP (add, , +, unsigned char, 1, oldval) --SUBWORD_SYNC_OP (sub, , -, unsigned char, 1, oldval) --SUBWORD_SYNC_OP (or, , |, unsigned char, 1, oldval) --SUBWORD_SYNC_OP (and, , &, unsigned char, 1, oldval) --SUBWORD_SYNC_OP (xor, , ^, unsigned char, 1, oldval) --SUBWORD_SYNC_OP (nand, ~, &, unsigned char, 1, oldval) -+SUBWORD_SYNC_OP (add, , +, signed char, 1, oldval) -+SUBWORD_SYNC_OP (sub, , -, signed char, 1, oldval) -+SUBWORD_SYNC_OP (or, , |, signed char, 1, oldval) -+SUBWORD_SYNC_OP (and, , &, signed char, 1, oldval) -+SUBWORD_SYNC_OP (xor, , ^, signed char, 1, oldval) -+SUBWORD_SYNC_OP (nand, ~, &, signed char, 1, oldval) - - #define OP_AND_FETCH_WORD(OP, PFX_OP, INF_OP) \ - int HIDDEN \ -@@ -132,19 +132,19 @@ - OP_AND_FETCH_WORD (xor, , ^) - OP_AND_FETCH_WORD (nand, ~, &) - --SUBWORD_SYNC_OP (add, , +, unsigned short, 2, newval) --SUBWORD_SYNC_OP (sub, , -, unsigned short, 2, newval) --SUBWORD_SYNC_OP (or, , |, unsigned short, 2, newval) --SUBWORD_SYNC_OP (and, , &, unsigned short, 2, newval) --SUBWORD_SYNC_OP (xor, , ^, unsigned short, 2, newval) --SUBWORD_SYNC_OP (nand, ~, &, unsigned short, 2, newval) -+SUBWORD_SYNC_OP (add, , +, short, 2, newval) -+SUBWORD_SYNC_OP (sub, , -, short, 2, newval) -+SUBWORD_SYNC_OP (or, , |, short, 2, newval) -+SUBWORD_SYNC_OP (and, , &, short, 2, newval) -+SUBWORD_SYNC_OP (xor, , ^, short, 2, newval) -+SUBWORD_SYNC_OP (nand, ~, &, short, 2, newval) - --SUBWORD_SYNC_OP (add, , +, unsigned char, 1, newval) --SUBWORD_SYNC_OP (sub, , -, unsigned char, 1, newval) --SUBWORD_SYNC_OP (or, , |, unsigned char, 1, newval) --SUBWORD_SYNC_OP (and, , &, unsigned char, 1, newval) --SUBWORD_SYNC_OP (xor, , ^, unsigned char, 1, newval) --SUBWORD_SYNC_OP (nand, ~, &, unsigned char, 1, newval) -+SUBWORD_SYNC_OP (add, , +, signed char, 1, newval) -+SUBWORD_SYNC_OP (sub, , -, signed char, 1, newval) -+SUBWORD_SYNC_OP (or, , |, signed char, 1, newval) -+SUBWORD_SYNC_OP (and, , &, signed char, 1, newval) -+SUBWORD_SYNC_OP (xor, , ^, signed char, 1, newval) -+SUBWORD_SYNC_OP (nand, ~, &, signed char, 1, newval) - - int HIDDEN - __sync_val_compare_and_swap_4 (int *ptr, int oldval, int newval) -@@ -181,7 +181,7 @@ - actual_oldval = *wordptr; \ - \ - if (__builtin_expect (((actual_oldval & mask) >> shift) != \ -- (unsigned int) oldval, 0)) \ -+ ((unsigned int) oldval & MASK_##WIDTH), 0)) \ - return (actual_oldval & mask) >> shift; \ - \ - actual_newval = (actual_oldval & ~mask) \ -@@ -195,8 +195,8 @@ - } \ - } - --SUBWORD_VAL_CAS (unsigned short, 2) --SUBWORD_VAL_CAS (unsigned char, 1) -+SUBWORD_VAL_CAS (short, 2) -+SUBWORD_VAL_CAS (signed char, 1) - - typedef unsigned char bool; - -@@ -217,8 +217,8 @@ - return (oldval == actual_oldval); \ - } - --SUBWORD_BOOL_CAS (unsigned short, 2) --SUBWORD_BOOL_CAS (unsigned char, 1) -+SUBWORD_BOOL_CAS (short, 2) -+SUBWORD_BOOL_CAS (signed char, 1) - - void HIDDEN - __sync_synchronize (void) -@@ -260,8 +260,8 @@ - return (oldval & mask) >> shift; \ - } - --SUBWORD_TEST_AND_SET (unsigned short, 2) --SUBWORD_TEST_AND_SET (unsigned char, 1) -+SUBWORD_TEST_AND_SET (short, 2) -+SUBWORD_TEST_AND_SET (signed char, 1) - - #define SYNC_LOCK_RELEASE(TYPE, WIDTH) \ - void HIDDEN \ -Index: gcc/doc/tm.texi -=================================================================== ---- gcc/doc/tm.texi (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/doc/tm.texi (.../branches/gcc-4_7-branch) (revision 198690) -@@ -9495,6 +9495,10 @@ - True if the @code{.debug_pubtypes} and @code{.debug_pubnames} sections should be emitted. These sections are not used on most platforms, and in particular GDB does not use them. - @end deftypevr - -+@deftypevr {Target Hook} bool TARGET_FORCE_AT_COMP_DIR -+True if the @code{DW_AT_comp_dir} attribute should be emitted for each compilation unit. This attribute is required for the darwin linker to emit debug information. -+@end deftypevr -+ - @deftypevr {Target Hook} bool TARGET_DELAY_SCHED2 - True if sched2 is not to be run at its normal place. This usually means it will be run as part of machine-specific reorg. - @end deftypevr -Index: gcc/doc/tm.texi.in -=================================================================== ---- gcc/doc/tm.texi.in (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/doc/tm.texi.in (.../branches/gcc-4_7-branch) (revision 198690) -@@ -9388,6 +9388,8 @@ - - @hook TARGET_WANT_DEBUG_PUB_SECTIONS - -+@hook TARGET_FORCE_AT_COMP_DIR -+ - @hook TARGET_DELAY_SCHED2 - - @hook TARGET_DELAY_VARTRACK -Index: gcc/target.def -=================================================================== ---- gcc/target.def (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/target.def (.../branches/gcc-4_7-branch) (revision 198690) -@@ -2758,6 +2758,13 @@ - bool, false) - - DEFHOOKPOD -+(force_at_comp_dir, -+ "True if the @code{DW_AT_comp_dir} attribute should be emitted for each \ -+ compilation unit. This attribute is required for the darwin linker \ -+ to emit debug information.", -+ bool, false) -+ -+DEFHOOKPOD - (delay_sched2, "True if sched2 is not to be run at its normal place. \ - This usually means it will be run as part of machine-specific reorg.", - bool, false) -Index: gcc/DATESTAMP -=================================================================== ---- gcc/DATESTAMP (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/DATESTAMP (.../branches/gcc-4_7-branch) (revision 198690) -@@ -1 +1 @@ --20130411 -+20130507 -Index: gcc/builtins.c -=================================================================== ---- gcc/builtins.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/builtins.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -9692,7 +9692,16 @@ - case rvc_inf: - /* If arg is Inf or NaN and we're logb, return it. */ - if (TREE_CODE (rettype) == REAL_TYPE) -- return fold_convert_loc (loc, rettype, arg); -+ { -+ /* For logb(-Inf) we have to return +Inf. */ -+ if (real_isinf (value) && real_isneg (value)) -+ { -+ REAL_VALUE_TYPE tem; -+ real_inf (&tem); -+ return build_real (rettype, tem); -+ } -+ return fold_convert_loc (loc, rettype, arg); -+ } - /* Fall through... */ - case rvc_zero: - /* Zero may set errno and/or raise an exception for logb, also -Index: gcc/ChangeLog -=================================================================== ---- gcc/ChangeLog (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/ChangeLog (.../branches/gcc-4_7-branch) (revision 198690) -@@ -1,3 +1,115 @@ -+2013-05-03 Marek Polacek -+ -+ Backport from mainline -+ 2013-04-25 Marek Polacek -+ -+ PR tree-optimization/57066 -+ * builtins.c (fold_builtin_logb): Return +Inf for -Inf. -+ -+2013-04-30 Uros Bizjak -+ -+ Backport from mainline -+ 2013-04-29 Uros Bizjak -+ -+ PR target/44578 -+ * config/i386/i386.md (*zero_extendsidi2_rex64): Add "!" to m->?*y -+ alternative. -+ (*zero_extendsidi2): Ditto. -+ -+ Backport from mainline -+ 2013-04-29 Uros Bizjak -+ -+ PR target/57098 -+ * config/i386/i386.c (ix86_expand_vec_perm): Validize constant memory. -+ -+2013-04-29 Christian Bruel -+ -+ PR target/57108 -+ * sh.md (tstsi_t_zero_extract_eq): Set mode for operand 0. -+ -+2013-04-27 Jakub Jelinek -+ -+ PR target/56866 -+ * config/i386/sse.md (xop_rotr3): Fix up computation of -+ the immediate rotate count. -+ -+2013-04-21 Eric Botcazou -+ -+ * cfgexpand.c (avoid_complex_debug_insns): Fix C++ism. -+ -+2013-04-19 Matthias Klose -+ -+ PR middle-end/56848 -+ Re-apply -+ 2013-04-01 Andrey Belevantsev -+ -+ Backport from mainline -+ 2013-02-25 Andrey Belevantsev -+ Alexander Monakov -+ -+ PR middle-end/56077 -+ * sched-deps.c (sched_analyze_insn): When reg_pending_barrier, -+ flush pending lists also on non-jumps. Adjust comment. -+ -+ Backport from 4.8: -+ 2012-08-27 Maxim Kuvyrkov -+ -+ * sched-deps.c (add_dependence_list_and_free): Simplify. -+ (flush_pending_list_and_free): Fix a hack that was fixing a hack. Free -+ lists when add_dependence_list_and_free doesn't free them. -+ -+2013-04-19 Marek Polacek -+ -+ Backport from mainline -+ 2013-01-08 Steven Bosscher -+ Jakub Jelinek -+ -+ PR tree-optimization/48189 -+ * predict.c (predict_loops): If max is 0, don't call compare_tree_int. -+ If nitercst is 0, don't predict the exit edge. -+ -+2013-04-16 Jack Howarth -+ -+ Backport from mainline -+ 2012-05-29 Jack Howarth -+ * config/darwin.h (STARTFILE_SPEC): Use -no_new_main with -lgcrt1.o -+ on Darwin >= 12. -+ (DARWIN_CRT1_SPEC): Use -lcrt1.10.6.o when Darwin >= 10 and < 12. -+ -+ -+ 2012-05-29 Jack Howarth -+ PR debug/53453 -+ * doc/tm.texi: Update. -+ * doc/tm.texi.in (SDB and DWARF) : Add @hook. -+ * target.def (force_at_comp_dir): New hook. -+ * config/darwin.h (TARGET_FORCE_AT_COMP_DIR): Define. -+ * dwarf2out.c (dwarf2out_finish): Check targetm.force_at_comp_dir. -+ -+2013-04-15 Eric Botcazou -+ -+ PR target/56890 -+ * config/sparc/sparc.c (enum sparc_mode_class): Add H_MODE value. -+ (S_MODES): Set H_MODE bit. -+ (SF_MODES): Set only S_MODE and SF_MODE bits. -+ (DF_MODES): Set SF_MODES and only D_MODE and DF_MODE bits. -+ (sparc_init_modes) : Set H_MODE bit for sub-word modes. -+ : Do not set SF_MODE for sub-word modes. -+ : Likewise. -+ -+2013-04-13 John David Anglin -+ -+ Backport from mainline: -+ 2013-04-06 John David Anglin -+ -+ PR target/55487 -+ * config/pa/pa.c (legitimize_pic_address): Before incrementing label -+ nuses, make sure we have a label. -+ -+2013-04-11 Richard Biener -+ -+ * BASE-VER: Set to 4.7.4. -+ * DEV-PHASE: Set to prerelease. -+ - 2013-04-11 Release Manager - - * GCC 4.7.3 released. -Index: gcc/testsuite/gcc.target/i386/pr44578.c -=================================================================== ---- gcc/testsuite/gcc.target/i386/pr44578.c (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gcc.target/i386/pr44578.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,31 @@ -+/* { dg-do run } */ -+/* { dg-options "-O2 -mtune=athlon64" } */ -+ -+extern void abort (void); -+ -+long double -+__attribute__((noinline, noclone)) -+test (float num) -+{ -+ unsigned int i; -+ -+ if (num < 0.0) -+ num = 0.0; -+ -+ __builtin_memcpy (&i, &num, sizeof(unsigned int)); -+ -+ return (long double)(unsigned long long) i; -+} -+ -+int -+main () -+{ -+ long double x; -+ -+ x = test (0.0); -+ -+ if (x != 0.0) -+ abort (); -+ -+ return 0; -+} -Index: gcc/testsuite/gcc.target/i386/pr56866.c -=================================================================== ---- gcc/testsuite/gcc.target/i386/pr56866.c (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gcc.target/i386/pr56866.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,16 @@ -+/* PR target/56866 */ -+/* { dg-do run } */ -+/* { dg-require-effective-target xop } */ -+/* { dg-options "-O3 -mxop" } */ -+ -+#define main xop_test_main -+#include "../../gcc.c-torture/execute/pr56866.c" -+#undef main -+ -+#include "xop-check.h" -+ -+static void -+xop_test (void) -+{ -+ xop_test_main (); -+} -Index: gcc/testsuite/gcc.target/i386/pr57098.c -=================================================================== ---- gcc/testsuite/gcc.target/i386/pr57098.c (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gcc.target/i386/pr57098.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,10 @@ -+/* { dg-do compile } */ -+/* { dg-require-effective-target lp64 } */ -+/* { dg-options "-msse4 -mcmodel=large" } */ -+ -+typedef int V __attribute__((vector_size(16))); -+ -+void foo (V *p, V *mask) -+{ -+ *p = __builtin_shuffle (*p, *mask); -+} -Index: gcc/testsuite/gcc.target/sh/pr57108.c -=================================================================== ---- gcc/testsuite/gcc.target/sh/pr57108.c (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gcc.target/sh/pr57108.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,19 @@ -+/* { dg-do compile { target "sh*-*-*" } } */ -+/* { dg-options "-O1" } */ -+ -+void __assert_func (void) __attribute__ ((__noreturn__)) ; -+ -+void ATATransfer (int num, int buffer) -+{ -+ int wordCount; -+ -+ while (num > 0) -+ { -+ wordCount = num * 512 / sizeof (int); -+ -+ ((0 == (buffer & 63)) ? (void)0 : __assert_func () ); -+ ((0 == (wordCount & 31)) ? (void)0 : __assert_func ()); -+ } -+ -+ -+ } -Index: gcc/testsuite/gfortran.dg/size_kind_3.f90 -=================================================================== ---- gcc/testsuite/gfortran.dg/size_kind_3.f90 (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gfortran.dg/size_kind_3.f90 (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,11 @@ -+! { dg-do compile } -+! -+! PR fortran/57142 -+! -+integer :: B(huge(1)+3_8,2_8) -+integer(8) :: var1(2), var2, var3 -+ -+var1 = shape(B) ! { dg-error "SHAPE overflows its kind" } -+var2 = size(B) ! { dg-error "SIZE overflows its kind" } -+var3 = size(B,dim=1) ! { dg-error "SIZE overflows its kind" } -+end -Index: gcc/testsuite/gfortran.dg/transfer_check_4.f90 -=================================================================== ---- gcc/testsuite/gfortran.dg/transfer_check_4.f90 (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gfortran.dg/transfer_check_4.f90 (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,44 @@ -+! { dg-do compile } -+! { dg-options "-Wall" } -+ -+! PR 57022: [4.7/4.8/4.9 Regression] Inappropriate warning for use of TRANSFER with arrays -+! Contributed by William Clodius -+ -+subroutine transfers (test) -+ -+ use, intrinsic :: iso_fortran_env -+ -+ integer, intent(in) :: test -+ -+ integer(int8) :: test8(8) = 0 -+ integer(int16) :: test16(4) = 0 -+ integer(int32) :: test32(2) = 0 -+ integer(int64) :: test64 = 0 -+ -+ select case(test) -+ case(0) -+ test64 = transfer(test8, test64) -+ case(1) -+ test64 = transfer(test16, test64) -+ case(2) -+ test64 = transfer(test32, test64) -+ case(3) -+ test8 = transfer(test64, test8, 8) -+ case(4) -+ test16 = transfer(test64, test16, 4) -+ case(5) -+ test32 = transfer(test64, test32, 2) -+ end select -+ -+end subroutine -+ -+ -+! PR 53685: surprising warns about transfer with explicit character range -+! Contributed by Jos de Kloe -+ -+subroutine mytest(byte_array,val) -+ integer, parameter :: r8_ = Selected_Real_Kind(15,307) ! = real*8 -+ character(len=1), dimension(16), intent(in) :: byte_array -+ real(r8_),intent(out) :: val -+ val = transfer(byte_array(1:8),val) -+end subroutine -Index: gcc/testsuite/gfortran.dg/namelist_77.f90 -=================================================================== ---- gcc/testsuite/gfortran.dg/namelist_77.f90 (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gfortran.dg/namelist_77.f90 (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,49 @@ -+! { dg-do run } -+! -+! PR libfortran/51825 - Fortran runtime error: Cannot match namelist object name -+! Test case derived from PR. -+ -+module local_mod -+ -+ type mytype1 -+ integer :: int1 -+ end type -+ -+ type mytype2 -+ integer :: n_x -+ integer :: n_px -+ end type -+ -+ type beam_init_struct -+ character(16) :: chars(1) = '' -+ type (mytype1) dummy -+ type (mytype2) grid(1) -+ end type -+ -+end module -+ -+program error_namelist -+ -+ use local_mod -+ -+ implicit none -+ -+ type (beam_init_struct) beam_init -+ -+ namelist / error_params / beam_init -+ -+ open (10, status='scratch') -+ write (10, '(a)') "&error_params" -+ write (10, '(a)') " beam_init%chars(1)='JUNK'" -+ write (10, '(a)') " beam_init%grid(1)%n_x=3" -+ write (10, '(a)') " beam_init%grid(1)%n_px=2" -+ write (10, '(a)') "/" -+ rewind(10) -+ read(10, nml=error_params) -+ close (10) -+ -+ if (beam_init%chars(1) /= 'JUNK') call abort -+ if (beam_init%grid(1)%n_x /= 3) call abort -+ if (beam_init%grid(1)%n_px /= 2) call abort -+ -+end program -Index: gcc/testsuite/gfortran.dg/namelist_79.f90 -=================================================================== ---- gcc/testsuite/gfortran.dg/namelist_79.f90 (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gfortran.dg/namelist_79.f90 (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,43 @@ -+! { dg-do run } -+! PR libfortran/52512 - Cannot match namelist object name -+! Test case derived from PR. -+ -+program testje -+ -+ implicit none -+ -+ integer :: getal, jn -+ type ptracer -+ character(len = 8) :: sname !: short name -+ logical :: lini !: read in a file or not -+ end type ptracer -+ type(ptracer) , dimension(3) :: tracer -+ namelist/namtoptrc/ getal,tracer -+ -+ ! standard values -+ getal = 9999 -+ do jn = 1, 3 -+ tracer(jn)%sname = 'default_name' -+ tracer(jn)%lini = .false. -+ end do -+ -+ open (10, status='scratch') -+ write (10, '(a)') "&namtoptrc" -+ write (10, '(a)') " getal = 7" -+ write (10, '(a)') " tracer(1) = 'DIC ', .true." -+ write (10, '(a)') " tracer(2) = 'Alkalini', .true." -+ write (10, '(a)') " tracer(3) = 'O2 ', .true." -+ write (10, '(a)') "/" -+ rewind(10) -+ read(10, nml=namtoptrc) -+ close (10) -+ -+ if (getal /= 7) call abort -+ if (tracer(1)%sname /= 'DIC ') call abort -+ if (tracer(2)%sname /= 'Alkalini') call abort -+ if (tracer(3)%sname /= 'O2 ') call abort -+ if (.not. tracer(1)%lini) call abort -+ if (.not. tracer(2)%lini) call abort -+ if (.not. tracer(3)%lini) call abort -+ -+end program testje -Index: gcc/testsuite/gfortran.dg/size_kind_2.f90 -=================================================================== ---- gcc/testsuite/gfortran.dg/size_kind_2.f90 (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gfortran.dg/size_kind_2.f90 (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,17 @@ -+! { dg-do compile } -+! { dg-options "-fdump-tree-original" } -+! -+! PR fortran/57142 -+! -+integer :: B(huge(1)+3_8,2_8) -+integer(8) :: var1(2), var2, var3 -+ -+var1 = shape(B,kind=8) -+var2 = size(B,kind=8) -+var3 = size(B,dim=1,kind=8) -+end -+ -+! { dg-final { scan-tree-dump "static integer.kind=8. A..\\\[2\\\] = \\\{2147483650, 2\\\};" "original" } } -+! { dg-final { scan-tree-dump "var2 = 4294967300;" "original" } } -+! { dg-final { scan-tree-dump "var3 = 2147483650;" "original" } } -+! { dg-final { cleanup-tree-dump "original" } } -Index: gcc/testsuite/gfortran.dg/proc_ptr_41.f90 -=================================================================== ---- gcc/testsuite/gfortran.dg/proc_ptr_41.f90 (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gfortran.dg/proc_ptr_41.f90 (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,37 @@ -+! { dg-do compile } -+! -+! PR 56968: [4.7/4.8/4.9 Regression] [F03] Issue with a procedure defined with a generic name returning procedure pointer -+! -+! Contributed by Samuel Debionne -+ -+module test -+ -+ interface generic_name_get_proc_ptr -+ module procedure specific_name_get_proc_ptr -+ end interface -+ -+ abstract interface -+ double precision function foo(arg1) -+ real, intent(in) :: arg1 -+ end function -+ end interface -+ -+contains -+ -+ function specific_name_get_proc_ptr() result(res) -+ procedure(foo), pointer :: res -+ end function -+ -+end module test -+ -+program crash_test -+ use :: test -+ -+ procedure(foo), pointer :: ptr -+ -+ ptr => specific_name_get_proc_ptr() -+ ptr => generic_name_get_proc_ptr() -+ -+end program -+ -+! { dg-final { cleanup-modules "test" } } -Index: gcc/testsuite/gfortran.dg/namelist_81.f90 -=================================================================== ---- gcc/testsuite/gfortran.dg/namelist_81.f90 (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gfortran.dg/namelist_81.f90 (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,43 @@ -+! { dg-do run } -+! PR56786 Error on embedded spaces -+integer :: i(3) -+namelist /nml/ i -+ -+i = -42 -+open(99,status='scratch') -+write(99,'(a)') '&nml i(3 ) = 5 /' -+rewind(99) -+read(99,nml=nml) -+close(99) -+if (i(1)/=-42 .or. i(2)/=-42 .or. i(3)/=5) call abort() -+ -+! Shorten the file so the read hits EOF -+ -+open(99,status='scratch') -+write(99,'(a)') '&nml i(3 ) = 5 ' -+rewind(99) -+read(99,nml=nml, end=30) -+call abort() -+! Shorten some more -+ 30 close(99) -+open(99,status='scratch') -+write(99,'(a)') '&nml i(3 ) =' -+rewind(99) -+read(99,nml=nml, end=40) -+call abort() -+! Shorten some more -+ 40 close(99) -+open(99,status='scratch') -+write(99,'(a)') '&nml i(3 )' -+rewind(99) -+read(99,nml=nml, end=50) -+call abort() -+! Shorten some more -+ 50 close(99) -+open(99,status='scratch') -+write(99,'(a)') '&nml i(3 ' -+rewind(99) -+read(99,nml=nml, end=60) -+call abort() -+ 60 close(99) -+end -Index: gcc/testsuite/gfortran.dg/namelist_78.f90 -=================================================================== ---- gcc/testsuite/gfortran.dg/namelist_78.f90 (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gfortran.dg/namelist_78.f90 (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,34 @@ -+! { dg-do run } -+! -+! PR libfortran/51825 -+! Test case regarding namelist problems with derived types -+ -+program namelist -+ -+ type d1 -+ integer :: j = 0 -+ end type d1 -+ -+ type d2 -+ type(d1) k -+ end type d2 -+ -+ type d3 -+ type(d2) d(2) -+ end type d3 -+ -+ type(d3) der -+ namelist /nmlst/ der -+ -+ open (10, status='scratch') -+ write (10, '(a)') "&NMLST" -+ write (10, '(a)') " DER%D(1)%K%J = 1," -+ write (10, '(a)') " DER%D(2)%K%J = 2," -+ write (10, '(a)') "/" -+ rewind(10) -+ read(10, nml=nmlst) -+ close (10) -+ -+ if (der%d(1)%k%j /= 1) call abort -+ if (der%d(2)%k%j /= 2) call abort -+end program namelist -Index: gcc/testsuite/gcc.c-torture/execute/pr56866.c -=================================================================== ---- gcc/testsuite/gcc.c-torture/execute/pr56866.c (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gcc.c-torture/execute/pr56866.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,45 @@ -+/* PR target/56866 */ -+ -+int -+main () -+{ -+#if __CHAR_BIT__ == 8 && __SIZEOF_LONG_LONG__ == 8 && __SIZEOF_INT__ == 4 && __SIZEOF_SHORT__ == 2 -+ unsigned long long wq[256], rq[256]; -+ unsigned int wi[256], ri[256]; -+ unsigned short ws[256], rs[256]; -+ unsigned char wc[256], rc[256]; -+ int t; -+ -+ __builtin_memset (wq, 0, sizeof wq); -+ __builtin_memset (wi, 0, sizeof wi); -+ __builtin_memset (ws, 0, sizeof ws); -+ __builtin_memset (wc, 0, sizeof wc); -+ wq[0] = 0x0123456789abcdefULL; -+ wi[0] = 0x01234567; -+ ws[0] = 0x4567; -+ wc[0] = 0x73; -+ -+ asm volatile ("" : : "g" (wq), "g" (wi), "g" (ws), "g" (wc) : "memory"); -+ -+ for (t = 0; t < 256; ++t) -+ rq[t] = (wq[t] >> 8) | (wq[t] << (sizeof (wq[0]) * __CHAR_BIT__ - 8)); -+ for (t = 0; t < 256; ++t) -+ ri[t] = (wi[t] >> 8) | (wi[t] << (sizeof (wi[0]) * __CHAR_BIT__ - 8)); -+ for (t = 0; t < 256; ++t) -+ rs[t] = (ws[t] >> 9) | (ws[t] << (sizeof (ws[0]) * __CHAR_BIT__ - 9)); -+ for (t = 0; t < 256; ++t) -+ rc[t] = (wc[t] >> 5) | (wc[t] << (sizeof (wc[0]) * __CHAR_BIT__ - 5)); -+ -+ asm volatile ("" : : "g" (rq), "g" (ri), "g" (rs), "g" (rc) : "memory"); -+ -+ if (rq[0] != 0xef0123456789abcdULL || rq[1]) -+ __builtin_abort (); -+ if (ri[0] != 0x67012345 || ri[1]) -+ __builtin_abort (); -+ if (rs[0] != 0xb3a2 || rs[1]) -+ __builtin_abort (); -+ if (rc[0] != 0x9b || rc[1]) -+ __builtin_abort (); -+#endif -+ return 0; -+} -Index: gcc/testsuite/gcc.dg/pr56890-2.c -=================================================================== ---- gcc/testsuite/gcc.dg/pr56890-2.c (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gcc.dg/pr56890-2.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,19 @@ -+/* PR target/56890 */ -+/* Reported by Rainer Jung */ -+ -+/* { dg-do assemble } */ -+/* { dg-options "-O" } */ -+ -+unsigned int buggy(unsigned int min, unsigned int max) -+{ -+ unsigned int number; -+ if (max < 16384) { -+ unsigned short num16; -+ num16 = min + (long) ((double) (max - min + 1.0) * (num16 / (65535 + 1.0))); -+ return num16; -+ } -+ else { -+ (number) = min + (long) ((double) (max - min + 1.0) * (number / (4294967295U + 1.0))); -+ } -+ return number; -+} -Index: gcc/testsuite/gcc.dg/pr48189.c -=================================================================== ---- gcc/testsuite/gcc.dg/pr48189.c (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gcc.dg/pr48189.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,13 @@ -+/* PR tree-optimization/48189 */ -+/* { dg-do compile } */ -+/* { dg-options "-O --param max-predicted-iterations=0" } */ -+ -+struct S { int s[8]; }; -+ -+void -+foo (int *x, struct S *y) -+{ -+ int i; -+ for (i = 0; y[i].s[i]; i++) -+ *x++ = y[i].s[i]; -+} -Index: gcc/testsuite/gcc.dg/torture/builtin-logb-1.c -=================================================================== ---- gcc/testsuite/gcc.dg/torture/builtin-logb-1.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/testsuite/gcc.dg/torture/builtin-logb-1.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -48,25 +48,25 @@ - /* Test if FUNCRES(FUNC(NEG FUNCARG(ARGARG))) is false. Check the - sign as well. */ - #ifndef __SPU__ --#define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES) do { \ -+#define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES,NEG2) do { \ - if (!__builtin_##FUNCRES##f(__builtin_##FUNC(NEG __builtin_##FUNCARG##f(ARGARG))) \ -- || CKSGN_F(__builtin_##FUNC##f(NEG __builtin_##FUNCARG##f(ARGARG)), NEG __builtin_##FUNCARG##f(ARGARG))) \ -+ || CKSGN_F(__builtin_##FUNC##f(NEG __builtin_##FUNCARG##f(ARGARG)), NEG2 __builtin_##FUNCARG##f(ARGARG))) \ - link_error(__LINE__); \ - if (!__builtin_##FUNCRES(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG))) \ -- || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG __builtin_##FUNCARG(ARGARG))) \ -+ || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG2 __builtin_##FUNCARG(ARGARG))) \ - link_error(__LINE__); \ - if (!__builtin_##FUNCRES##l(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG))) \ -- || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG __builtin_##FUNCARG##l(ARGARG))) \ -+ || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG2 __builtin_##FUNCARG##l(ARGARG))) \ - link_error(__LINE__); \ - } while (0) - #else --#define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES) do { \ -+#define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES,NEG2) do { \ - /* SPU single-precision floating point format does not support Inf or Nan. */ \ - if (!__builtin_##FUNCRES(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG))) \ -- || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG __builtin_##FUNCARG(ARGARG))) \ -+ || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG2 __builtin_##FUNCARG(ARGARG))) \ - link_error(__LINE__); \ - if (!__builtin_##FUNCRES##l(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG))) \ -- || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG __builtin_##FUNCARG##l(ARGARG))) \ -+ || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG2 __builtin_##FUNCARG##l(ARGARG))) \ - link_error(__LINE__); \ - } while (0) - #endif -@@ -173,15 +173,15 @@ - - /* Test for f(+-Inf) -> +-Inf and f(+-NaN) -> +-NaN, regardless of - the radix. */ -- TESTIT3 (logb, ,inf, , isinf); -- TESTIT3 (logb, - ,inf, , isinf); -- TESTIT3 (logb, ,nan, "", isnan); -- TESTIT3 (logb, - ,nan, "", isnan); -+ TESTIT3 (logb, ,inf, , isinf, ); -+ TESTIT3 (logb, - ,inf, , isinf, ); -+ TESTIT3 (logb, ,nan, "", isnan, ); -+ TESTIT3 (logb, - ,nan, "", isnan, -); - -- TESTIT3 (significand, ,inf, , isinf); -- TESTIT3 (significand, - ,inf, , isinf); -- TESTIT3 (significand, ,nan, "", isnan); -- TESTIT3 (significand, - ,nan, "", isnan); -+ TESTIT3 (significand, ,inf, , isinf, ); -+ TESTIT3 (significand, - ,inf, , isinf, -); -+ TESTIT3 (significand, ,nan, "", isnan, ); -+ TESTIT3 (significand, - ,nan, "", isnan, -); - } - - int main() -Index: gcc/testsuite/gcc.dg/torture/pr53922.c -=================================================================== ---- gcc/testsuite/gcc.dg/torture/pr53922.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/testsuite/gcc.dg/torture/pr53922.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -1,6 +1,7 @@ - /* { dg-do run } */ - /* { dg-require-weak "" } */ --/* { dg-skip-if "No undefined weak" { hppa*-*-hpux* && { ! lp64 } } { "*" } { "" } } */ -+/* { dg-skip-if "No undefined weak" { alpha*-*-osf* } } */ -+/* { dg-skip-if "No undefined weak" { hppa*-*-hpux* && { ! lp64 } } } */ - - int x(int a) - { -Index: gcc/testsuite/gcc.dg/pr56890-1.c -=================================================================== ---- gcc/testsuite/gcc.dg/pr56890-1.c (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/gcc.dg/pr56890-1.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,15 @@ -+/* PR target/56890 */ -+/* Reported by Rainer Jung */ -+ -+/* { dg-do assemble } */ -+/* { dg-options "-O2" } */ -+ -+unsigned int buggy(unsigned int min, unsigned int max) -+{ -+ if (max < 16384) { -+ unsigned short num16 = 0; -+ num16 = min + (long) ((double) (max - min + 1.0) * (num16 / (65535 + 1.0))); -+ return num16; -+ } -+ return 0; -+} -Index: gcc/testsuite/ChangeLog -=================================================================== ---- gcc/testsuite/ChangeLog (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/testsuite/ChangeLog (.../branches/gcc-4_7-branch) (revision 198690) -@@ -1,3 +1,97 @@ -+2013-05-07 Tobias Burnus -+ -+ Backport from mainline -+ 2013-05-02 Tobias Burnus -+ -+ PR fortran/57142 -+ * gfortran.dg/size_kind_2.f90: New. -+ * gfortran.dg/size_kind_3.f90: New. -+ -+2013-05-03 Marek Polacek -+ -+ Backport from mainline -+ 2013-04-25 Marek Polacek -+ -+ PR tree-optimization/57066 -+ * gcc.dg/torture/builtin-logb-1.c: Adjust testcase. -+ -+2013-04-30 Uros Bizjak -+ -+ Backport from mainline -+ 2013-04-29 Uros Bizjak -+ -+ PR target/44578 -+ * gcc.target/i386/pr44578.c: New test. -+ -+ Backport from mainline -+ 2013-04-29 Uros Bizjak -+ -+ PR target/57098 -+ * gcc.target/i386/pr57098.c: New test. -+ -+2013-04-29 Christian Bruel -+ -+ PR target/57108 -+ * gcc.target/sh/pr57108.c: New test. -+ -+2013-04-28 Jerry DeLisle -+ -+ Backport from trunk: -+ -+ PR fortran/51825 -+ * gfortran.dg/namelist_77.f90: New test. -+ * gfortran.dg/namelist_78.f90: New test. -+ -+2013-04-28 Jerry DeLisle -+ -+ Backport from trunk: -+ -+ PR fortran/56786 -+ * gfortran.dg/namelist_81.f90: New test. -+ -+2013-04-28 Jerry DeLisle -+ -+ Backport from trunk: -+ -+ PR fortran/52512 -+ * gfortran.dg/namelist_79.f90: New test. -+ -+2013-04-27 Jakub Jelinek -+ -+ PR target/56866 -+ * gcc.c-torture/execute/pr56866.c: New test. -+ * gcc.target/i386/pr56866.c: New test. -+ -+2013-04-26 Janus Weil -+ -+ Backports from trunk: -+ -+ PR fortran/56968 -+ * gfortran.dg/proc_ptr_41.f90: New. -+ -+ PR fortran/53685 -+ PR fortran/57022 -+ * gfortran.dg/transfer_check_4.f90: New. -+ -+2013-04-19 Marek Polacek -+ -+ Backport from mainline -+ 2013-01-08 Steven Bosscher -+ Jakub Jelinek -+ -+ PR tree-optimization/48189 -+ * gcc.dg/pr48189.c: New test. -+ -+2013-04-15 Rainer Orth -+ -+ * gcc.dg/torture/pr53922.c: Skip on alpha*-*-osf*. -+ Remove dg-skip-if default args. -+ -+2013-04-15 Eric Botcazou -+ -+ * gcc.dg/pr56890-1.c: New test. -+ * gcc.dg/pr56890-2.c: Likewise. -+ - 2013-04-11 Release Manager - - * GCC 4.7.3 released. -Index: gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh3.C -=================================================================== ---- gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh3.C (.../tags/gcc_4_7_3_release) (revision 0) -+++ gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh3.C (.../branches/gcc-4_7-branch) (revision 198690) -@@ -0,0 +1,14 @@ -+// PR c++/56388 -+// { dg-require-effective-target c++11 } -+ -+int main() -+{ -+ bool /*const*/ condition = false; -+ -+ [&]{ -+ try{} -+ catch(...){ -+ if(condition){} -+ } -+ }(); -+} -Index: gcc/cp/ChangeLog -=================================================================== ---- gcc/cp/ChangeLog (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/cp/ChangeLog (.../branches/gcc-4_7-branch) (revision 198690) -@@ -1,3 +1,13 @@ -+2013-04-21 Eric Botcazou -+ -+ * parser.c (cp_parser_late_return_type_opt): Fix C++ism. -+ -+2013-04-15 Jason Merrill -+ -+ PR c++/56388 -+ * semantics.c (insert_capture_proxy): Just use index 1 in the -+ stmt_list_stack. -+ - 2013-04-11 Release Manager - - * GCC 4.7.3 released. -Index: gcc/cp/semantics.c -=================================================================== ---- gcc/cp/semantics.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/cp/semantics.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -8959,13 +8959,12 @@ - insert_capture_proxy (tree var) - { - cp_binding_level *b; -- int skip; - tree stmt_list; - - /* Put the capture proxy in the extra body block so that it won't clash - with a later local variable. */ - b = current_binding_level; -- for (skip = 0; ; ++skip) -+ for (;;) - { - cp_binding_level *n = b->level_chain; - if (n->kind == sk_function_parms) -@@ -8976,8 +8975,7 @@ - - /* And put a DECL_EXPR in the STATEMENT_LIST for the same block. */ - var = build_stmt (DECL_SOURCE_LOCATION (var), DECL_EXPR, var); -- stmt_list = VEC_index (tree, stmt_list_stack, -- VEC_length (tree, stmt_list_stack) - 1 - skip); -+ stmt_list = VEC_index (tree, stmt_list_stack, 1); - gcc_assert (stmt_list); - append_to_statement_list_force (var, &stmt_list); - } -Index: gcc/cp/parser.c -=================================================================== ---- gcc/cp/parser.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/cp/parser.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -16691,7 +16691,7 @@ - cp_parser_late_return_type_opt (cp_parser* parser, cp_cv_quals quals) - { - cp_token *token; -- tree type; -+ tree type, save_ccp, save_ccr; - - /* Peek at the next token. */ - token = cp_lexer_peek_token (parser->lexer); -@@ -16702,8 +16702,8 @@ - /* Consume the ->. */ - cp_lexer_consume_token (parser->lexer); - -- tree save_ccp = current_class_ptr; -- tree save_ccr = current_class_ref; -+ save_ccp = current_class_ptr; -+ save_ccr = current_class_ref; - if (quals >= 0) - { - /* DR 1207: 'this' is in scope in the trailing return type. */ -Index: gcc/dwarf2out.c -=================================================================== ---- gcc/dwarf2out.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/dwarf2out.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -22538,7 +22538,7 @@ - /* Add the name for the main input file now. We delayed this from - dwarf2out_init to avoid complications with PCH. */ - add_name_attribute (comp_unit_die (), remap_debug_filename (filename)); -- if (!IS_ABSOLUTE_PATH (filename)) -+ if (!IS_ABSOLUTE_PATH (filename) || targetm.force_at_comp_dir) - add_comp_dir_attribute (comp_unit_die ()); - else if (get_AT (comp_unit_die (), DW_AT_comp_dir) == NULL) - { -Index: gcc/predict.c -=================================================================== ---- gcc/predict.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/predict.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -983,7 +983,8 @@ - if (TREE_CODE (niter) == INTEGER_CST) - { - if (host_integerp (niter, 1) -- && compare_tree_int (niter, max-1) == -1) -+ && max -+ && compare_tree_int (niter, max - 1) == -1) - nitercst = tree_low_cst (niter, 1) + 1; - else - nitercst = max; -@@ -1005,6 +1006,11 @@ - else - continue; - -+ /* If the prediction for number of iterations is zero, do not -+ predict the exit edges. */ -+ if (nitercst == 0) -+ continue; -+ - probability = ((REG_BR_PROB_BASE + nitercst / 2) / nitercst); - predict_edge (ex, predictor, probability); - } -Index: gcc/fortran/ChangeLog -=================================================================== ---- gcc/fortran/ChangeLog (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/fortran/ChangeLog (.../branches/gcc-4_7-branch) (revision 198690) -@@ -1,3 +1,39 @@ -+2013-05-07 Tobias Burnus -+ -+ Backport from mainline -+ 2013-05-02 Tobias Burnus -+ -+ PR fortran/57142 -+ * simplify.c (gfc_simplify_size): Renamed from -+ simplify_size; fix kind=8 handling. -+ (gfc_simplify_size): New function. -+ (gfc_simplify_shape): Add range check. -+ * resolve.c (resolve_function): Fix handling -+ for ISYM_SIZE. -+ -+2013-04-26 Janus Weil -+ -+ Backports from trunk: -+ -+ PR fortran/56968 -+ * expr.c (gfc_check_pointer_assign): Handle generic functions returning -+ procedure pointers. -+ -+ PR fortran/53685 -+ PR fortran/57022 -+ * check.c (gfc_calculate_transfer_sizes): Fix for array-valued SOURCE -+ expressions. -+ * target-memory.h (gfc_element_size): New prototype. -+ * target-memory.c (size_array): Remove. -+ (gfc_element_size): New function. -+ (gfc_target_expr_size): Modified to always return the full size of the -+ expression. -+ -+2013-04-18 Tobias Burnus -+ -+ PR fortran/56994 -+ * invoke.texi (NEAREST): S argument is not optional. -+ - 2013-04-11 Release Manager - - * GCC 4.7.3 released. -Index: gcc/fortran/expr.c -=================================================================== ---- gcc/fortran/expr.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/fortran/expr.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -3493,8 +3493,12 @@ - } - else if (rvalue->expr_type == EXPR_FUNCTION) - { -- s2 = rvalue->symtree->n.sym->result; -- name = rvalue->symtree->n.sym->result->name; -+ if (rvalue->value.function.esym) -+ s2 = rvalue->value.function.esym->result; -+ else -+ s2 = rvalue->symtree->n.sym->result; -+ -+ name = s2->name; - } - else - { -Index: gcc/fortran/resolve.c -=================================================================== ---- gcc/fortran/resolve.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/fortran/resolve.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -3155,6 +3155,7 @@ - for (arg = expr->value.function.actual; arg; arg = arg->next) - { - if ((GENERIC_ID == GFC_ISYM_UBOUND || GENERIC_ID == GFC_ISYM_SIZE) -+ && arg == expr->value.function.actual - && arg->next != NULL && arg->next->expr) - { - if (arg->next->expr->expr_type != EXPR_CONSTANT) -Index: gcc/fortran/target-memory.c -=================================================================== ---- gcc/fortran/target-memory.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/fortran/target-memory.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -35,17 +35,7 @@ - /* --------------------------------------------------------------- */ - /* Calculate the size of an expression. */ - --static size_t --size_array (gfc_expr *e) --{ -- mpz_t array_size; -- gfc_constructor *c = gfc_constructor_first (e->value.constructor); -- size_t elt_size = gfc_target_expr_size (c->expr); - -- gfc_array_size (e, &array_size); -- return (size_t)mpz_get_ui (array_size) * elt_size; --} -- - static size_t - size_integer (int kind) - { -@@ -82,16 +72,14 @@ - } - - -+/* Return the size of a single element of the given expression. -+ Identical to gfc_target_expr_size for scalars. */ -+ - size_t --gfc_target_expr_size (gfc_expr *e) -+gfc_element_size (gfc_expr *e) - { - tree type; - -- gcc_assert (e != NULL); -- -- if (e->expr_type == EXPR_ARRAY) -- return size_array (e); -- - switch (e->ts.type) - { - case BT_INTEGER: -@@ -130,12 +118,36 @@ - return int_size_in_bytes (type); - } - default: -- gfc_internal_error ("Invalid expression in gfc_target_expr_size."); -+ gfc_internal_error ("Invalid expression in gfc_element_size."); - return 0; - } - } - - -+/* Return the size of an expression in its target representation. */ -+ -+size_t -+gfc_target_expr_size (gfc_expr *e) -+{ -+ mpz_t tmp; -+ size_t asz; -+ -+ gcc_assert (e != NULL); -+ -+ if (e->rank) -+ { -+ if (gfc_array_size (e, &tmp)) -+ asz = mpz_get_ui (tmp); -+ else -+ asz = 0; -+ } -+ else -+ asz = 1; -+ -+ return asz * gfc_element_size (e); -+} -+ -+ - /* The encode_* functions export a value into a buffer, and - return the number of bytes of the buffer that have been - used. */ -Index: gcc/fortran/target-memory.h -=================================================================== ---- gcc/fortran/target-memory.h (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/fortran/target-memory.h (.../branches/gcc-4_7-branch) (revision 198690) -@@ -25,7 +25,7 @@ - /* Convert a BOZ to REAL or COMPLEX. */ - bool gfc_convert_boz (gfc_expr *, gfc_typespec *); - --/* Return the size of an expression in its target representation. */ -+size_t gfc_element_size (gfc_expr *); - size_t gfc_target_expr_size (gfc_expr *); - - /* Write a constant expression in binary form to a target buffer. */ -Index: gcc/fortran/check.c -=================================================================== ---- gcc/fortran/check.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/fortran/check.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -3988,8 +3988,6 @@ - size_t *result_length_p) - { - size_t result_elt_size; -- mpz_t tmp; -- gfc_expr *mold_element; - - if (source->expr_type == EXPR_FUNCTION) - return FAILURE; -@@ -3998,20 +3996,12 @@ - return FAILURE; - - /* Calculate the size of the source. */ -- if (source->expr_type == EXPR_ARRAY -- && gfc_array_size (source, &tmp) == FAILURE) -- return FAILURE; -- - *source_size = gfc_target_expr_size (source); - if (*source_size == 0) - return FAILURE; - -- mold_element = mold->expr_type == EXPR_ARRAY -- ? gfc_constructor_first (mold->value.constructor)->expr -- : mold; -- - /* Determine the size of the element. */ -- result_elt_size = gfc_target_expr_size (mold_element); -+ result_elt_size = gfc_element_size (mold); - if (result_elt_size == 0) - return FAILURE; - -Index: gcc/fortran/intrinsic.texi -=================================================================== ---- gcc/fortran/intrinsic.texi (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/fortran/intrinsic.texi (.../branches/gcc-4_7-branch) (revision 198690) -@@ -9209,7 +9209,7 @@ - @item @emph{Arguments}: - @multitable @columnfractions .15 .70 - @item @var{X} @tab Shall be of type @code{REAL}. --@item @var{S} @tab (Optional) shall be of type @code{REAL} and -+@item @var{S} @tab Shall be of type @code{REAL} and - not equal to zero. - @end multitable - -Index: gcc/fortran/simplify.c -=================================================================== ---- gcc/fortran/simplify.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/fortran/simplify.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -32,7 +32,9 @@ - - gfc_expr gfc_bad_expr; - -+static gfc_expr *simplify_size (gfc_expr *, gfc_expr *, int); - -+ - /* Note that 'simplification' is not just transforming expressions. - For functions that are not simplified at compile time, range - checking is done if possible. -@@ -3240,7 +3242,7 @@ - gfc_expr* dim = result; - mpz_set_si (dim->value.integer, d); - -- result = gfc_simplify_size (array, dim, kind); -+ result = simplify_size (array, dim, k); - gfc_free_expr (dim); - if (!result) - goto returnNull; -@@ -5493,15 +5495,12 @@ - e = gfc_get_constant_expr (BT_INTEGER, k, &source->where); - - if (t == SUCCESS) -- { -- mpz_set (e->value.integer, shape[n]); -- mpz_clear (shape[n]); -- } -+ mpz_set (e->value.integer, shape[n]); - else - { - mpz_set_ui (e->value.integer, n + 1); - -- f = gfc_simplify_size (source, e, NULL); -+ f = simplify_size (source, e, k); - gfc_free_expr (e); - if (f == NULL) - { -@@ -5512,24 +5511,31 @@ - e = f; - } - -+ if (e == &gfc_bad_expr || range_check (e, "SHAPE") == &gfc_bad_expr) -+ { -+ gfc_free_expr (result); -+ if (t) -+ gfc_clear_shape (shape, source->rank); -+ return &gfc_bad_expr; -+ } -+ - gfc_constructor_append_expr (&result->value.constructor, e, NULL); - } - -+ if (t) -+ gfc_clear_shape (shape, source->rank); -+ - return result; - } - - --gfc_expr * --gfc_simplify_size (gfc_expr *array, gfc_expr *dim, gfc_expr *kind) -+static gfc_expr * -+simplify_size (gfc_expr *array, gfc_expr *dim, int k) - { - mpz_t size; - gfc_expr *return_value; - int d; -- int k = get_kind (BT_INTEGER, kind, "SIZE", gfc_default_integer_kind); - -- if (k == -1) -- return &gfc_bad_expr; -- - /* For unary operations, the size of the result is given by the size - of the operand. For binary ones, it's the size of the first operand - unless it is scalar, then it is the size of the second. */ -@@ -5558,7 +5564,7 @@ - replacement = array->value.op.op1; - else - { -- simplified = gfc_simplify_size (array->value.op.op1, dim, kind); -+ simplified = simplify_size (array->value.op.op1, dim, k); - if (simplified) - return simplified; - -@@ -5568,18 +5574,20 @@ - } - - /* Try to reduce it directly if possible. */ -- simplified = gfc_simplify_size (replacement, dim, kind); -+ simplified = simplify_size (replacement, dim, k); - - /* Otherwise, we build a new SIZE call. This is hopefully at least - simpler than the original one. */ - if (!simplified) -- simplified = gfc_build_intrinsic_call (gfc_current_ns, -- GFC_ISYM_SIZE, "size", -- array->where, 3, -- gfc_copy_expr (replacement), -- gfc_copy_expr (dim), -- gfc_copy_expr (kind)); -- -+ { -+ gfc_expr *kind = gfc_get_int_expr (gfc_default_integer_kind, NULL, k); -+ simplified = gfc_build_intrinsic_call (gfc_current_ns, -+ GFC_ISYM_SIZE, "size", -+ array->where, 3, -+ gfc_copy_expr (replacement), -+ gfc_copy_expr (dim), -+ kind); -+ } - return simplified; - } - -@@ -5598,13 +5606,32 @@ - return NULL; - } - -- return_value = gfc_get_int_expr (k, &array->where, mpz_get_si (size)); -+ return_value = gfc_get_constant_expr (BT_INTEGER, k, &array->where); -+ mpz_set (return_value->value.integer, size); - mpz_clear (size); -+ - return return_value; - } - - - gfc_expr * -+gfc_simplify_size (gfc_expr *array, gfc_expr *dim, gfc_expr *kind) -+{ -+ gfc_expr *result; -+ int k = get_kind (BT_INTEGER, kind, "SIZE", gfc_default_integer_kind); -+ -+ if (k == -1) -+ return &gfc_bad_expr; -+ -+ result = simplify_size (array, dim, k); -+ if (result == NULL || result == &gfc_bad_expr) -+ return result; -+ -+ return range_check (result, "SIZE"); -+} -+ -+ -+gfc_expr * - gfc_simplify_sign (gfc_expr *x, gfc_expr *y) - { - gfc_expr *result; -Index: gcc/cfgexpand.c -=================================================================== ---- gcc/cfgexpand.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/cfgexpand.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -3646,6 +3646,8 @@ - avoid_complex_debug_insns (rtx insn, rtx *exp_p, int depth) - { - rtx exp = *exp_p; -+ const char *format_ptr; -+ int i, j; - - if (exp == NULL_RTX) - return; -@@ -3668,8 +3670,7 @@ - return; - } - -- const char *format_ptr = GET_RTX_FORMAT (GET_CODE (exp)); -- int i, j; -+ format_ptr = GET_RTX_FORMAT (GET_CODE (exp)); - for (i = 0; i < GET_RTX_LENGTH (GET_CODE (exp)); i++) - switch (*format_ptr++) - { -Index: gcc/sched-deps.c -=================================================================== ---- gcc/sched-deps.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/sched-deps.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -1563,24 +1563,15 @@ - add_dependence_list_and_free (struct deps_desc *deps, rtx insn, rtx *listp, - int uncond, enum reg_note dep_type) - { -- rtx list, next; -+ add_dependence_list (insn, *listp, uncond, dep_type); - - /* We don't want to short-circuit dependencies involving debug - insns, because they may cause actual dependencies to be - disregarded. */ - if (deps->readonly || DEBUG_INSN_P (insn)) -- { -- add_dependence_list (insn, *listp, uncond, dep_type); -- return; -- } -+ return; - -- for (list = *listp, *listp = NULL; list ; list = next) -- { -- next = XEXP (list, 1); -- if (uncond || ! sched_insns_conditions_mutex_p (insn, XEXP (list, 0))) -- add_dependence (insn, XEXP (list, 0), dep_type); -- free_INSN_LIST_node (list); -- } -+ free_INSN_LIST_list (listp); - } - - /* Remove all occurences of INSN from LIST. Return the number of -@@ -1764,6 +1755,15 @@ - add_dependence_list_and_free (deps, insn, &deps->pending_jump_insns, 1, - REG_DEP_ANTI); - -+ if (DEBUG_INSN_P (insn)) -+ { -+ if (for_write) -+ free_INSN_LIST_list (&deps->pending_read_insns); -+ free_INSN_LIST_list (&deps->pending_write_insns); -+ free_INSN_LIST_list (&deps->last_pending_memory_flush); -+ free_INSN_LIST_list (&deps->pending_jump_insns); -+ } -+ - if (!deps->readonly) - { - free_EXPR_LIST_list (&deps->pending_write_mems); -@@ -3262,9 +3262,9 @@ - SET_REGNO_REG_SET (&deps->reg_last_in_use, i); - } - -- /* Flush pending lists on jumps, but not on speculative checks. */ -- if (JUMP_P (insn) && !(sel_sched_p () -- && sel_insn_is_speculation_check (insn))) -+ /* Don't flush pending lists on speculative checks for -+ selective scheduling. */ -+ if (!sel_sched_p () || !sel_insn_is_speculation_check (insn)) - flush_pending_lists (deps, insn, true, true); - - reg_pending_barrier = NOT_A_BARRIER; -Index: gcc/config/sparc/sparc.c -=================================================================== ---- gcc/config/sparc/sparc.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/config/sparc/sparc.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -4207,13 +4207,14 @@ - mapped into one sparc_mode_class mode. */ - - enum sparc_mode_class { -- S_MODE, D_MODE, T_MODE, O_MODE, -+ H_MODE, S_MODE, D_MODE, T_MODE, O_MODE, - SF_MODE, DF_MODE, TF_MODE, OF_MODE, - CC_MODE, CCFP_MODE - }; - - /* Modes for single-word and smaller quantities. */ --#define S_MODES ((1 << (int) S_MODE) | (1 << (int) SF_MODE)) -+#define S_MODES \ -+ ((1 << (int) H_MODE) | (1 << (int) S_MODE) | (1 << (int) SF_MODE)) - - /* Modes for double-word and smaller quantities. */ - #define D_MODES (S_MODES | (1 << (int) D_MODE) | (1 << DF_MODE)) -@@ -4224,13 +4225,11 @@ - /* Modes for 8-word and smaller quantities. */ - #define O_MODES (T_MODES | (1 << (int) O_MODE) | (1 << (int) OF_MODE)) - --/* Modes for single-float quantities. We must allow any single word or -- smaller quantity. This is because the fix/float conversion instructions -- take integer inputs/outputs from the float registers. */ --#define SF_MODES (S_MODES) -+/* Modes for single-float quantities. */ -+#define SF_MODES ((1 << (int) S_MODE) | (1 << (int) SF_MODE)) - - /* Modes for double-float and smaller quantities. */ --#define DF_MODES (D_MODES) -+#define DF_MODES (SF_MODES | (1 << (int) D_MODE) | (1 << DF_MODE)) - - /* Modes for quad-float and smaller quantities. */ - #define TF_MODES (DF_MODES | (1 << (int) TF_MODE)) -@@ -4326,7 +4325,9 @@ - case MODE_INT: - case MODE_PARTIAL_INT: - case MODE_COMPLEX_INT: -- if (GET_MODE_SIZE (i) <= 4) -+ if (GET_MODE_SIZE (i) < 4) -+ sparc_mode_class[i] = 1 << (int) H_MODE; -+ else if (GET_MODE_SIZE (i) == 4) - sparc_mode_class[i] = 1 << (int) S_MODE; - else if (GET_MODE_SIZE (i) == 8) - sparc_mode_class[i] = 1 << (int) D_MODE; -@@ -4338,14 +4339,16 @@ - sparc_mode_class[i] = 0; - break; - case MODE_VECTOR_INT: -- if (GET_MODE_SIZE (i) <= 4) -- sparc_mode_class[i] = 1 << (int)SF_MODE; -+ if (GET_MODE_SIZE (i) == 4) -+ sparc_mode_class[i] = 1 << (int) SF_MODE; - else if (GET_MODE_SIZE (i) == 8) -- sparc_mode_class[i] = 1 << (int)DF_MODE; -+ sparc_mode_class[i] = 1 << (int) DF_MODE; -+ else -+ sparc_mode_class[i] = 0; - break; - case MODE_FLOAT: - case MODE_COMPLEX_FLOAT: -- if (GET_MODE_SIZE (i) <= 4) -+ if (GET_MODE_SIZE (i) == 4) - sparc_mode_class[i] = 1 << (int) SF_MODE; - else if (GET_MODE_SIZE (i) == 8) - sparc_mode_class[i] = 1 << (int) DF_MODE; -Index: gcc/config/i386/i386.md -=================================================================== ---- gcc/config/i386/i386.md (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/config/i386/i386.md (.../branches/gcc-4_7-branch) (revision 198690) -@@ -3444,9 +3444,9 @@ - }) - - (define_insn "*zero_extendsidi2_rex64" -- [(set (match_operand:DI 0 "nonimmediate_operand" "=r,o,?*Ym,?*y,?*Yi,*x") -+ [(set (match_operand:DI 0 "nonimmediate_operand" "=r,o,?*Ym,?!*y,?*Yi,*x") - (zero_extend:DI -- (match_operand:SI 1 "nonimmediate_operand" "rm,0,r ,m ,r ,m")))] -+ (match_operand:SI 1 "nonimmediate_operand" "rm,0,r ,m ,r ,m")))] - "TARGET_64BIT" - "@ - mov{l}\t{%1, %k0|%k0, %1} -@@ -3469,9 +3469,9 @@ - - ;; %%% Kill me once multi-word ops are sane. - (define_insn "zero_extendsidi2_1" -- [(set (match_operand:DI 0 "nonimmediate_operand" "=r,?r,?o,?*Ym,?*y,?*Yi,*x") -+ [(set (match_operand:DI 0 "nonimmediate_operand" "=r,?r,?o,?*Ym,?!*y,?*Yi,*x") - (zero_extend:DI -- (match_operand:SI 1 "nonimmediate_operand" "0,rm,r ,r ,m ,r ,m"))) -+ (match_operand:SI 1 "nonimmediate_operand" "0,rm,r ,r ,m ,r ,m"))) - (clobber (reg:CC FLAGS_REG))] - "!TARGET_64BIT" - "@ -Index: gcc/config/i386/sse.md -=================================================================== ---- gcc/config/i386/sse.md (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/config/i386/sse.md (.../branches/gcc-4_7-branch) (revision 198690) -@@ -11167,7 +11167,8 @@ - (match_operand:SI 2 "const_0_to__operand" "n")))] - "TARGET_XOP" - { -- operands[3] = GEN_INT (( * 8) - INTVAL (operands[2])); -+ operands[3] -+ = GEN_INT (GET_MODE_BITSIZE (mode) - INTVAL (operands[2])); - return \"vprot\t{%3, %1, %0|%0, %1, %3}\"; - } - [(set_attr "type" "sseishft") -Index: gcc/config/i386/i386.c -=================================================================== ---- gcc/config/i386/i386.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/config/i386/i386.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -20026,7 +20026,7 @@ - vec[i * 2 + 1] = const1_rtx; - } - vt = gen_rtx_CONST_VECTOR (maskmode, gen_rtvec_v (w, vec)); -- vt = force_const_mem (maskmode, vt); -+ vt = validize_mem (force_const_mem (maskmode, vt)); - t1 = expand_simple_binop (maskmode, PLUS, t1, vt, t1, 1, - OPTAB_DIRECT); - -@@ -20223,7 +20223,7 @@ - for (i = 0; i < 16; ++i) - vec[i] = GEN_INT (i/e * e); - vt = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, vec)); -- vt = force_const_mem (V16QImode, vt); -+ vt = validize_mem (force_const_mem (V16QImode, vt)); - if (TARGET_XOP) - emit_insn (gen_xop_pperm (mask, mask, mask, vt)); - else -@@ -20234,7 +20234,7 @@ - for (i = 0; i < 16; ++i) - vec[i] = GEN_INT (i % e); - vt = gen_rtx_CONST_VECTOR (V16QImode, gen_rtvec_v (16, vec)); -- vt = force_const_mem (V16QImode, vt); -+ vt = validize_mem (force_const_mem (V16QImode, vt)); - emit_insn (gen_addv16qi3 (mask, mask, vt)); - } - -Index: gcc/config/sh/sh.md -=================================================================== ---- gcc/config/sh/sh.md (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/config/sh/sh.md (.../branches/gcc-4_7-branch) (revision 198690) -@@ -654,7 +654,7 @@ - - (define_insn "tstsi_t_zero_extract_eq" - [(set (reg:SI T_REG) -- (eq:SI (zero_extract:SI (match_operand 0 "logical_operand" "z") -+ (eq:SI (zero_extract:SI (match_operand:SI 0 "logical_operand" "z") - (match_operand:SI 1 "const_int_operand") - (match_operand:SI 2 "const_int_operand")) - (const_int 0)))] -Index: gcc/config/darwin.h -=================================================================== ---- gcc/config/darwin.h (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/config/darwin.h (.../branches/gcc-4_7-branch) (revision 198690) -@@ -356,7 +356,9 @@ - %{!Zbundle:%{pg:%{static:-lgcrt0.o} \ - %{!static:%{object:-lgcrt0.o} \ - %{!object:%{preload:-lgcrt0.o} \ -- %{!preload:-lgcrt1.o %(darwin_crt2)}}}} \ -+ %{!preload:-lgcrt1.o \ -+ %:version-compare(>= 10.8 mmacosx-version-min= -no_new_main) \ -+ %(darwin_crt2)}}}} \ - %{!pg:%{static:-lcrt0.o} \ - %{!static:%{object:-lcrt0.o} \ - %{!object:%{preload:-lcrt0.o} \ -@@ -379,7 +381,7 @@ - #define DARWIN_CRT1_SPEC \ - "%:version-compare(!> 10.5 mmacosx-version-min= -lcrt1.o) \ - %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lcrt1.10.5.o) \ -- %:version-compare(>= 10.6 mmacosx-version-min= -lcrt1.10.6.o) \ -+ %:version-compare(>< 10.6 10.8 mmacosx-version-min= -lcrt1.10.6.o) \ - %{fgnu-tm: -lcrttms.o}" - - /* Default Darwin ASM_SPEC, very simple. */ -@@ -414,6 +416,8 @@ - - #define TARGET_WANT_DEBUG_PUB_SECTIONS true - -+#define TARGET_FORCE_AT_COMP_DIR true -+ - /* When generating stabs debugging, use N_BINCL entries. */ - - #define DBX_USE_BINCL -Index: gcc/config/pa/pa.c -=================================================================== ---- gcc/config/pa/pa.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ gcc/config/pa/pa.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -790,7 +790,9 @@ - /* Extract CODE_LABEL. */ - orig = XEXP (orig, 0); - add_reg_note (insn, REG_LABEL_OPERAND, orig); -- LABEL_NUSES (orig)++; -+ /* Make sure we have label and not a note. */ -+ if (LABEL_P (orig)) -+ LABEL_NUSES (orig)++; - } - crtl->uses_pic_offset_table = 1; - return reg; -Index: libgfortran/ChangeLog -=================================================================== ---- libgfortran/ChangeLog (.../tags/gcc_4_7_3_release) (revision 198690) -+++ libgfortran/ChangeLog (.../branches/gcc-4_7-branch) (revision 198690) -@@ -1,3 +1,38 @@ -+2013-04-28 Jerry DeLisle -+ -+ Backport from mainline: -+ 2013-03-20 Tilo Schwarz -+ -+ PR libfortran/51825 -+ * io/list_read.c (nml_read_obj): Don't end the component loop on a -+ nested derived type, but continue with the next loop iteration. -+ (nml_get_obj_data): Don't move the first_nl pointer further in the -+ list if a qualifier was found. -+ -+2013-04-28 Jerry DeLisle -+ -+ Backport from mainline: -+ -+ PR libfortran/56786 -+ * io/list_read.c (nml_parse_qualifier): Remove spurious next_char call -+ when checking for EOF. Use error return mechanism when EOF detected. -+ Do not return FAILURE unless parse_err_msg and parse_err_msg_size have -+ been set. Use hit_eof. -+ (nml_get_obj_data): Likewise use the correct error mechanism. -+ * io/transfer.c (hit_eof): Do not set AFTER_ENDFILE if in namelist -+ mode. -+ -+2013-04-28 Jerry DeLisle -+ -+ Backport from mainline: -+ 2013-03-25 Tilo Schwarz -+ -+ PR libfortran/52512 -+ * io/list_read.c (nml_parse_qualifier): To check for a derived type -+ don't use the namelist head element type but the current element type. -+ (nml_get_obj_data): Add current namelist element type to -+ nml_parse_qualifier call. -+ - 2013-04-11 Release Manager - - * GCC 4.7.3 released. -Index: libgfortran/io/list_read.c -=================================================================== ---- libgfortran/io/list_read.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ libgfortran/io/list_read.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -2028,8 +2028,8 @@ - - static try - nml_parse_qualifier (st_parameter_dt *dtp, descriptor_dimension *ad, -- array_loop_spec *ls, int rank, char *parse_err_msg, -- size_t parse_err_msg_size, -+ array_loop_spec *ls, int rank, bt nml_elem_type, -+ char *parse_err_msg, size_t parse_err_msg_size, - int *parsed_rank) - { - int dim; -@@ -2053,7 +2053,7 @@ - /* The next character in the stream should be the '('. */ - - if ((c = next_char (dtp)) == EOF) -- return FAILURE; -+ goto err_ret; - - /* Process the qualifier, by dimension and triplet. */ - -@@ -2067,7 +2067,7 @@ - - /* Process a potential sign. */ - if ((c = next_char (dtp)) == EOF) -- return FAILURE; -+ goto err_ret; - switch (c) - { - case '-': -@@ -2085,11 +2085,12 @@ - /* Process characters up to the next ':' , ',' or ')'. */ - for (;;) - { -- if ((c = next_char (dtp)) == EOF) -- return FAILURE; -- -+ c = next_char (dtp); - switch (c) - { -+ case EOF: -+ goto err_ret; -+ - case ':': - is_array_section = 1; - break; -@@ -2112,10 +2113,8 @@ - push_char (dtp, c); - continue; - -- case ' ': case '\t': -+ case ' ': case '\t': case '\r': case '\n': - eat_spaces (dtp); -- if ((c = next_char (dtp) == EOF)) -- return FAILURE; - break; - - default: -@@ -2204,7 +2203,7 @@ - do not allow excess data to be processed. */ - if (is_array_section == 1 - || !(compile_options.allow_std & GFC_STD_GNU) -- || dtp->u.p.ionml->type == BT_DERIVED) -+ || nml_elem_type == BT_DERIVED) - ls[dim].end = ls[dim].start; - else - dtp->u.p.expanded_read = 1; -@@ -2257,6 +2256,15 @@ - - err_ret: - -+ /* The EOF error message is issued by hit_eof. Return true so that the -+ caller does not use parse_err_msg and parse_err_msg_size to generate -+ an unrelated error message. */ -+ if (c == EOF) -+ { -+ hit_eof (dtp); -+ dtp->u.p.input_complete = 1; -+ return SUCCESS; -+ } - return FAILURE; - } - -@@ -2553,17 +2561,17 @@ - since a single object can have multiple reads. */ - dtp->u.p.expanded_read = 0; - -- /* Now loop over the components. Update the component pointer -- with the return value from nml_write_obj. This loop jumps -- past nested derived types by testing if the potential -- component name contains '%'. */ -+ /* Now loop over the components. */ - - for (cmp = nl->next; - cmp && -- !strncmp (cmp->var_name, obj_name, obj_name_len) && -- !strchr (cmp->var_name + obj_name_len, '%'); -+ !strncmp (cmp->var_name, obj_name, obj_name_len); - cmp = cmp->next) - { -+ /* Jump over nested derived type by testing if the potential -+ component name contains '%'. */ -+ if (strchr (cmp->var_name + obj_name_len, '%')) -+ continue; - - if (nml_read_obj (dtp, cmp, (index_type)(pdata - nl->mem_pos), - pprev_nl, nml_err_msg, nml_err_msg_size, -@@ -2726,12 +2734,12 @@ - return SUCCESS; - - if ((c = next_char (dtp)) == EOF) -- return FAILURE; -+ goto nml_err_ret; - switch (c) - { - case '=': - if ((c = next_char (dtp)) == EOF) -- return FAILURE; -+ goto nml_err_ret; - if (c != '?') - { - snprintf (nml_err_msg, nml_err_msg_size, -@@ -2781,8 +2789,9 @@ - if (!is_separator (c)) - push_char (dtp, tolower(c)); - if ((c = next_char (dtp)) == EOF) -- return FAILURE; -- } while (!( c=='=' || c==' ' || c=='\t' || c =='(' || c =='%' )); -+ goto nml_err_ret; -+ } -+ while (!( c=='=' || c==' ' || c=='\t' || c =='(' || c =='%' )); - - unget_char (dtp, c); - -@@ -2842,7 +2851,7 @@ - { - parsed_rank = 0; - if (nml_parse_qualifier (dtp, nl->dim, nl->ls, nl->var_rank, -- nml_err_msg, nml_err_msg_size, -+ nl->type, nml_err_msg, nml_err_msg_size, - &parsed_rank) == FAILURE) - { - char *nml_err_msg_end = strchr (nml_err_msg, '\0'); -@@ -2857,7 +2866,7 @@ - qualifier_flag = 1; - - if ((c = next_char (dtp)) == EOF) -- return FAILURE; -+ goto nml_err_ret; - unget_char (dtp, c); - } - else if (nl->var_rank > 0) -@@ -2876,14 +2885,15 @@ - goto nml_err_ret; - } - -- if (*pprev_nl == NULL || !component_flag) -+ /* Don't move first_nl further in the list if a qualifier was found. */ -+ if ((*pprev_nl == NULL && !qualifier_flag) || !component_flag) - first_nl = nl; - - root_nl = nl; - - component_flag = 1; - if ((c = next_char (dtp)) == EOF) -- return FAILURE; -+ goto nml_err_ret; - goto get_name; - } - -@@ -2898,8 +2908,8 @@ - descriptor_dimension chd[1] = { {1, clow, nl->string_length} }; - array_loop_spec ind[1] = { {1, clow, nl->string_length, 1} }; - -- if (nml_parse_qualifier (dtp, chd, ind, -1, nml_err_msg, -- nml_err_msg_size, &parsed_rank) -+ if (nml_parse_qualifier (dtp, chd, ind, -1, nl->type, -+ nml_err_msg, nml_err_msg_size, &parsed_rank) - == FAILURE) - { - char *nml_err_msg_end = strchr (nml_err_msg, '\0'); -@@ -2921,7 +2931,7 @@ - } - - if ((c = next_char (dtp)) == EOF) -- return FAILURE; -+ goto nml_err_ret; - unget_char (dtp, c); - } - -@@ -2961,7 +2971,7 @@ - return SUCCESS; - - if ((c = next_char (dtp)) == EOF) -- return FAILURE; -+ goto nml_err_ret; - - if (c != '=') - { -@@ -2996,6 +3006,17 @@ - - nml_err_ret: - -+ /* The EOF error message is issued by hit_eof. Return true so that the -+ caller does not use nml_err_msg and nml_err_msg_size to generate -+ an unrelated error message. */ -+ if (c == EOF) -+ { -+ dtp->u.p.input_complete = 1; -+ unget_char (dtp, c); -+ hit_eof (dtp); -+ return SUCCESS; -+ } -+ - return FAILURE; - } - -Index: libgfortran/io/transfer.c -=================================================================== ---- libgfortran/io/transfer.c (.../tags/gcc_4_7_3_release) (revision 198690) -+++ libgfortran/io/transfer.c (.../branches/gcc-4_7-branch) (revision 198690) -@@ -3748,7 +3748,7 @@ - case NO_ENDFILE: - case AT_ENDFILE: - generate_error (&dtp->common, LIBERROR_END, NULL); -- if (!is_internal_unit (dtp)) -+ if (!is_internal_unit (dtp) && !dtp->u.p.namelist_mode) - { - dtp->u.p.current_unit->endfile = AFTER_ENDFILE; - dtp->u.p.current_unit->current_record = 0; diff --git a/gcc-cloog.patch b/gcc-cloog.patch index 0f3f39c..a14f471 100644 --- a/gcc-cloog.patch +++ b/gcc-cloog.patch @@ -17,10 +17,10 @@ main () { #if CLOOG_VERSION_MAJOR != 0 \ -- || CLOOG_VERSION_MINOR != 16 \ -- || CLOOG_VERSION_REVISION < 1 -+ || CLOOG_VERSION_MINOR < 16 \ -+ || (CLOOG_VERSION_MINOR == 16 && CLOOG_VERSION_REVISION < 1) +- || CLOOG_VERSION_MINOR != 17 \ +- || CLOOG_VERSION_REVISION < 0 ++ || CLOOG_VERSION_MINOR < 17 \ ++ || (CLOOG_VERSION_MINOR == 17 && CLOOG_VERSION_REVISION < 0) choke me #endif ; diff --git a/gcc-info.patch b/gcc-info.patch index b848a13..e5db5bc 100644 --- a/gcc-info.patch +++ b/gcc-info.patch @@ -37,11 +37,12 @@ @direntry -* gcc: (gcc). The GNU Compiler Collection. -* g++: (gcc). The GNU C++ compiler. +-* gcov: (gcc) Gcov. @command{gcov}---a test coverage program. +* gcc: (gcc). The GNU Compiler Collection +* g++: (gcc). The GNU C++ compiler ++* gcov: (gcc) Gcov. @command{gcov}---a test coverage program @end direntry This file documents the use of the GNU compilers. - @sp 1 --- a/gcc/doc/gccint.texi 2004-05-24 00:54:29.000000000 +0200 +++ b/gcc/doc/gccint.texi 2004-09-26 10:58:58.222712920 +0200 @@ -46,9 +46,9 @@ @@ -73,9 +74,9 @@ --- a/gcc/ada/gnat_ugn.texi 2005-12-06 23:45:52.983574000 +0100 +++ b/gcc/ada/gnat_ugn.texi 2005-12-11 02:35:45.580878360 +0100 @@ -109,9 +109,9 @@ - @end macro - @settitle @value{EDITION} User's Guide @value{PLATFORM} + + @settitle @value{EDITION} User's Guide @value{TITLESUFFIX} -@dircategory GNU Ada tools +@dircategory Programming Languages: @direntry @@ -133,11 +134,11 @@ +* jcf-dump: (gcj)jcf-dump. Print information about Java class files +* gij: (gcj)gij. GNU interpreter for Java bytecode +* jv-convert: (gcj)jv-convert. Convert file from one encoding to another -+* gcj-dbtool: (gcj)gcj-dbtool. Db tool. -+* grmic: (gcj)grmic. Generate stubs for Remote Method Invocation. -+* gc-analyze: (gcj)gc-analyze. Analyze Garbage Collector (GC) memory dumps. -+* aot-compile: Compile bytecode to native and generate databases. -+* rebuild-gcj-db: Merge the per-solib databases made by aot-compile into one system-wide database. ++* gcj-dbtool: (gcj)gcj-dbtool. Db tool ++* grmic: (gcj)grmic. Generate stubs for Remote Method Invocation ++* gc-analyze: (gcj)gc-analyze. Analyze Garbage Collector (GC) memory dumps ++* aot-compile: (gcj)aot-compile. Compile bytecode to native and generate databases ++* rebuild-gcj-db: (gcj)rebuild-gcj-db. Merge the per-solib databases made by aot-compile into one system-wide database @end direntry @end format @@ -317,3 +318,59 @@ @end direntry @end format +--- gcc-4.8.2/libjava/classpath/doc/cp-tools.texinfo.orig 2013-02-21 10:40:44.000000000 +0100 ++++ gcc-4.8.2/libjava/classpath/doc/cp-tools.texinfo 2014-04-21 08:05:30.116078643 +0200 +@@ -35,9 +35,9 @@ + @ifnotplaintext + @setchapternewpage on + +-@dircategory GNU Libraries ++@dircategory Libraries: + @direntry +-* Classpath Tools: (cp-tools). GNU Classpath Tools Guide ++* Classpath Tools: (cp-tools). GNU Classpath Tools Guide + @end direntry + @end ifnotplaintext + @end ifinfo +--- gcc-4.8.2/libgomp/libgomp.texi.orig 2013-01-14 19:18:49.000000000 +0100 ++++ gcc-4.8.2/libgomp/libgomp.texi 2014-04-21 08:06:10.259411139 +0200 +@@ -29,9 +29,9 @@ + @end copying + + @ifinfo +-@dircategory GNU Libraries ++@dircategory Libraries: + @direntry +-* libgomp: (libgomp). GNU OpenMP runtime library ++* libgomp: (libgomp). GNU OpenMP runtime library + @end direntry + + This manual documents the GNU implementation of the OpenMP API for +--- gcc-4.8.2/libitm/libitm.texi.orig 2013-02-03 18:46:11.000000000 +0100 ++++ gcc-4.8.2/libitm/libitm.texi 2014-04-21 08:06:38.919410542 +0200 +@@ -18,9 +18,9 @@ + @end copying + + @ifinfo +-@dircategory GNU Libraries ++@dircategory Libraries: + @direntry +-* libitm: (libitm). GNU Transactional Memory Library ++* libitm: (libitm). GNU Transactional Memory Library + @end direntry + + This manual documents the GNU Transactional Memory Library. +--- gcc-4.8.2/libquadmath/libquadmath.texi.orig 2013-01-22 09:23:32.000000000 +0100 ++++ gcc-4.8.2/libquadmath/libquadmath.texi 2014-04-21 08:07:12.262743180 +0200 +@@ -23,9 +23,9 @@ + @end copying + + @ifinfo +-@dircategory GNU Libraries ++@dircategory Libraries: + @direntry +-* libquadmath: (libquadmath). GCC Quad-Precision Math Library ++* libquadmath: (libquadmath). GCC Quad-Precision Math Library + @end direntry + + This manual documents the GCC Quad-Precision Math Library API. diff --git a/gcc-install-libffi.patch b/gcc-install-libffi.patch new file mode 100644 index 0000000..0fb9d8c --- /dev/null +++ b/gcc-install-libffi.patch @@ -0,0 +1,49 @@ +Index: Makefile.in +=================================================================== +--- Makefile.in (.../tags/gcc_4_8_0_release) (revision 199208) ++++ Makefile.in (.../branches/gcc-4_8-branch) (revision 199208) +@@ -38710,8 +38710,13 @@ + @if target-libffi + maybe-install-target-libffi: install-target-libffi + +-# Dummy target for uninstallable. +-install-target-libffi: ++install-target-libffi: installdirs ++ @: $(MAKE); $(unstage) ++ @r=`${PWD_COMMAND}`; export r; \ ++ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ ++ $(NORMAL_TARGET_EXPORTS) \ ++ (cd $(TARGET_SUBDIR)/libffi && \ ++ $(MAKE) $(TARGET_FLAGS_TO_PASS) install) + + @endif target-libffi + +@@ -38725,8 +38720,13 @@ + @if target-libffi + maybe-install-strip-target-libffi: install-strip-target-libffi + +-# Dummy target for uninstallable. +-install-strip-target-libffi: ++install-strip-target-libffi: installdirs ++ @: $(MAKE); $(unstage) ++ @r=`${PWD_COMMAND}`; export r; \ ++ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ ++ $(NORMAL_TARGET_EXPORTS) \ ++ (cd $(TARGET_SUBDIR)/libffi && \ ++ $(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip) + + @endif target-libffi + +Index: Makefile.def +=================================================================== +--- Makefile.def (.../tags/gcc_4_8_0_release) (revision 199208) ++++ Makefile.def (.../branches/gcc-4_8-branch) (revision 199208) +@@ -138,7 +138,7 @@ + missing=maintainer-clean; }; + target_modules = { module= winsup; }; + target_modules = { module= libgloss; no_check=true; }; +-target_modules = { module= libffi; no_install=true; }; ++target_modules = { module= libffi; }; + target_modules = { module= libjava; raw_cxx=true; + extra_configure_flags="$(EXTRA_CONFIGARGS_LIBJAVA)"; }; + target_modules = { module= zlib; }; diff --git a/gcc.spec b/gcc.spec index 6d17bc8..d8c45e0 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,4 +1,4 @@ -# NOTE: despite lower soname, libffi is newer than standalone 3.0.9 +# NOTE: despite lower soname, libffi is newer than standalone 3.0.10 # # TODO: # - gconf peer? (but libgcj needs split anyway) @@ -16,13 +16,16 @@ %bcond_without objc # build without Objective-C support %bcond_without objcxx # build without Objective-C++ support # - features: -%bcond_with cloogpplleg # use cloog-ppl-legacy (0.15.x) backend (instead of cloog-isl) -%bcond_with cloogppl # use cloog-ppl 0.16.1 backend (instead of cloog-isl) %bcond_without gomp # build without OpenMP support %bcond_without mudflap # build without Mudflap pointer debugging support %bcond_without multilib # build without multilib support (it needs glibc[32&64]-devel) %bcond_without profiling # build without profiling %bcond_without python # build without libstdc++ printers for gdb and aot-compile for java +%bcond_without asan # build without Address Sanitizer library +%bcond_without tsan # build without Thread Sanitizer library +%bcond_without atomic # build without library for atomic operations not supported by hardware +%bcond_without gcc_libffi # packaging gcc libffi for system usage + # note: libgcj and libgo always have convenience gcc libffi linked in # - libgcj options: %bcond_without alsa # don't build libgcj ALSA MIDI interface %bcond_without dssi # don't build libgcj DSSI MIDI interface @@ -42,12 +45,13 @@ %define cxx_sover 6 %endif +# go, java and objcxx require C++ %if %{without cxx} %undefine with_go %undefine with_java %undefine with_objcxx %endif - +# objcxx requires objc %if %{without objc} %undefine with_objcxx %endif @@ -65,22 +69,24 @@ %undefine with_multilib %endif -%if %{with cloogppl} -%define cloog_backend ppl -%else -%if %{with cloogpplleg} -%define cloog_backend ppl-legacy -%else -%define cloog_backend isl +%ifnarch %{ix86} %{x8664} +%undefine with_atomic %endif + +%ifnarch %{ix86} %{x8664} +%undefine with_asan %endif -%define major_ver 4.7 +%ifnarch %{x8664} +%undefine with_tsan +%endif + +%define major_ver 4.8 %define minor_ver 3 %define major_ecj_ver 4.5 # class data version seen with file(1) that this jvm is able to load %define _classdataversion 50.0 -%define gcj_soname_ver 13 +%define gcj_soname_ver 14 Summary: GNU Compiler Collection: the C compiler and shared files Summary(es.UTF-8): Colección de compiladores GNU: el compilador C y ficheros compartidos @@ -88,26 +94,26 @@ Summary(pl.UTF-8): Kolekcja kompilatorów GNU: kompilator C i pliki współdziel Summary(pt_BR.UTF-8): Coleção dos compiladores GNU: o compilador C e arquivos compartilhados Name: gcc Version: %{major_ver}.%{minor_ver} -Release: 3 +Release: 1 Epoch: 6 License: GPL v3+ Group: Development/Languages Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/%{name}-%{version}.tar.bz2 -# Source0-md5: 86f428a30379bdee0224e353ee2f999e +# Source0-md5: 7c60f24fab389f77af203d2516ee110f Source1: %{name}-optimize-la.pl Source2: ftp://sourceware.org/pub/java/ecj-%{major_ecj_ver}.jar # Source2-md5: d7cd6a27c8801e66cbaa964a039ecfdb # check libffi version with libffi/configure.ac Source3: libffi.pc.in -# svn diff -x --ignore-eol-style --force svn://gcc.gnu.org/svn/gcc/tags/gcc_4_7_3_release svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch > gcc-branch.diff -Patch100: %{name}-branch.diff +# For creating branch.diff please run: +# svn diff -x --ignore-eol-style --force svn://gcc.gnu.org/svn/gcc/tags/gcc_4_8_3_release svn://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch > gcc-branch.diff Patch0: %{name}-info.patch Patch1: %{name}-cloog.patch Patch2: %{name}-nodebug.patch Patch3: %{name}-ada-link.patch -Patch7: %{name}-libjava-multilib.patch -Patch8: %{name}-enable-java-awt-qt.patch -Patch13: issue4664051.patch +Patch4: %{name}-libjava-multilib.patch +Patch5: %{name}-enable-java-awt-qt.patch +Patch6: %{name}-install-libffi.patch URL: http://gcc.gnu.org/ BuildRequires: autoconf >= 2.64 %{?with_tests:BuildRequires: autogen} @@ -116,16 +122,8 @@ BuildRequires: automake >= 1:1.9.3 BuildRequires: binutils >= 3:2.17.50.0.9-1 BuildRequires: bison BuildRequires: chrpath >= 0.13-2 -%if %{with cloogppl} -BuildRequires: cloog-ppl-devel >= 0.16.1 -%else -%if %{with cloogpplleg} -BuildRequires: cloog-ppl-devel >= 0.15.9 -BuildRequires: cloog-ppl-devel < 0.16 -%else -BuildRequires: cloog-isl-devel >= 0.16.1 -%endif -%endif +BuildRequires: cloog-isl-devel >= 0.17.0 +BuildRequires: cloog-isl-devel < 0.19 %{?with_tests:BuildRequires: dejagnu} BuildRequires: elfutils-devel >= 0.145-1 BuildRequires: fileutils >= 4.0.41 @@ -142,8 +140,10 @@ BuildRequires: gcc(multilib) BuildRequires: glibc-devel(ix86) %endif %endif -BuildRequires: gmp-devel >= 4.1 BuildRequires: gmp-c++-devel >= 4.1 +BuildRequires: gmp-devel >= 4.1 +BuildRequires: isl-devel >= 0.10 +BuildRequires: isl-devel < 0.13 BuildRequires: libmpc-devel BuildRequires: mpfr-devel >= 2.3.0 BuildRequires: ppl-devel >= 0.11 @@ -183,7 +183,7 @@ BuildRequires: qt4-build >= 4.0.1 %{?with_mozilla:BuildRequires: xulrunner-devel >= 1.8.1.3-1.20070321.5} %endif BuildConflicts: pdksh < 5.2.14-50 -Requires: binutils >= 3:2.20.51.0.2 +Requires: binutils >= 3:2.23 Requires: libgcc = %{epoch}:%{version}-%{release} Provides: cpp = %{epoch}:%{version}-%{release} %{?with_ada:Provides: gcc(ada)} @@ -804,6 +804,9 @@ Statyczna biblioteka standardowa C++ - wersja 32-bitowa. Summary: C++ standard library API documentation Summary(pl.UTF-8): Dokumentacja API biblioteki standardowej C++ Group: Documentation +%if "%{_rpmversion}" >= "5" +BuildArch: noarch +%endif %description -n libstdc++-apidocs API and internal documentation for C++ standard library. @@ -1465,20 +1468,216 @@ Static Go language library - 32-bit version. %description -n libgo-multilib-static -l pl.UTF-8 Statyczna biblioteka języka Go - wersja 32-bitowa. +%package -n libasan +Summary: The Address Sanitizer library +Summary(pl.UTF-8): Biblioteka Address Sanitizer do kontroli adresów +Group: Libraries + +%description -n libasan +This package contains the Address Sanitizer library which is used for +-fsanitize=address instrumented programs. + +%description -n libasan -l pl.UTF-8 +Ten pakiet zawiera bibliotekę Address Sanitizer, służącą do +kontroli adresów w programach kompilowanych z opcją +-fsanitize=address. + +%package -n libasan-multilib +Summary: The Address Sanitizer library - 32-bit version +Summary(pl.UTF-8): Biblioteka Address Sanitizer do kontroli adresów - wersja 32-bitowa +Group: Libraries + +%description -n libasan-multilib +This package contains 32-bit version of the Address Sanitizer library +which is used for -fsanitize=address instrumented programs. + +%description -n libasan-multilib -l pl.UTF-8 +Ten pakiet zawiera 32-bitową wersję biblioteki Address Sanitizer, +służącej do kontroli adresów w programach kompilowanych z opcją +-fsanitize=address. + +%package -n libasan-devel +Summary: Development files for the Address Sanitizer library +Summary(pl.UTF-8): Pliki programistyczne biblioteki Address Sanitizer +Group: Development/Libraries +Requires: libasan = %{epoch}:%{version}-%{release} + +%description -n libasan-devel +This package contains development files for the Address Sanitizer +library. + +%description -n libasan-devel -l pl.UTF-8 +Ten pakiet zawiera pliki programistyczne biblioteki Address Sanitizer. + +%package -n libasan-multilib-devel +Summary: Development files for the Address Sanitizer library - 32-bit version +Summary(pl.UTF-8): Pliki programistyczne biblioteki Address Sanitizer - wersja 32-bitowa +Group: Development/Libraries +Requires: libasan-multilib = %{epoch}:%{version}-%{release} + +%description -n libasan-multilib-devel +This package contains the development files for 32-bit version of the +Address Sanitizer library. + +%description -n libasan-multilib-devel -l pl.UTF-8 +Ten pakiet zawiera pliki programistyczne 32-bitowej wersji biblioteki +Address Sanitizer. + +%package -n libasan-static +Summary: The Address Sanitizer static library +Summary(pl.UTF-8): Statyczna biblioteka Address Sanitizer +Group: Development/Libraries +Requires: libasan-devel = %{epoch}:%{version}-%{release} + +%description -n libasan-static +This package contains Address Sanitizer static library. + +%description -n libasan-static -l pl.UTF-8 +Ten pakiet zawiera statyczną bibliotekę Address Sanitizer. + +%package -n libasan-multilib-static +Summary: The Address Sanitizer static library - 32-bit version +Summary(pl.UTF-8): Statyczna biblioteka Address Sanitizer - wersja 32-bitowa +Group: Development/Libraries +Requires: libasan-multilib-devel = %{epoch}:%{version}-%{release} + +%description -n libasan-multilib-static +This package contains 32-bit version of the Address Sanitizer static +library. + +%description -n libasan-multilib-static -l pl.UTF-8 +Ten pakiet zawiera 32-bitową wersję statycznej biblioteki Address +Sanitizer. + +%package -n libtsan +Summary: The Thread Sanitizer library +Summary(pl.UTF-8): Biblioteka Thread Sanitizer do kontroli wielowątkowości +Group: Libraries + +%description -n libtsan +This package contains the Thread Sanitizer library which is used for +-fsanitize=thread instrumented programs. + +%description -n libtsan -l pl.UTF-8 +Ten pakiet zawiera bibliotekę Thread Sanitizer, służącą do kontroli +wielowątkowości w programach kompilowanych z opcją -fsanitize=thread. + +%package -n libtsan-devel +Summary: Development files for the Thread Sanitizer library +Summary(pl.UTF-8): Pliki programistyczne biblioteki Thread Sanitizer +Group: Development/Libraries +Requires: libtsan = %{epoch}:%{version}-%{release} + +%description -n libtsan-devel +This package contains development files for Thread Sanitizer library. + +%description -n libtsan-devel -l pl.UTF-8 +Ten pakiet zawiera pliki programistyczne biblioteki Address Sanitizer. + +%package -n libtsan-static +Summary: The Thread Sanitizer static library +Summary(pl.UTF-8): Statyczna biblioteka Thread Sanitizer +Group: Development/Libraries +Requires: libtsan-devel = %{epoch}:%{version}-%{release} + +%description -n libtsan-static +This package contains Thread Sanitizer static library. + +%description -n libtsan-static -l pl.UTF-8 +Ten pakiet zawiera statyczną bibliotekę Thread Sanitizer. + +%package -n libatomic +Summary: The GNU Atomic library +Summary(pl.UTF-8): Biblioteka GNU Atomic +Group: Libraries + +%description -n libatomic +This package contains the GNU Atomic library which is a GCC support +library for atomic operations not supported by hardware. + +%description -n libatomic -l pl.UTF-8 +Ten pakiet zawiera bibliotekę GNU Atomic, będącą biblioteką GCC +wspierającą operacje atomowe na sprzęcie ich nie obsługującym. + +%package -n libatomic-multilib +Summary: The GNU Atomic library - 32-bit version +Summary(pl.UTF-8): Biblioteka GNU Atomic - wersja 32-bitowa +Group: Libraries + +%description -n libatomic-multilib +This package contains 32-bit version of the GNU Atomic library which +is a GCC support library for atomic operations not supported by +hardware. + +%description -n libatomic-multilib -l pl.UTF-8 +Ten pakiet zawiera 32-bitową wersję biblioteki GNU Atomic, będącej +biblioteką GCC wspierającą operacje atomowe na sprzęcie ich nie +obsługującym. + +%package -n libatomic-devel +Summary: Development files for the GNU Atomic library +Summary(pl.UTF-8): Pliki programistyczne biblioteki GNU Atomic +Group: Development/Libraries +Requires: libatomic = %{epoch}:%{version}-%{release} + +%description -n libatomic-devel +This package contains development files for the GNU Atomic library. + +%description -n libatomic-devel -l pl.UTF-8 +Ten pakiet zawiera pliki programistyczne biblioteki GNU Atomic. + +%package -n libatomic-multilib-devel +Summary: Development files for the GNU Atomic static library - 32-bit version +Summary(pl.UTF-8): Pliki programistyczne biblioteki GNU Atomic - wersja 32-bitowa +Group: Development/Libraries +Requires: libatomic-multilib = %{epoch}:%{version}-%{release} + +%description -n libatomic-multilib-devel +This package contains the development files for 32-bit version of the +GNU Atomic library. + +%description -n libatomic-multilib-devel -l pl.UTF-8 +Ten pakiet zawiera pliki programistyczne 32-bitowej wersji biblioteki +GNU Atomic. + +%package -n libatomic-static +Summary: The GNU Atomic static library +Summary(pl.UTF-8): Statyczna biblioteka GNU Atomic +Group: Development/Libraries +Requires: libatomic-devel = %{epoch}:%{version}-%{release} + +%description -n libatomic-static +This package contains GNU Atomic static library. + +%description -n libatomic-static +Ten pakiet zawiera statyczną bibliotekę GNU Atomic. + +%package -n libatomic-multilib-static +Summary: The GNU Atomic static library - 32-bit version +Summary(pl.UTF-8): Statyczna biblioteka GNU Atomic - wersja 32-bitowa +Group: Development/Libraries +Requires: libatomic-multilib-devel = %{epoch}:%{version}-%{release} + +%description -n libatomic-multilib-static +This package contains 32-bit version of the GNU Atomic static +library. + +%description -n libatomic-multilib-static -l pl.UTF-8 +Ten pakiet zawiera 32-bitową wersję statycznej biblioteki GNU Atomic. + %prep %setup -q -%patch100 -p0 %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 - -%patch7 -p0 +%patch4 -p0 %if %{with qt} -%patch8 -p1 +%patch5 -p1 +%endif +%if %{with gcc_libffi} +%patch6 -p0 %endif - -%patch13 -p0 mv ChangeLog ChangeLog.general @@ -1527,7 +1726,6 @@ TEXCONFIG=false \ %ifarch %{ix86} %{x8664} --disable-cld \ %endif - --enable-cloog-backend=%{cloog_backend} \ %{?with_fortran:--enable-cmath} \ --enable-decimal-float \ --enable-gnu-unique-object \ @@ -1553,6 +1751,7 @@ TEXCONFIG=false \ --with-linker-hash-style=gnu \ --with-long-double-128 \ --with-ppl \ + --disable-ppl-version-check \ --with-slibdir=%{_slibdir} \ %ifnarch ia64 --without-system-libunwind \ @@ -1697,6 +1896,7 @@ cp -f libjava/READ* java-doc ln -sf libgcj-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/libgcj.jar %endif +%if %{with gcc_libffi} # still not installed by gcc? [ ! -f $RPM_BUILD_ROOT%{_pkgconfigdir}/libffi.pc ] || exit 1 install -d $RPM_BUILD_ROOT%{_pkgconfigdir} @@ -1712,6 +1912,7 @@ sed -e 's,@prefix@,%{_prefix}, s,@libdir@,%{_libdir32}, s,@gcclibdir@,%{gcclibdir},' %{SOURCE3} >$RPM_BUILD_ROOT%{_pkgconfigdir32}/libffi.pc %endif +%endif %if %{with objc} cp -f libobjc/README gcc/objc/README.libobjc @@ -1723,9 +1924,13 @@ for f in libitm.la libssp.la libssp_nonshared.la \ %{?with_cxx:libstdc++.la libsupc++.la} \ %{?with_fortran:libgfortran.la libquadmath.la} \ %{?with_gomp:libgomp.la} \ + %{?with_asan:libasan.la} \ + %{?with_tsan:libtsan.la} \ + %{?with_atomic:libatomic.la} \ %{?with_mudflap:libmudflap.la libmudflapth.la} \ %if %{with java} - libffi.la libgcj.la libgcj-tools.la libgij.la \ + %{?with_gcc_libffi:libffi.la} \ + libgcj.la libgcj-tools.la libgij.la \ %{gcjdbexecdir}/libjvm.la \ %{gcjdbexecdir}/libxmlj.la \ %{?with_x:lib-gnu-awt-xlib.la} \ @@ -1744,8 +1949,10 @@ for f in libitm.la libssp.la libssp_nonshared.la \ %{?with_cxx:libstdc++.la libsupc++.la} \ %{?with_fortran:libgfortran.la libquadmath.la} \ %{?with_gomp:libgomp.la} \ + %{?with_asan:libasan.la} \ + %{?with_atomic:libatomic.la} \ %{?with_mudflap:libmudflap.la libmudflapth.la} \ - %{?with_java:libffi.la} \ + %{?with_java:%{?with_gcc_libffi:libffi.la}} \ %{?with_objc:libobjc.la}; do %{__perl} %{SOURCE1} $RPM_BUILD_ROOT%{_libdir32}/$f %{_libdir32} > $RPM_BUILD_ROOT%{_libdir32}/$f.fixed @@ -1845,6 +2052,18 @@ rm -rf $RPM_BUILD_ROOT %postun go -p /sbin/postshell -/usr/sbin/fix-info-dir -c %{_infodir} +%post -n libquadmath-devel -p /sbin/postshell +-/usr/sbin/fix-info-dir -c %{_infodir} + +%postun -n libquadmath-devel -p /sbin/postshell +-/usr/sbin/fix-info-dir -c %{_infodir} + +%post -n libffi-devel -p /sbin/postshell +-/usr/sbin/fix-info-dir -c %{_infodir} + +%postun -n libffi-devel -p /sbin/postshell +-/usr/sbin/fix-info-dir -c %{_infodir} + %post -p /sbin/ldconfig -n libgcc %postun -p /sbin/ldconfig -n libgcc %post -p /sbin/ldconfig -n libgcc-multilib @@ -1879,18 +2098,24 @@ rm -rf $RPM_BUILD_ROOT %postun -p /sbin/ldconfig -n libobjc %post -p /sbin/ldconfig -n libobjc-multilib %postun -p /sbin/ldconfig -n libobjc-multilib -%post -n libquadmath -/sbin/ldconfig -[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 -%postun -n libquadmath -/sbin/ldconfig -[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 +%post -p /sbin/ldconfig -n libquadmath +%postun -p /sbin/ldconfig -n libquadmath %post -p /sbin/ldconfig -n libquadmath-multilib %postun -p /sbin/ldconfig -n libquadmath-multilib %post -p /sbin/ldconfig -n libgo %postun -p /sbin/ldconfig -n libgo %post -p /sbin/ldconfig -n libgo-multilib %postun -p /sbin/ldconfig -n libgo-multilib +%post -p /sbin/ldconfig -n libasan +%postun -p /sbin/ldconfig -n libasan +%post -p /sbin/ldconfig -n libasan-multilib +%postun -p /sbin/ldconfig -n libasan-multilib +%post -p /sbin/ldconfig -n libtsan +%postun -p /sbin/ldconfig -n libtsan +%post -p /sbin/ldconfig -n libatomic +%postun -p /sbin/ldconfig -n libatomic +%post -p /sbin/ldconfig -n libatomic-multilib +%postun -p /sbin/ldconfig -n libatomic-multilib %files -f gcc.lang %defattr(644,root,root,755) @@ -1988,6 +2213,14 @@ rm -rf $RPM_BUILD_ROOT %{gcclibdir}/include/x86intrin.h %{gcclibdir}/include/xmmintrin.h %{gcclibdir}/include/xopintrin.h +%{gcclibdir}/include/adxintrin.h +%{gcclibdir}/include/fxsrintrin.h +%{gcclibdir}/include/prfchwintrin.h +%{gcclibdir}/include/rdseedintrin.h +%{gcclibdir}/include/rtmintrin.h +%{gcclibdir}/include/xsaveintrin.h +%{gcclibdir}/include/xsaveoptintrin.h +%{gcclibdir}/include/xtestintrin.h %endif %ifarch arm %{gcclibdir}/include/arm_neon.h @@ -2512,6 +2745,7 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/%{gcjdbexecdir}/libjvm.a %endif +%if %{with gcc_libffi} %files -n libffi %defattr(644,root,root,755) %doc libffi/{ChangeLog,ChangeLog.libgcj,LICENSE,README} @@ -2533,6 +2767,7 @@ rm -rf $RPM_BUILD_ROOT %{gcclibdir}/include/ffitarget.h %{_pkgconfigdir}/libffi.pc %{_mandir}/man3/ffi*.3* +%{_infodir}/libffi.info* %if %{with multilib} %files -n libffi-multilib-devel @@ -2551,6 +2786,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %{_libdir32}/libffi.a %endif +%endif %if %{with objc} %files objc @@ -2621,13 +2857,13 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %doc libgo/{LICENSE,PATENTS,README} %attr(755,root,root) %{_libdir}/libgo.so.*.*.* -%attr(755,root,root) %ghost %{_libdir}/libgo.so.0 +%attr(755,root,root) %ghost %{_libdir}/libgo.so.4 %if %{with multilib} %files -n libgo-multilib %defattr(644,root,root,755) %attr(755,root,root) %{_libdir32}/libgo.so.*.*.* -%attr(755,root,root) %ghost %{_libdir32}/libgo.so.0 +%attr(755,root,root) %ghost %{_libdir32}/libgo.so.4 %endif %files -n libgo-devel @@ -2654,3 +2890,96 @@ rm -rf $RPM_BUILD_ROOT %{_libdir32}/libgo.a %endif %endif + +%if %{with asan} +%files -n libasan +%defattr(644,root,root,755) +%doc libsanitizer/ChangeLog* libsanitizer/LICENSE.TXT +%attr(755,root,root) %{_libdir}/libasan.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libasan.so.0 + +%if %{with multilib} +%files -n libasan-multilib +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir32}/libasan.so.*.*.* +%attr(755,root,root) %ghost %{_libdir32}/libasan.so.0 +%endif + +%files -n libasan-devel +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir}/libasan.so +%{_libdir}/libasan_preinit.o +%{_libdir}/libasan.la + +%if %{with multilib} +%files -n libasan-multilib-devel +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir32}/libasan.so +%{_libdir32}/libasan_preinit.o +%{_libdir32}/libasan.la +%endif + +%files -n libasan-static +%defattr(644,root,root,755) +%{_libdir}/libasan.a + +%if %{with multilib} +%files -n libasan-multilib-static +%defattr(644,root,root,755) +%{_libdir32}/libasan.a +%endif +%endif + +%if %{with tsan} +%files -n libtsan +%defattr(644,root,root,755) +%doc libsanitizer/ChangeLog* libsanitizer/LICENSE.TXT +%attr(755,root,root) %{_libdir}/libtsan.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libtsan.so.0 + +%files -n libtsan-devel +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir}/libtsan.so +%{_libdir}/libtsan.la + +%files -n libtsan-static +%defattr(644,root,root,755) +%{_libdir}/libtsan.a +%endif + +%if %{with atomic} +%files -n libatomic +%defattr(644,root,root,755) +%doc libatomic/ChangeLog* +%attr(755,root,root) %{_libdir}/libatomic.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libatomic.so.1 + +%if %{with multilib} +%files -n libatomic-multilib +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir32}/libatomic.so.*.*.* +%attr(755,root,root) %ghost %{_libdir32}/libatomic.so.1 +%endif + +%files -n libatomic-devel +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir}/libatomic.so +%{_libdir}/libatomic.la + +%if %{with multilib} +%files -n libatomic-multilib-devel +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir32}/libatomic.so +%{_libdir32}/libatomic.la +%endif + +%files -n libatomic-static +%defattr(644,root,root,755) +%{_libdir}/libatomic.a + +%if %{with multilib} +%files -n libatomic-multilib-static +%defattr(644,root,root,755) +%{_libdir32}/libatomic.a +%endif +%endif diff --git a/issue4664051.patch b/issue4664051.patch deleted file mode 100644 index 9258f63..0000000 --- a/issue4664051.patch +++ /dev/null @@ -1,542 +0,0 @@ -http://patchwork.ozlabs.org/patch/102292/ -http://codereview.appspot.com/4664051/ -http://sourceware.org/ml/binutils/2011-01/msg00178.html -http://anonscm.debian.org/viewvc/gcccvs/branches/sid/gcc-4.6/debian/patches/gold-and-ld.diff - -Index: gcc/doc/invoke.texi -=================================================================== ---- gcc/doc/invoke.texi (revision 175346) -+++ gcc/doc/invoke.texi (working copy) -@@ -418,7 +418,7 @@ - -funit-at-a-time -funroll-all-loops -funroll-loops @gol - -funsafe-loop-optimizations -funsafe-math-optimizations -funswitch-loops @gol - -fvariable-expansion-in-unroller -fvect-cost-model -fvpt -fweb @gol ---fwhole-program -fwpa -fuse-linker-plugin @gol -+-fwhole-program -fwpa -fuse-ld -fuse-linker-plugin @gol - --param @var{name}=@var{value} - -O -O0 -O1 -O2 -O3 -Os -Ofast} - -@@ -8017,6 +8017,16 @@ - - Enabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}. - -+@item -fuse-ld=gold -+Use the @command{gold} linker instead of the default linker. -+This option is only necessary if GCC has been configured with -+@option{--enable-gold} and @option{--enable-ld=default}. -+ -+@item -fuse-ld=bfd -+Use the @command{ld.bfd} linker instead of the default linker. -+This option is only necessary if GCC has been configured with -+@option{--enable-gold} and @option{--enable-ld}. -+ - @item -fcprop-registers - @opindex fcprop-registers - After register allocation and post-register allocation instruction splitting, -Index: gcc/configure -=================================================================== ---- gcc/configure (revision 175346) -+++ gcc/configure (working copy) -@@ -681,6 +681,7 @@ - gcc_cv_objdump - ORIGINAL_NM_FOR_TARGET - gcc_cv_nm -+ORIGINAL_GOLD_FOR_TARGET - ORIGINAL_LD_FOR_TARGET - ORIGINAL_PLUGIN_LD_FOR_TARGET - gcc_cv_ld -@@ -21131,6 +21132,21 @@ - fi - fi - -+gcc_cv_ld_gold_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gold -+ -+if test "${gcc_cv_gold+set}" = set; then : -+ -+else -+ -+if test -f $gcc_cv_ld_gold_srcdir/configure.ac \ -+ && test -f ../gold/Makefile \ -+ && test x$build = x$host; then -+ gcc_cv_gold=../gold/ld-new$build_exeext -+else -+ gcc_cv_gold='' -+fi -+fi -+ - ORIGINAL_PLUGIN_LD_FOR_TARGET=$gcc_cv_ld - PLUGIN_LD=`basename $gcc_cv_ld` - -@@ -21170,6 +21186,9 @@ - ;; - esac - -+ORIGINAL_GOLD_FOR_TARGET=$gcc_cv_gold -+ -+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking what linker to use" >&5 - $as_echo_n "checking what linker to use... " >&6; } - if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then -Index: gcc/gcc.c -=================================================================== ---- gcc/gcc.c (revision 175346) -+++ gcc/gcc.c (working copy) -@@ -657,6 +657,9 @@ - }"PLUGIN_COND_CLOSE" \ - %{flto|flto=*:%max_errors = value; - break; - -+ case OPT_fuse_ld_: - case OPT_fuse_linker_plugin: -- /* No-op. Used by the driver and passed to us because it starts with f.*/ -+ /* No-op. Used by the driver and passed to us because it starts with f. */ - break; - - case OPT_Wuninitialized: -Index: gcc/configure.ac -=================================================================== ---- gcc/configure.ac (revision 175346) -+++ gcc/configure.ac (working copy) -@@ -1974,6 +1974,17 @@ - AC_PATH_PROG(gcc_cv_ld, $LD_FOR_TARGET) - fi]) - -+gcc_cv_ld_gold_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gold -+ -+AS_VAR_SET_IF(gcc_cv_gold,, [ -+if test -f $gcc_cv_ld_gold_srcdir/configure.ac \ -+ && test -f ../gold/Makefile \ -+ && test x$build = x$host; then -+ gcc_cv_gold=../gold/ld-new$build_exeext -+else -+ gcc_cv_gold='' -+fi]) -+ - ORIGINAL_PLUGIN_LD_FOR_TARGET=$gcc_cv_ld - PLUGIN_LD=`basename $gcc_cv_ld` - AC_ARG_WITH(plugin-ld, -@@ -2003,6 +2014,9 @@ - *) AC_CONFIG_FILES(collect-ld:exec-tool.in, [chmod +x collect-ld]) ;; - esac - -+ORIGINAL_GOLD_FOR_TARGET=$gcc_cv_gold -+AC_SUBST(ORIGINAL_GOLD_FOR_TARGET) -+ - AC_MSG_CHECKING(what linker to use) - if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then - # Single tree build which includes ld. We want to prefer it -Index: gcc/exec-tool.in -=================================================================== ---- gcc/exec-tool.in (revision 175346) -+++ gcc/exec-tool.in (working copy) -@@ -1,6 +1,6 @@ - #! /bin/sh - --# Copyright (C) 2007, 2008, 2010 Free Software Foundation, Inc. -+# Copyright (C) 2007, 2008, 2010, 2011 Free Software Foundation, Inc. - # This file is part of GCC. - - # GCC is free software; you can redistribute it and/or modify -@@ -21,11 +21,13 @@ - - ORIGINAL_AS_FOR_TARGET="@ORIGINAL_AS_FOR_TARGET@" - ORIGINAL_LD_FOR_TARGET="@ORIGINAL_LD_FOR_TARGET@" -+ORIGINAL_GOLD_FOR_TARGET="@ORIGINAL_GOLD_FOR_TARGET@" - ORIGINAL_PLUGIN_LD_FOR_TARGET="@ORIGINAL_PLUGIN_LD_FOR_TARGET@" - ORIGINAL_NM_FOR_TARGET="@ORIGINAL_NM_FOR_TARGET@" - exeext=@host_exeext@ - fast_install=@enable_fast_install@ - objdir=@objdir@ -+version="1.1" - - invoked=`basename "$0"` - id=$invoked -@@ -36,15 +38,44 @@ - dir=gas - ;; - collect-ld) -- # when using a linker plugin, gcc will always pass '-plugin' as the -- # first or second option to the linker. -- if test x"$1" = "x-plugin" || test x"$2" = "x-plugin"; then -- original=$ORIGINAL_PLUGIN_LD_FOR_TARGET -- else -- original=$ORIGINAL_LD_FOR_TARGET -+ prog=ld-new$exeext -+ # Look for the a command line option -+ # specifying the linker to be used. -+ case " $* " in -+ *\ -use-gold\ *) -+ original=$ORIGINAL_GOLD_FOR_TARGET -+ dir=gold -+ ;; -+ *\ -use-ld\ * | *\ -use-ld.bfd\ *) -+ original=$ORIGINAL_LD_FOR_TARGET -+ dir=ld -+ ;; -+ *\ -plugin\ *) -+ original=$ORIGINAL_PLUGIN_LD_FOR_TARGET -+ dir=ld -+ ;; -+ *) -+ original=$ORIGINAL_LD_FOR_TARGET -+ dir=ld -+ ;; -+ esac -+ -+ # If the selected linker has not been configured then -+ # try using the others, in the order PLUGIN-LD, LD, GOLD. -+ if test x"$original" = x; then -+ if test x"$ORIGINAL_PLUGIN_LD_FOR_TARGET" != x; then -+ original=$ORIGINAL_PLUGIN_LD_FOR_TARGET -+ dir=ld -+ elif test x"$ORIGINAL_LD_FOR_TARGET" != x; then -+ original=$ORIGINAL_LD_FOR_TARGET -+ dir=ld -+ elif test x"$ORIGINAL_GOLD_FOR_TARGET" != x; then -+ original=$ORIGINAL_GOLD_FOR_TARGET -+ dir=gold -+ # Otherwise do nothing - the case statement below -+ # will issue an error message for us. -+ fi - fi -- prog=ld-new$exeext -- dir=ld - id=ld - ;; - nm) -@@ -61,29 +92,58 @@ - scriptdir=`cd "$tdir" && pwd` - - if test -x $scriptdir/../$dir/$prog; then -- test "$fast_install" = yes || exec $scriptdir/../$dir/$prog ${1+"$@"} -+ if test "$fast_install" = yes; then -+ # If libtool did everything it needs to do, there's a fast path. -+ lt_prog=$scriptdir/../$dir/$objdir/lt-$prog - -- # if libtool did everything it needs to do, there's a fast path -- lt_prog=$scriptdir/../$dir/$objdir/lt-$prog -- test -x $lt_prog && exec $lt_prog ${1+"$@"} -- -- # libtool has not relinked ld-new yet, but we cannot just use the -- # previous stage (because then the relinking would just never happen!). -- # So we take extra care to use prev-ld/ld-new *on recursive calls*. -- eval LT_RCU="\${LT_RCU_$id}" -- test x"$LT_RCU" = x"1" && exec $scriptdir/../prev-$dir/$prog ${1+"$@"} -- -- eval LT_RCU_$id=1 -- export LT_RCU_$id -- $scriptdir/../$dir/$prog ${1+"$@"} -- result=$? -- exit $result -- -+ if test -x $lt_prog; then -+ original=$lt_prog -+ else -+ # Libtool has not relinked ld-new yet, but we cannot just use the -+ # previous stage (because then the relinking would just never happen!). -+ # So we take extra care to use prev-ld/ld-new *on recursive calls*. -+ eval LT_RCU="\${LT_RCU_$id}" -+ if test x"$LT_RCU" = x"1"; then -+ original=$scriptdir/../prev-$dir/$prog -+ else -+ eval LT_RCU_$id=1 -+ export LT_RCU_$id -+ case " $* " in -+ *\ -v\ *) -+ echo "$invoked $version" -+ echo $scriptdir/../$dir/$prog $* -+ ;; -+ esac -+ $scriptdir/../$dir/$prog ${1+"$@"} -+ result=$? -+ exit $result -+ fi -+ fi -+ else -+ original=$scriptdir/../$dir/$prog -+ fi - else -- exec $scriptdir/../prev-$dir/$prog ${1+"$@"} -+ original=$scriptdir/../prev-$dir/$prog - fi - ;; -- *) -- exec $original ${1+"$@"} -+ "") -+ echo "$invoked: executable not configured" -+ exit 1 - ;; - esac -+ -+# If -v has been used then display our version number -+# and then echo the command we are about to invoke. -+case " $* " in -+ *\ -v\ *) -+ echo "$invoked $version" -+ echo $original $* -+ ;; -+esac -+ -+if test -x $original; then -+ exec "$original" ${1+"$@"} -+else -+ echo "$invoked: unable to locate executable: $original" -+ exit 1 -+fi -Index: gcc/common.opt -=================================================================== ---- gcc/common.opt (revision 175346) -+++ gcc/common.opt (working copy) -@@ -2138,6 +2138,9 @@ - Common Report Var(flag_unwind_tables) Optimization - Just generate unwind tables for exception handling - -+fuse-ld= -+Common Joined Undocumented -+ - fuse-linker-plugin - Common Undocumented - -Index: gcc/collect2.c -=================================================================== ---- gcc/collect2.c (revision 175346) -+++ gcc/collect2.c (working copy) -@@ -1075,17 +1075,19 @@ - int - main (int argc, char **argv) - { -- static const char *const ld_suffix = "ld"; -- static const char *const plugin_ld_suffix = PLUGIN_LD; -- static const char *const real_ld_suffix = "real-ld"; -+ static const char *const ld_suffix = "ld"; -+ static const char *const gold_suffix = "ld.gold"; -+ static const char *const bfd_ld_suffix = "ld.bfd"; -+ static const char *const plugin_ld_suffix = PLUGIN_LD; -+ static const char *const real_ld_suffix = "real-ld"; - static const char *const collect_ld_suffix = "collect-ld"; -- static const char *const nm_suffix = "nm"; -- static const char *const gnm_suffix = "gnm"; -+ static const char *const nm_suffix = "nm"; -+ static const char *const gnm_suffix = "gnm"; - #ifdef LDD_SUFFIX -- static const char *const ldd_suffix = LDD_SUFFIX; -+ static const char *const ldd_suffix = LDD_SUFFIX; - #endif -- static const char *const strip_suffix = "strip"; -- static const char *const gstrip_suffix = "gstrip"; -+ static const char *const strip_suffix = "strip"; -+ static const char *const gstrip_suffix = "gstrip"; - - #ifdef CROSS_DIRECTORY_STRUCTURE - /* If we look for a program in the compiler directories, we just use -@@ -1095,6 +1097,10 @@ - - const char *const full_ld_suffix = - concat(target_machine, "-", ld_suffix, NULL); -+ const char *const full_gold_suffix = -+ concat (target_machine, "-", gold_suffix, NULL); -+ const char *const full_bfd_ld_suffix = -+ concat (target_machine, "-", bfd_ld_suffix, NULL); - const char *const full_plugin_ld_suffix = - concat(target_machine, "-", plugin_ld_suffix, NULL); - const char *const full_nm_suffix = -@@ -1110,15 +1116,17 @@ - const char *const full_gstrip_suffix = - concat (target_machine, "-", gstrip_suffix, NULL); - #else -- const char *const full_ld_suffix = ld_suffix; -+ const char *const full_ld_suffix = ld_suffix; -+ const char *const full_gold_suffix = gold_suffix; -+ const char *const full_bfd_ld_suffix = bfd_ld_suffix; - const char *const full_plugin_ld_suffix = plugin_ld_suffix; -- const char *const full_nm_suffix = nm_suffix; -- const char *const full_gnm_suffix = gnm_suffix; -+ const char *const full_nm_suffix = nm_suffix; -+ const char *const full_gnm_suffix = gnm_suffix; - #ifdef LDD_SUFFIX -- const char *const full_ldd_suffix = ldd_suffix; -+ const char *const full_ldd_suffix = ldd_suffix; - #endif -- const char *const full_strip_suffix = strip_suffix; -- const char *const full_gstrip_suffix = gstrip_suffix; -+ const char *const full_strip_suffix = strip_suffix; -+ const char *const full_gstrip_suffix = gstrip_suffix; - #endif /* CROSS_DIRECTORY_STRUCTURE */ - - const char *arg; -@@ -1132,7 +1140,13 @@ - const char **c_ptr; - char **ld1_argv; - const char **ld1; -- bool use_plugin = false; -+ enum linker_select -+ { -+ DFLT_LINKER, -+ PLUGIN_LINKER, -+ GOLD_LINKER, -+ BFD_LINKER -+ } selected_linker = DFLT_LINKER; - - /* The kinds of symbols we will have to consider when scanning the - outcome of a first pass link. This is ALL to start with, then might -@@ -1209,15 +1223,21 @@ - else if (! strcmp (argv[i], "-flto-partition=none")) - no_partition = true; - else if ((! strncmp (argv[i], "-flto=", 6) -- || ! strcmp (argv[i], "-flto")) && ! use_plugin) -+ || ! strcmp (argv[i], "-flto")) -+ && selected_linker != PLUGIN_LINKER) - lto_mode = LTO_MODE_WHOPR; - else if (!strncmp (argv[i], "-fno-lto", 8)) - lto_mode = LTO_MODE_NONE; - else if (! strcmp (argv[i], "-plugin")) - { -- use_plugin = true; -+ selected_linker = PLUGIN_LINKER; - lto_mode = LTO_MODE_NONE; - } -+ else if (! strcmp (argv[i], "-use-gold")) -+ selected_linker = GOLD_LINKER; -+ else if (! strcmp (argv[i], "-use-ld")) -+ selected_linker = BFD_LINKER; -+ - #ifdef COLLECT_EXPORT_LIST - /* since -brtl, -bexport, -b64 are not position dependent - also check for them here */ -@@ -1299,36 +1319,109 @@ - /* Try to discover a valid linker/nm/strip to use. */ - - /* Maybe we know the right file to use (if not cross). */ -- ld_file_name = 0; -+ ld_file_name = NULL; - #ifdef DEFAULT_LINKER - if (access (DEFAULT_LINKER, X_OK) == 0) - ld_file_name = DEFAULT_LINKER; -- if (ld_file_name == 0) -+ if (ld_file_name == NULL) - #endif - #ifdef REAL_LD_FILE_NAME - ld_file_name = find_a_file (&path, REAL_LD_FILE_NAME); -- if (ld_file_name == 0) -+ if (ld_file_name == NULL) - #endif - /* Search the (target-specific) compiler dirs for ld'. */ - ld_file_name = find_a_file (&cpath, real_ld_suffix); - /* Likewise for `collect-ld'. */ -- if (ld_file_name == 0) -+ if (ld_file_name == NULL) - ld_file_name = find_a_file (&cpath, collect_ld_suffix); - /* Search the compiler directories for `ld'. We have protection against - recursive calls in find_a_file. */ -- if (ld_file_name == 0) -- ld_file_name = find_a_file (&cpath, -- use_plugin -- ? plugin_ld_suffix -- : ld_suffix); -+ if (ld_file_name == NULL) -+ switch (selected_linker) -+ { -+ default: -+ case DFLT_LINKER: -+ ld_file_name = find_a_file (&cpath, ld_suffix); -+ break; -+ case PLUGIN_LINKER: -+ ld_file_name = find_a_file (&cpath, plugin_ld_suffix); -+ break; -+ case GOLD_LINKER: -+ ld_file_name = find_a_file (&cpath, gold_suffix); -+ break; -+ case BFD_LINKER: -+ ld_file_name = find_a_file (&cpath, bfd_ld_suffix); -+ break; -+ } - /* Search the ordinary system bin directories - for `ld' (if native linking) or `TARGET-ld' (if cross). */ -- if (ld_file_name == 0) -- ld_file_name = find_a_file (&path, -- use_plugin -- ? full_plugin_ld_suffix -- : full_ld_suffix); -+ if (ld_file_name == NULL) -+ switch (selected_linker) -+ { -+ default: -+ case DFLT_LINKER: -+ ld_file_name = find_a_file (&path, full_ld_suffix); -+ break; -+ case PLUGIN_LINKER: -+ ld_file_name = find_a_file (&path, full_plugin_ld_suffix); -+ break; -+ case GOLD_LINKER: -+ ld_file_name = find_a_file (&path, full_gold_suffix); -+ break; -+ case BFD_LINKER: -+ ld_file_name = find_a_file (&path, full_bfd_ld_suffix); -+ break; -+ } -+ /* If we failed to find a plugin-capable linker, try the ordinary one. */ -+ if (ld_file_name == NULL && selected_linker == PLUGIN_LINKER) -+ ld_file_name = find_a_file (&cpath, ld_suffix); - -+ if ((vflag || debug) && ld_file_name == NULL) -+ { -+ struct prefix_list * p; -+ const char * s; -+ -+ notice ("collect2: warning: unable to find linker.\n"); -+ -+#ifdef DEFAULT_LINKER -+ notice (" Searched for this absolute executable:\n"); -+ notice (" %s\n", DEFAULT_LINKER); -+#endif -+ -+ notice (" Searched in these paths:\n"); -+ for (p = cpath.plist; p != NULL; p = p->next) -+ notice (" %s\n", p->prefix); -+ notice (" For these executables:\n"); -+ notice (" %s\n", real_ld_suffix); -+ notice (" %s\n", collect_ld_suffix); -+ switch (selected_linker) -+ { -+ default: -+ case DFLT_LINKER: s = ld_suffix; break; -+ case PLUGIN_LINKER: s = plugin_ld_suffix; break; -+ case GOLD_LINKER: s = gold_suffix; break; -+ case BFD_LINKER: s = bfd_ld_suffix; break; -+ } -+ notice (" %s\n", s); -+ -+ notice (" And searched in these paths:\n"); -+ for (p = path.plist; p != NULL; p = p->next) -+ notice (" %s\n", p->prefix); -+ notice (" For these executables:\n"); -+#ifdef REAL_LD_FILE_NAME -+ notice (" %s\n", REAL_LD_FILE_NAME); -+#endif -+ switch (selected_linker) -+ { -+ default: -+ case DFLT_LINKER: s = full_ld_suffix; break; -+ case PLUGIN_LINKER: s = full_plugin_ld_suffix; break; -+ case GOLD_LINKER: s = full_gold_suffix; break; -+ case BFD_LINKER: s = full_bfd_ld_suffix; break; -+ } -+ notice (" %s\n", s); -+ } -+ - #ifdef REAL_NM_FILE_NAME - nm_file_name = find_a_file (&path, REAL_NM_FILE_NAME); - if (nm_file_name == 0)