diff options
author | doko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca> | 2015-04-19 13:50:20 +0000 |
---|---|---|
committer | doko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca> | 2015-04-19 13:50:20 +0000 |
commit | a73bcc4c80c4795fbb0a066215d381e8942f0c98 (patch) | |
tree | 0d3d9dc165a98ae6a912e1a2611629539e94fc60 | |
parent | 9ad1eea70a2d21fc5fbfa2b0c64a1a7465ebcea6 (diff) | |
download | gcc-5-a73bcc4c80c4795fbb0a066215d381e8942f0c98.tar.gz |
* Update to SVN 20150419 (r222218) from the gcc-5-branch.
git-svn-id: svn://anonscm.debian.org/gcccvs/branches/sid/gcc-5@7973 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | debian/patches/svn-updates.diff | 853 | ||||
-rw-r--r-- | debian/rules.patch | 1 |
3 files changed, 852 insertions, 5 deletions
diff --git a/debian/changelog b/debian/changelog index 9d53a6e..1a18795 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,10 @@ gcc-5 (5.1~rc1-2) UNRELEASED; urgency=medium + * Update to SVN 20150419 (r222218) from the gcc-5-branch. * Apply the ada-bootstrap-compare patch for snapshot builds as well. * Update libgomp and libstdc++ symbols files. - -- Matthias Klose <doko@debian.org> Tue, 14 Apr 2015 20:30:44 +0200 + -- Matthias Klose <doko@debian.org> Sun, 19 Apr 2015 15:37:27 +0200 gcc-5 (5.1~rc1-1) experimental; urgency=medium diff --git a/debian/patches/svn-updates.diff b/debian/patches/svn-updates.diff index 9725770..645a61b 100644 --- a/debian/patches/svn-updates.diff +++ b/debian/patches/svn-updates.diff @@ -1,10 +1,10 @@ -# DP: updates from the 5 branch upto 2015xxyy (r221808). +# DP: updates from the 5 branch upto 20150419 (r222218). last_update() { cat > ${dir}LAST_UPDATED <EOF -Wed Apr 1 18:00:58 CEST 2015 -Wed Apr 1 16:00:58 UTC 2015 (revision 221808) +Sun Apr 19 15:23:34 CEST 2015 +Sun Apr 19 13:23:34 UTC 2015 (revision 222218) EOF } @@ -12,7 +12,852 @@ LANG=C svn diff svn://gcc.gnu.org/svn/gcc/tags/gcc_5_1_0_release svn://gcc.gnu.o | sed -r 's,^--- (\S+)\t(\S+)(.*)$,--- a/src/\1\t\2,;s,^\+\+\+ (\S+)\t(\S+)(.*)$,+++ b/src/\1\t\2,' \ | awk '/^Index:.*\.(class|texi)/ {skip=1; next} /^Index:/ { skip=0 } skip==0' -LANG=C svn diff svn://gcc.gnu.org/svn/gcc/trunk@221805 svn://gcc.gnu.org/svn/gcc/trunk \ +LANG=C svn diff svn://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@222066 svn://gcc.gnu.org/svn/gcc/branches/gcc-5-branch \ | sed -r 's,^--- (\S+)\t(\S+)(.*)$,--- a/src/\1\t\2,;s,^\+\+\+ (\S+)\t(\S+)(.*)$,+++ b/src/\1\t\2,' \ | awk '/^Index:.*\.(class|texi)/ {skip=1; next} /^Index:/ { skip=0 } skip==0' +Index: libcc1/Makefile.in +=================================================================== +--- a/src/libcc1/Makefile.in (revision ++++ b/src/libcc1/Makefile.in (revision +@@ -245,7 +245,7 @@ + top_srcdir = @top_srcdir@ + visibility = @visibility@ + ACLOCAL_AMFLAGS = -I .. -I ../config +-gcc_build_dir = ../$(host_subdir)/gcc ++gcc_build_dir = ../gcc + AM_CPPFLAGS = -I $(srcdir)/../include -I $(srcdir)/../libgcc \ + -I $(gcc_build_dir) -I$(srcdir)/../gcc \ + -I $(srcdir)/../gcc/c -I $(srcdir)/../gcc/c-family \ +Index: libcc1/ChangeLog +=================================================================== +--- a/src/libcc1/ChangeLog (revision ++++ b/src/libcc1/ChangeLog (revision +@@ -1,3 +1,9 @@ ++2015-04-15 Andreas Schwab <schwab@suse.de> ++ ++ PR bootstrap/65763 ++ * Makefile.am (gcc_build_dir): Remove $(host_subdir)/ part. ++ * Makefile.in: Regenerated. ++ + 2015-01-30 Joseph Myers <joseph@codesourcery.com> + + * plugin.cc: All callers of fatal_error changed to pass +Index: libcc1/Makefile.am +=================================================================== +--- a/src/libcc1/Makefile.am (revision ++++ b/src/libcc1/Makefile.am (revision +@@ -17,7 +17,7 @@ + ## <http://www.gnu.org/licenses/>. + + ACLOCAL_AMFLAGS = -I .. -I ../config +-gcc_build_dir = ../$(host_subdir)/gcc ++gcc_build_dir = ../gcc + AM_CPPFLAGS = -I $(srcdir)/../include -I $(srcdir)/../libgcc \ + -I $(gcc_build_dir) -I$(srcdir)/../gcc \ + -I $(srcdir)/../gcc/c -I $(srcdir)/../gcc/c-family \ +Index: libstdc++-v3/scripts/extract_symvers.pl +=================================================================== +--- a/src/libstdc++-v3/scripts/extract_symvers.pl (revision ++++ b/src/libstdc++-v3/scripts/extract_symvers.pl (revision +@@ -82,7 +82,10 @@ + close PVS or die "pvs error"; + + # Only look at .dynsym table, like readelf in extract_symvers. +-open ELFDUMP, "/usr/ccs/bin/elfdump -s -N .dynsym $lib |" or die $!; ++# Ignore error output to avoid getting confused by ++# .gnu.version_r: zero sh_entsize information, expected 0x1 ++# warning with Solaris 11 elfdump on gld-produced shared objects. ++open ELFDUMP, "/usr/ccs/bin/elfdump -s -N .dynsym $lib 2>/dev/null |" or die $!; + while (<ELFDUMP>) { + chomp; + +Index: libstdc++-v3/ChangeLog +=================================================================== +--- a/src/libstdc++-v3/ChangeLog (revision ++++ b/src/libstdc++-v3/ChangeLog (revision +@@ -1,3 +1,12 @@ ++2015-04-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> ++ ++ * scripts/extract_symvers.pl: Ignore elfdump error output. ++ ++2015-04-14 Hans-Peter Nilsson <hp@axis.com> ++ ++ * testsuite/29_atomics/atomic/62259.cc: Assert atomic ++ alignment is larger-equal, not equal, to default alignment. ++ + 2015-04-13 Jonathan Wakely <jwakely@redhat.com> + + PR libstdc++/65754 +Index: libstdc++-v3/testsuite/29_atomics/atomic/62259.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/29_atomics/atomic/62259.cc (revision ++++ b/src/libstdc++-v3/testsuite/29_atomics/atomic/62259.cc (revision +@@ -33,7 +33,7 @@ + int32_t b; + }; + +-static_assert( alignof(std::atomic<twoints>) == alignof(int64_t), ++static_assert( alignof(std::atomic<twoints>) >= alignof(int64_t), + "std::atomic not suitably aligned" ); + + // libstdc++/65147 +@@ -44,7 +44,7 @@ + + std::atomic<power_of_two_obj> obj1; + +-static_assert( alignof(obj1) == alignof(int64_t), ++static_assert( alignof(obj1) >= alignof(int64_t), + "std::atomic not suitably aligned" ); + + struct container_struct { +@@ -54,5 +54,5 @@ + + container_struct obj2; + +-static_assert( alignof(obj2.ao) == alignof(int64_t), ++static_assert( alignof(obj2.ao) >= alignof(int64_t), + "std::atomic not suitably aligned" ); +Index: configure.ac +=================================================================== +--- a/src/configure.ac (revision ++++ b/src/configure.ac (revision +@@ -3482,7 +3482,19 @@ + [choose additional checking for stage1 of the compiler])], + [stage1_checking=--enable-checking=${enable_stage1_checking}], + [if test "x$enable_checking" = xno || test "x$enable_checking" = x; then +- stage1_checking=--enable-checking=yes,types ++ # For --disable-checking or implicit --enable-checking=release, avoid ++ # setting --enable-checking=gc in the default stage1 checking for LTO ++ # bootstraps. See PR62077. ++ stage1_checking=--enable-checking=release,misc,gimple,rtlflag,tree,types ++ case $BUILD_CONFIG in ++ *lto*) ++ if test "x$enable_checking" = x && \ ++ test -d ${srcdir}/gcc && \ ++ test x"`cat ${srcdir}/gcc/DEV-PHASE`" = xexperimental; then ++ stage1_checking=--enable-checking=yes,types ++ fi;; ++ *) stage1_checking=--enable-checking=yes,types;; ++ esac + else + stage1_checking=--enable-checking=$enable_checking,types + fi]) +Index: ChangeLog +=================================================================== +--- a/src/ChangeLog (revision ++++ b/src/ChangeLog (revision +@@ -1,3 +1,12 @@ ++2015-04-17 Jakub Jelinek <jakub@redhat.com> ++ ++ PR bootstrap/62077 ++ * configure.ac (--enable-stage1-checking): Default to ++ release,misc,gimple,rtlflag,tree,types if --disable-checking ++ or --enable-checking is not specified and DEV-PHASE is not ++ experimental. ++ * configure: Regenerated. ++ + 2015-04-08 Cary Coutant <ccoutant@gmail.com> + + * MAINTAINERS: Update my email address. +Index: configure +=================================================================== +--- a/src/configure (revision ++++ b/src/configure (revision +@@ -14761,7 +14761,19 @@ + enableval=$enable_stage1_checking; stage1_checking=--enable-checking=${enable_stage1_checking} + else + if test "x$enable_checking" = xno || test "x$enable_checking" = x; then +- stage1_checking=--enable-checking=yes,types ++ # For --disable-checking or implicit --enable-checking=release, avoid ++ # setting --enable-checking=gc in the default stage1 checking for LTO ++ # bootstraps. See PR62077. ++ stage1_checking=--enable-checking=release,misc,gimple,rtlflag,tree,types ++ case $BUILD_CONFIG in ++ *lto*) ++ if test "x$enable_checking" = x && \ ++ test -d ${srcdir}/gcc && \ ++ test x"`cat ${srcdir}/gcc/DEV-PHASE`" = xexperimental; then ++ stage1_checking=--enable-checking=yes,types ++ fi;; ++ *) stage1_checking=--enable-checking=yes,types;; ++ esac + else + stage1_checking=--enable-checking=$enable_checking,types + fi +Index: gcc/ipa-icf-gimple.c +=================================================================== +--- a/src/gcc/ipa-icf-gimple.c (revision ++++ b/src/gcc/ipa-icf-gimple.c (revision +@@ -706,7 +706,11 @@ + return return_different_stmts (s1, s2, "GIMPLE_SWITCH"); + break; + case GIMPLE_DEBUG: ++ break; + case GIMPLE_EH_DISPATCH: ++ if (gimple_eh_dispatch_region (as_a <geh_dispatch *> (s1)) ++ != gimple_eh_dispatch_region (as_a <geh_dispatch *> (s2))) ++ return return_different_stmts (s1, s2, "GIMPLE_EH_DISPATCH"); + break; + case GIMPLE_RESX: + if (!compare_gimple_resx (as_a <gresx *> (s1), +@@ -734,7 +738,7 @@ + break; + case GIMPLE_PREDICT: + case GIMPLE_NOP: +- return true; ++ break; + default: + return return_false_with_msg ("Unknown GIMPLE code reached"); + } +Index: gcc/DATESTAMP +=================================================================== +--- a/src/gcc/DATESTAMP (revision ++++ b/src/gcc/DATESTAMP (revision +@@ -1 +1 @@ +-20150413 ++20150419 +Index: gcc/ChangeLog +=================================================================== +--- a/src/gcc/ChangeLog (revision ++++ b/src/gcc/ChangeLog (revision +@@ -1,3 +1,60 @@ ++2015-04-18 Gerald Pfeifer <gerald@pfeifer.com> ++ ++ * doc/plugins.texi: Rewrite first introductory paragraph. ++ ++2015-04-17 H.J. Lu <hongjiu.lu@intel.com> ++ ++ PR target/65780 ++ * config/i386/i386.c (ix86_binds_local_p): Define only if ++ TARGET_MACHO and TARGET_DLLIMPORT_DECL_ATTRIBUTES are false. ++ ++2015-04-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com> ++ ++ PR target/65787 ++ * config/rs6000/rs6000.c (rtx_is_swappable_p): Remove previous ++ fix; ensure that a subsequent SH_NONE operand does not overwrite ++ an existing *special value. ++ ++2015-04-17 H.J. Lu <hongjiu.lu@intel.com> ++ ++ PR target/65780 ++ * output.h (default_binds_local_p_3): New. ++ * varasm.c (default_binds_local_p_3): Make it public. Take an ++ argument to indicate if common symbol may be local. If common ++ symbol may be local, treat non-external variable as defined ++ locally. ++ (default_binds_local_p_2): Pass !flag_pic to default_binds_local_p_3. ++ (default_binds_local_p_1): Pass false to default_binds_local_p_3. ++ * config/i386/i386.c (ix86_binds_local_p): New. ++ (TARGET_BINDS_LOCAL_P): Replace default_binds_local_p_2 with ++ ix86_binds_local_p. ++ ++2015-04-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com> ++ ++ PR target/65787 ++ * config/rs6000/rs6000.c (rtx_is_swappable_p): Handle case where ++ vec_extract operation is wrapped in a PARALLEL with a CLOBBER. ++ (adjust_extract): Likewise. ++ ++2015-04-17 Jakub Jelinek <jakub@redhat.com> ++ ++ PR debug/65771 ++ * dwarf2out.c (loc_list_from_tree): Return NULL ++ for DEBUG_EXPR_DECL. ++ ++2015-04-15 Jakub Jelinek <jakub@redhat.com> ++ ++ PR ipa/65765 ++ * ipa-icf-gimple.c (func_checker::compare_bb): For GIMPLE_NOP ++ and GIMPLE_PREDICT use break instead of return true. For ++ GIMPLE_EH_DISPATCH, compare dispatch region. ++ ++2015-04-14 Jakub Jelinek <jakub@redhat.com> ++ ++ PR rtl-optimization/65761 ++ * cfgrtl.c (rtl_split_edge): For EDGE_CROSSING split, use ++ get_last_bb_insn (after) instead of NEXT_INSN (BB_END (after)). ++ + 2015-04-13 Jan Hubicka <hubicka@ucw.cz> + Gerald Pfeifer <gerald@pfeifer.com> + +Index: gcc/testsuite/gcc.target/powerpc/pr65787.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/powerpc/pr65787.c (revision ++++ b/src/gcc/testsuite/gcc.target/powerpc/pr65787.c (revision +@@ -0,0 +1,21 @@ ++/* { dg-do compile { target { powerpc64le-*-* } } } */ ++/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */ ++/* { dg-options "-mcpu=power8 -O3" } */ ++/* { dg-final { scan-assembler "xxsldwi \[0-9\]*,\[0-9\]*,\[0-9\]*,3" } } */ ++/* { dg-final { scan-assembler-not "xxpermdi" } } */ ++ ++/* This test verifies that a vector extract operand properly has its ++ lane changed by the swap optimization. Element 2 of LE corresponds ++ to element 1 of BE. When doublewords are swapped, this becomes ++ element 3 of BE, so we need to shift the vector left by 3 words ++ to be able to extract the correct value from BE element zero. */ ++ ++typedef float v4f32 __attribute__ ((__vector_size__ (16))); ++ ++void foo (float); ++extern v4f32 x, y; ++ ++int main() { ++ v4f32 z = x + y; ++ foo (z[2]); ++} +Index: gcc/testsuite/gcc.target/i386/avx512dq-vfpclasspd-2.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/i386/avx512dq-vfpclasspd-2.c (revision ++++ b/src/gcc/testsuite/gcc.target/i386/avx512dq-vfpclasspd-2.c (revision +@@ -21,7 +21,7 @@ + int PInf_res = (isinf (src) == 1); + int NInf_res = (isinf (src) == -1); + int Denorm_res = (fpclassify (src) == FP_SUBNORMAL); +- int FinNeg_res = finite (src) && (src < 0); ++ int FinNeg_res = __builtin_finite (src) && (src < 0); + + int result = (((imm & 1) && qNaN_res) + || (((imm >> 1) & 1) && Pzero_res) +Index: gcc/testsuite/gcc.target/i386/pr32219-1.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/i386/pr32219-1.c (revision ++++ b/src/gcc/testsuite/gcc.target/i386/pr32219-1.c (revision +@@ -1,7 +1,8 @@ + /* { dg-do compile { target *-*-linux* } } */ + /* { dg-options "-O2 -fpie" } */ + +-/* Common symbol with -fpie. */ ++/* Initialized common symbol with -fpie. */ ++int xxx = 5; + int xxx; + + int +Index: gcc/testsuite/gcc.target/i386/pr32219-9.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/i386/pr32219-9.c (revision ++++ b/src/gcc/testsuite/gcc.target/i386/pr32219-9.c (revision +@@ -0,0 +1,15 @@ ++/* { dg-do compile { target *-*-linux* } } */ ++/* { dg-require-effective-target pie_copyreloc } */ ++/* { dg-options "-O2 -fpie" } */ ++ ++/* Uninitialized common symbol with -fpie. */ ++int xxx; ++ ++int ++foo () ++{ ++ return xxx; ++} ++ ++/* { dg-final { scan-assembler "movl\[ \t\]xxx\\(%rip\\), %eax" { target { ! ia32 } } } } */ ++/* { dg-final { scan-assembler-not "xxx@GOTPCREL" { target { ! ia32 } } } } */ +Index: gcc/testsuite/gcc.target/i386/avx512dq-vfpclassps-2.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/i386/avx512dq-vfpclassps-2.c (revision ++++ b/src/gcc/testsuite/gcc.target/i386/avx512dq-vfpclassps-2.c (revision +@@ -21,7 +21,7 @@ + int PInf_res = (isinf (src) == 1); + int NInf_res = (isinf (src) == -1); + int Denorm_res = (fpclassify (src) == FP_SUBNORMAL); +- int FinNeg_res = finite (src) && (src < 0); ++ int FinNeg_res = __builtin_finite (src) && (src < 0); + + int result = (((imm & 1) && qNaN_res) + || (((imm >> 1) & 1) && Pzero_res) +Index: gcc/testsuite/gcc.target/i386/mpx/alloca-1-lbv.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/i386/mpx/alloca-1-lbv.c (revision ++++ b/src/gcc/testsuite/gcc.target/i386/mpx/alloca-1-lbv.c (revision +@@ -16,7 +16,7 @@ + + int mpx_test (int argc, const char **argv) + { +- int *buf = (int *)__buitlin_alloca (100 * sizeof(int)); ++ int *buf = (int *)__builtin_alloca (100 * sizeof(int)); + + rd (buf, -1); + +Index: gcc/testsuite/gcc.target/i386/pr64317.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/i386/pr64317.c (revision ++++ b/src/gcc/testsuite/gcc.target/i386/pr64317.c (revision +@@ -3,7 +3,7 @@ + /* { dg-final { scan-assembler "addl\[ \\t\]+\[$\]_GLOBAL_OFFSET_TABLE_, %ebx" } } */ + /* { dg-final { scan-assembler "movl\[ \\t\]+c@GOTOFF\[(\]%ebx\[)\]" } } */ + /* { dg-final { scan-assembler-not "movl\[ \\t\]+\[0-9]+\[(\]%esp\[)\], %ebx" } } */ +-long c; ++long c = 1; + + int bar(); + +Index: gcc/testsuite/gcc.dg/pr65780-1.c +=================================================================== +--- a/src/gcc/testsuite/gcc.dg/pr65780-1.c (revision ++++ b/src/gcc/testsuite/gcc.dg/pr65780-1.c (revision +@@ -0,0 +1,12 @@ ++/* PR target/65780 */ ++/* { dg-do link { target *-*-linux* *-*-gnu* } } */ ++/* { dg-options "-O2" } */ ++ ++int optopt; ++ ++int ++main () ++{ ++ optopt = 4; ++ return 0; ++} +Index: gcc/testsuite/gcc.dg/debug/pr65771.c +=================================================================== +--- a/src/gcc/testsuite/gcc.dg/debug/pr65771.c (revision ++++ b/src/gcc/testsuite/gcc.dg/debug/pr65771.c (revision +@@ -0,0 +1,15 @@ ++/* PR debug/65771 */ ++/* { dg-do link } */ ++/* { dg-require-effective-target tls } */ ++ ++struct S { int s; int t; }; ++__thread struct S a[10]; ++int b; ++ ++int ++main () ++{ ++ int c = a[b].t; ++ (void) c; ++ return 0; ++} +Index: gcc/testsuite/gcc.dg/pr65780-2.c +=================================================================== +--- a/src/gcc/testsuite/gcc.dg/pr65780-2.c (revision ++++ b/src/gcc/testsuite/gcc.dg/pr65780-2.c (revision +@@ -0,0 +1,13 @@ ++/* PR target/65780 */ ++/* { dg-do link { target *-*-linux* *-*-gnu* } } */ ++/* { dg-require-effective-target pie } */ ++/* { dg-options "-O2 -fpie" } */ ++ ++int optopt; ++ ++int ++main () ++{ ++ optopt = 4; ++ return 0; ++} +Index: gcc/testsuite/ChangeLog +=================================================================== +--- a/src/gcc/testsuite/ChangeLog (revision ++++ b/src/gcc/testsuite/ChangeLog (revision +@@ -1,3 +1,40 @@ ++2015-04-17 H.J. Lu <hongjiu.lu@intel.com> ++ ++ PR target/65780 ++ * gcc.dg/pr65780-1.c: New test. ++ * gcc.dg/pr65780-2.c: Likewise. ++ * gcc.target/i386/pr32219-9.c: Likewise. ++ * gcc.target/i386/pr32219-1.c (xxx): Make it initialized common ++ symbol. ++ * gcc.target/i386/pr64317.c (c): Initialize. ++ ++2015-04-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com> ++ ++ PR target/65787 ++ * gcc.target/powerpc/pr65787.c: New. ++ ++2015-04-17 Jakub Jelinek <jakub@redhat.com> ++ ++ PR debug/65771 ++ * gcc.dg/debug/pr65771.c: New test. ++ ++2015-04-16 H.J. Lu <hongjiu.lu@intel.com> ++ ++ * gcc.target/i386/mpx/alloca-1-lbv.c (mpx_test): Replace ++ __buitlin_alloca with __builtin_alloca. ++ ++2015-04-15 Jakub Jelinek <jakub@redhat.com> ++ ++ PR ipa/65765 ++ * g++.dg/ipa/pr65765.C: New test. ++ ++2015-04-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> ++ ++ * gcc.target/i386/avx512dq-vfpclasspd-2.c (check_fp_class_dp): Use ++ __builtin_finite instead of finite. ++ * gcc.target/i386/avx512dq-vfpclassps-2.c (check_fp_class_sp): ++ Likewise. ++ + 2015-04-12 Jakub Jelinek <jakub@redhat.com> + + PR tree-optimization/65747 +Index: gcc/testsuite/g++.dg/ipa/pr65765.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/ipa/pr65765.C (revision ++++ b/src/gcc/testsuite/g++.dg/ipa/pr65765.C (revision +@@ -0,0 +1,45 @@ ++// PR ipa/65765 ++// { dg-do run } ++// { dg-options "-O2" } ++ ++int a, b, c, d, e; ++unsigned char h[] = { 1, 1 }; ++ ++__attribute__ ((cold)) int ModRM_Mode () { return a; } ++ ++int ++ModRM_RM (int p1) ++{ ++ return p1; ++} ++ ++__attribute__ ((cold)) static bool ModRM_hasSIB (unsigned char p1) ++{ ++ return ModRM_Mode () != 1 && ModRM_RM (p1); ++} ++ ++__attribute__ ((cold)) static bool ModRM_hasRIP (unsigned char p1) ++{ ++ return ModRM_Mode () && ModRM_RM (p1); ++} ++ ++unsigned char * ++DisassembleHeapAccess (unsigned char *p1) ++{ ++ b = *p1++; ++ if (ModRM_hasSIB (b)) ++ c = *p1++; ++ int f = c, g = 0; ++ d = ModRM_hasRIP (g); ++ e = f == 0; ++ if (e) ++ p1 += sizeof 0; ++ return p1; ++} ++ ++int ++main () ++{ ++ if (DisassembleHeapAccess (h) != h + 2) ++ __builtin_abort (); ++} +Index: gcc/dwarf2out.c +=================================================================== +--- a/src/gcc/dwarf2out.c (revision ++++ b/src/gcc/dwarf2out.c (revision +@@ -14642,6 +14642,7 @@ + + case TARGET_MEM_REF: + case SSA_NAME: ++ case DEBUG_EXPR_DECL: + return NULL; + + case COMPOUND_EXPR: +Index: gcc/go/gofrontend/types.cc +=================================================================== +--- a/src/gcc/go/gofrontend/types.cc (revision ++++ b/src/gcc/go/gofrontend/types.cc (revision +@@ -2259,6 +2259,14 @@ + if (in_function != NULL) + { + n.append(1, '.'); ++ const Typed_identifier* rcvr = ++ in_function->func_value()->type()->receiver(); ++ if (rcvr != NULL) ++ { ++ Named_type* rcvr_type = rcvr->type()->deref()->named_type(); ++ n.append(Gogo::unpack_hidden_name(rcvr_type->name())); ++ n.append(1, '.'); ++ } + n.append(Gogo::unpack_hidden_name(in_function->name())); + if (index > 0) + { +@@ -9102,23 +9110,18 @@ + } + if (!this->is_builtin()) + { +- // We handle -fgo-prefix and -fgo-pkgpath differently here for +- // compatibility with how the compiler worked before +- // -fgo-pkgpath was introduced. When -fgo-pkgpath is specified, +- // we use it to make a unique reflection string, so that the +- // type canonicalization in the reflect package will work. In +- // order to be compatible with the gc compiler, we put tabs into +- // the package path, so that the reflect methods can discard it. ++ // When -fgo-pkgpath or -fgo-prefix is specified, we use it to ++ // make a unique reflection string, so that the type ++ // canonicalization in the reflect package will work. In order ++ // to be compatible with the gc compiler, we put tabs into the ++ // package path, so that the reflect methods can discard it. + const Package* package = this->named_object_->package(); +- if (gogo->pkgpath_from_option()) +- { +- ret->push_back('\t'); +- ret->append(package != NULL +- ? package->pkgpath_symbol() +- : gogo->pkgpath_symbol()); +- ret->push_back('\t'); +- } ++ ret->push_back('\t'); + ret->append(package != NULL ++ ? package->pkgpath_symbol() ++ : gogo->pkgpath_symbol()); ++ ret->push_back('\t'); ++ ret->append(package != NULL + ? package->package_name() + : gogo->package_name()); + ret->push_back('.'); +@@ -9126,6 +9129,14 @@ + if (this->in_function_ != NULL) + { + ret->push_back('\t'); ++ const Typed_identifier* rcvr = ++ this->in_function_->func_value()->type()->receiver(); ++ if (rcvr != NULL) ++ { ++ Named_type* rcvr_type = rcvr->type()->deref()->named_type(); ++ ret->append(Gogo::unpack_hidden_name(rcvr_type->name())); ++ ret->push_back('.'); ++ } + ret->append(Gogo::unpack_hidden_name(this->in_function_->name())); + ret->push_back('$'); + if (this->in_function_index_ > 0) +Index: gcc/varasm.c +=================================================================== +--- a/src/gcc/varasm.c (revision ++++ b/src/gcc/varasm.c (revision +@@ -6809,9 +6809,13 @@ + || resolution == LDPR_RESOLVED_EXEC); + } + +-static bool ++/* COMMON_LOCAL_P is true means that the linker can guarantee that an ++ uninitialized common symbol in the executable will still be defined ++ (through COPY relocation) in the executable. */ ++ ++bool + default_binds_local_p_3 (const_tree exp, bool shlib, bool weak_dominate, +- bool extern_protected_data) ++ bool extern_protected_data, bool common_local_p) + { + /* A non-decl is an entry in the constant pool. */ + if (!DECL_P (exp)) +@@ -6836,7 +6840,16 @@ + because dynamic linking might overwrite symbols + in shared libraries. */ + bool resolved_locally = false; +- bool defined_locally = !DECL_EXTERNAL (exp); ++ ++ bool uninited_common = (DECL_COMMON (exp) ++ && (DECL_INITIAL (exp) == NULL ++ || (!in_lto_p ++ && DECL_INITIAL (exp) == error_mark_node))); ++ ++ /* A non-external variable is defined locally only if it isn't ++ uninitialized COMMON variable or common_local_p is true. */ ++ bool defined_locally = (!DECL_EXTERNAL (exp) ++ && (!uninited_common || common_local_p)); + if (symtab_node *node = symtab_node::get (exp)) + { + if (node->in_other_partition) +@@ -6878,10 +6891,7 @@ + + /* Uninitialized COMMON variable may be unified with symbols + resolved from other modules. */ +- if (DECL_COMMON (exp) +- && !resolved_locally +- && (DECL_INITIAL (exp) == NULL +- || (!in_lto_p && DECL_INITIAL (exp) == error_mark_node))) ++ if (uninited_common && !resolved_locally) + return false; + + /* Otherwise we're left with initialized (or non-common) global data +@@ -6895,21 +6905,22 @@ + bool + default_binds_local_p (const_tree exp) + { +- return default_binds_local_p_3 (exp, flag_shlib != 0, true, false); ++ return default_binds_local_p_3 (exp, flag_shlib != 0, true, false, false); + } + +-/* Similar to default_binds_local_p, but protected data may be +- external. */ ++/* Similar to default_binds_local_p, but common symbol may be local. */ ++ + bool + default_binds_local_p_2 (const_tree exp) + { +- return default_binds_local_p_3 (exp, flag_shlib != 0, true, true); ++ return default_binds_local_p_3 (exp, flag_shlib != 0, true, false, ++ !flag_pic); + } + + bool + default_binds_local_p_1 (const_tree exp, int shlib) + { +- return default_binds_local_p_3 (exp, shlib != 0, false, false); ++ return default_binds_local_p_3 (exp, shlib != 0, false, false, false); + } + + /* Return true when references to DECL must bind to current definition in +Index: gcc/output.h +=================================================================== +--- a/src/gcc/output.h (revision ++++ b/src/gcc/output.h (revision +@@ -587,6 +587,7 @@ + extern bool default_binds_local_p (const_tree); + extern bool default_binds_local_p_1 (const_tree, int); + extern bool default_binds_local_p_2 (const_tree); ++extern bool default_binds_local_p_3 (const_tree, bool, bool, bool, bool); + extern void default_globalize_label (FILE *, const char *); + extern void default_globalize_decl_name (FILE *, tree); + extern void default_emit_unwind_label (FILE *, tree, int, int); +Index: gcc/config/i386/i386.c +=================================================================== +--- a/src/gcc/config/i386/i386.c (revision ++++ b/src/gcc/config/i386/i386.c (revision +@@ -51801,6 +51801,21 @@ + return 2; + } + ++#if !TARGET_MACHO && !TARGET_DLLIMPORT_DECL_ATTRIBUTES ++/* For i386, common symbol is local only for non-PIE binaries. For ++ x86-64, common symbol is local only for non-PIE binaries or linker ++ supports copy reloc in PIE binaries. */ ++ ++static bool ++ix86_binds_local_p (const_tree exp) ++{ ++ return default_binds_local_p_3 (exp, flag_shlib != 0, true, true, ++ (!flag_pic ++ || (TARGET_64BIT ++ && HAVE_LD_PIE_COPYRELOC != 0))); ++} ++#endif ++ + /* Initialize the GCC target structure. */ + #undef TARGET_RETURN_IN_MEMORY + #define TARGET_RETURN_IN_MEMORY ix86_return_in_memory +@@ -51935,7 +51950,7 @@ + #define TARGET_BINDS_LOCAL_P darwin_binds_local_p + #else + #undef TARGET_BINDS_LOCAL_P +-#define TARGET_BINDS_LOCAL_P default_binds_local_p_2 ++#define TARGET_BINDS_LOCAL_P ix86_binds_local_p + #endif + #if TARGET_DLLIMPORT_DECL_ATTRIBUTES + #undef TARGET_BINDS_LOCAL_P +Index: gcc/config/rs6000/rs6000.c +=================================================================== +--- a/src/gcc/config/rs6000/rs6000.c (revision ++++ b/src/gcc/config/rs6000/rs6000.c (revision +@@ -34285,10 +34285,11 @@ + { + unsigned int special_op = SH_NONE; + ok &= rtx_is_swappable_p (XEXP (op, i), &special_op); ++ if (special_op == SH_NONE) ++ continue; + /* Ensure we never have two kinds of special handling + for the same insn. */ +- if (*special != SH_NONE && special_op != SH_NONE +- && *special != special_op) ++ if (*special != SH_NONE && *special != special_op) + return 0; + *special = special_op; + } +@@ -34297,10 +34298,11 @@ + { + unsigned int special_op = SH_NONE; + ok &= rtx_is_swappable_p (XVECEXP (op, i, j), &special_op); ++ if (special_op == SH_NONE) ++ continue; + /* Ensure we never have two kinds of special handling + for the same insn. */ +- if (*special != SH_NONE && special_op != SH_NONE +- && *special != special_op) ++ if (*special != SH_NONE && *special != special_op) + return 0; + *special = special_op; + } +@@ -34603,7 +34605,10 @@ + static void + adjust_extract (rtx_insn *insn) + { +- rtx src = SET_SRC (PATTERN (insn)); ++ rtx pattern = PATTERN (insn); ++ if (GET_CODE (pattern) == PARALLEL) ++ pattern = XVECEXP (pattern, 0, 0); ++ rtx src = SET_SRC (pattern); + /* The vec_select may be wrapped in a vec_duplicate for a splat, so + account for that. */ + rtx sel = GET_CODE (src) == VEC_DUPLICATE ? XEXP (src, 0) : src; +Index: gcc/cfgrtl.c +=================================================================== +--- a/src/gcc/cfgrtl.c (revision ++++ b/src/gcc/cfgrtl.c (revision +@@ -1928,7 +1928,7 @@ + && (edge_in->flags & EDGE_CROSSING)) + { + after = last_bb_in_partition (edge_in->src); +- before = NEXT_INSN (BB_END (after)); ++ before = get_last_bb_insn (after); + /* The instruction following the last bb in partition should + be a barrier, since it cannot end in a fall-through. */ + gcc_checking_assert (BARRIER_P (before)); +Index: libgo/runtime/go-callers.c +=================================================================== +--- a/src/libgo/runtime/go-callers.c (revision ++++ b/src/libgo/runtime/go-callers.c (revision +@@ -83,8 +83,21 @@ + } + + loc = &arg->locbuf[arg->index]; +- loc->pc = pc; + ++ /* On the call to backtrace_full the pc value was most likely ++ decremented if there was a normal call, since the pc referred to ++ the instruction where the call returned and not the call itself. ++ This was done so that the line number referred to the call ++ instruction. To make sure the actual pc from the call stack is ++ used, it is incremented here. ++ ++ In the case of a signal, the pc was not decremented by ++ backtrace_full but still incremented here. That doesn't really ++ hurt anything since the line number is right and the pc refers to ++ the same instruction. */ ++ ++ loc->pc = pc + 1; ++ + /* The libbacktrace library says that these strings might disappear, + but with the current implementation they won't. We can't easily + allocate memory here, so for now assume that we can save a +Index: libgo/runtime/go-caller.c +=================================================================== +--- a/src/libgo/runtime/go-caller.c (revision ++++ b/src/libgo/runtime/go-caller.c (revision +@@ -166,7 +166,7 @@ + + runtime_memclr (&ret, sizeof ret); + n = runtime_callers (skip + 1, &loc, 1, false); +- if (n < 1) ++ if (n < 1 || loc.pc == 0) + return ret; + ret.pc = loc.pc; + ret.file = loc.filename; +Index: libgo/go/runtime/pprof/pprof.go +=================================================================== +--- a/src/libgo/go/runtime/pprof/pprof.go (revision ++++ b/src/libgo/go/runtime/pprof/pprof.go (revision +@@ -351,6 +351,10 @@ + if !show && !strings.Contains(name, ".") && strings.HasPrefix(name, "__go_") { + continue + } ++ if !show && name == "" { ++ // This can happen due to http://gcc.gnu.org/PR65797. ++ continue ++ } + show = true + fmt.Fprintf(w, "#\t%#x\t%s+%#x\t%s:%d\n", pc, name, pc-f.Entry(), file, line) + } diff --git a/debian/rules.patch b/debian/rules.patch index db3466f..b218648 100644 --- a/debian/rules.patch +++ b/debian/rules.patch @@ -13,6 +13,7 @@ series_file ?= $(patchdir)/series # which patches should be applied? debian_patches = \ + svn-updates \ $(if $(with_linaro_branch),gcc-linaro) \ $(if $(with_linaro_branch),gcc-linaro-no-macros) \ |