aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9')
-rw-r--r--gcc-4.9/ChangeLog11
-rw-r--r--gcc-4.9/config/futex.m416
-rwxr-xr-xgcc-4.9/configure38
-rw-r--r--gcc-4.9/configure.ac24
-rw-r--r--gcc-4.9/gcc/BASE-VER2
-rw-r--r--gcc-4.9/gcc/ChangeLog201
-rw-r--r--gcc-4.9/gcc/Makefile.in2
-rw-r--r--gcc-4.9/gcc/builtins.def3
-rw-r--r--gcc-4.9/gcc/c-family/c-common.c2
-rw-r--r--gcc-4.9/gcc/cfghooks.c18
-rw-r--r--gcc-4.9/gcc/cfgloop.c13
-rw-r--r--gcc-4.9/gcc/cfgloop.h8
-rw-r--r--gcc-4.9/gcc/common.opt9
-rw-r--r--gcc-4.9/gcc/config.gcc6
-rw-r--r--gcc-4.9/gcc/config.in6
-rw-r--r--gcc-4.9/gcc/config/aarch64/aarch64-elf-raw.h8
-rw-r--r--gcc-4.9/gcc/config/aarch64/aarch64-linux.h11
-rw-r--r--gcc-4.9/gcc/config/arm/thumb2.md24
-rw-r--r--gcc-4.9/gcc/config/i386/i386.c6
-rw-r--r--gcc-4.9/gcc/config/i386/pmm_malloc.h8
-rw-r--r--gcc-4.9/gcc/config/linux-android.h10
-rw-r--r--gcc-4.9/gcc/config/linux-grte.h0
-rw-r--r--gcc-4.9/gcc/config/mips/mips.c16
-rw-r--r--gcc-4.9/gcc/config/mips/msa.h535
-rw-r--r--gcc-4.9/gcc/config/rs6000/linux-grte.h0
-rwxr-xr-xgcc-4.9/gcc/configure21
-rw-r--r--gcc-4.9/gcc/configure.ac10
-rw-r--r--gcc-4.9/gcc/cp/call.c71
-rw-r--r--gcc-4.9/gcc/cp/cp-lang.c4
-rw-r--r--gcc-4.9/gcc/cp/cp-tree.h48
-rw-r--r--gcc-4.9/gcc/cp/decl2.c5
-rw-r--r--gcc-4.9/gcc/cp/init.c16
-rw-r--r--gcc-4.9/gcc/cp/parser.c10
-rw-r--r--gcc-4.9/gcc/defaults.h7
-rw-r--r--gcc-4.9/gcc/doc/invoke.texi5
-rw-r--r--gcc-4.9/gcc/except.c5
-rw-r--r--gcc-4.9/gcc/final.c2
-rw-r--r--gcc-4.9/gcc/gcc.c37
-rw-r--r--gcc-4.9/gcc/incpath.c40
-rw-r--r--gcc-4.9/gcc/ira.c5
-rw-r--r--gcc-4.9/gcc/l-ipo.c2
-rw-r--r--gcc-4.9/gcc/langhooks-def.h4
-rw-r--r--gcc-4.9/gcc/langhooks.h4
-rw-r--r--gcc-4.9/gcc/loop-init.c27
-rw-r--r--gcc-4.9/gcc/omp-low.c4
-rw-r--r--gcc-4.9/gcc/opts-global.c18
-rw-r--r--gcc-4.9/gcc/opts.c6
-rw-r--r--gcc-4.9/gcc/opts.h3
-rw-r--r--gcc-4.9/gcc/passes.def6
-rw-r--r--gcc-4.9/gcc/sancov.c146
-rw-r--r--gcc-4.9/gcc/sanitizer.def5
-rw-r--r--gcc-4.9/gcc/testsuite/ChangeLog61
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp1y/testinc/phoobhar.h (renamed from gcc-4.9/gcc/config/arm/linux-grte.h)0
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/ext/mv18.C7
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/ext/mv19.C7
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/ext/mv20.C7
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/ext/mv21.C7
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/ext/mv22.C7
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/ext/mv23.C7
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/execute/pr69403.c20
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/fold-compare-2.c7
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/sancov/asan.c18
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/sancov/basic0.c9
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/sancov/basic1.c12
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/sancov/basic2.c14
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/lipo/val-prof-5_0.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/val-prof-5.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/20030709-2.c3
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/20040305-1.c5
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20318.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20657.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20702.c8
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21001.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21086.c8
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21090.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21294.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21458.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21559.c8
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21563.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr22117.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr23744.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr25382.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr37508.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr49039.c12
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr58480.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr59597.c7
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-2.c8
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-vrp-thread-1.c7
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp01.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp02.c8
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp03.c8
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp04.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c10
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp07.c14
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp08.c10
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp09.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp16.c7
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp17.c7
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp18.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp19.c8
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp20.c8
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp23.c7
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp24.c7
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp25.c7
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp33.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp34.c8
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp46.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp55.c9
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp56.c7
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp58.c8
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp67.c6
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp87.c13
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/vect/slp-perm-7.c4
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c14
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/aarch64/pr62040.c21
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/aarch64/pr62262.c20
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c2
-rw-r--r--gcc-4.9/gcc/toplev.c2
-rw-r--r--gcc-4.9/gcc/tree-pass.h3
-rw-r--r--gcc-4.9/gcc/tree-profile.c14
-rw-r--r--gcc-4.9/gcc/tree-ssa-threadedge.c55
-rw-r--r--gcc-4.9/gcc/tree-ssa-threadupdate.c182
-rw-r--r--gcc-4.9/gcc/tree-vect-data-refs.c38
-rw-r--r--gcc-4.9/gcc/tree-vect-stmts.c26
-rw-r--r--gcc-4.9/gcc/tree-vectorizer.h15
-rw-r--r--gcc-4.9/gcc/tree-vrp.c54
-rw-r--r--gcc-4.9/gcc/tree.c6
-rw-r--r--gcc-4.9/libatomic/acinclude.m45
-rw-r--r--gcc-4.9/libatomic/aclocal.m412
-rwxr-xr-xgcc-4.9/libatomic/configure14
-rw-r--r--gcc-4.9/libatomic/configure.ac3
-rw-r--r--gcc-4.9/libgcc/config.host2
-rw-r--r--gcc-4.9/libgcc/config/i386/cpuinfo.c16
-rw-r--r--gcc-4.9/libgcc/config/i386/t-linux6
-rw-r--r--gcc-4.9/libgo/go/debug/elf/testdata/go-relocation-test-gcc447-ppc64.objbin0 -> 3048 bytes
-rw-r--r--gcc-4.9/libstdc++-v3/Makefile.in2
-rw-r--r--gcc-4.9/libstdc++-v3/acinclude.m428
-rwxr-xr-xgcc-4.9/libstdc++-v3/configure74
-rw-r--r--gcc-4.9/libstdc++-v3/configure.ac1
-rw-r--r--gcc-4.9/libstdc++-v3/doc/Makefile.in2
-rw-r--r--gcc-4.9/libstdc++-v3/include/Makefile.in2
-rw-r--r--gcc-4.9/libstdc++-v3/include/bits/stl_tree.h26
-rw-r--r--gcc-4.9/libstdc++-v3/include/c_compatibility/complex.h2
-rw-r--r--gcc-4.9/libstdc++-v3/include/debug/array2
-rw-r--r--gcc-4.9/libstdc++-v3/include/ext/aligned_buffer.h41
-rw-r--r--gcc-4.9/libstdc++-v3/include/std/array11
-rw-r--r--gcc-4.9/libstdc++-v3/include/std/complex6
-rw-r--r--gcc-4.9/libstdc++-v3/libsupc++/Makefile.in25
-rw-r--r--gcc-4.9/libstdc++-v3/po/Makefile.in2
-rw-r--r--gcc-4.9/libstdc++-v3/python/Makefile.in2
-rw-r--r--gcc-4.9/libstdc++-v3/python/libstdcxx/v6/printers.py7
-rw-r--r--gcc-4.9/libstdc++-v3/src/Makefile.am31
-rw-r--r--gcc-4.9/libstdc++-v3/src/Makefile.in42
-rw-r--r--gcc-4.9/libstdc++-v3/src/c++11/Makefile.in2
-rw-r--r--gcc-4.9/libstdc++-v3/src/c++98/Makefile.in2
-rw-r--r--gcc-4.9/libstdc++-v3/testsuite/23_containers/array/tuple_interface/get_neg.cc6
-rw-r--r--gcc-4.9/libstdc++-v3/testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc2
-rw-r--r--gcc-4.9/libstdc++-v3/testsuite/26_numerics/complex/value_operations/constexpr2.cc29
-rw-r--r--gcc-4.9/libstdc++-v3/testsuite/Makefile.in2
160 files changed, 2124 insertions, 742 deletions
diff --git a/gcc-4.9/ChangeLog b/gcc-4.9/ChangeLog
index 207f2caf5..8c14e2788 100644
--- a/gcc-4.9/ChangeLog
+++ b/gcc-4.9/ChangeLog
@@ -23,17 +23,6 @@
* Makefile.in: Regenerate.
* configure: Regenerate.
-2014-11-19 Wilco Dijkstra <wdijkstr@arm.com>
-
- PR target/61915
- * config/aarch64/aarch64.c (generic_regmove_cost): Increase FP move
- cost.
-
-2014-11-19 Renlin Li <Renlin.Li@arm.com>
-
- PR middle-end/63762
- * ira.c (ira): Update preferred class.
-
2014-10-30 Release Manager
* GCC 4.9.2 released.
diff --git a/gcc-4.9/config/futex.m4 b/gcc-4.9/config/futex.m4
index e95144dd1..3356e144f 100644
--- a/gcc-4.9/config/futex.m4
+++ b/gcc-4.9/config/futex.m4
@@ -22,7 +22,13 @@ case "$target" in
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[#include <sys/syscall.h>
- int lk;],
+ int lk;
+#if !defined(SYS_gettid)
+#define SYS_gettid __NR_gettid
+#endif
+#if !defined(SYS_futex)
+#define SYS_futex __NR_futex
+#endif],
[syscall (SYS_gettid); syscall (SYS_futex, &lk, 0, 0, 0);])],
[save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
@@ -48,7 +54,13 @@ If so, please configure with --disable-linux-futex])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[#include <sys/syscall.h>
- int lk;],
+ int lk;
+#if !defined(SYS_gettid)
+#define SYS_gettid __NR_gettid
+#endif
+#if !defined(SYS_futex)
+#define SYS_futex __NR_futex
+#endif],
[syscall (SYS_gettid); syscall (SYS_futex, &lk, 0, 0, 0);])],[],
[AC_MSG_ERROR([SYS_gettid and SYS_futex required for --enable-linux-futex])])
;;
diff --git a/gcc-4.9/configure b/gcc-4.9/configure
index a7b80ffa0..186f52fec 100755
--- a/gcc-4.9/configure
+++ b/gcc-4.9/configure
@@ -784,6 +784,8 @@ with_build_sysroot
with_debug_prefix_map
with_build_config
enable_vtable_verify
+enable_bionic_libs
+enable_libatomic_ifuncs
enable_serial_configure
with_build_time_tools
enable_maintainer_mode
@@ -1483,6 +1485,8 @@ Optional Features:
--enable-objc-gc enable use of Boehm's garbage collector with the GNU
Objective-C runtime
--enable-vtable-verify Enable vtable verification feature
+ --enable-bionic-libs Use bionic libstdc++ libraries
+ --enable-bionic-libs Enable/disable IFUNCs in libatomic library
--enable-serial-[{host,target,build}-]configure
force sequential configuration of sub-packages for
the host, target or build machine, or all
@@ -7221,6 +7225,40 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_vtable_verify" >&5
$as_echo "$enable_vtable_verify" >&6; }
+# Use same top-level configure hooks in libgcc/libstdc++/libvtv.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-bionic-libs" >&5
+$as_echo_n "checking for --enable-bionic-libs... " >&6; }
+# Check whether --enable-bionic-libs was given.
+if test "${enable_bionic_libs+set}" = set; then :
+ enableval=$enable_bionic_libs; case "$enableval" in
+ yes) enable_bionic_libs=yes ;;
+ no) enable_bionic_libs=no ;;
+ *) enable_bionic_libs=no;;
+ esac
+else
+ enable_bionic_libs=no
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_bionic_libs" >&5
+$as_echo "$enable_bionic_libs" >&6; }
+
+# Use same top-level configure hooks in libatomic.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-libatomic-ifuncs" >&5
+$as_echo_n "checking for --enable-libatomic-ifuncs... " >&6; }
+# Check whether --enable-libatomic-ifuncs was given.
+if test "${enable_libatomic_ifuncs+set}" = set; then :
+ enableval=$enable_libatomic_ifuncs; case "$enableval" in
+ yes) enable_libatomic_ifuncs=yes ;;
+ no) enable_libatomic_ifuncs=no ;;
+ *) enable_libatomic_ifuncs=yes;;
+ esac
+else
+ enable_libatomic_ifuncs=yes
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_libatomic_ifuncs" >&5
+$as_echo "$enable_libatomic_ifuncs" >&6; }
+
# Record target_configdirs and the configure arguments for target and
# build configuration in Makefile.
target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
diff --git a/gcc-4.9/configure.ac b/gcc-4.9/configure.ac
index 5dac5dae0..b78629a75 100644
--- a/gcc-4.9/configure.ac
+++ b/gcc-4.9/configure.ac
@@ -2544,6 +2544,30 @@ AC_ARG_ENABLE(vtable-verify,
[enable_vtable_verify=no])
AC_MSG_RESULT($enable_vtable_verify)
+# Use same top-level configure hooks in libgcc/libstdc++/libvtv.
+AC_MSG_CHECKING([for --enable-bionic-libs])
+AC_ARG_ENABLE(bionic-libs,
+[ --enable-bionic-libs Use bionic libstdc++ libraries ],
+[case "$enableval" in
+ yes) enable_bionic_libs=yes ;;
+ no) enable_bionic_libs=no ;;
+ *) enable_bionic_libs=no;;
+ esac],
+[enable_bionic_libs=no])
+AC_MSG_RESULT($enable_bionic_libs)
+
+# Use same top-level configure hooks in libatomic.
+AC_MSG_CHECKING([for --enable-libatomic-ifuncs])
+AC_ARG_ENABLE(libatomic-ifuncs,
+[ --enable-bionic-libs Enable/disable IFUNCs in libatomic library ],
+[case "$enableval" in
+ yes) enable_libatomic_ifuncs=yes ;;
+ no) enable_libatomic_ifuncs=no ;;
+ *) enable_libatomic_ifuncs=yes;;
+ esac],
+[enable_libatomic_ifuncs=yes])
+AC_MSG_RESULT($enable_libatomic_ifuncs)
+
# Record target_configdirs and the configure arguments for target and
# build configuration in Makefile.
target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
diff --git a/gcc-4.9/gcc/BASE-VER b/gcc-4.9/gcc/BASE-VER
index 86a9588ad..d792740f8 100644
--- a/gcc-4.9/gcc/BASE-VER
+++ b/gcc-4.9/gcc/BASE-VER
@@ -1 +1 @@
-4.9
+4.9.x
diff --git a/gcc-4.9/gcc/ChangeLog b/gcc-4.9/gcc/ChangeLog
index c8a6ad1fe..fe9d7cec5 100644
--- a/gcc-4.9/gcc/ChangeLog
+++ b/gcc-4.9/gcc/ChangeLog
@@ -1,3 +1,37 @@
+2016-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR target/69403
+ * config/arm/thumb2.md (*thumb2_ior_scc_strict_it): Convert to
+ define_insn_and_split. Ensure operands[1] and operands[0] do not
+ get assigned the same register.
+
+2015-10-28 Yvan Roux <yvan.roux@linaro.org>
+ Sebastian Pop <s.pop@samsung.com>
+
+ Backport from trunk r221007, r221675, r222011.
+ 2015-04-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/65735
+ * tree-ssa-threadedge.c (fsm_find_control_statement_thread_paths):
+ Remove visited_phis argument, add visited_bbs, avoid recursing into the
+ same bb rather than just into the same phi node.
+ (thread_through_normal_block): Adjust caller.
+
+ 2015-03-25 Sebastian Pop <s.pop@samsung.com>
+
+ PR tree-optimization/65177
+ * tree-ssa-threadupdate.c (verify_seme): Renamed verify_jump_thread.
+ (bb_in_bbs): New.
+ (duplicate_seme_region): Renamed duplicate_thread_path. Redirect all
+ edges not adjacent on the path to the original code.
+
+ 2015-02-26 Sebastian Pop <s.pop@samsung.com>
+
+ PR tree-optimization/65048
+ * tree-ssa-threadupdate.c (valid_jump_thread_path): New.
+ (thread_through_all_blocks): Call valid_jump_thread_path.
+ Remove invalid FSM jump-thread paths.
+
2015-03-26 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport of r214242, r214254, and bug fix patches from mainline
@@ -49,6 +83,83 @@
(entry_register): Likewise.
(web_main): Likewise.
+2015-03-05 Yvan Roux <yvan.roux@linaro.org>
+
+ Backport from trunk r212011, r214942, r214957, r215012, r215016, r218115
+ r218733, r218746, r220491.
+ 2015-02-06 Sebastian Pop <s.pop@samsung.com>
+ Brian Rzycki <b.rzycki@samsung.com>
+
+ PR tree-optimization/64878
+ * tree-ssa-threadedge.c: Include tree-ssa-loop.h.
+ (fsm_find_control_statement_thread_paths): Add parameter seen_loop_phi.
+ Stop recursion at loop phi nodes after having visited a loop phi node.
+
+ 2014-12-15 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/64246
+ * cfgloop.c (mark_loop_for_removal): Make safe against multiple
+ invocations on the same loop.
+
+ 2014-12-15 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/64284
+ * tree-ssa-threadupdate.c (duplicate_seme_region): Mark
+ the loop for removal if we copied the loop header.
+
+ 2014-11-27 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/64083
+ * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not
+ forcibly mark loop for removal the wrong way.
+
+ 2014-09-08 Richard Biener <rguenther@suse.de>
+
+ PR ipa/63196
+ * tree-inline.c (copy_loops): The source loop header should
+ always be non-NULL.
+ (tree_function_versioning): If loops need fixup after removing
+ unreachable blocks fix them.
+ * omp-low.c (simd_clone_adjust): Do not add incr block to
+ loop under construction.
+
+ 2014-09-08 Richard Biener <rguenther@suse.de>
+
+ PR bootstrap/63204
+ * cfgloop.c (mark_loop_for_removal): Track former header
+ unconditionally.
+ * cfgloop.h (struct loop): Add former_header member unconditionally.
+ * loop-init.c (fix_loop_structure): Enable bogus loop removal
+ diagnostic unconditionally.
+
+ 2014-09-05 Richard Biener <rguenther@suse.de>
+
+ * cfgloop.c (mark_loop_for_removal): Record former header
+ when ENABLE_CHECKING.
+ * cfgloop.h (strut loop): Add former_header member when
+ ENABLE_CHECKING.
+ * loop-init.c (fix_loop_structure): Sanity check loops
+ marked for removal if they re-appeared.
+
+ 2014-09-05 Richard Biener <rguenther@suse.de>
+
+ * cfgloop.c (mark_loop_for_removal): New function.
+ * cfgloop.h (mark_loop_for_removal): Declare.
+ * cfghooks.c (delete_basic_block): Use mark_loop_for_removal.
+ (merge_blocks): Likewise.
+ (duplicate_block): Likewise.
+ * except.c (sjlj_emit_dispatch_table): Likewise.
+ * tree-eh.c (cleanup_empty_eh_merge_phis): Likewise.
+ * tree-ssa-threadupdate.c (ssa_redirect_edges): Likewise.
+ (thread_through_loop_header): Likewise.
+
+ 2014-06-26 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/61607
+ * tree-ssa-threadupdate.c (ssa_redirect_edges): Cancel the
+ loop if we redirected its latch edge.
+ (thread_block_1): Do not cancel loops prematurely.
+
2015-01-23 Jakub Jelinek <jakub@redhat.com>
PR middle-end/64734
@@ -104,6 +215,38 @@
* expr.c (expand_expr_real_1) <normal_inner_ref>: Use the expression to
set the memory attributes in all cases but clear MEM_EXPR if need be.
+2015-01-14 Yvan Roux <yvan.roux@linaro.org>
+
+ Backport from trunk r218451.
+ 2014-12-06 James Greenhalgh <james.greenhalgh@arm.com>
+ Sebastian Pop <s.pop@samsung.com>
+ Brian Rzycki <b.rzycki@samsung.com>
+
+ PR tree-optimization/54742
+ * params.def (max-fsm-thread-path-insns, max-fsm-thread-length)
+ (max-fsm-thread-paths): New.
+
+ * doc/invoke.texi (max-fsm-thread-path-insns, max-fsm-thread-length)
+ (max-fsm-thread-paths): Documented.
+
+ * tree-cfg.c (split_edge_bb_loc): Export.
+ * tree-cfg.h (split_edge_bb_loc): Declared extern.
+
+ * tree-ssa-threadedge.c (simplify_control_stmt_condition): Restore the
+ original value of cond when simplification fails.
+ (fsm_find_thread_path): New.
+ (fsm_find_control_statement_thread_paths): New.
+ (thread_through_normal_block):Call find_control_statement_thread_paths.
+
+ * tree-ssa-threadupdate.c (dump_jump_thread_path): Pretty print
+ EDGE_FSM_THREAD.
+ (verify_seme): New.
+ (duplicate_seme_region): New.
+ (thread_through_all_blocks): Generate code for EDGE_FSM_THREAD edges
+ calling duplicate_seme_region.
+
+ * tree-ssa-threadupdate.h (jump_thread_edge_type): Add EDGE_FSM_THREAD.
+
2015-01-14 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
@@ -656,12 +799,6 @@
(sh_optimize_sett_clrt::execute): Do nothing if find_last_ccreg_values
returned false.
-2014-11-22 Uros Bizjak <ubizjak@gmail.com>
-
- * params.def (PARAM_MAX_COMPLETELY_PEELED_INSNS): Increase to 200.
- * config/i386/i386.c (ix86_option_override_internal): Do not increase
- PARAM_MAX_COMPLETELY_PEELED_INSNS.
-
2014-11-22 Oleg Endo <olegendo@gcc.gnu.org>
Backport from mainline
@@ -681,6 +818,12 @@
PR target/60111
* config/sh/sh.c: Use signed char for signed field.
+2014-11-22 Uros Bizjak <ubizjak@gmail.com>
+
+ * params.def (PARAM_MAX_COMPLETELY_PEELED_INSNS): Increase to 200.
+ * config/i386/i386.c (ix86_option_override_internal): Do not increase
+ PARAM_MAX_COMPLETELY_PEELED_INSNS.
+
2014-11-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/63673
@@ -694,6 +837,12 @@
* tree-ssa-forwprop.c (simplify_vce): Verify type sizes
match for the resulting VIEW_CONVERT_EXPR.
+2014-11-19 Wilco Dijkstra <wdijkstr@arm.com>
+
+ PR target/61915
+ * config/aarch64/aarch64.c (generic_regmove_cost): Increase FP move
+ cost.
+
2014-11-19 Uros Bizjak <ubizjak@gmail.com>
PR target/63947
@@ -839,9 +988,9 @@
2014-11-04 Jiong Wang <jiong.wang@arm.com>
2014-11-04 Wilco Dijkstra <wilco.dijkstra@arm.com>
- PR target/63293
- * config/aarch64/aarch64.c (aarch64_expand_epiloue): Add barriers before
- stack adjustment.
+ PR target/63293
+ * config/aarch64/aarch64.c (aarch64_expand_epiloue): Add barriers before
+ stack adjustment.
2014-10-31 DJ Delorie <dj@redhat.com>
@@ -905,13 +1054,6 @@
PR sanitizer/63638
* asan.c (enum asan_check_flags): Fixed ASAN_CHECK_LAST.
-2014-10-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
-
- * config/aarch64/aarch64-elf-raw.h (CA53_ERR_835769_SPEC): Define.
- (LINK_SPEC): Include CA53_ERR_835769_SPEC.
- * config/aarch64/aarch64-linux.h (CA53_ERR_835769_SPEC): Define.
- (LINK_SPEC): Include CA53_ERR_835769_SPEC.
-
2014-10-24 Markus Trippelsdorf <markus@trippelsdorf.de>
PR bootstrap/63632
@@ -1245,17 +1387,6 @@
also check CALL_INSN_FUNCTION_USAGE for clobbers again after
killing regs_invalidated_by_call.
-2014-10-08 Rong Xu <xur@google.com>
-
- * gcov-tool.c (profile_overlap): New driver function
- to compute profile overlap.
- (print_overlap_usage_message): New.
- (overlap_usage): New.
- (do_overlap): New.
- (print_usage): Add calls to overlap function.
- (main): Ditto.
- * doc/gcov-tool.texi: Add documentation.
-
2014-10-08 Oleg Endo <olegendo@gcc.gnu.org>
Backport from mainline
@@ -1536,12 +1667,6 @@
* config/pa/pa.c (pa_function_value): Directly handle aggregates
that fit exactly in a word or double word.
-2014-09-15 Sharad Singhai <singhai@google.com>
-
- Google Ref b/17114943
-
- * l-ipo.c (promote_static_var_func): Update RTL with the unique name.
-
2014-09-15 Markus Trippelsdorf <markus@trippelsdorf.de>
* doc/install.texi (Options specification): add
@@ -3447,6 +3572,16 @@
* config/i386/i386.md (*movsf_internal): Set MODE to SI for
alternative 12.
+2014-05-16 James Greenhalgh <james.greenhalgh@arm.com>
+ Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
+
+ * config/aarch64/aarch64.c (aarch64_strip_shift_or_extend): Rename
+ to...
+ (aarch64_strip_extend): ...this, don't strip shifts, check RTX is
+ well formed.
+ (aarch64_rtx_mult_cost): New.
+ (aarch64_rtx_costs): Use it, refactor as appropriate.
+
2014-05-16 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/60969
diff --git a/gcc-4.9/gcc/Makefile.in b/gcc-4.9/gcc/Makefile.in
index 0309b3701..568dec469 100644
--- a/gcc-4.9/gcc/Makefile.in
+++ b/gcc-4.9/gcc/Makefile.in
@@ -1383,6 +1383,7 @@ OBJS = \
asan.o \
tsan.o \
ubsan.o \
+ sancov.o \
tree-call-cdce.o \
tree-cfg.o \
tree-cfgcleanup.o \
@@ -2295,6 +2296,7 @@ GTFILES = $(CPP_ID_DATA_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
$(srcdir)/asan.c \
$(srcdir)/ubsan.c \
$(srcdir)/tsan.c \
+ $(srcdir)/sancov.c \
$(srcdir)/ipa-devirt.c \
$(srcdir)/internal-fn.h \
@all_gtfiles@
diff --git a/gcc-4.9/gcc/builtins.def b/gcc-4.9/gcc/builtins.def
index 5a76ba329..e34e7721e 100644
--- a/gcc-4.9/gcc/builtins.def
+++ b/gcc-4.9/gcc/builtins.def
@@ -169,7 +169,8 @@ along with GCC; see the file COPYING3. If not see
DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
true, true, true, ATTRS, true, \
(flag_sanitize & (SANITIZE_ADDRESS | SANITIZE_THREAD \
- | SANITIZE_UNDEFINED)))
+ | SANITIZE_UNDEFINED) \
+ || flag_sanitize_coverage))
#undef DEF_CILKPLUS_BUILTIN
#define DEF_CILKPLUS_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
diff --git a/gcc-4.9/gcc/c-family/c-common.c b/gcc-4.9/gcc/c-family/c-common.c
index 41f81221f..ec1785d8f 100644
--- a/gcc-4.9/gcc/c-family/c-common.c
+++ b/gcc-4.9/gcc/c-family/c-common.c
@@ -9200,7 +9200,7 @@ parse_optimize_options (tree args, bool attr_p)
&decoded_options_count);
decode_options (&global_options, &global_options_set,
decoded_options, decoded_options_count,
- input_location, global_dc);
+ input_location, global_dc, false);
targetm.override_options_after_change();
diff --git a/gcc-4.9/gcc/cfghooks.c b/gcc-4.9/gcc/cfghooks.c
index 87da0d02a..76486b28c 100644
--- a/gcc-4.9/gcc/cfghooks.c
+++ b/gcc-4.9/gcc/cfghooks.c
@@ -568,14 +568,10 @@ delete_basic_block (basic_block bb)
struct loop *loop = bb->loop_father;
/* If we remove the header or the latch of a loop, mark the loop for
- removal by setting its header and latch to NULL. */
+ removal. */
if (loop->latch == bb
|| loop->header == bb)
- {
- loop->header = NULL;
- loop->latch = NULL;
- loops_state_set (LOOPS_NEED_FIXUP);
- }
+ mark_loop_for_removal (loop);
remove_bb_from_loops (bb);
}
@@ -759,11 +755,7 @@ merge_blocks (basic_block a, basic_block b)
/* ... we merge two loop headers, in which case we kill
the inner loop. */
if (b->loop_father->header == b)
- {
- b->loop_father->header = NULL;
- b->loop_father->latch = NULL;
- loops_state_set (LOOPS_NEED_FIXUP);
- }
+ mark_loop_for_removal (b->loop_father);
}
/* If we merge a loop header into its predecessor, update the loop
structure. */
@@ -1098,9 +1090,7 @@ duplicate_block (basic_block bb, edge e, basic_block after)
&& cloop->header == bb)
{
add_bb_to_loop (new_bb, loop_outer (cloop));
- cloop->header = NULL;
- cloop->latch = NULL;
- loops_state_set (LOOPS_NEED_FIXUP);
+ mark_loop_for_removal (cloop);
}
else
{
diff --git a/gcc-4.9/gcc/cfgloop.c b/gcc-4.9/gcc/cfgloop.c
index e4b60f5d8..a23840585 100644
--- a/gcc-4.9/gcc/cfgloop.c
+++ b/gcc-4.9/gcc/cfgloop.c
@@ -1994,3 +1994,16 @@ bb_loop_depth (const_basic_block bb)
{
return bb->loop_father ? loop_depth (bb->loop_father) : 0;
}
+
+/* Marks LOOP for removal and sets LOOPS_NEED_FIXUP. */
+
+void
+mark_loop_for_removal (loop_p loop)
+{
+ if (loop->header == NULL)
+ return;
+ loop->former_header = loop->header;
+ loop->header = NULL;
+ loop->latch = NULL;
+ loops_state_set (LOOPS_NEED_FIXUP);
+}
diff --git a/gcc-4.9/gcc/cfgloop.h b/gcc-4.9/gcc/cfgloop.h
index 11bfc810f..ce1a689b3 100644
--- a/gcc-4.9/gcc/cfgloop.h
+++ b/gcc-4.9/gcc/cfgloop.h
@@ -203,6 +203,12 @@ struct GTY ((chain_next ("%h.next"))) loop {
/* Number of iteration analysis data for RTL. */
struct niter_desc *simple_loop_desc;
+
+ /* For sanity checking during loop fixup we record here the former
+ loop header for loops marked for removal. Note that this prevents
+ the basic-block from being collected but its index can still be
+ reused. */
+ basic_block former_header;
};
/* Flags for state of loop structure. */
@@ -345,6 +351,8 @@ struct loop * loop_version (struct loop *, void *,
extern bool remove_path (edge);
extern void unloop (struct loop *, bool *, bitmap);
extern void scale_loop_frequencies (struct loop *, int, int);
+void mark_loop_for_removal (loop_p);
+
/* Induction variable analysis. */
diff --git a/gcc-4.9/gcc/common.opt b/gcc-4.9/gcc/common.opt
index d4e989b40..3137ec47f 100644
--- a/gcc-4.9/gcc/common.opt
+++ b/gcc-4.9/gcc/common.opt
@@ -211,6 +211,11 @@ bool flag_opts_finished
Variable
unsigned int flag_sanitize
+fsanitize-coverage=trace-pc
+Common Report Var(flag_sanitize_coverage)
+Enable coverage-guided fuzzing code instrumentation.
+Inserts call to __sanitizer_cov_trace_pc into every basic block.
+
; Flag whether a prefix has been added to dump_base_name
Variable
bool dump_base_name_prefixed = false
@@ -621,6 +626,10 @@ Wpedantic
Common Var(pedantic) Warning
Issue warnings needed for strict compliance to the standard
+Wpoison-system-directories
+Common Var(flag_poison_system_directories) Init(POISON_SYSTEM_DIRECTORIES_DEFAULT) Warning
+Warn for -I and -L options using system directories if cross compiling
+
Wshadow
Common Var(warn_shadow) Warning
Warn when one local variable shadows another
diff --git a/gcc-4.9/gcc/config.gcc b/gcc-4.9/gcc/config.gcc
index 925658a82..c0fdd2c11 100644
--- a/gcc-4.9/gcc/config.gcc
+++ b/gcc-4.9/gcc/config.gcc
@@ -1091,7 +1091,9 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
tmake_file="${tmake_file} arm/t-symbian"
;;
esac
- tm_file="${tm_file} arm/aout.h vxworks-dummy.h arm/arm.h"
+ tm_defines="${tm_defines} ANDROID_DEFAULT=0"
+ tm_file="${tm_file} arm/aout.h vxworks-dummy.h arm/arm.h linux-android.h"
+ extra_options="${extra_options} linux-android.opt"
;;
avr-*-rtems*)
tm_file="elfos.h avr/elf.h avr/avr-arch.h avr/avr.h dbxelf.h avr/rtems.h rtems.h newlib-stdint.h"
@@ -2342,7 +2344,7 @@ powerpc-*-rtems*)
powerpc*-*-linux*)
tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h linux-android.h"
extra_options="${extra_options} rs6000/sysv4.opt"
- extra_options="${extra_options} linux-android.opt"
+ extra_options="${extra_options} linux-android.opt"
tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
extra_objs="$extra_objs rs6000-linux.o"
default_gnu_indirect_function=yes
diff --git a/gcc-4.9/gcc/config.in b/gcc-4.9/gcc/config.in
index 7883eb362..83c51ce68 100644
--- a/gcc-4.9/gcc/config.in
+++ b/gcc-4.9/gcc/config.in
@@ -144,6 +144,12 @@
#endif
+/* Define to warn for use of native system header directories. */
+#ifndef USED_FOR_TARGET
+#undef ENABLE_POISON_SYSTEM_DIRECTORIES
+#endif
+
+
/* Define if you want all operations on RTL (the basic data structure of the
optimizer and back end) to be checked for dynamic type safety at runtime.
This is quite expensive. */
diff --git a/gcc-4.9/gcc/config/aarch64/aarch64-elf-raw.h b/gcc-4.9/gcc/config/aarch64/aarch64-elf-raw.h
index 67271b29d..99611c5f8 100644
--- a/gcc-4.9/gcc/config/aarch64/aarch64-elf-raw.h
+++ b/gcc-4.9/gcc/config/aarch64/aarch64-elf-raw.h
@@ -33,14 +33,6 @@
" %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
#endif
-#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
-#define CA53_ERR_835769_SPEC \
- " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}"
-#else
-#define CA53_ERR_835769_SPEC \
- " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
-#endif
-
#define CA53_ERR_843419_SPEC \
" %{!mno-fix-cortex-a53-843419:--fix-cortex-a53-843419}"
diff --git a/gcc-4.9/gcc/config/aarch64/aarch64-linux.h b/gcc-4.9/gcc/config/aarch64/aarch64-linux.h
index f42ea1afc..7b77c42fb 100644
--- a/gcc-4.9/gcc/config/aarch64/aarch64-linux.h
+++ b/gcc-4.9/gcc/config/aarch64/aarch64-linux.h
@@ -55,16 +55,7 @@
CA53_ERR_835769_SPEC \
CA53_ERR_843419_SPEC
-#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
-#define CA53_ERR_835769_SPEC \
- " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}"
-#else
-#define CA53_ERR_835769_SPEC \
- " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
-#endif
-
-#define LINK_SPEC LINUX_TARGET_LINK_SPEC \
- CA53_ERR_835769_SPEC
+#define LINK_SPEC LINUX_TARGET_LINK_SPEC
#define TARGET_OS_CPP_BUILTINS() \
do \
diff --git a/gcc-4.9/gcc/config/arm/thumb2.md b/gcc-4.9/gcc/config/arm/thumb2.md
index d84938f30..1411a6816 100644
--- a/gcc-4.9/gcc/config/arm/thumb2.md
+++ b/gcc-4.9/gcc/config/arm/thumb2.md
@@ -642,15 +642,27 @@
(set_attr "type" "multiple")]
)
-(define_insn "*thumb2_ior_scc_strict_it"
- [(set (match_operand:SI 0 "s_register_operand" "=l,l")
+(define_insn_and_split "*thumb2_ior_scc_strict_it"
+ [(set (match_operand:SI 0 "s_register_operand" "=&r")
(ior:SI (match_operator:SI 2 "arm_comparison_operator"
[(match_operand 3 "cc_register" "") (const_int 0)])
- (match_operand:SI 1 "s_register_operand" "0,?l")))]
+ (match_operand:SI 1 "s_register_operand" "r")))]
"TARGET_THUMB2 && arm_restrict_it"
- "@
- it\\t%d2\;mov%d2\\t%0, #1\;it\\t%d2\;orr%d2\\t%0, %1
- mov\\t%0, #1\;orr\\t%0, %1\;it\\t%D2\;mov%D2\\t%0, %1"
+ "#" ; orr\\t%0, %1, #1\;it\\t%D2\;mov%D2\\t%0, %1
+ "&& reload_completed"
+ [(set (match_dup 0) (ior:SI (match_dup 1) (const_int 1)))
+ (cond_exec (match_dup 4)
+ (set (match_dup 0) (match_dup 1)))]
+ {
+ machine_mode mode = GET_MODE (operands[3]);
+ rtx_code rc = GET_CODE (operands[2]);
+
+ if (mode == CCFPmode || mode == CCFPEmode)
+ rc = reverse_condition_maybe_unordered (rc);
+ else
+ rc = reverse_condition (rc);
+ operands[4] = gen_rtx_fmt_ee (rc, VOIDmode, operands[3], const0_rtx);
+ }
[(set_attr "conds" "use")
(set_attr "length" "8")
(set_attr "type" "multiple")]
diff --git a/gcc-4.9/gcc/config/i386/i386.c b/gcc-4.9/gcc/config/i386/i386.c
index 9f57c6e3a..614b8db81 100644
--- a/gcc-4.9/gcc/config/i386/i386.c
+++ b/gcc-4.9/gcc/config/i386/i386.c
@@ -4070,12 +4070,6 @@ ix86_option_override_internal (bool main_args_p,
opts->x_param_values,
opts_set->x_param_values);
- /* Increase full peel max insns parameter for x86. */
- maybe_set_param_value (PARAM_MAX_COMPLETELY_PEELED_INSNS,
- 400,
- opts->x_param_values,
- opts_set->x_param_values);
-
/* Enable sw prefetching at -O3 for CPUS that prefetching is helpful. */
if (opts->x_flag_prefetch_loop_arrays < 0
&& HAVE_prefetch
diff --git a/gcc-4.9/gcc/config/i386/pmm_malloc.h b/gcc-4.9/gcc/config/i386/pmm_malloc.h
index 67b88a857..4506dbc9a 100644
--- a/gcc-4.9/gcc/config/i386/pmm_malloc.h
+++ b/gcc-4.9/gcc/config/i386/pmm_malloc.h
@@ -32,9 +32,13 @@
#ifndef __cplusplus
extern int posix_memalign (void **, size_t, size_t);
#else
+#ifdef __GLIBC__
extern "C" int posix_memalign (void **, size_t, size_t) throw ();
-#endif
-#endif
+#else
+extern "C" int posix_memalign (void **, size_t, size_t);
+#endif /* __GLIBC__ */
+#endif /* __cplusplus */
+#endif /* !(__ANDROID__) || (HAVE_POSIX_MEMALIGN) */
static __inline void *
_mm_malloc (size_t size, size_t alignment)
diff --git a/gcc-4.9/gcc/config/linux-android.h b/gcc-4.9/gcc/config/linux-android.h
index 6995785da..e1e1a0034 100644
--- a/gcc-4.9/gcc/config/linux-android.h
+++ b/gcc-4.9/gcc/config/linux-android.h
@@ -60,13 +60,3 @@
#define ANDROID_ENDFILE_SPEC \
"%{shared: crtend_so%O%s;: crtend_android%O%s}"
-
-#define PROFILE_OR_COV_LINK_SPEC \
- "%{fprofile-arcs|fprofile-generate*|coverage:-lgcov " \
- LINUX_OR_ANDROID_LD("", "-lgcc") "}" SANITIZER_SPEC
-
-//
-// For Android apparently we want to temporarily
-// disable __cxa_throw_bad_array_new_length
-//
-#define DISABLE_CXA_THROW_BAD_ARRAY_NEW_LENGTH 1
diff --git a/gcc-4.9/gcc/config/linux-grte.h b/gcc-4.9/gcc/config/linux-grte.h
deleted file mode 100644
index e69de29bb..000000000
--- a/gcc-4.9/gcc/config/linux-grte.h
+++ /dev/null
diff --git a/gcc-4.9/gcc/config/mips/mips.c b/gcc-4.9/gcc/config/mips/mips.c
index 859755882..524c6d52d 100644
--- a/gcc-4.9/gcc/config/mips/mips.c
+++ b/gcc-4.9/gcc/config/mips/mips.c
@@ -16448,23 +16448,17 @@ mips_build_cvpointer_type (void)
#define MIPS_ATYPE_V4QI mips_builtin_vector_type (intQI_type_node, V4QImode)
#define MIPS_ATYPE_V4HI mips_builtin_vector_type (intHI_type_node, V4HImode)
#define MIPS_ATYPE_V8QI mips_builtin_vector_type (intQI_type_node, V8QImode)
-
-#define MIPS_ATYPE_V2DI \
- mips_builtin_vector_type (long_long_integer_type_node, V2DImode)
+#define MIPS_ATYPE_V2DI mips_builtin_vector_type (intDI_type_node, V2DImode)
#define MIPS_ATYPE_V4SI mips_builtin_vector_type (intSI_type_node, V4SImode)
#define MIPS_ATYPE_V8HI mips_builtin_vector_type (intHI_type_node, V8HImode)
#define MIPS_ATYPE_V16QI mips_builtin_vector_type (intQI_type_node, V16QImode)
#define MIPS_ATYPE_V2DF mips_builtin_vector_type (double_type_node, V2DFmode)
#define MIPS_ATYPE_V4SF mips_builtin_vector_type (float_type_node, V4SFmode)
-#define MIPS_ATYPE_UV2DI \
- mips_builtin_vector_type (long_long_unsigned_type_node, V2DImode)
-#define MIPS_ATYPE_UV4SI \
- mips_builtin_vector_type (unsigned_intSI_type_node, V4SImode)
-#define MIPS_ATYPE_UV8HI \
- mips_builtin_vector_type (unsigned_intHI_type_node, V8HImode)
-#define MIPS_ATYPE_UV16QI \
- mips_builtin_vector_type (unsigned_intQI_type_node, V16QImode)
+#define MIPS_ATYPE_UV2DI mips_builtin_vector_type (unsigned_intDI_type_node, V2DImode)
+#define MIPS_ATYPE_UV4SI mips_builtin_vector_type (unsigned_intSI_type_node, V4SImode)
+#define MIPS_ATYPE_UV8HI mips_builtin_vector_type (unsigned_intHI_type_node, V8HImode)
+#define MIPS_ATYPE_UV16QI mips_builtin_vector_type (unsigned_intQI_type_node, V16QImode)
#define MIPS_ATYPE_UV2SI \
mips_builtin_vector_type (unsigned_intSI_type_node, V2SImode)
diff --git a/gcc-4.9/gcc/config/mips/msa.h b/gcc-4.9/gcc/config/mips/msa.h
index f24c32065..fe2eaa1ac 100644
--- a/gcc-4.9/gcc/config/mips/msa.h
+++ b/gcc-4.9/gcc/config/mips/msa.h
@@ -49,6 +49,541 @@ typedef float v4f32_w __attribute__((vector_size(16), aligned(4)));
typedef double v2f64 __attribute__ ((vector_size(16), aligned(16)));
typedef double v2f64_d __attribute__ ((vector_size(16), aligned(8)));
+#ifndef __clang__
+extern v16i8 __builtin_msa_sll_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_sll_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_sll_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_sll_d(v2i64, v2i64);
+extern v16i8 __builtin_msa_slli_b(v16i8, unsigned char);
+extern v8i16 __builtin_msa_slli_h(v8i16, unsigned char);
+extern v4i32 __builtin_msa_slli_w(v4i32, unsigned char);
+extern v2i64 __builtin_msa_slli_d(v2i64, unsigned char);
+extern v16i8 __builtin_msa_sra_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_sra_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_sra_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_sra_d(v2i64, v2i64);
+extern v16i8 __builtin_msa_srai_b(v16i8, unsigned char);
+extern v8i16 __builtin_msa_srai_h(v8i16, unsigned char);
+extern v4i32 __builtin_msa_srai_w(v4i32, unsigned char);
+extern v2i64 __builtin_msa_srai_d(v2i64, unsigned char);
+extern v16i8 __builtin_msa_srar_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_srar_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_srar_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_srar_d(v2i64, v2i64);
+extern v16i8 __builtin_msa_srari_b(v16i8, unsigned char);
+extern v8i16 __builtin_msa_srari_h(v8i16, unsigned char);
+extern v4i32 __builtin_msa_srari_w(v4i32, unsigned char);
+extern v2i64 __builtin_msa_srari_d(v2i64, unsigned char);
+extern v16i8 __builtin_msa_srl_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_srl_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_srl_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_srl_d(v2i64, v2i64);
+extern v16i8 __builtin_msa_srli_b(v16i8, unsigned char);
+extern v8i16 __builtin_msa_srli_h(v8i16, unsigned char);
+extern v4i32 __builtin_msa_srli_w(v4i32, unsigned char);
+extern v2i64 __builtin_msa_srli_d(v2i64, unsigned char);
+extern v16i8 __builtin_msa_srlr_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_srlr_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_srlr_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_srlr_d(v2i64, v2i64);
+extern v16i8 __builtin_msa_srlri_b(v16i8, unsigned char);
+extern v8i16 __builtin_msa_srlri_h(v8i16, unsigned char);
+extern v4i32 __builtin_msa_srlri_w(v4i32, unsigned char);
+extern v2i64 __builtin_msa_srlri_d(v2i64, unsigned char);
+extern v16u8 __builtin_msa_bclr_b(v16u8, v16u8);
+extern v8u16 __builtin_msa_bclr_h(v8u16, v8u16);
+extern v4u32 __builtin_msa_bclr_w(v4u32, v4u32);
+extern v2u64 __builtin_msa_bclr_d(v2u64, v2u64);
+extern v16u8 __builtin_msa_bclri_b(v16u8, unsigned char);
+extern v8u16 __builtin_msa_bclri_h(v8u16, unsigned char);
+extern v4u32 __builtin_msa_bclri_w(v4u32, unsigned char);
+extern v2u64 __builtin_msa_bclri_d(v2u64, unsigned char);
+extern v16u8 __builtin_msa_bset_b(v16u8, v16u8);
+extern v8u16 __builtin_msa_bset_h(v8u16, v8u16);
+extern v4u32 __builtin_msa_bset_w(v4u32, v4u32);
+extern v2u64 __builtin_msa_bset_d(v2u64, v2u64);
+extern v16u8 __builtin_msa_bseti_b(v16u8, unsigned char);
+extern v8u16 __builtin_msa_bseti_h(v8u16, unsigned char);
+extern v4u32 __builtin_msa_bseti_w(v4u32, unsigned char);
+extern v2u64 __builtin_msa_bseti_d(v2u64, unsigned char);
+extern v16u8 __builtin_msa_bneg_b(v16u8, v16u8);
+extern v8u16 __builtin_msa_bneg_h(v8u16, v8u16);
+extern v4u32 __builtin_msa_bneg_w(v4u32, v4u32);
+extern v2u64 __builtin_msa_bneg_d(v2u64, v2u64);
+extern v16u8 __builtin_msa_bnegi_b(v16u8, unsigned char);
+extern v8u16 __builtin_msa_bnegi_h(v8u16, unsigned char);
+extern v4u32 __builtin_msa_bnegi_w(v4u32, unsigned char);
+extern v2u64 __builtin_msa_bnegi_d(v2u64, unsigned char);
+extern v16u8 __builtin_msa_binsl_b(v16u8, v16u8, v16u8);
+extern v8u16 __builtin_msa_binsl_h(v8u16, v8u16, v8u16);
+extern v4u32 __builtin_msa_binsl_w(v4u32, v4u32, v4u32);
+extern v2u64 __builtin_msa_binsl_d(v2u64, v2u64, v2u64);
+extern v16u8 __builtin_msa_binsli_b(v16u8, v16u8, unsigned char);
+extern v8u16 __builtin_msa_binsli_h(v8u16, v8u16, unsigned char);
+extern v4u32 __builtin_msa_binsli_w(v4u32, v4u32, unsigned char);
+extern v2u64 __builtin_msa_binsli_d(v2u64, v2u64, unsigned char);
+extern v16u8 __builtin_msa_binsr_b(v16u8, v16u8, v16u8);
+extern v8u16 __builtin_msa_binsr_h(v8u16, v8u16, v8u16);
+extern v4u32 __builtin_msa_binsr_w(v4u32, v4u32, v4u32);
+extern v2u64 __builtin_msa_binsr_d(v2u64, v2u64, v2u64);
+extern v16u8 __builtin_msa_binsri_b(v16u8, v16u8, unsigned char);
+extern v8u16 __builtin_msa_binsri_h(v8u16, v8u16, unsigned char);
+extern v4u32 __builtin_msa_binsri_w(v4u32, v4u32, unsigned char);
+extern v2u64 __builtin_msa_binsri_d(v2u64, v2u64, unsigned char);
+extern v16i8 __builtin_msa_addv_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_addv_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_addv_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_addv_d(v2i64, v2i64);
+extern v16i8 __builtin_msa_addvi_b(v16i8, unsigned char);
+extern v8i16 __builtin_msa_addvi_h(v8i16, unsigned char);
+extern v4i32 __builtin_msa_addvi_w(v4i32, unsigned char);
+extern v2i64 __builtin_msa_addvi_d(v2i64, unsigned char);
+extern v16i8 __builtin_msa_subv_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_subv_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_subv_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_subv_d(v2i64, v2i64);
+extern v16i8 __builtin_msa_subvi_b(v16i8, unsigned char);
+extern v8i16 __builtin_msa_subvi_h(v8i16, unsigned char);
+extern v4i32 __builtin_msa_subvi_w(v4i32, unsigned char);
+extern v2i64 __builtin_msa_subvi_d(v2i64, unsigned char);
+extern v16i8 __builtin_msa_max_s_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_max_s_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_max_s_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_max_s_d(v2i64, v2i64);
+extern v16i8 __builtin_msa_maxi_s_b(v16i8, char);
+extern v8i16 __builtin_msa_maxi_s_h(v8i16, char);
+extern v4i32 __builtin_msa_maxi_s_w(v4i32, char);
+extern v2i64 __builtin_msa_maxi_s_d(v2i64, char);
+extern v16u8 __builtin_msa_max_u_b(v16u8, v16u8);
+extern v8u16 __builtin_msa_max_u_h(v8u16, v8u16);
+extern v4u32 __builtin_msa_max_u_w(v4u32, v4u32);
+extern v2u64 __builtin_msa_max_u_d(v2u64, v2u64);
+extern v16u8 __builtin_msa_maxi_u_b(v16u8, unsigned char);
+extern v8u16 __builtin_msa_maxi_u_h(v8u16, unsigned char);
+extern v4u32 __builtin_msa_maxi_u_w(v4u32, unsigned char);
+extern v2u64 __builtin_msa_maxi_u_d(v2u64, unsigned char);
+extern v16i8 __builtin_msa_min_s_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_min_s_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_min_s_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_min_s_d(v2i64, v2i64);
+extern v16i8 __builtin_msa_mini_s_b(v16i8, char);
+extern v8i16 __builtin_msa_mini_s_h(v8i16, char);
+extern v4i32 __builtin_msa_mini_s_w(v4i32, char);
+extern v2i64 __builtin_msa_mini_s_d(v2i64, char);
+extern v16u8 __builtin_msa_min_u_b(v16u8, v16u8);
+extern v8u16 __builtin_msa_min_u_h(v8u16, v8u16);
+extern v4u32 __builtin_msa_min_u_w(v4u32, v4u32);
+extern v2u64 __builtin_msa_min_u_d(v2u64, v2u64);
+extern v16u8 __builtin_msa_mini_u_b(v16u8, unsigned char);
+extern v8u16 __builtin_msa_mini_u_h(v8u16, unsigned char);
+extern v4u32 __builtin_msa_mini_u_w(v4u32, unsigned char);
+extern v2u64 __builtin_msa_mini_u_d(v2u64, unsigned char);
+extern v16i8 __builtin_msa_max_a_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_max_a_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_max_a_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_max_a_d(v2i64, v2i64);
+extern v16i8 __builtin_msa_min_a_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_min_a_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_min_a_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_min_a_d(v2i64, v2i64);
+extern v16i8 __builtin_msa_ceq_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_ceq_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_ceq_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_ceq_d(v2i64, v2i64);
+extern v16i8 __builtin_msa_ceqi_b(v16i8, char);
+extern v8i16 __builtin_msa_ceqi_h(v8i16, char);
+extern v4i32 __builtin_msa_ceqi_w(v4i32, char);
+extern v2i64 __builtin_msa_ceqi_d(v2i64, char);
+extern v16i8 __builtin_msa_clt_s_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_clt_s_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_clt_s_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_clt_s_d(v2i64, v2i64);
+extern v16i8 __builtin_msa_clti_s_b(v16i8, char);
+extern v8i16 __builtin_msa_clti_s_h(v8i16, char);
+extern v4i32 __builtin_msa_clti_s_w(v4i32, char);
+extern v2i64 __builtin_msa_clti_s_d(v2i64, char);
+extern v16i8 __builtin_msa_clt_u_b(v16u8, v16u8);
+extern v8i16 __builtin_msa_clt_u_h(v8u16, v8u16);
+extern v4i32 __builtin_msa_clt_u_w(v4u32, v4u32);
+extern v2i64 __builtin_msa_clt_u_d(v2u64, v2u64);
+extern v16i8 __builtin_msa_clti_u_b(v16u8, unsigned char);
+extern v8i16 __builtin_msa_clti_u_h(v8u16, unsigned char);
+extern v4i32 __builtin_msa_clti_u_w(v4u32, unsigned char);
+extern v2i64 __builtin_msa_clti_u_d(v2u64, unsigned char);
+extern v16i8 __builtin_msa_cle_s_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_cle_s_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_cle_s_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_cle_s_d(v2i64, v2i64);
+extern v16i8 __builtin_msa_clei_s_b(v16i8, char);
+extern v8i16 __builtin_msa_clei_s_h(v8i16, char);
+extern v4i32 __builtin_msa_clei_s_w(v4i32, char);
+extern v2i64 __builtin_msa_clei_s_d(v2i64, char);
+extern v16i8 __builtin_msa_cle_u_b(v16u8, v16u8);
+extern v8i16 __builtin_msa_cle_u_h(v8u16, v8u16);
+extern v4i32 __builtin_msa_cle_u_w(v4u32, v4u32);
+extern v2i64 __builtin_msa_cle_u_d(v2u64, v2u64);
+extern v16i8 __builtin_msa_clei_u_b(v16u8, unsigned char);
+extern v8i16 __builtin_msa_clei_u_h(v8u16, unsigned char);
+extern v4i32 __builtin_msa_clei_u_w(v4u32, unsigned char);
+extern v2i64 __builtin_msa_clei_u_d(v2u64, unsigned char);
+extern v16i8 __builtin_msa_ld_b(void *, int);
+extern v8i16 __builtin_msa_ld_h(void *, int);
+extern v4i32 __builtin_msa_ld_w(void *, int);
+extern v2i64 __builtin_msa_ld_d(void *, int);
+extern void __builtin_msa_st_b(v16i8, char *, int);
+extern void __builtin_msa_st_h(v8i16, char *, int);
+extern void __builtin_msa_st_w(v4i32, char *, int);
+extern void __builtin_msa_st_d(v2i64, char *, int);
+extern v16i8 __builtin_msa_sat_s_b(v16i8, unsigned char);
+extern v8i16 __builtin_msa_sat_s_h(v8i16, unsigned char);
+extern v4i32 __builtin_msa_sat_s_w(v4i32, unsigned char);
+extern v2i64 __builtin_msa_sat_s_d(v2i64, unsigned char);
+extern v16u8 __builtin_msa_sat_u_b(v16u8, unsigned char);
+extern v8u16 __builtin_msa_sat_u_h(v8u16, unsigned char);
+extern v4u32 __builtin_msa_sat_u_w(v4u32, unsigned char);
+extern v2u64 __builtin_msa_sat_u_d(v2u64, unsigned char);
+extern v16i8 __builtin_msa_add_a_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_add_a_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_add_a_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_add_a_d(v2i64, v2i64);
+extern v16i8 __builtin_msa_adds_a_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_adds_a_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_adds_a_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_adds_a_d(v2i64, v2i64);
+extern v16i8 __builtin_msa_adds_s_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_adds_s_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_adds_s_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_adds_s_d(v2i64, v2i64);
+extern v16u8 __builtin_msa_adds_u_b(v16u8, v16u8);
+extern v8u16 __builtin_msa_adds_u_h(v8u16, v8u16);
+extern v4u32 __builtin_msa_adds_u_w(v4u32, v4u32);
+extern v2u64 __builtin_msa_adds_u_d(v2u64, v2u64);
+extern v16i8 __builtin_msa_ave_s_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_ave_s_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_ave_s_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_ave_s_d(v2i64, v2i64);
+extern v16u8 __builtin_msa_ave_u_b(v16u8, v16u8);
+extern v8u16 __builtin_msa_ave_u_h(v8u16, v8u16);
+extern v4u32 __builtin_msa_ave_u_w(v4u32, v4u32);
+extern v2u64 __builtin_msa_ave_u_d(v2u64, v2u64);
+extern v16i8 __builtin_msa_aver_s_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_aver_s_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_aver_s_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_aver_s_d(v2i64, v2i64);
+extern v16u8 __builtin_msa_aver_u_b(v16u8, v16u8);
+extern v8u16 __builtin_msa_aver_u_h(v8u16, v8u16);
+extern v4u32 __builtin_msa_aver_u_w(v4u32, v4u32);
+extern v2u64 __builtin_msa_aver_u_d(v2u64, v2u64);
+extern v16i8 __builtin_msa_subs_s_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_subs_s_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_subs_s_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_subs_s_d(v2i64, v2i64);
+extern v16u8 __builtin_msa_subs_u_b(v16u8, v16u8);
+extern v8u16 __builtin_msa_subs_u_h(v8u16, v8u16);
+extern v4u32 __builtin_msa_subs_u_w(v4u32, v4u32);
+extern v2u64 __builtin_msa_subs_u_d(v2u64, v2u64);
+extern v16i8 __builtin_msa_subsuu_s_b(v16u8, v16u8);
+extern v8i16 __builtin_msa_subsuu_s_h(v8u16, v8u16);
+extern v4i32 __builtin_msa_subsuu_s_w(v4u32, v4u32);
+extern v2i64 __builtin_msa_subsuu_s_d(v2u64, v2u64);
+extern v16u8 __builtin_msa_subsus_u_b(v16u8, v16i8);
+extern v8u16 __builtin_msa_subsus_u_h(v8u16, v8i16);
+extern v4u32 __builtin_msa_subsus_u_w(v4u32, v4i32);
+extern v2u64 __builtin_msa_subsus_u_d(v2u64, v2i64);
+extern v16i8 __builtin_msa_asub_s_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_asub_s_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_asub_s_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_asub_s_d(v2i64, v2i64);
+extern v16u8 __builtin_msa_asub_u_b(v16u8, v16u8);
+extern v8u16 __builtin_msa_asub_u_h(v8u16, v8u16);
+extern v4u32 __builtin_msa_asub_u_w(v4u32, v4u32);
+extern v2u64 __builtin_msa_asub_u_d(v2u64, v2u64);
+extern v16i8 __builtin_msa_mulv_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_mulv_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_mulv_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_mulv_d(v2i64, v2i64);
+extern v16i8 __builtin_msa_maddv_b(v16i8, v16i8, v16i8);
+extern v8i16 __builtin_msa_maddv_h(v8i16, v8i16, v8i16);
+extern v4i32 __builtin_msa_maddv_w(v4i32, v4i32, v4i32);
+extern v2i64 __builtin_msa_maddv_d(v2i64, v2i64, v2i64);
+extern v16i8 __builtin_msa_msubv_b(v16i8, v16i8, v16i8);
+extern v8i16 __builtin_msa_msubv_h(v8i16, v8i16, v8i16);
+extern v4i32 __builtin_msa_msubv_w(v4i32, v4i32, v4i32);
+extern v2i64 __builtin_msa_msubv_d(v2i64, v2i64, v2i64);
+extern v16i8 __builtin_msa_div_s_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_div_s_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_div_s_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_div_s_d(v2i64, v2i64);
+extern v16u8 __builtin_msa_div_u_b(v16u8, v16u8);
+extern v8u16 __builtin_msa_div_u_h(v8u16, v8u16);
+extern v4u32 __builtin_msa_div_u_w(v4u32, v4u32);
+extern v2u64 __builtin_msa_div_u_d(v2u64, v2u64);
+extern v8i16 __builtin_msa_hadd_s_h(v16i8, v16i8);
+extern v4i32 __builtin_msa_hadd_s_w(v8i16, v8i16);
+extern v2i64 __builtin_msa_hadd_s_d(v4i32, v4i32);
+extern v8u16 __builtin_msa_hadd_u_h(v16u8, v16u8);
+extern v4u32 __builtin_msa_hadd_u_w(v8u16, v8u16);
+extern v2u64 __builtin_msa_hadd_u_d(v4u32, v4u32);
+extern v8i16 __builtin_msa_hsub_s_h(v16i8, v16i8);
+extern v4i32 __builtin_msa_hsub_s_w(v8i16, v8i16);
+extern v2i64 __builtin_msa_hsub_s_d(v4i32, v4i32);
+extern v8i16 __builtin_msa_hsub_u_h(v16u8, v16u8);
+extern v4i32 __builtin_msa_hsub_u_w(v8u16, v8u16);
+extern v2i64 __builtin_msa_hsub_u_d(v4u32, v4u32);
+extern v16i8 __builtin_msa_mod_s_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_mod_s_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_mod_s_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_mod_s_d(v2i64, v2i64);
+extern v16u8 __builtin_msa_mod_u_b(v16u8, v16u8);
+extern v8u16 __builtin_msa_mod_u_h(v8u16, v8u16);
+extern v4u32 __builtin_msa_mod_u_w(v4u32, v4u32);
+extern v2u64 __builtin_msa_mod_u_d(v2u64, v2u64);
+extern v8i16 __builtin_msa_dotp_s_h(v16i8, v16i8);
+extern v4i32 __builtin_msa_dotp_s_w(v8i16, v8i16);
+extern v2i64 __builtin_msa_dotp_s_d(v4i32, v4i32);
+extern v8u16 __builtin_msa_dotp_u_h(v16u8, v16u8);
+extern v4u32 __builtin_msa_dotp_u_w(v8u16, v8u16);
+extern v2u64 __builtin_msa_dotp_u_d(v4u32, v4u32);
+extern v8i16 __builtin_msa_dpadd_s_h(v8i16, v16i8, v16i8);
+extern v4i32 __builtin_msa_dpadd_s_w(v4i32, v8i16, v8i16);
+extern v2i64 __builtin_msa_dpadd_s_d(v2i64, v4i32, v4i32);
+extern v8u16 __builtin_msa_dpadd_u_h(v8u16, v16u8, v16u8);
+extern v4u32 __builtin_msa_dpadd_u_w(v4u32, v8u16, v8u16);
+extern v2u64 __builtin_msa_dpadd_u_d(v2u64, v4u32, v4u32);
+extern v8i16 __builtin_msa_dpsub_s_h(v8i16, v16i8, v16i8);
+extern v4i32 __builtin_msa_dpsub_s_w(v4i32, v8i16, v8i16);
+extern v2i64 __builtin_msa_dpsub_s_d(v2i64, v4i32, v4i32);
+extern v8i16 __builtin_msa_dpsub_u_h(v8i16, v16u8, v16u8);
+extern v4i32 __builtin_msa_dpsub_u_w(v4i32, v8u16, v8u16);
+extern v2i64 __builtin_msa_dpsub_u_d(v2i64, v4u32, v4u32);
+extern v16i8 __builtin_msa_sld_b(v16i8, v16i8, int);
+extern v8i16 __builtin_msa_sld_h(v8i16, v8i16, int);
+extern v4i32 __builtin_msa_sld_w(v4i32, v4i32, int);
+extern v2i64 __builtin_msa_sld_d(v2i64, v2i64, int);
+extern v16i8 __builtin_msa_sldi_b(v16i8, v16i8, unsigned char);
+extern v8i16 __builtin_msa_sldi_h(v8i16, v8i16, unsigned char);
+extern v4i32 __builtin_msa_sldi_w(v4i32, v4i32, unsigned char);
+extern v2i64 __builtin_msa_sldi_d(v2i64, v2i64, unsigned char);
+extern v16i8 __builtin_msa_splat_b(v16i8, int);
+extern v8i16 __builtin_msa_splat_h(v8i16, int);
+extern v4i32 __builtin_msa_splat_w(v4i32, int);
+extern v2i64 __builtin_msa_splat_d(v2i64, int);
+extern v16i8 __builtin_msa_splati_b(v16i8, unsigned char);
+extern v8i16 __builtin_msa_splati_h(v8i16, unsigned char);
+extern v4i32 __builtin_msa_splati_w(v4i32, unsigned char);
+extern v2i64 __builtin_msa_splati_d(v2i64, unsigned char);
+extern v16i8 __builtin_msa_pckev_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_pckev_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_pckev_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_pckev_d(v2i64, v2i64);
+extern v16i8 __builtin_msa_pckod_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_pckod_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_pckod_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_pckod_d(v2i64, v2i64);
+extern v16i8 __builtin_msa_ilvl_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_ilvl_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_ilvl_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_ilvl_d(v2i64, v2i64);
+extern v16i8 __builtin_msa_ilvr_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_ilvr_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_ilvr_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_ilvr_d(v2i64, v2i64);
+extern v16i8 __builtin_msa_ilvev_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_ilvev_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_ilvev_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_ilvev_d(v2i64, v2i64);
+extern v16i8 __builtin_msa_ilvod_b(v16i8, v16i8);
+extern v8i16 __builtin_msa_ilvod_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_ilvod_w(v4i32, v4i32);
+extern v2i64 __builtin_msa_ilvod_d(v2i64, v2i64);
+extern v16i8 __builtin_msa_vshf_b(v16i8, v16i8, v16i8);
+extern v8i16 __builtin_msa_vshf_h(v8i16, v8i16, v8i16);
+extern v4i32 __builtin_msa_vshf_w(v4i32, v4i32, v4i32);
+extern v2i64 __builtin_msa_vshf_d(v2i64, v2i64, v2i64);
+extern v16u8 __builtin_msa_and_v(v16u8, v16u8);
+extern v16u8 __builtin_msa_andi_b(v16u8, unsigned char);
+extern v16u8 __builtin_msa_or_v(v16u8, v16u8);
+extern v16u8 __builtin_msa_ori_b(v16u8, unsigned char);
+extern v16u8 __builtin_msa_nor_v(v16u8, v16u8);
+extern v16u8 __builtin_msa_nori_b(v16u8, unsigned char);
+extern v16u8 __builtin_msa_xor_v(v16u8, v16u8);
+extern v16u8 __builtin_msa_xori_b(v16u8, unsigned char);
+extern v16u8 __builtin_msa_bmnz_v(v16u8, v16u8, v16u8);
+extern v16u8 __builtin_msa_bmnzi_b(v16u8, v16u8, unsigned char);
+extern v16u8 __builtin_msa_bmz_v(v16u8, v16u8, v16u8);
+extern v16u8 __builtin_msa_bmzi_b(v16u8, v16u8, unsigned char);
+extern v16u8 __builtin_msa_bsel_v(v16u8, v16u8, v16u8);
+extern v16u8 __builtin_msa_bseli_b(v16u8, v16u8, unsigned char);
+extern v16i8 __builtin_msa_shf_b(v16i8, unsigned char);
+extern v8i16 __builtin_msa_shf_h(v8i16, unsigned char);
+extern v4i32 __builtin_msa_shf_w(v4i32, unsigned char);
+extern int __builtin_msa_bnz_v(v16u8);
+extern int __builtin_msa_bz_v(v16u8);
+extern v16i8 __builtin_msa_fill_b(int);
+extern v8i16 __builtin_msa_fill_h(int);
+extern v4i32 __builtin_msa_fill_w(int);
+extern v2i64 __builtin_msa_fill_d(long long);
+extern v16i8 __builtin_msa_pcnt_b(v16i8);
+extern v8i16 __builtin_msa_pcnt_h(v8i16);
+extern v4i32 __builtin_msa_pcnt_w(v4i32);
+extern v2i64 __builtin_msa_pcnt_d(v2i64);
+extern v16i8 __builtin_msa_nloc_b(v16i8);
+extern v8i16 __builtin_msa_nloc_h(v8i16);
+extern v4i32 __builtin_msa_nloc_w(v4i32);
+extern v2i64 __builtin_msa_nloc_d(v2i64);
+extern v16i8 __builtin_msa_nlzc_b(v16i8);
+extern v8i16 __builtin_msa_nlzc_h(v8i16);
+extern v4i32 __builtin_msa_nlzc_w(v4i32);
+extern v2i64 __builtin_msa_nlzc_d(v2i64);
+extern int __builtin_msa_copy_s_b(v16i8, unsigned char);
+extern int __builtin_msa_copy_s_h(v8i16, unsigned char);
+extern int __builtin_msa_copy_s_w(v4i32, unsigned char);
+extern long long __builtin_msa_copy_s_d(v2i64, unsigned char);
+extern int __builtin_msa_copy_u_b(v16i8, unsigned char);
+extern int __builtin_msa_copy_u_h(v8i16, unsigned char);
+extern int __builtin_msa_copy_u_w(v4i32, unsigned char);
+extern long long __builtin_msa_copy_u_d(v2i64, unsigned char);
+extern v16i8 __builtin_msa_insert_b(v16i8, unsigned char, int);
+extern v8i16 __builtin_msa_insert_h(v8i16, unsigned char, int);
+extern v4i32 __builtin_msa_insert_w(v4i32, unsigned char, int);
+extern v2i64 __builtin_msa_insert_d(v2i64, unsigned char, long long);
+extern v16i8 __builtin_msa_insve_b(v16i8, unsigned char, v16i8);
+extern v8i16 __builtin_msa_insve_h(v8i16, unsigned char, v8i16);
+extern v4i32 __builtin_msa_insve_w(v4i32, unsigned char, v4i32);
+extern v2i64 __builtin_msa_insve_d(v2i64, unsigned char, v2i64);
+extern int __builtin_msa_bnz_b(v16u8);
+extern int __builtin_msa_bnz_h(v8u16);
+extern int __builtin_msa_bnz_w(v4u32);
+extern int __builtin_msa_bnz_d(v2u64);
+extern int __builtin_msa_bz_b(v16u8);
+extern int __builtin_msa_bz_h(v8u16);
+extern int __builtin_msa_bz_w(v4u32);
+extern int __builtin_msa_bz_d(v2u64);
+extern v16i8 __builtin_msa_ldi_b(short);
+extern v8i16 __builtin_msa_ldi_h(short);
+extern v4i32 __builtin_msa_ldi_w(short);
+extern v2i64 __builtin_msa_ldi_d(short);
+extern v4i32 __builtin_msa_fcaf_w(v4f32, v4f32);
+extern v2i64 __builtin_msa_fcaf_d(v2f64, v2f64);
+extern v4i32 __builtin_msa_fcor_w(v4f32, v4f32);
+extern v2i64 __builtin_msa_fcor_d(v2f64, v2f64);
+extern v4i32 __builtin_msa_fcun_w(v4f32, v4f32);
+extern v2i64 __builtin_msa_fcun_d(v2f64, v2f64);
+extern v4i32 __builtin_msa_fcune_w(v4f32, v4f32);
+extern v2i64 __builtin_msa_fcune_d(v2f64, v2f64);
+extern v4i32 __builtin_msa_fcueq_w(v4f32, v4f32);
+extern v2i64 __builtin_msa_fcueq_d(v2f64, v2f64);
+extern v4i32 __builtin_msa_fceq_w(v4f32, v4f32);
+extern v2i64 __builtin_msa_fceq_d(v2f64, v2f64);
+extern v4i32 __builtin_msa_fcne_w(v4f32, v4f32);
+extern v2i64 __builtin_msa_fcne_d(v2f64, v2f64);
+extern v4i32 __builtin_msa_fclt_w(v4f32, v4f32);
+extern v2i64 __builtin_msa_fclt_d(v2f64, v2f64);
+extern v4i32 __builtin_msa_fcult_w(v4f32, v4f32);
+extern v2i64 __builtin_msa_fcult_d(v2f64, v2f64);
+extern v4i32 __builtin_msa_fcle_w(v4f32, v4f32);
+extern v2i64 __builtin_msa_fcle_d(v2f64, v2f64);
+extern v4i32 __builtin_msa_fcule_w(v4f32, v4f32);
+extern v2i64 __builtin_msa_fcule_d(v2f64, v2f64);
+extern v4i32 __builtin_msa_fsaf_w(v4f32, v4f32);
+extern v2i64 __builtin_msa_fsaf_d(v2f64, v2f64);
+extern v4i32 __builtin_msa_fsor_w(v4f32, v4f32);
+extern v2i64 __builtin_msa_fsor_d(v2f64, v2f64);
+extern v4i32 __builtin_msa_fsun_w(v4f32, v4f32);
+extern v2i64 __builtin_msa_fsun_d(v2f64, v2f64);
+extern v4i32 __builtin_msa_fsune_w(v4f32, v4f32);
+extern v2i64 __builtin_msa_fsune_d(v2f64, v2f64);
+extern v4i32 __builtin_msa_fsueq_w(v4f32, v4f32);
+extern v2i64 __builtin_msa_fsueq_d(v2f64, v2f64);
+extern v4i32 __builtin_msa_fseq_w(v4f32, v4f32);
+extern v2i64 __builtin_msa_fseq_d(v2f64, v2f64);
+extern v4i32 __builtin_msa_fsne_w(v4f32, v4f32);
+extern v2i64 __builtin_msa_fsne_d(v2f64, v2f64);
+extern v4i32 __builtin_msa_fslt_w(v4f32, v4f32);
+extern v2i64 __builtin_msa_fslt_d(v2f64, v2f64);
+extern v4i32 __builtin_msa_fsult_w(v4f32, v4f32);
+extern v2i64 __builtin_msa_fsult_d(v2f64, v2f64);
+extern v4i32 __builtin_msa_fsle_w(v4f32, v4f32);
+extern v2i64 __builtin_msa_fsle_d(v2f64, v2f64);
+extern v4i32 __builtin_msa_fsule_w(v4f32, v4f32);
+extern v2i64 __builtin_msa_fsule_d(v2f64, v2f64);
+extern v4f32 __builtin_msa_fadd_w(v4f32, v4f32);
+extern v2f64 __builtin_msa_fadd_d(v2f64, v2f64);
+extern v4f32 __builtin_msa_fsub_w(v4f32, v4f32);
+extern v2f64 __builtin_msa_fsub_d(v2f64, v2f64);
+extern v4f32 __builtin_msa_fmul_w(v4f32, v4f32);
+extern v2f64 __builtin_msa_fmul_d(v2f64, v2f64);
+extern v4f32 __builtin_msa_fdiv_w(v4f32, v4f32);
+extern v2f64 __builtin_msa_fdiv_d(v2f64, v2f64);
+extern v4f32 __builtin_msa_fmadd_w(v4f32, v4f32, v4f32);
+extern v2f64 __builtin_msa_fmadd_d(v2f64, v2f64, v2f64);
+extern v4f32 __builtin_msa_fmsub_w(v4f32, v4f32, v4f32);
+extern v2f64 __builtin_msa_fmsub_d(v2f64, v2f64, v2f64);
+extern v4f32 __builtin_msa_fexp2_w(v4f32, v4i32);
+extern v2f64 __builtin_msa_fexp2_d(v2f64, v2i64);
+extern v8i16 __builtin_msa_fexdo_h(v4f32, v4f32);
+extern v4f32 __builtin_msa_fexdo_w(v2f64, v2f64);
+extern v8i16 __builtin_msa_ftq_h(v4f32, v4f32);
+extern v4i32 __builtin_msa_ftq_w(v2f64, v2f64);
+extern v4f32 __builtin_msa_fmin_w(v4f32, v4f32);
+extern v2f64 __builtin_msa_fmin_d(v2f64, v2f64);
+extern v4f32 __builtin_msa_fmin_a_w(v4f32, v4f32);
+extern v2f64 __builtin_msa_fmin_a_d(v2f64, v2f64);
+extern v4f32 __builtin_msa_fmax_w(v4f32, v4f32);
+extern v2f64 __builtin_msa_fmax_d(v2f64, v2f64);
+extern v4f32 __builtin_msa_fmax_a_w(v4f32, v4f32);
+extern v2f64 __builtin_msa_fmax_a_d(v2f64, v2f64);
+extern v8i16 __builtin_msa_mul_q_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_mul_q_w(v4i32, v4i32);
+extern v8i16 __builtin_msa_mulr_q_h(v8i16, v8i16);
+extern v4i32 __builtin_msa_mulr_q_w(v4i32, v4i32);
+extern v8i16 __builtin_msa_madd_q_h(v8i16, v8i16, v8i16);
+extern v4i32 __builtin_msa_madd_q_w(v4i32, v4i32, v4i32);
+extern v8i16 __builtin_msa_maddr_q_h(v8i16, v8i16, v8i16);
+extern v4i32 __builtin_msa_maddr_q_w(v4i32, v4i32, v4i32);
+extern v8i16 __builtin_msa_msub_q_h(v8i16, v8i16, v8i16);
+extern v4i32 __builtin_msa_msub_q_w(v4i32, v4i32, v4i32);
+extern v8i16 __builtin_msa_msubr_q_h(v8i16, v8i16, v8i16);
+extern v4i32 __builtin_msa_msubr_q_w(v4i32, v4i32, v4i32);
+extern v4i32 __builtin_msa_fclass_w(v4f32);
+extern v2i64 __builtin_msa_fclass_d(v2f64);
+extern v4f32 __builtin_msa_fsqrt_w(v4f32);
+extern v2f64 __builtin_msa_fsqrt_d(v2f64);
+extern v4f32 __builtin_msa_frcp_w(v4f32);
+extern v2f64 __builtin_msa_frcp_d(v2f64);
+extern v4f32 __builtin_msa_frint_w(v4f32);
+extern v2f64 __builtin_msa_frint_d(v2f64);
+extern v4f32 __builtin_msa_frsqrt_w(v4f32);
+extern v2f64 __builtin_msa_frsqrt_d(v2f64);
+extern v4f32 __builtin_msa_flog2_w(v4f32);
+extern v2f64 __builtin_msa_flog2_d(v2f64);
+extern v4f32 __builtin_msa_fexupl_w(v8i16);
+extern v2f64 __builtin_msa_fexupl_d(v4f32);
+extern v4f32 __builtin_msa_fexupr_w(v8i16);
+extern v2f64 __builtin_msa_fexupr_d(v4f32);
+extern v4f32 __builtin_msa_ffql_w(v8i16);
+extern v2f64 __builtin_msa_ffql_d(v4i32);
+extern v4f32 __builtin_msa_ffqr_w(v8i16);
+extern v2f64 __builtin_msa_ffqr_d(v4i32);
+extern v4i32 __builtin_msa_ftint_s_w(v4f32);
+extern v2i64 __builtin_msa_ftint_s_d(v2f64);
+extern v4u32 __builtin_msa_ftint_u_w(v4f32);
+extern v2u64 __builtin_msa_ftint_u_d(v2f64);
+extern v4i32 __builtin_msa_ftrunc_s_w(v4f32);
+extern v2i64 __builtin_msa_ftrunc_s_d(v2f64);
+extern v4u32 __builtin_msa_ftrunc_u_w(v4f32);
+extern v2u64 __builtin_msa_ftrunc_u_d(v2f64);
+extern v4f32 __builtin_msa_ffint_s_w(v4i32);
+extern v2f64 __builtin_msa_ffint_s_d(v2i64);
+extern v4f32 __builtin_msa_ffint_u_w(v4u32);
+extern v2f64 __builtin_msa_ffint_u_d(v2u64);
+extern int __builtin_msa_cfcmsa(unsigned char);
+extern v16i8 __builtin_msa_move_v(v16i8);
+extern v4f32 __builtin_msa_cast_to_vector_float(float);
+extern v2f64 __builtin_msa_cast_to_vector_double(double);
+extern float __builtin_msa_cast_to_scalar_float(v4f32);
+extern double __builtin_msa_cast_to_scalar_double(v2f64);
+#endif /* __clang__ */
#define __msa_sll_b __builtin_msa_sll_b
#define __msa_sll_h __builtin_msa_sll_h
#define __msa_sll_w __builtin_msa_sll_w
diff --git a/gcc-4.9/gcc/config/rs6000/linux-grte.h b/gcc-4.9/gcc/config/rs6000/linux-grte.h
deleted file mode 100644
index e69de29bb..000000000
--- a/gcc-4.9/gcc/config/rs6000/linux-grte.h
+++ /dev/null
diff --git a/gcc-4.9/gcc/configure b/gcc-4.9/gcc/configure
index 746c37556..a16ecab61 100755
--- a/gcc-4.9/gcc/configure
+++ b/gcc-4.9/gcc/configure
@@ -932,6 +932,7 @@ with_system_zlib
enable_maintainer_mode
enable_link_mutex
enable_version_specific_runtime_libs
+enable_poison_system_directories
enable_canonical_prefixes
enable_plugin
enable_host_shared
@@ -1665,6 +1666,8 @@ Optional Features:
--enable-version-specific-runtime-libs
specify that runtime libraries should be installed
in a compiler-specific directory
+ --enable-poison-system-directories
+ warn for use of native system header directories
--enable-canonical-prefixes
enable or disable prefix canonicalization
--enable-plugin enable plugin support
@@ -27020,7 +27023,7 @@ if test $gcc_cv_ld_pie = yes ; then
# Check if linker supports -pie option with copy reloc
case "$target" in
*android*)
- ;;
+ ;;
i?86-*-linux* | x86_64-*-linux*)
cat > conftest1.s <<EOF
.globl a_glob
@@ -27049,7 +27052,8 @@ EOF
esac
fi
fi
-
+# Disable gcc linker PIE support with copy reloc
+gcc_cv_ld_pie_copyreloc=no
cat >>confdefs.h <<_ACEOF
#define HAVE_LD_PIE_COPYRELOC `if test x"$gcc_cv_ld_pie_copyreloc" = xyes; then echo 1; else echo 0; fi`
_ACEOF
@@ -27945,6 +27949,19 @@ $as_echo "#define ENABLE_CANONICAL_PREFIXES 1" >>confdefs.h
fi
+# Check whether --enable-poison-system-directories was given.
+if test "${enable_poison_system_directories+set}" = set; then :
+ enableval=$enable_poison_system_directories;
+else
+ enable_poison_system_directories=no
+fi
+
+if test "x${enable_poison_system_directories}" = "xyes"; then
+
+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
+
+fi
+
# Substitute configuration variables
diff --git a/gcc-4.9/gcc/configure.ac b/gcc-4.9/gcc/configure.ac
index a871103ff..6893dfc5b 100644
--- a/gcc-4.9/gcc/configure.ac
+++ b/gcc-4.9/gcc/configure.ac
@@ -5521,6 +5521,16 @@ if test x"$enable_canonical_prefixes" = xyes; then
1, [Define to enable prefix canonicalization.])
fi
+AC_ARG_ENABLE([poison-system-directories],
+ AS_HELP_STRING([--enable-poison-system-directories],
+ [warn for use of native system header directories]),,
+ [enable_poison_system_directories=no])
+if test "x${enable_poison_system_directories}" = "xyes"; then
+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
+ [1],
+ [Define to warn for use of native system header directories])
+fi
+
# Substitute configuration variables
AC_SUBST(subdirs)
AC_SUBST(srcdir)
diff --git a/gcc-4.9/gcc/cp/call.c b/gcc-4.9/gcc/cp/call.c
index 74de4f273..db43bf10d 100644
--- a/gcc-4.9/gcc/cp/call.c
+++ b/gcc-4.9/gcc/cp/call.c
@@ -462,7 +462,7 @@ struct conversion_info {
/* The type of the formal argument. */
tree to_type;
};
-
+
struct rejection_reason {
enum rejection_reason_code code;
union {
@@ -1589,7 +1589,7 @@ reference_binding (tree rto, tree rfrom, tree expr, bool c_cast_p, int flags,
conv->rvaluedness_matches_p
= (TYPE_REF_IS_RVALUE (rto) == TYPE_REF_IS_RVALUE (rfrom));
else
- conv->rvaluedness_matches_p
+ conv->rvaluedness_matches_p
= (TYPE_REF_IS_RVALUE (rto) == !is_lvalue);
if ((gl_kind & clk_bitfield) != 0
@@ -2490,16 +2490,16 @@ add_builtin_candidate (struct z_candidate **candidates, enum tree_code code,
break;
if (TYPE_PTR_P (type1) && TYPE_PTR_P (type2))
break;
- if (TREE_CODE (type1) == ENUMERAL_TYPE
+ if (TREE_CODE (type1) == ENUMERAL_TYPE
&& TREE_CODE (type2) == ENUMERAL_TYPE)
break;
- if (TYPE_PTR_P (type1)
+ if (TYPE_PTR_P (type1)
&& null_ptr_cst_p (args[1]))
{
type2 = type1;
break;
}
- if (null_ptr_cst_p (args[0])
+ if (null_ptr_cst_p (args[0])
&& TYPE_PTR_P (type2))
{
type1 = type2;
@@ -2662,7 +2662,7 @@ add_builtin_candidate (struct z_candidate **candidates, enum tree_code code,
if (ARITHMETIC_TYPE_P (type1))
break;
return;
-
+
default:
gcc_unreachable ();
}
@@ -3940,7 +3940,7 @@ print_error_for_call_failure (tree fn, vec<tree, va_gc> *args, bool any_viable_p
ARGS. */
tree
-build_new_function_call (tree fn, vec<tree, va_gc> **args, bool koenig_p,
+build_new_function_call (tree fn, vec<tree, va_gc> **args, bool koenig_p,
tsubst_flags_t complain)
{
struct z_candidate *candidates, *cand;
@@ -4041,8 +4041,9 @@ build_operator_new_call (tree fnname, vec<tree, va_gc> **args,
if (size_check != NULL_TREE)
{
tree errval = TYPE_MAX_VALUE (sizetype);
- if (cxx_dialect >= cxx11 && flag_exceptions &&
- DISABLE_CXA_THROW_BAD_ARRAY_NEW_LENGTH)
+ if (cxx_dialect >= cxx11 && flag_exceptions
+ /* ANDROID - temporarily disable __cxa_throw_bad_array_new_length call. */
+ && !TARGET_ANDROID)
errval = throw_bad_array_new_length ();
*size = fold_build3 (COND_EXPR, sizetype, size_check,
original_size, errval);
@@ -4233,7 +4234,7 @@ build_op_call_1 (tree obj, vec<tree, va_gc> **args, tsubst_flags_t complain)
{
if (complain & tf_error)
{
- error ("call of %<(%T) (%A)%> is ambiguous",
+ error ("call of %<(%T) (%A)%> is ambiguous",
TREE_TYPE (obj), build_tree_list_vec (*args));
print_z_candidates (location_of (TREE_TYPE (obj)), candidates);
}
@@ -4462,7 +4463,7 @@ build_conditional_expr_1 (location_t loc, tree arg1, tree arg2, tree arg3,
if (!arg2)
{
if (complain & tf_error)
- pedwarn (loc, OPT_Wpedantic,
+ pedwarn (loc, OPT_Wpedantic,
"ISO C++ forbids omitting the middle term of a ?: expression");
/* Make sure that lvalues remain lvalues. See g++.oliva/ext1.C. */
@@ -5160,7 +5161,7 @@ add_candidates (tree fns, tree first_arg, const vec<tree, va_gc> *args,
fn,
ctype,
explicit_targs,
- fn_first_arg,
+ fn_first_arg,
fn_args,
return_type,
access_path,
@@ -5376,7 +5377,7 @@ build_new_op_1 (location_t loc, enum tree_code code, int flags, tree arg1,
-fpermissive. */
else
{
- const char *msg = (flag_permissive)
+ const char *msg = (flag_permissive)
? G_("no %<%D(int)%> declared for postfix %qs,"
" trying prefix operator instead")
: G_("no %<%D(int)%> declared for postfix %qs");
@@ -5579,8 +5580,8 @@ build_new_op_1 (location_t loc, enum tree_code code, int flags, tree arg1,
return cp_build_array_ref (input_location, arg1, arg2, complain);
case MEMBER_REF:
- return build_m_component_ref (cp_build_indirect_ref (arg1, RO_ARROW_STAR,
- complain),
+ return build_m_component_ref (cp_build_indirect_ref (arg1, RO_ARROW_STAR,
+ complain),
arg2, complain);
/* The caller will deal with these. */
@@ -6111,7 +6112,7 @@ convert_like_real (conversion *convs, tree expr, tree fn, int argnum,
about to bind it to a reference, in which case we need to
leave it as an lvalue. */
if (inner >= 0)
- {
+ {
expr = decl_constant_value_safe (expr);
if (expr == null_node && INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P (totype))
/* If __null has been converted to an integer type, we do not
@@ -6205,7 +6206,7 @@ convert_like_real (conversion *convs, tree expr, tree fn, int argnum,
expr = convert_like_real (next_conversion (convs), expr, fn, argnum,
convs->kind == ck_ref_bind ? -1 : 1,
- convs->kind == ck_ref_bind ? issue_conversion_warnings : false,
+ convs->kind == ck_ref_bind ? issue_conversion_warnings : false,
c_cast_p,
complain);
if (expr == error_mark_node)
@@ -6273,7 +6274,7 @@ convert_like_real (conversion *convs, tree expr, tree fn, int argnum,
return error_mark_node;
}
- /* If necessary, create a temporary.
+ /* If necessary, create a temporary.
VA_ARG_EXPR and CONSTRUCTOR expressions are special cases
that need temporaries, even when their types are reference
@@ -6621,7 +6622,7 @@ convert_for_arg_passing (tree type, tree val, tsubst_flags_t complain)
tree bitfield_type;
/* If VAL is a bitfield, then -- since it has already been converted
- to TYPE -- it cannot have a precision greater than TYPE.
+ to TYPE -- it cannot have a precision greater than TYPE.
If it has a smaller precision, we must widen it here. For
example, passing "int f:3;" to a function expecting an "int" will
@@ -6635,7 +6636,7 @@ convert_for_arg_passing (tree type, tree val, tsubst_flags_t complain)
if we call convert_bitfield_to_declared_type, the bitfield will
be converted to "long long". */
bitfield_type = is_bitfield_expr_with_lowered_type (val);
- if (bitfield_type
+ if (bitfield_type
&& TYPE_PRECISION (TREE_TYPE (val)) < TYPE_PRECISION (type))
val = convert_to_integer (TYPE_MAIN_VARIANT (bitfield_type), val);
@@ -6717,7 +6718,7 @@ get_function_version_dispatcher (tree fn)
return dispatcher_decl;
}
-/* fn is a function version dispatcher that is marked used. Mark all the
+/* fn is a function version dispatcher that is marked used. Mark all the
semantically identical function versions it will dispatch as used. */
void
@@ -7058,7 +7059,7 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain)
: complain & (~tf_warning));
val = convert_for_arg_passing (type, val, complain);
-
+
if (val == error_mark_node)
return error_mark_node;
else
@@ -7098,8 +7099,8 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain)
if (! flag_elide_constructors)
/* Do things the hard way. */;
- else if (cand->num_convs == 1
- && (DECL_COPY_CONSTRUCTOR_P (fn)
+ else if (cand->num_convs == 1
+ && (DECL_COPY_CONSTRUCTOR_P (fn)
|| DECL_MOVE_CONSTRUCTOR_P (fn)))
{
tree targ;
@@ -7297,11 +7298,11 @@ build_cxx_call (tree fn, int nargs, tree *argarray,
return error_mark_node;
/* If it is a built-in array notation function, then the return type of
- the function is the element type of the array passed in as array
+ the function is the element type of the array passed in as array
notation (i.e. the first parameter of the function). */
- if (flag_cilkplus && TREE_CODE (fn) == CALL_EXPR)
+ if (flag_cilkplus && TREE_CODE (fn) == CALL_EXPR)
{
- enum built_in_function bif =
+ enum built_in_function bif =
is_cilkplus_reduce_builtin (CALL_EXPR_FN (fn));
if (bif == BUILT_IN_CILKPLUS_SEC_REDUCE_ADD
|| bif == BUILT_IN_CILKPLUS_SEC_REDUCE_MUL
@@ -7309,7 +7310,7 @@ build_cxx_call (tree fn, int nargs, tree *argarray,
|| bif == BUILT_IN_CILKPLUS_SEC_REDUCE_MIN
|| bif == BUILT_IN_CILKPLUS_SEC_REDUCE
|| bif == BUILT_IN_CILKPLUS_SEC_REDUCE_MUTATING)
- {
+ {
if (call_expr_nargs (fn) == 0)
{
error_at (EXPR_LOCATION (fn), "Invalid builtin arguments");
@@ -7317,13 +7318,13 @@ build_cxx_call (tree fn, int nargs, tree *argarray,
}
/* for bif == BUILT_IN_CILKPLUS_SEC_REDUCE_ALL_ZERO or
BUILT_IN_CILKPLUS_SEC_REDUCE_ANY_ZERO or
- BUILT_IN_CILKPLUS_SEC_REDUCE_ANY_NONZERO or
+ BUILT_IN_CILKPLUS_SEC_REDUCE_ANY_NONZERO or
BUILT_IN_CILKPLUS_SEC_REDUCE_ALL_NONZERO or
BUILT_IN_CILKPLUS_SEC_REDUCE_MIN_IND or
BUILT_IN_CILKPLUS_SEC_REDUCE_MAX_IND
The pre-defined return-type is the correct one. */
- tree array_ntn = CALL_EXPR_ARG (fn, 0);
- TREE_TYPE (fn) = TREE_TYPE (array_ntn);
+ tree array_ntn = CALL_EXPR_ARG (fn, 0);
+ TREE_TYPE (fn) = TREE_TYPE (array_ntn);
return fn;
}
}
@@ -7384,7 +7385,7 @@ build_java_interface_fn_ref (tree fn, tree instance)
/* Look up the pointer to the runtime java.lang.Class object for `instance'.
This is the first entry in the vtable. */
- klass_ref = build_vtbl_ref (cp_build_indirect_ref (instance, RO_NULL,
+ klass_ref = build_vtbl_ref (cp_build_indirect_ref (instance, RO_NULL,
tf_warning_or_error),
integer_zero_node);
@@ -7568,7 +7569,7 @@ build_special_member_call (tree instance, tree name, vec<tree, va_gc> **args,
if ((complain & tf_error)
&& (flags & LOOKUP_DELEGATING_CONS)
- && name == complete_ctor_identifier
+ && name == complete_ctor_identifier
&& TREE_CODE (ret) == CALL_EXPR
&& (DECL_ABSTRACT_ORIGIN (TREE_OPERAND (CALL_EXPR_FN (ret), 0))
== current_function_decl))
@@ -8745,7 +8746,7 @@ joust (struct z_candidate *cand1, struct z_candidate *cand2, bool warn,
source = TREE_TYPE (source);
if (warning (OPT_Wconversion, "choosing %qD over %qD", w->fn, l->fn)
&& warning (OPT_Wconversion, " for conversion from %qT to %qT",
- source, w->second_conv->type))
+ source, w->second_conv->type))
{
inform (input_location, " because conversion sequence for the argument is better");
}
@@ -8846,7 +8847,7 @@ joust (struct z_candidate *cand1, struct z_candidate *cand2, bool warn,
tree f2 = TREE_TYPE (cand2->fn);
tree p1 = TYPE_ARG_TYPES (f1);
tree p2 = TYPE_ARG_TYPES (f2);
-
+
/* Check if cand1->fn and cand2->fn are versions of the same function. It
is possible that cand1->fn and cand2->fn are function versions but of
different functions. Check types to see if they are versions of the same
diff --git a/gcc-4.9/gcc/cp/cp-lang.c b/gcc-4.9/gcc/cp/cp-lang.c
index 22f8e4bbb..bd2c2b7bd 100644
--- a/gcc-4.9/gcc/cp/cp-lang.c
+++ b/gcc-4.9/gcc/cp/cp-lang.c
@@ -109,8 +109,8 @@ static tree get_template_argument_pack_elems_folded (const_tree);
#define LANG_HOOKS_COPY_LANG_TYPE cp_lipo_copy_lang_type
#undef LANG_HOOKS_PROCESS_PENDING_DECLS
#define LANG_HOOKS_PROCESS_PENDING_DECLS cp_process_pending_declarations
-#undef LANG_HOOKS_CLEAR_DEFFERED_FNS
-#define LANG_HOOKS_CLEAR_DEFFERED_FNS cp_clear_deferred_fns
+#undef LANG_HOOKS_RESET_PARSING_STATE
+#define LANG_HOOKS_RESET_PARSING_STATE cp_reset_parsing_state
#undef LANG_HOOKS_IS_GENERATED_TYPE
#define LANG_HOOKS_IS_GENERATED_TYPE cp_is_compiler_generated_type
#undef LANG_HOOKS_CMP_LANG_TYPE
diff --git a/gcc-4.9/gcc/cp/cp-tree.h b/gcc-4.9/gcc/cp/cp-tree.h
index 582988c30..793c8481d 100644
--- a/gcc-4.9/gcc/cp/cp-tree.h
+++ b/gcc-4.9/gcc/cp/cp-tree.h
@@ -465,7 +465,7 @@ typedef enum expr_list_kind {
ELK_INIT, /* initializer */
ELK_MEM_INIT, /* member initializer */
ELK_FUNC_CAST /* functional cast */
-} expr_list_kind;
+} expr_list_kind;
/* Possible cases of implicit bad rhs conversions. */
typedef enum impl_conv_rhs {
@@ -662,7 +662,7 @@ typedef enum cp_trait_kind
struct GTY (()) tree_trait_expr {
struct tree_common common;
tree type1;
- tree type2;
+ tree type2;
enum cp_trait_kind kind;
};
@@ -817,7 +817,7 @@ union GTY((desc ("cp_tree_node_structure (&%h)"),
struct tree_default_arg GTY ((tag ("TS_CP_DEFAULT_ARG"))) default_arg;
struct tree_deferred_noexcept GTY ((tag ("TS_CP_DEFERRED_NOEXCEPT"))) deferred_noexcept;
struct lang_identifier GTY ((tag ("TS_CP_IDENTIFIER"))) identifier;
- struct tree_static_assert GTY ((tag ("TS_CP_STATIC_ASSERT")))
+ struct tree_static_assert GTY ((tag ("TS_CP_STATIC_ASSERT")))
static_assertion;
struct tree_argument_pack_select GTY ((tag ("TS_CP_ARGUMENT_PACK_SELECT")))
argument_pack_select;
@@ -2694,7 +2694,7 @@ extern void decl_shadowed_for_var_insert (tree, tree);
TREE_PURPOSE is the TEMPLATE_DECL of which this entity is a
specialization or abstract instance. The TREE_VALUE is the
template arguments used to specialize the template.
-
+
Consider:
template <typename T> struct S { friend void f(T) {} };
@@ -2884,7 +2884,7 @@ extern void decl_shadowed_for_var_insert (tree, tree);
template <typename T> struct S {};
template <typename T> struct S<T*> {};
-
+
the CLASSTPYE_TI_TEMPLATE for S<int*> will be S, not the S<T*>. */
#define CLASSTYPE_TI_TEMPLATE(NODE) TI_TEMPLATE (CLASSTYPE_TEMPLATE_INFO (NODE))
#define CLASSTYPE_TI_ARGS(NODE) TI_ARGS (CLASSTYPE_TEMPLATE_INFO (NODE))
@@ -3001,7 +3001,7 @@ extern void decl_shadowed_for_var_insert (tree, tree);
select. */
#define ARGUMENT_PACK_SELECT_INDEX(NODE) \
(((struct tree_argument_pack_select *)ARGUMENT_PACK_SELECT_CHECK (NODE))->index)
-
+
/* In an ARGUMENT_PACK_SELECT, the actual underlying argument that the
ARGUMENT_PACK_SELECT represents. */
#define ARGUMENT_PACK_SELECT_ARG(NODE) \
@@ -3308,7 +3308,7 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter)
/* [basic.fundamental]
Integral and floating types are collectively called arithmetic
- types.
+ types.
As a GNU extension, we also accept complex types.
@@ -3326,7 +3326,7 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter)
Arithmetic types, enumeration types, pointer types,
pointer-to-member types, and std::nullptr_t are collectively called
scalar types.
-
+
Keep these checks in ascending code order. */
#define SCALAR_TYPE_P(TYPE) \
(TYPE_PTRDATAMEM_P (TYPE) \
@@ -3346,7 +3346,7 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter)
Scoped enumeration types are different from normal (unscoped)
enumeration types in several ways:
-
+
- The enumerators of a scoped enumeration type are only available
within the scope of the enumeration type and not in the
enclosing scope. For example, the Red color can be referred to
@@ -3892,18 +3892,18 @@ more_aggr_init_expr_args_p (const aggr_init_expr_arg_iterator *iter)
template <> int min<int> (int, int),
3=explicit instantiation, e.g.:
-
+
template int min<int> (int, int);
Note that NODE will be marked as a specialization even if the
template it is instantiating is not a primary template. For
example, given:
- template <typename T> struct O {
+ template <typename T> struct O {
void f();
- struct I {};
+ struct I {};
};
-
+
both O<int>::f and O<int>::I will be marked as instantiations.
If DECL_USE_TEMPLATE is nonzero, then DECL_TEMPLATE_INFO will also
@@ -4385,6 +4385,7 @@ extern int cp_unevaluated_operand;
extern tree cp_convert_range_for (tree, tree, tree, bool);
extern bool parsing_nsdmi (void);
extern void inject_this_parameter (tree, cp_cv_quals);
+extern void clear_lambda_scope (void);
/* in pt.c */
@@ -5040,7 +5041,7 @@ extern bool pragma_java_exceptions;
extern bool check_dtor_name (tree, tree);
bool magic_varargs_p (tree);
-extern tree build_conditional_expr (location_t, tree, tree, tree,
+extern tree build_conditional_expr (location_t, tree, tree, tree,
tsubst_flags_t);
extern tree build_addr_func (tree, tsubst_flags_t);
extern void set_flags_from_callee (tree);
@@ -5052,7 +5053,7 @@ extern bool sufficient_parms_p (const_tree);
extern tree type_decays_to (tree);
extern tree build_user_type_conversion (tree, tree, int,
tsubst_flags_t);
-extern tree build_new_function_call (tree, vec<tree, va_gc> **, bool,
+extern tree build_new_function_call (tree, vec<tree, va_gc> **, bool,
tsubst_flags_t);
extern tree build_operator_new_call (tree, vec<tree, va_gc> **, tree *,
tree *, tree, tree *,
@@ -5342,7 +5343,7 @@ extern void cplus_decl_attributes (tree *, tree, int);
extern void finish_anon_union (tree);
extern void cp_write_global_declarations (void);
extern void cp_process_pending_declarations (location_t);
-extern void cp_clear_deferred_fns (void);
+extern void cp_reset_parsing_state (void);
extern void cp_clear_constexpr_hashtable (void);
extern void cp_clear_conv_type_map (void);
extern tree coerce_new_type (tree);
@@ -5542,7 +5543,7 @@ extern tree convert_generic_types_to_packs (tree, int, int);
extern tree splice_late_return_type (tree, tree);
extern bool is_auto (const_tree);
extern bool is_auto_or_concept (const_tree);
-extern tree process_template_parm (tree, location_t, tree,
+extern tree process_template_parm (tree, location_t, tree,
bool, bool);
extern tree end_template_parm_list (tree);
extern void end_template_decl (void);
@@ -6062,7 +6063,7 @@ extern tree unlowered_expr_type (const_tree);
extern tree decay_conversion (tree, tsubst_flags_t);
extern tree build_class_member_access_expr (tree, tree, tree, bool,
tsubst_flags_t);
-extern tree finish_class_member_access_expr (tree, tree, bool,
+extern tree finish_class_member_access_expr (tree, tree, bool,
tsubst_flags_t);
extern tree build_x_indirect_ref (location_t, tree,
ref_operator, tsubst_flags_t);
@@ -6089,10 +6090,10 @@ extern tree build_x_unary_op (location_t,
tsubst_flags_t);
extern tree cp_build_addr_expr (tree, tsubst_flags_t);
extern tree cp_build_addr_expr_strict (tree, tsubst_flags_t);
-extern tree cp_build_unary_op (enum tree_code, tree, int,
+extern tree cp_build_unary_op (enum tree_code, tree, int,
tsubst_flags_t);
extern tree unary_complex_lvalue (enum tree_code, tree);
-extern tree build_x_conditional_expr (location_t, tree, tree, tree,
+extern tree build_x_conditional_expr (location_t, tree, tree, tree,
tsubst_flags_t);
extern tree build_x_compound_expr_from_list (tree, expr_list_kind,
tsubst_flags_t);
@@ -6133,7 +6134,7 @@ extern void expand_ptrmemfunc_cst (tree, tree *, tree *);
extern tree type_after_usual_arithmetic_conversions (tree, tree);
extern tree common_pointer_type (tree, tree);
extern tree composite_pointer_type (tree, tree, tree, tree,
- composite_pointer_operation,
+ composite_pointer_operation,
tsubst_flags_t);
extern tree merge_types (tree, tree);
extern tree strip_array_domain (tree);
@@ -6277,11 +6278,6 @@ bool cilkplus_an_triplet_types_ok_p (location_t, tree, tree, tree,
/* In c-family/cilk.c */
extern bool cilk_valid_spawn (tree);
-// This symbol can be overridden by target config.
-#ifndef DISABLE_CXA_THROW_BAD_ARRAY_NEW_LENGTH
-#define DISABLE_CXA_THROW_BAD_ARRAY_NEW_LENGTH 0
-#endif
-
/* -- end of C++ */
#endif /* ! GCC_CP_TREE_H */
diff --git a/gcc-4.9/gcc/cp/decl2.c b/gcc-4.9/gcc/cp/decl2.c
index 074108eea..ff0d30446 100644
--- a/gcc-4.9/gcc/cp/decl2.c
+++ b/gcc-4.9/gcc/cp/decl2.c
@@ -4178,10 +4178,10 @@ no_linkage_error (tree decl)
"to declare function %q#D with linkage", t, decl);
}
-/* Clear the list of deferred functions. */
+/* Reset the parsing state for the next module. */
void
-cp_clear_deferred_fns (void)
+cp_reset_parsing_state (void)
{
vec_free (deferred_fns);
deferred_fns = NULL;
@@ -4192,6 +4192,7 @@ cp_clear_deferred_fns (void)
clear_pending_templates ();
reset_anon_name ();
reset_temp_count ();
+ clear_lambda_scope ();
}
/* Collect declarations from all namespaces relevant to SOURCE_FILE. */
diff --git a/gcc-4.9/gcc/cp/init.c b/gcc-4.9/gcc/cp/init.c
index 7313f8477..283843ae9 100644
--- a/gcc-4.9/gcc/cp/init.c
+++ b/gcc-4.9/gcc/cp/init.c
@@ -388,7 +388,7 @@ build_value_init_noctor (tree type, tsubst_flags_t complain)
{
gcc_assert (!TYPE_HAS_COMPLEX_DFLT (type)
|| errorcount != 0);
-
+
if (TREE_CODE (type) != UNION_TYPE)
{
tree field;
@@ -1217,7 +1217,7 @@ expand_virtual_init (tree binfo, tree decl)
}
/* Compute the location of the vtpr. */
- vtbl_ptr = build_vfield_ref (cp_build_indirect_ref (decl, RO_NULL,
+ vtbl_ptr = build_vfield_ref (cp_build_indirect_ref (decl, RO_NULL,
tf_warning_or_error),
TREE_TYPE (binfo));
gcc_assert (vtbl_ptr != error_mark_node);
@@ -2586,8 +2586,10 @@ build_new_1 (vec<tree, va_gc> **placement, tree type, tree nelts,
}
/* Perform the overflow check. */
tree errval = TYPE_MAX_VALUE (sizetype);
- if (cxx_dialect >= cxx11 && flag_exceptions &&
- DISABLE_CXA_THROW_BAD_ARRAY_NEW_LENGTH)
+ if (cxx_dialect >= cxx11 && flag_exceptions
+ /* ANDROID - temporarily disable __cxa_throw_bad_array_new_length
+ call. */
+ && !TARGET_ANDROID)
errval = throw_bad_array_new_length ();
if (outer_nelts_check != NULL_TREE)
size = fold_build3 (COND_EXPR, sizetype, outer_nelts_check,
@@ -3218,7 +3220,7 @@ build_vec_delete_1 (tree base, tree maxindex, tree type,
"even if they are declared when the class is defined");
}
return build_builtin_delete_call (base);
- }
+ }
size_exp = size_in_bytes (type);
@@ -3379,7 +3381,7 @@ get_temp_regvar (tree type, tree init)
decl = create_temporary_var (type);
add_decl_expr (decl);
- finish_expr_stmt (cp_build_modify_expr (decl, INIT_EXPR, init,
+ finish_expr_stmt (cp_build_modify_expr (decl, INIT_EXPR, init,
tf_warning_or_error));
return decl;
@@ -3768,7 +3770,7 @@ build_vec_init (tree base, tree maxindex, tree init,
from = NULL_TREE;
if (from_array == 2)
- elt_init = cp_build_modify_expr (to, NOP_EXPR, from,
+ elt_init = cp_build_modify_expr (to, NOP_EXPR, from,
complain);
else if (type_build_ctor_call (type))
elt_init = build_aggr_init (to, from, 0, complain);
diff --git a/gcc-4.9/gcc/cp/parser.c b/gcc-4.9/gcc/cp/parser.c
index 29b590ea4..aadb36e8a 100644
--- a/gcc-4.9/gcc/cp/parser.c
+++ b/gcc-4.9/gcc/cp/parser.c
@@ -8705,6 +8705,16 @@ finish_lambda_scope (void)
lambda_scope_stack->pop ();
}
+void
+clear_lambda_scope (void)
+{
+ if (!lambda_scope_stack)
+ return;
+ gcc_assert(lambda_scope_stack->is_empty());
+ lambda_scope = NULL_TREE;
+ lambda_count = 0;
+}
+
/* Parse a lambda expression.
lambda-expression:
diff --git a/gcc-4.9/gcc/defaults.h b/gcc-4.9/gcc/defaults.h
index f94ae17a7..678674a71 100644
--- a/gcc-4.9/gcc/defaults.h
+++ b/gcc-4.9/gcc/defaults.h
@@ -1277,6 +1277,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define SET_RATIO(speed) MOVE_RATIO (speed)
#endif
+/* Whether to warn about poisoned system directories by default. */
+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
+#define POISON_SYSTEM_DIRECTORIES_DEFAULT 1
+#else
+#define POISON_SYSTEM_DIRECTORIES_DEFAULT 0
+#endif
+
/* Supply a default definition for FUNCTION_ARG_PADDING:
usually pad upward, but pad short args downward on
big-endian machines. */
diff --git a/gcc-4.9/gcc/doc/invoke.texi b/gcc-4.9/gcc/doc/invoke.texi
index b5d9c4ba0..698ecd659 100644
--- a/gcc-4.9/gcc/doc/invoke.texi
+++ b/gcc-4.9/gcc/doc/invoke.texi
@@ -22412,6 +22412,11 @@ can figure out the other form by either removing @samp{no-} or adding
it.
@table @gcctabopt
+@item -fsanitize-coverage=trace-pc
+@opindex fsanitize-coverage=trace-pc
+Enable coverage-guided fuzzing code instrumentation.
+Inserts a call to @code{__sanitizer_cov_trace_pc} into every basic block.
+
@item -fbounds-check
@opindex fbounds-check
For front ends that support it, generate additional code to check that
diff --git a/gcc-4.9/gcc/except.c b/gcc-4.9/gcc/except.c
index d67b4e427..2818119ec 100644
--- a/gcc-4.9/gcc/except.c
+++ b/gcc-4.9/gcc/except.c
@@ -1394,10 +1394,7 @@ sjlj_emit_dispatch_table (rtx dispatch_label, int num_dispatch)
{
for (loop = bb->loop_father;
loop_outer (loop); loop = loop_outer (loop))
- {
- loop->header = NULL;
- loop->latch = NULL;
- }
+ mark_loop_for_removal (loop);
}
}
diff --git a/gcc-4.9/gcc/final.c b/gcc-4.9/gcc/final.c
index 3bf3fdb67..c7efcc565 100644
--- a/gcc-4.9/gcc/final.c
+++ b/gcc-4.9/gcc/final.c
@@ -2179,7 +2179,7 @@ final_scan_insn (rtx insn, FILE *file, int optimize_p ATTRIBUTE_UNUSED,
current_function_decl);
#else
ASM_OUTPUT_LABEL (asm_out_file,
- IDENTIFIER_POINTER (cold_function_name));
+ IDENTIFIER_POINTER (cold_partition_name));
#endif
}
has_cold_section_p = true;
diff --git a/gcc-4.9/gcc/gcc.c b/gcc-4.9/gcc/gcc.c
index e2d921718..cc717820d 100644
--- a/gcc-4.9/gcc/gcc.c
+++ b/gcc-4.9/gcc/gcc.c
@@ -751,10 +751,18 @@ proper position among the other output files. */
%{fvtable-verify=preinit: -lvtv -u_vtable_map_vars_start -u_vtable_map_vars_end}}"
#endif
-/* Overridable by target. */
-#ifndef PROFILE_OR_COV_LINK_SPEC
-#define PROFILE_OR_COV_LINK_SPEC ""
+#if POISON_SYSTEM_DIRECTORIES_DEFAULT
+# define POISON_SYSTEM_DIRECTORIES_DEFAULT_SPEC "\
+%{!Wpoison-system-directories:%{!Wno-poison-system-directories:\
+ --warn-poison-system-directories}}"
+#else
+# define POISON_SYSTEM_DIRECTORIES_DEFAULT_SPEC ""
#endif
+#define POISON_SYSTEM_DIRECTORIES_SPEC \
+ POISON_SYSTEM_DIRECTORIES_DEFAULT_SPEC " \
+ %{Wpoison-system-directories:--warn-poison-system-directories}\
+ %{Wno-poison-system-directories:--no-warn-poison-system-directories}\
+ %{Werror=poison-system-directories:--error-poison-system-directories}"
/* -u* was put back because both BSD and SysV seem to support it. */
/* %{static:} simply prevents an error message if the target machine
@@ -778,11 +786,14 @@ proper position among the other output files. */
"%{fuse-ld=*:-fuse-ld=%*}\
%X %{o*} %{e*} %{N} %{n} %{r}\
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} " VTABLE_VERIFICATION_SPEC " \
+ " POISON_SYSTEM_DIRECTORIES_SPEC " \
%{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\
%{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\
%{fcilkplus:%:include(libcilkrts.spec)%(link_cilkrts)}\
%{fgnu-tm:%:include(libitm.spec)%(link_itm)}\
- %(mflib) " STACK_SPLIT_SPEC PROFILE_OR_COV_LINK_SPEC "\
+ %(mflib) " STACK_SPLIT_SPEC "\
+ %{fprofile-arcs|fprofile-generate*|coverage:-lgcov " \
+ LINUX_OR_ANDROID_LD("", "-lgcc") "}" SANITIZER_SPEC " \
%{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\
%{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}"
#endif
@@ -5404,7 +5415,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
"%{foo=*:bar%*}%{foo=*:one%*two}"
matches -foo=hello then it will produce:
-
+
barhello onehellotwo
*/
if (*p == 0 || *p == '}')
@@ -6347,7 +6358,7 @@ set_func_reorder_linker_plugin_spec (void)
int i;
const char *plugin_opt_none = "group=none";
const char *plugin_opt_callgraph = "group=callgraph";
-
+
/* Find the linker plugin that does function ordering. */
func_reorder_linker_plugin_file_spec = find_a_file (&exec_prefixes,
FRPLUGINSONAME, R_OK, false);
@@ -7221,7 +7232,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
lto_gcc_spec = argv[0];
/* The function reordering linker plugin will be loaded if the option
- -freorder-functions= is present in the command-line. */
+ -freorder-functions= is present in the command-line. */
if (switch_matches (freorder_functions_,
freorder_functions_ + strlen (freorder_functions_), 1))
set_func_reorder_linker_plugin_spec ();
@@ -8490,9 +8501,9 @@ static unsigned HOST_WIDE_INT
get_random_number (void)
{
unsigned HOST_WIDE_INT ret = 0;
- int fd;
+ int fd;
- fd = open ("/dev/urandom", O_RDONLY);
+ fd = open ("/dev/urandom", O_RDONLY);
if (fd >= 0)
{
read (fd, &ret, sizeof (HOST_WIDE_INT));
@@ -8744,16 +8755,16 @@ replace_extension_spec_func (int argc, const char **argv)
return result;
}
-/* Insert backslash before spaces in ORIG (usually a file path), to
+/* Insert backslash before spaces in ORIG (usually a file path), to
avoid being broken by spec parser.
This function is needed as do_spec_1 treats white space (' ' and '\t')
as the end of an argument. But in case of -plugin /usr/gcc install/xxx.so,
the file name should be treated as a single argument rather than being
- broken into multiple. Solution is to insert '\\' before the space in a
+ broken into multiple. Solution is to insert '\\' before the space in a
file name.
-
- This function converts and only converts all occurrence of ' '
+
+ This function converts and only converts all occurrence of ' '
to '\\' + ' ' and '\t' to '\\' + '\t'. For example:
"a b" -> "a\\ b"
"a b" -> "a\\ \\ b"
diff --git a/gcc-4.9/gcc/incpath.c b/gcc-4.9/gcc/incpath.c
index ddd856cb7..c25a37659 100644
--- a/gcc-4.9/gcc/incpath.c
+++ b/gcc-4.9/gcc/incpath.c
@@ -28,6 +28,7 @@
#include "intl.h"
#include "incpath.h"
#include "cppdefault.h"
+#include "diagnostic.h"
/* Microsoft Windows does not natively support inodes.
VMS has non-numeric inodes. */
@@ -348,6 +349,45 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
add_sysroot_to_chain (sysroot, AFTER);
}
+ /* Need to run here before processing below as that'll automatically cull
+ paths that do not exist. However, we want to throw errors whenever the
+ build includes things like -I/usr/include/asdf even if it happens to not
+ exist on the current system. */
+ if (flag_poison_system_directories)
+ {
+ unsigned int c;
+ unsigned int chains[] = { QUOTE, BRACKET, SYSTEM, AFTER };
+
+ /* Enable -Werror=poison-system-directories when -Werror and -Wno-error
+ have not been set.
+
+ Ideally this would be done in toplev's process_options, but this
+ function runs before that one, so we inline it here instead. */
+ if (POISON_SYSTEM_DIRECTORIES_DEFAULT
+ && !global_options_set.x_warnings_are_errors
+ && global_dc->classify_diagnostic[OPT_Wpoison_system_directories] ==
+ DK_UNSPECIFIED)
+ diagnostic_classify_diagnostic (global_dc,
+ OPT_Wpoison_system_directories,
+ DK_ERROR, UNKNOWN_LOCATION);
+
+ for (c = 0; c < ARRAY_SIZE (chains); ++c)
+ {
+ unsigned int chain = chains[c];
+ struct cpp_dir *p;
+
+ for (p = heads[chain]; p; p = p->next)
+ if (!strncmp (p->name, "/usr/include", 12)
+ || !strncmp (p->name, "/usr/local/include", 18)
+ || !strncmp (p->name, "/usr/X11R6/include", 18)
+ || !strncmp (p->name, "/lib", 4)
+ || !strncmp (p->name, "/usr/local/lib", 14))
+ warning (OPT_Wpoison_system_directories,
+ "include location \"%s\" is unsafe for "
+ "cross-compilation", p->name);
+ }
+ }
+
/* Join the SYSTEM and AFTER chains. Remove duplicates in the
resulting SYSTEM chain. */
if (heads[SYSTEM])
diff --git a/gcc-4.9/gcc/ira.c b/gcc-4.9/gcc/ira.c
index b2f58d1c4..22d613580 100644
--- a/gcc-4.9/gcc/ira.c
+++ b/gcc-4.9/gcc/ira.c
@@ -5474,9 +5474,10 @@ ira (FILE *f)
if (old_regno != new_regno)
setup_reg_classes (new_regno, reg_preferred_class (old_regno),
- reg_alternate_class (old_regno),
- reg_allocno_class (old_regno));
+ reg_alternate_class (old_regno),
+ reg_allocno_class (old_regno));
}
+
}
else
{
diff --git a/gcc-4.9/gcc/l-ipo.c b/gcc-4.9/gcc/l-ipo.c
index 43c514696..c9e1f492f 100644
--- a/gcc-4.9/gcc/l-ipo.c
+++ b/gcc-4.9/gcc/l-ipo.c
@@ -414,7 +414,7 @@ pop_module_scope (void)
at_eof = 1;
cgraph_process_same_body_aliases ();
lang_hooks.l_ipo.process_pending_decls (input_location);
- lang_hooks.l_ipo.clear_deferred_fns ();
+ lang_hooks.l_ipo.reset_parsing_state ();
at_eof = 0;
is_last = is_last_module (current_module_id);
diff --git a/gcc-4.9/gcc/langhooks-def.h b/gcc-4.9/gcc/langhooks-def.h
index 3cc155fed..c084b103d 100644
--- a/gcc-4.9/gcc/langhooks-def.h
+++ b/gcc-4.9/gcc/langhooks-def.h
@@ -214,7 +214,7 @@ extern tree lhd_make_node (enum tree_code);
#define LANG_HOOKS_DUP_LANG_TYPE lhd_do_nothing_t_t
#define LANG_HOOKS_COPY_LANG_TYPE lhd_do_nothing_t_t
#define LANG_HOOKS_PROCESS_PENDING_DECLS lhd_do_nothing_u
-#define LANG_HOOKS_CLEAR_DEFFERED_FNS lhd_do_nothing
+#define LANG_HOOKS_RESET_PARSING_STATE lhd_do_nothing
#define LANG_HOOKS_IS_GENERATED_TYPE lhd_do_nothing_t_return_bool
#define LANG_HOOKS_CMP_LANG_TYPE lhd_do_nothing_t_t_return_int
@@ -231,7 +231,7 @@ extern tree lhd_make_node (enum tree_code);
LANG_HOOKS_DUP_LANG_TYPE, \
LANG_HOOKS_COPY_LANG_TYPE, \
LANG_HOOKS_PROCESS_PENDING_DECLS, \
- LANG_HOOKS_CLEAR_DEFFERED_FNS, \
+ LANG_HOOKS_RESET_PARSING_STATE, \
LANG_HOOKS_IS_GENERATED_TYPE, \
LANG_HOOKS_CMP_LANG_TYPE, \
}
diff --git a/gcc-4.9/gcc/langhooks.h b/gcc-4.9/gcc/langhooks.h
index f24bcdd82..e89a58b18 100644
--- a/gcc-4.9/gcc/langhooks.h
+++ b/gcc-4.9/gcc/langhooks.h
@@ -275,8 +275,8 @@ struct lang_hooks_for_lipo
/* Process decls after parsing of a source module. */
void (*process_pending_decls) (unsigned);
- /* Clear the list of deferred functions. */
- void (*clear_deferred_fns) (void);
+ /* Reset the parsing state for the next module. */
+ void (*reset_parsing_state) (void);
/* Return true if T is compiler generated. */
bool (*is_compiler_generated_type) (tree t);
diff --git a/gcc-4.9/gcc/loop-init.c b/gcc-4.9/gcc/loop-init.c
index 4cc561c2e..a8abf372a 100644
--- a/gcc-4.9/gcc/loop-init.c
+++ b/gcc-4.9/gcc/loop-init.c
@@ -272,6 +272,33 @@ fix_loop_structure (bitmap changed_bbs)
FOR_EACH_VEC_ELT (*get_loops (cfun), i, loop)
if (loop && loop->header == NULL)
{
+ if (dump_file
+ && ((unsigned) loop->former_header->index
+ < basic_block_info_for_fn (cfun)->length ()))
+ {
+ basic_block former_header
+ = BASIC_BLOCK_FOR_FN (cfun, loop->former_header->index);
+ /* If the old header still exists we want to check if the
+ original loop is re-discovered or the old header is now
+ part of a newly discovered loop.
+ In both cases we should have avoided removing the loop. */
+ if (former_header == loop->former_header)
+ {
+ if (former_header->loop_father->header == former_header)
+ fprintf (dump_file, "fix_loop_structure: rediscovered "
+ "removed loop %d as loop %d with old header %d\n",
+ loop->num, former_header->loop_father->num,
+ former_header->index);
+ else if ((unsigned) former_header->loop_father->num
+ >= old_nloops)
+ fprintf (dump_file, "fix_loop_structure: header %d of "
+ "removed loop %d is part of the newly "
+ "discovered loop %d with header %d\n",
+ former_header->index, loop->num,
+ former_header->loop_father->num,
+ former_header->loop_father->header->index);
+ }
+ }
(*get_loops (cfun))[i] = NULL;
flow_loop_free (loop);
}
diff --git a/gcc-4.9/gcc/omp-low.c b/gcc-4.9/gcc/omp-low.c
index 6d9206c95..6520c0303 100644
--- a/gcc-4.9/gcc/omp-low.c
+++ b/gcc-4.9/gcc/omp-low.c
@@ -11705,6 +11705,7 @@ simd_clone_adjust (struct cgraph_node *node)
iteration increment and the condition/branch. */
basic_block orig_exit = EDGE_PRED (EXIT_BLOCK_PTR_FOR_FN (cfun), 0)->src;
basic_block incr_bb = create_empty_bb (orig_exit);
+ add_bb_to_loop (incr_bb, body_bb->loop_father);
/* The succ of orig_exit was EXIT_BLOCK_PTR_FOR_FN (cfun), with an empty
flag. Set it now to be a FALLTHRU_EDGE. */
gcc_assert (EDGE_COUNT (orig_exit->succs) == 1);
@@ -11729,7 +11730,6 @@ simd_clone_adjust (struct cgraph_node *node)
loop->safelen = node->simdclone->simdlen;
loop->force_vect = true;
loop->header = body_bb;
- add_bb_to_loop (incr_bb, loop);
/* Branch around the body if the mask applies. */
if (node->simdclone->inbranch)
@@ -11770,7 +11770,7 @@ simd_clone_adjust (struct cgraph_node *node)
gsi_insert_after (&gsi, g, GSI_CONTINUE_LINKING);
e = split_block (incr_bb, gsi_stmt (gsi));
basic_block latch_bb = e->dest;
- basic_block new_exit_bb = e->dest;
+ basic_block new_exit_bb;
new_exit_bb = split_block (latch_bb, NULL)->dest;
loop->latch = latch_bb;
diff --git a/gcc-4.9/gcc/opts-global.c b/gcc-4.9/gcc/opts-global.c
index 425c3c0b2..e83766034 100644
--- a/gcc-4.9/gcc/opts-global.c
+++ b/gcc-4.9/gcc/opts-global.c
@@ -299,7 +299,9 @@ lipo_save_cl_args (struct cl_decoded_option *decoded)
the results of processing DECODED_OPTIONS and DECODED_OPTIONS_COUNT
in OPTS and OPTS_SET and using DC for diagnostic state. LANG_MASK
contains has a single bit set representing the current language.
- HANDLERS describes what functions to call for the options. */
+ HANDLERS describes what functions to call for the options.
+ If COMMAND_LINE is true, this is being invoked for file level command
+ line options, otherwise for an optimize pragma or function attribute. */
static void
read_cmdline_options (struct gcc_options *opts, struct gcc_options *opts_set,
@@ -308,7 +310,8 @@ read_cmdline_options (struct gcc_options *opts, struct gcc_options *opts_set,
location_t loc,
unsigned int lang_mask,
const struct cl_option_handlers *handlers,
- diagnostic_context *dc)
+ diagnostic_context *dc,
+ bool command_line)
{
unsigned int i;
int force_multi_module = 0;
@@ -341,7 +344,8 @@ read_cmdline_options (struct gcc_options *opts, struct gcc_options *opts_set,
read_cmdline_option (opts, opts_set,
decoded_options + i, loc, lang_mask, handlers,
dc);
- lipo_save_cl_args (decoded_options + i);
+ if (command_line)
+ lipo_save_cl_args (decoded_options + i);
}
}
@@ -393,12 +397,14 @@ set_default_handlers (struct cl_option_handlers *handlers)
/* Parse command line options and set default flag values. Do minimal
options processing. The decoded options are in *DECODED_OPTIONS
and *DECODED_OPTIONS_COUNT; settings go in OPTS, OPTS_SET and DC;
- the options are located at LOC. */
+ the options are located at LOC. If COMMAND_LINE is true, this is
+ being invoked for file level command line options, otherwise for
+ an optimize pragma or function attribute. */
void
decode_options (struct gcc_options *opts, struct gcc_options *opts_set,
struct cl_decoded_option *decoded_options,
unsigned int decoded_options_count,
- location_t loc, diagnostic_context *dc)
+ location_t loc, diagnostic_context *dc, bool command_line)
{
struct cl_option_handlers handlers;
@@ -415,7 +421,7 @@ decode_options (struct gcc_options *opts, struct gcc_options *opts_set,
read_cmdline_options (opts, opts_set,
decoded_options, decoded_options_count,
loc, lang_mask,
- &handlers, dc);
+ &handlers, dc, command_line);
finish_options (opts, opts_set, loc);
}
diff --git a/gcc-4.9/gcc/opts.c b/gcc-4.9/gcc/opts.c
index ac589412c..e999ed02c 100644
--- a/gcc-4.9/gcc/opts.c
+++ b/gcc-4.9/gcc/opts.c
@@ -734,13 +734,15 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
sections of the .o and executable files does not work (currently)
with exception handling. This is because there is no support for
generating unwind info. If opts->x_flag_exceptions is turned on
- we need to turn off the partitioning optimization. */
+ we need to turn off the partitioning optimization.
+ Enforcing this for DWARF2 based unwinding too because it could lead
+ to segfault. */
ui_except = targetm_common.except_unwind_info (opts);
if (opts->x_flag_exceptions
&& opts->x_flag_reorder_blocks_and_partition
- && (ui_except == UI_SJLJ || ui_except >= UI_TARGET))
+ && (ui_except >= UI_SJLJ))
{
if (opts_set->x_flag_reorder_blocks_and_partition)
inform (loc,
diff --git a/gcc-4.9/gcc/opts.h b/gcc-4.9/gcc/opts.h
index 790be5375..7caed791e 100644
--- a/gcc-4.9/gcc/opts.h
+++ b/gcc-4.9/gcc/opts.h
@@ -344,7 +344,8 @@ extern void decode_options (struct gcc_options *opts,
struct cl_decoded_option *decoded_options,
unsigned int decoded_options_count,
location_t loc,
- diagnostic_context *dc);
+ diagnostic_context *dc,
+ bool command_line);
extern int option_enabled (int opt_idx, void *opts);
extern bool get_option_state (struct gcc_options *, int,
struct cl_option_state *);
diff --git a/gcc-4.9/gcc/passes.def b/gcc-4.9/gcc/passes.def
index 4d2ea6d82..0bec5c360 100644
--- a/gcc-4.9/gcc/passes.def
+++ b/gcc-4.9/gcc/passes.def
@@ -75,12 +75,13 @@ along with GCC; see the file COPYING3. If not see
NEXT_PASS (pass_fre);
NEXT_PASS (pass_copy_prop);
NEXT_PASS (pass_merge_phi);
+ NEXT_PASS (pass_profile);
+ NEXT_PASS (pass_early_vrp);
NEXT_PASS (pass_cd_dce);
NEXT_PASS (pass_early_ipa_sra);
NEXT_PASS (pass_tail_recursion);
NEXT_PASS (pass_convert_switch);
NEXT_PASS (pass_cleanup_eh);
- NEXT_PASS (pass_profile);
NEXT_PASS (pass_local_pure_const);
/* Split functions creates parts that are not run through
early optimizations again. It is thus good idea to do this
@@ -195,6 +196,7 @@ along with GCC; see the file COPYING3. If not see
NEXT_PASS (pass_split_crit_edges);
NEXT_PASS (pass_pre);
NEXT_PASS (pass_sink_code);
+ NEXT_PASS (pass_sancov);
NEXT_PASS (pass_asan);
NEXT_PASS (pass_tsan);
NEXT_PASS (pass_tree_loop);
@@ -286,6 +288,7 @@ along with GCC; see the file COPYING3. If not see
to forward object-size and builtin folding results properly. */
NEXT_PASS (pass_copy_prop);
NEXT_PASS (pass_dce);
+ NEXT_PASS (pass_sancov);
NEXT_PASS (pass_asan);
NEXT_PASS (pass_tsan);
NEXT_PASS (pass_rename_ssa_copies);
@@ -308,6 +311,7 @@ along with GCC; see the file COPYING3. If not see
NEXT_PASS (pass_vtable_verify);
NEXT_PASS (pass_lower_vector);
NEXT_PASS (pass_lower_complex_O0);
+ NEXT_PASS (pass_sancov_O0);
NEXT_PASS (pass_asan_O0);
NEXT_PASS (pass_tsan_O0);
NEXT_PASS (pass_sanopt);
diff --git a/gcc-4.9/gcc/sancov.c b/gcc-4.9/gcc/sancov.c
new file mode 100644
index 000000000..8f2f3fde9
--- /dev/null
+++ b/gcc-4.9/gcc/sancov.c
@@ -0,0 +1,146 @@
+/* Code coverage instrumentation for fuzzing.
+ Copyright (C) 2015 Free Software Foundation, Inc.
+ Contributed by Dmitry Vyukov <dvyukov@google.com>
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "tree.h"
+#include "basic-block.h"
+#include "tree-ssa-alias.h"
+#include "internal-fn.h"
+#include "gimple-expr.h"
+#include "is-a.h"
+#include "gimple.h"
+#include "gimple-iterator.h"
+#include "tree-pass.h"
+#include "asan.h"
+
+unsigned
+sancov_pass ()
+{
+ initialize_sanitizer_builtins ();
+
+ /* Insert callback into beginning of every BB. */
+ tree fndecl = builtin_decl_implicit (BUILT_IN_SANITIZER_COV_TRACE_PC);
+ basic_block bb;
+ FOR_EACH_BB_FN (bb, cfun)
+ {
+ gimple_stmt_iterator gsi = gsi_after_labels (bb);
+ if (gsi_end_p (gsi))
+ continue;
+ gimple stmt = gsi_stmt (gsi);
+ gimple gcall = gimple_build_call (fndecl, 0);
+ gimple_set_location (gcall, gimple_location (stmt));
+ gsi_insert_before (&gsi, gcall, GSI_SAME_STMT);
+ }
+ return 0;
+}
+/* The pass's gate. */
+
+static bool
+sancov_gate (void)
+{
+ return flag_sanitize_coverage;
+}
+
+/* The pass descriptor. */
+
+namespace {
+
+const pass_data pass_data_sancov =
+{
+ GIMPLE_PASS, /* type */
+ "sancov", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
+ true, /* has_gate */
+ true, /* has_execute */
+ TV_NONE, /* tv_id */
+ ( PROP_cfg ), /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ ( TODO_update_ssa ), /* todo_flags_finish */
+};
+
+class pass_sancov : public gimple_opt_pass
+{
+public:
+ pass_sancov (gcc::context *ctxt)
+ : gimple_opt_pass (pass_data_sancov, ctxt)
+ {}
+
+ /* opt_pass methods: */
+ opt_pass * clone () { return new pass_sancov (m_ctxt); }
+ bool gate () { return sancov_gate (); }
+ unsigned int execute () { return sancov_pass (); }
+
+}; // class pass_sancov
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_sancov (gcc::context *ctxt)
+{
+ return new pass_sancov (ctxt);
+}
+
+static bool
+sancov_gate_O0 (void)
+{
+ return flag_sanitize_coverage && !optimize;
+}
+
+namespace {
+
+const pass_data pass_data_sancov_O0 =
+{
+ GIMPLE_PASS, /* type */
+ "sancov0", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
+ true, /* has_gate */
+ true, /* has_execute */
+ TV_NONE, /* tv_id */
+ ( PROP_cfg ), /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ ( TODO_update_ssa ), /* todo_flags_finish */
+};
+
+class pass_sancov_O0 : public gimple_opt_pass
+{
+public:
+ pass_sancov_O0 (gcc::context *ctxt)
+ : gimple_opt_pass (pass_data_sancov_O0, ctxt)
+ {}
+
+ /* opt_pass methods: */
+ bool gate () { return sancov_gate_O0 (); }
+ unsigned int execute () { return sancov_pass (); }
+
+}; // class pass_sancov_O0
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_sancov_O0 (gcc::context *ctxt)
+{
+ return new pass_sancov_O0 (ctxt);
+}
diff --git a/gcc-4.9/gcc/sanitizer.def b/gcc-4.9/gcc/sanitizer.def
index b1e6f0497..ad18d36ed 100644
--- a/gcc-4.9/gcc/sanitizer.def
+++ b/gcc-4.9/gcc/sanitizer.def
@@ -365,3 +365,8 @@ DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_LOAD_INVALID_VALUE,
"__ubsan_handle_load_invalid_value",
BT_FN_VOID_PTR_PTR,
ATTR_COLD_NOTHROW_LEAF_LIST)
+/* Sanitizer coverage */
+DEF_SANITIZER_BUILTIN(BUILT_IN_SANITIZER_COV_TRACE_PC,
+ "__sanitizer_cov_trace_pc",
+ BT_FN_VOID,
+ ATTR_NOTHROW_LEAF_LIST)
diff --git a/gcc-4.9/gcc/testsuite/ChangeLog b/gcc-4.9/gcc/testsuite/ChangeLog
index 2d76bdc81..2f34469c6 100644
--- a/gcc-4.9/gcc/testsuite/ChangeLog
+++ b/gcc-4.9/gcc/testsuite/ChangeLog
@@ -1,3 +1,27 @@
+2016-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR target/69403
+ * gcc.c-torture/execute/pr69403.c: New test.
+
+2015-10-28 Yvan Roux <yvan.roux@linaro.org>
+ Sebastian Pop <s.pop@samsung.com>
+
+ Backport from trunk r221007, r221675, r222011.
+ 2015-04-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/65735
+ * gcc.c-torture/compile/pr65735.c: New test.
+
+ 2015-03-25 Sebastian Pop <s.pop@samsung.com>
+
+ PR tree-optimization/65177
+ * gcc.dg/tree-ssa/ssa-dom-thread-10.c: New.
+
+ 2015-02-26 Sebastian Pop <s.pop@samsung.com>
+
+ PR tree-optimization/65048
+ * gcc.dg/tree-ssa/ssa-dom-thread-9.c: New.
+
2015-03-26 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport r214254 and related tests from mainline
@@ -51,6 +75,17 @@
* gnat.dg/opt47.adb: New test.
+2015-01-14 Yvan Roux <yvan.roux@linaro.org>
+
+ Backport from trunk r218451.
+ 2014-12-06 James Greenhalgh <james.greenhalgh@arm.com>
+ Sebastian Pop <s.pop@samsung.com>
+ Brian Rzycki <b.rzycki@samsung.com>
+
+ PR tree-optimization/54742
+ * gcc.dg/tree-ssa/ssa-dom-thread-6.c: New test.
+ * gcc.dg/tree-ssa/ssa-dom-thread-7.c: New test.
+
2015-01-14 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
@@ -113,6 +148,11 @@
* gcc.target/powerpc/pr64505.c: New file to test -m32 -mpowerpc64
fix is correct.
+2014-01-08 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/56867
+ * gfortran.dg/dependency_45.f90: New test.
+
2015-01-08 Christian Bruel <christian.bruel@st.com>
PR target/64507
@@ -331,11 +371,6 @@
* gcc.target/sh/pr51244-20.c: Adjust.
* gcc.target/sh/pr51244-20-sh2a.c: Adjust.
-2014-11-19 Renlin Li <Renlin.Li@arm.com>
-
- PR middle-end/63762
- * gcc.dg/pr63762.c: New test.
-
2014-11-19 Uros Bizjak <ubizjak@gmail.com>
PR target/63947
@@ -769,12 +804,6 @@
PR c++/63241
* g++.dg/cpp0x/constexpr-63241.C: New.
-2014-09-15 Sharad Singhai <singhai@google.com>
-
- * g++.dg/tree-prof/lipo/static1_0.C: New test.
- * g++.dg/tree-prof/lipo/static1_1.C: New file.
- * g++.dg/tree-prof/lipo/static1_2.C: New file.
-
2014-09-12 Martin Jambor <mjambor@suse.cz>
PR ipa/61654
@@ -889,11 +918,6 @@
* gcc.dg/tree-ssa/loop-19.c: Exclude classic FPU Power targets.
-2014-09-04 Guozhi Wei <carrot@google.com>
-
- PR target/62040
- * gcc.target/aarch64/pr62040.c: New test.
-
2014-08-27 Guozhi Wei <carrot@google.com>
PR target/62262
@@ -5485,11 +5509,6 @@
PR middle-end/59471
* gcc.dg/pr59471.c: New testcase.
-2014-01-08 Thomas Koenig <tkoenig@gcc.gnu.org>
-
- PR fortran/56867
- * gfortran.dg/dependency_45.f90: New test.
-
2014-01-07 Jeff Law <law@redhat.com>
PR middle-end/53623
diff --git a/gcc-4.9/gcc/config/arm/linux-grte.h b/gcc-4.9/gcc/testsuite/g++.dg/cpp1y/testinc/phoobhar.h
index e69de29bb..e69de29bb 100644
--- a/gcc-4.9/gcc/config/arm/linux-grte.h
+++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp1y/testinc/phoobhar.h
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/ext/mv18.C b/gcc-4.9/gcc/testsuite/g++.dg/ext/mv18.C
new file mode 100644
index 000000000..1f024de9b
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/ext/mv18.C
@@ -0,0 +1,7 @@
+/* Test case to check if Multiversioning works. */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-ifunc "" } */
+/* { dg-require-effective-target pie } */
+/* { dg-options "-O2 -fPIE -pie" } */
+
+#include "mv1.C"
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/ext/mv19.C b/gcc-4.9/gcc/testsuite/g++.dg/ext/mv19.C
new file mode 100644
index 000000000..d1ea78874
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/ext/mv19.C
@@ -0,0 +1,7 @@
+/* Test case to check if Multiversioning works. */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-ifunc "" } */
+/* { dg-require-effective-target pie } */
+/* { dg-options "-O2 -fPIE -pie -march=x86-64" } */
+
+#include "mv14.C"
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/ext/mv20.C b/gcc-4.9/gcc/testsuite/g++.dg/ext/mv20.C
new file mode 100644
index 000000000..98f7408e1
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/ext/mv20.C
@@ -0,0 +1,7 @@
+/* Test case to check if Multiversioning works. */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-ifunc "" } */
+/* { dg-require-effective-target pie } */
+/* { dg-options "-O2 -fPIE -pie -march=x86-64" } */
+
+#include "mv15.C"
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/ext/mv21.C b/gcc-4.9/gcc/testsuite/g++.dg/ext/mv21.C
new file mode 100644
index 000000000..9708ad950
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/ext/mv21.C
@@ -0,0 +1,7 @@
+/* Test case to check if Multiversioning works. */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-ifunc "" } */
+/* { dg-require-effective-target static } */
+/* { dg-options "-O2 -static" } */
+
+#include "mv1.C"
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/ext/mv22.C b/gcc-4.9/gcc/testsuite/g++.dg/ext/mv22.C
new file mode 100644
index 000000000..2550136fd
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/ext/mv22.C
@@ -0,0 +1,7 @@
+/* Test case to check if Multiversioning works. */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-ifunc "" } */
+/* { dg-require-effective-target static } */
+/* { dg-options "-O2 -static -march=x86-64" } */
+
+#include "mv14.C"
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/ext/mv23.C b/gcc-4.9/gcc/testsuite/g++.dg/ext/mv23.C
new file mode 100644
index 000000000..f00afb01f
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/ext/mv23.C
@@ -0,0 +1,7 @@
+/* Test case to check if Multiversioning works. */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-ifunc "" } */
+/* { dg-require-effective-target static } */
+/* { dg-options "-O2 -static -march=x86-64" } */
+
+#include "mv15.C"
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/pr69403.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/pr69403.c
new file mode 100644
index 000000000..097d36607
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/pr69403.c
@@ -0,0 +1,20 @@
+/* PR target/69403. */
+
+int a, b, c;
+
+__attribute__ ((__noinline__)) int
+fn1 ()
+{
+ if ((b | (a != (a & c))) == 1)
+ __builtin_abort ();
+ return 0;
+}
+
+int
+main (void)
+{
+ a = 5;
+ c = 1;
+ b = 6;
+ return fn1 ();
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/fold-compare-2.c b/gcc-4.9/gcc/testsuite/gcc.dg/fold-compare-2.c
index 15ea462d4..4d0b8554a 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/fold-compare-2.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/fold-compare-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-tail-merge -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fno-tree-tail-merge -fdump-tree-vrp" } */
extern void abort (void);
@@ -15,6 +15,5 @@ main(void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "Removing basic block" 2 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
-
+/* { dg-final { scan-tree-dump-times "Removing basic block" 2 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/sancov/asan.c b/gcc-4.9/gcc/testsuite/gcc.dg/sancov/asan.c
new file mode 100644
index 000000000..64a36b54a
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/sancov/asan.c
@@ -0,0 +1,18 @@
+/* Test coverage/asan interaction:
+ - coverage instruments __asan_init ctor (thus 4 covarage callbacks)
+ - coverage does not instrument asan-emitted basic blocks
+ - asan considers coverage callback as "nonfreeing" (thus 1 asan store
+ callback. */
+/* { dg-do compile { target fsanitize_address } } */
+/* { dg-options "-fsanitize-coverage=trace-pc -fsanitize=address -fdump-tree-optimized" } */
+
+void foo(volatile int *a, int *b)
+{
+ *a = 1;
+ if (*b)
+ *a = 2;
+}
+
+/* { dg-final { scan-tree-dump-times "__builtin___sanitizer_cov_trace_pc \\(\\)" 4 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "__builtin___asan_report_load4 \\(" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "__builtin___asan_report_store4 \\(" 1 "optimized" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/sancov/basic0.c b/gcc-4.9/gcc/testsuite/gcc.dg/sancov/basic0.c
new file mode 100644
index 000000000..af69b2d12
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/sancov/basic0.c
@@ -0,0 +1,9 @@
+/* Basic test on number of inserted callbacks. */
+/* { dg-do compile } */
+/* { dg-options "-fsanitize-coverage=trace-pc -fdump-tree-optimized" } */
+
+void foo(void)
+{
+}
+
+/* { dg-final { scan-tree-dump-times "__builtin___sanitizer_cov_trace_pc \\(\\)" 1 "optimized" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/sancov/basic1.c b/gcc-4.9/gcc/testsuite/gcc.dg/sancov/basic1.c
new file mode 100644
index 000000000..e0ae5b4d7
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/sancov/basic1.c
@@ -0,0 +1,12 @@
+/* Basic test on number of inserted callbacks. */
+/* { dg-do compile } */
+/* { dg-options "-fsanitize-coverage=trace-pc -fdump-tree-optimized" } */
+
+void foo (int *a, int *b, int *c)
+{
+ *a = 1;
+ if (*b)
+ *c = 2;
+}
+
+/* { dg-final { scan-tree-dump-times "__builtin___sanitizer_cov_trace_pc \\(\\)" 3 "optimized" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/sancov/basic2.c b/gcc-4.9/gcc/testsuite/gcc.dg/sancov/basic2.c
new file mode 100644
index 000000000..ac2ec7850
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/sancov/basic2.c
@@ -0,0 +1,14 @@
+/* Basic test on number of inserted callbacks. */
+/* { dg-do compile } */
+/* { dg-options "-fsanitize-coverage=trace-pc -fdump-tree-optimized" } */
+
+void foo(int *a, int *b, int *c, int *d)
+{
+ *a = 1;
+ if (*b)
+ *c = 2;
+ else
+ *d = 3;
+}
+
+/* { dg-final { scan-tree-dump-times "__builtin___sanitizer_cov_trace_pc \\(\\)" 4 "optimized" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/lipo/val-prof-5_0.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/lipo/val-prof-5_0.c
index 1a804a767..03360119a 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/lipo/val-prof-5_0.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/lipo/val-prof-5_0.c
@@ -11,7 +11,7 @@ main()
a[i]/=b;
return 0;
}
-/* { dg-final-use { scan-ipa-dump "Div.mod by constant b.*=997 transformation on insn" "profile" } } */
+/* { dg-final-use { scan-ipa-dump "Div.mod by constant b.*=997 transformation on insn" "profile" { xfail *-*-* } } } */
/* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */
/* { dg-final-use { cleanup-tree-dump "optimized" } } */
/* { dg-final-use { cleanup-ipa-dump "profile" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/val-prof-5.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/val-prof-5.c
index 1a804a767..9709d80e1 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/val-prof-5.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-prof/val-prof-5.c
@@ -11,7 +11,7 @@ main()
a[i]/=b;
return 0;
}
-/* { dg-final-use { scan-ipa-dump "Div.mod by constant b.*=997 transformation on insn" "profile" } } */
+/* { dg-final-use { scan-ipa-dump "Div.mod by constant b.*=997 transformation on insn" "profile" { xfail *-*-* } } } */
/* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */
/* { dg-final-use { cleanup-tree-dump "optimized" } } */
/* { dg-final-use { cleanup-ipa-dump "profile" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/20030709-2.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/20030709-2.c
index f99598d73..8b6d5c31d 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/20030709-2.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/20030709-2.c
@@ -49,6 +49,7 @@ get_alias_set (t)
/* There should be one IF statement (the complex return statement should
collapse down to a simple return 0 without any conditionals). */
-/* { dg-final { scan-tree-dump-times "if " 1 "cddce2"} } */
+/* { dg-final { scan-tree-dump-times "if " 0 "cddce2"} } */
+/* { dg-final { scan-tree-dump-times "0B ? " 1 "cddce2"} } */
/* { dg-final { cleanup-tree-dump "cddce2" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/20040305-1.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/20040305-1.c
index 8e9f61da6..50d18e73c 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/20040305-1.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/20040305-1.c
@@ -28,5 +28,6 @@ void foo(int edx, int eax)
/* After cddce we should have two IF statements remaining as the other
two tests can be threaded. */
-/* { dg-final { scan-tree-dump-times "if " 2 "cddce2"} } */
-/* { dg-final { cleanup-tree-dump "cddce2" } } */
+/* { dg-final { scan-tree-dump-times " == " 2 "cddce2"} } */
+/* { dg-final { scan-tree-dump-times " & " 1 "cddce2"} } */
+/* { dg-final { cleanup-tree-dump "cddce1" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20318.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20318.c
index 1b302aede..99cb0ccb8 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20318.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20318.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! keeps_null_pointer_checks } } } */
-/* { dg-options "-O2 -fdump-tree-original -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-original -fdump-tree-vrp" } */
extern int* f(int) __attribute__((returns_nonnull));
extern void eliminate ();
@@ -14,6 +14,6 @@ void h () {
}
/* { dg-final { scan-tree-dump-times "== 0" 1 "original" } } */
-/* { dg-final { scan-tree-dump-times "Folding predicate\[^\\n\]*to 0" 1 "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate\[^\\n\]*to 0" 1 "vrp" } } */
/* { dg-final { cleanup-tree-dump "original" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20657.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20657.c
index 1c3dbf9fd..abb14e604 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20657.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20657.c
@@ -3,7 +3,7 @@
statement, which was needed to eliminate the second "if" statement. */
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-vrp-details" } */
int
foo (int a)
@@ -14,5 +14,5 @@ foo (int a)
return 0;
}
-/* { dg-final { scan-tree-dump-times "Folding predicate" 1 "vrp1"} } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate" 1 "vrp"} } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20702.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20702.c
index ce62fa3f0..f4f7a3d19 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20702.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr20702.c
@@ -4,7 +4,7 @@
immediate successors of the basic block. */
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-vrp-details" } */
extern void bar (int);
@@ -26,6 +26,6 @@ foo (int *p, int b)
}
/* Target with fno-delete-null-pointer-checks should not fold checks */
-/* { dg-final { scan-tree-dump-times "Folding predicate" 1 "vrp1" { target { ! keeps_null_pointer_checks } } } } */
-/* { dg-final { scan-tree-dump-times "Folding predicate" 0 "vrp1" { target { keeps_null_pointer_checks } } } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate" 1 "vrp" { target { ! keeps_null_pointer_checks } } } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate" 0 "vrp" { target { keeps_null_pointer_checks } } } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21001.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21001.c
index 888d609ae..f4d609a2b 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21001.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21001.c
@@ -5,7 +5,7 @@
range information out of the conditional. */
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-vrp-details" } */
int
foo (int a)
@@ -17,5 +17,5 @@ foo (int a)
return 0;
}
-/* { dg-final { scan-tree-dump-times "Folding predicate" 1 "vrp1"} } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate" 1 "vrp"} } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21086.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21086.c
index f924d26cc..1ae037f6e 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21086.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21086.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1 -fdump-tree-dce1" } */
+/* { dg-options "-O2 -fdump-tree-vrp -fdump-tree-dce1" } */
int
foo (int *p)
@@ -16,9 +16,9 @@ foo (int *p)
}
/* Target with fno-delete-null-pointer-checks should not fold checks */
-/* { dg-final { scan-tree-dump "Folding predicate " "vrp1" { target { ! keeps_null_pointer_checks } } } } */
-/* { dg-final { scan-tree-dump-times "Folding predicate " 0 "vrp1" { target { keeps_null_pointer_checks } } } } */
+/* { dg-final { scan-tree-dump "Folding predicate " "vrp" { target { ! keeps_null_pointer_checks } } } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate " 0 "vrp" { target { keeps_null_pointer_checks } } } } */
/* { dg-final { scan-tree-dump-not "b_. =" "dce1" { target { ! avr-*-* } } } } */
/* { dg-final { scan-tree-dump "b_. =" "dce1" { target { avr-*-* } } } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
/* { dg-final { cleanup-tree-dump "dce1" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21090.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21090.c
index 40d960d49..facd96c0b 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21090.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21090.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
int g, h;
@@ -19,5 +19,5 @@ foo (int a)
return 0;
}
-/* { dg-final { scan-tree-dump-times "Folding predicate.*to 1" 1 "vrp1" { target { ! keeps_null_pointer_checks } } } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate.*to 1" 1 "vrp" { target { ! keeps_null_pointer_checks } } } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21294.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21294.c
index 567e6366a..dc90dbde3 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21294.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21294.c
@@ -4,7 +4,7 @@
allows us to eliminate the second "if" statement. */
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-vrp-details" } */
struct f {
int i;
@@ -19,5 +19,5 @@ foo (struct f *p)
return 0;
}
-/* { dg-final { scan-tree-dump-times "Folding predicate" 1 "vrp1"} } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate" 1 "vrp"} } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21458.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21458.c
index 01777f6e6..0222e7a69 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21458.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21458.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
extern void g (void);
extern void bar (int);
@@ -16,5 +16,5 @@ foo (int a)
}
}
-/* { dg-final { scan-tree-dump-times "Folding predicate.*to 1" 1 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate.*to 1" 1 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21559.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21559.c
index 6378d1aa7..fe558e507 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21559.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21559.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fdump-tree-vrp-details -fdump-tree-vrp1-details" } */
static int blocksize = 4096;
@@ -32,13 +32,13 @@ void foo (void)
/* First, we should simplify the bits < 0 test within the loop. */
-/* { dg-final { scan-tree-dump-times "Simplified relational" 1 "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Simplified relational" 1 "vrp" } } */
/* Second, we should thread the edge out of the loop via the break
statement. We also realize that the final bytes == 0 test is useless,
and thread over it. We also know that toread != 0 is useless when
entering while loop and thread over it. */
-/* { dg-final { scan-tree-dump-times "Threaded jump" 3 "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Threaded jump" 1 "vrp1" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
/* { dg-final { cleanup-tree-dump "vrp1" } } */
-
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21563.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21563.c
index 8e6c57850..b3c45886e 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21563.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr21563.c
@@ -2,7 +2,7 @@
Make sure VRP folds the second "if" statement. */
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-vrp-details" } */
int
foo (int a)
@@ -13,5 +13,5 @@ foo (int a)
return 0;
}
-/* { dg-final { scan-tree-dump-times "Folding predicate" 1 "vrp1"} } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate" 1 "vrp"} } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr22117.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr22117.c
index d265d5e2c..0955c4519 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr22117.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr22117.c
@@ -3,7 +3,7 @@
known to be zero after entering the first two "if" statements. */
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
void
foo (int *p, int q)
@@ -19,5 +19,5 @@ foo (int *p, int q)
}
}
-/* { dg-final { scan-tree-dump-times "Folding predicate r_.* != 0B to 0" 1 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate r_.* != 0B to 0" 1 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr23744.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr23744.c
index 538139676..53d042568 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr23744.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr23744.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-ccp -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fno-tree-ccp -fdump-tree-vrp" } */
int g (int i, int j)
{
@@ -15,5 +15,5 @@ int g (int i, int j)
return 1;
}
-/* { dg-final { scan-tree-dump-times "Folding predicate.*to 1" 1 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate.*to 1" 1 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr25382.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr25382.c
index daff68ee9..cb0589eb4 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr25382.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr25382.c
@@ -3,7 +3,7 @@
Check that VRP now gets ranges from BIT_AND_EXPRs. */
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-ccp -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fno-tree-ccp -fdump-tree-vrp" } */
int
foo (int a)
@@ -15,5 +15,5 @@ foo (int a)
return 1;
}
-/* { dg-final { scan-tree-dump-times "Folding predicate b_.* > 300 to 0" 1 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate b_.* > 300 to 0" 1 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr37508.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr37508.c
index aea35cc04..b4c067777 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr37508.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr37508.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
struct foo1 {
int i:1;
@@ -44,5 +44,5 @@ int test4 (struct foo2 *x)
return 0;
}
-/* { dg-final { scan-tree-dump-times "Folding" 3 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding" 3 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr49039.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr49039.c
index 3500dbf2a..3401ac668 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr49039.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr49039.c
@@ -1,6 +1,6 @@
/* PR tree-optimization/49039 */
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
extern void bar (void);
@@ -24,8 +24,8 @@ foo (unsigned int x, unsigned int y)
bar ();
}
-/* { dg-final { scan-tree-dump "Folding predicate minv_\[0-9\]* == 5 to 0" "vrp1" } } */
-/* { dg-final { scan-tree-dump "Folding predicate minv_\[0-9\]* == 6 to 0" "vrp1" } } */
-/* { dg-final { scan-tree-dump "Folding predicate maxv_\[0-9\]* == 5 to 0" "vrp1" } } */
-/* { dg-final { scan-tree-dump "Folding predicate maxv_\[0-9\]* == 6 to 0" "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump "Folding predicate minv_\[0-9\]* == 5 to 0" "vrp" } } */
+/* { dg-final { scan-tree-dump "Folding predicate minv_\[0-9\]* == 6 to 0" "vrp" } } */
+/* { dg-final { scan-tree-dump "Folding predicate maxv_\[0-9\]* == 5 to 0" "vrp" } } */
+/* { dg-final { scan-tree-dump "Folding predicate maxv_\[0-9\]* == 6 to 0" "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr58480.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr58480.c
index a42edf973..c9b877e19 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr58480.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr58480.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! keeps_null_pointer_checks } } } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
extern void eliminate (void);
extern void* f1 (void *a, void *b) __attribute__((nonnull));
@@ -15,5 +15,5 @@ void g2 (void*p, void*q){
eliminate ();
}
-/* { dg-final { scan-tree-dump-times "Folding predicate\[^\\n\]*to 0" 2 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate\[^\\n\]*to 0" 2 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr59597.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr59597.c
index bc9d73049..aeecdf1a5 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr59597.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/pr59597.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-Ofast -fdump-tree-vrp1-details" } */
+/* { dg-options "-Ofast -fdump-tree-vrp-details" } */
typedef unsigned short u16;
typedef unsigned char u8;
@@ -53,6 +53,5 @@ main (int argc, char argv[])
return crc;
}
-/* { dg-final { scan-tree-dump "Cancelling" "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
-
+/* { dg-final { scan-tree-dump "Cancelling" "vrp" { xfail *-*-* } } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-2.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-2.c
index 6aaea8ecb..47456be15 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-2.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1-stats -fdump-tree-dom1-stats" } */
+/* { dg-options "-O2 -fdump-tree-vrp-stats -fdump-tree-dom1-stats" } */
void foo();
void bla();
@@ -111,9 +111,9 @@ void dont_thread_4 (int a, int nfirst)
} while (i++ < 100);
}
-/* { dg-final { scan-tree-dump-times "Jumps threaded: 1" 1 "vrp1"} } */
-/* { dg-final { scan-tree-dump-times "Jumps threaded: 2" 0 "vrp1"} } */
+/* { dg-final { scan-tree-dump-times "Jumps threaded: 1" 1 "vrp"} } */
+/* { dg-final { scan-tree-dump-times "Jumps threaded: 2" 0 "vrp"} } */
/* { dg-final { scan-tree-dump-times "Jumps threaded: 1" 0 "dom1"} } */
/* { dg-final { scan-tree-dump-times "Jumps threaded: 2" 1 "dom1"} } */
/* { dg-final { cleanup-tree-dump "dom1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-vrp-thread-1.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-vrp-thread-1.c
index 476ee5e94..b25582dc8 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-vrp-thread-1.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-vrp-thread-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fdump-tree-vrp-details" } */
struct basic_block_def;
@@ -28,6 +28,5 @@ build_omp_regions_1 (basic_block bb, struct omp_region *parent,
/* ARM Cortex-M defined LOGICAL_OP_NON_SHORT_CIRCUIT to false,
so skip below test. */
-/* { dg-final { scan-tree-dump-times "Threaded" 1 "vrp1" { target { ! arm_cortex_m } } } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
-
+/* { dg-final { scan-tree-dump-times "Threaded" 1 "vrp" { target { ! arm_cortex_m } } } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp01.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp01.c
index 3f8e82061..1edda2941 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp01.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp01.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
foo (int *p, int i)
{
@@ -24,5 +24,5 @@ foo (int *p, int i)
return i;
}
-/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 1 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 1 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp02.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp02.c
index 56fca9711..9984bd241 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp02.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp02.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
struct A
{
@@ -20,6 +20,6 @@ foo (struct A *p, struct A *q)
return x + p->b;
}
/* Target with fno-delete-null-pointer-checks should not fold check */
-/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 1 "vrp1" { target { ! keeps_null_pointer_checks } } } } */
-/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 0 "vrp1" { target { keeps_null_pointer_checks } } } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 1 "vrp" { target { ! keeps_null_pointer_checks } } } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 0 "vrp" { target { keeps_null_pointer_checks } } } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp03.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp03.c
index 9b7c08256..20fcb917e 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp03.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp03.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
struct A
{
@@ -30,6 +30,6 @@ foo (struct A *p, struct A *q)
return q->a;
}
-/* { dg-final { scan-tree-dump-times "Folding predicate q_.*to 1" 1 "vrp1" } } */
-/* { dg-final { scan-tree-dump-times "Folding predicate r_.*to 1" 1 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate q_.*to 1" 1 "vrp" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate r_.*to 1" 1 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp04.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp04.c
index bf5d683cb..26322483f 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp04.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp04.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
foo (int a, int b)
{
@@ -9,5 +9,5 @@ foo (int a, int b)
return a + b;
}
-/* { dg-final { scan-tree-dump-times "Folding predicate a_.*to 1" 1 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate a_.*to 1" 1 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c
index cb6df0dca..a59cb863d 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
foo (int i, int j, int a)
{
@@ -25,7 +25,7 @@ foo (int i, int j, int a)
return i + a + j;
}
-/* { dg-final { scan-tree-dump-times "Folding predicate i_\[0-9\]+.*0 to 0" 1 "vrp1" } } */
-/* { dg-final { scan-tree-dump-times "Folding predicate j_\[0-9\]+.*0 to 1" 1 "vrp1" } } */
-/* { dg-final { scan-tree-dump-times "Folding predicate i_\[0-9]+.*j_\[0-9\]+.* to 0" 1 "vrp1" { xfail *-*-* } } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate i_\[0-9\]+.*0 to 0" 1 "vrp" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate j_\[0-9\]+.*0 to 1" 1 "vrp" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate i_\[0-9]+.*j_\[0-9\]+.* to 0" 1 "vrp" { xfail *-*-* } } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp07.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp07.c
index 6584919b5..d546f84e6 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp07.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp07.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fdump-tree-vrp-details" } */
foo (int i, int *p)
{
@@ -30,10 +30,10 @@ foo (int i, int *p)
return i;
}
/* Target with fno-delete-null-pointer-checks should not fold checks */
-/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 1 "vrp1" } } */
-/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 0" 1 "vrp1" { target { ! keeps_null_pointer_checks } } } } */
-/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 0" 0 "vrp1" { target { keeps_null_pointer_checks } } } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 1 "vrp" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 0" 1 "vrp" { target { ! keeps_null_pointer_checks } } } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 0" 0 "vrp" { target { keeps_null_pointer_checks } } } } */
-/* { dg-final { scan-tree-dump-times "PREDICATE: p_\[0-9\]" 2 "vrp1" { target { ! keeps_null_pointer_checks } } } } */
-/* { dg-final { scan-tree-dump-times "PREDICATE: p_\[0-9\]" 1 "vrp1" { target { keeps_null_pointer_checks } } } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "PREDICATE: p_\[0-9\]" 2 "vrp" { target { ! keeps_null_pointer_checks } } } } */
+/* { dg-final { scan-tree-dump-times "PREDICATE: p_\[0-9\]" 1 "vrp" { target { keeps_null_pointer_checks } } } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp08.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp08.c
index 193199fbf..6a7dec091 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp08.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp08.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-tree-fre -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fno-tree-fre -fdump-tree-vrp-details" } */
/* Compile with -fno-tree-fre -O2 to prevent CSEing *p. */
foo (int a, int *p)
@@ -18,7 +18,7 @@ foo (int a, int *p)
return a;
}
/* Target with fno-delete-null-pointer-checks should not fold checks */
-/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 1 "vrp1" { target { ! keeps_null_pointer_checks } } } } */
-/* { dg-final { scan-tree-dump-times "PREDICATE: p_.* ne_expr 0" 1 "vrp1" { target { ! keeps_null_pointer_checks } } } } */
-/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 0 "vrp1" { target { keeps_null_pointer_checks } } } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 1 "vrp" { target { ! keeps_null_pointer_checks } } } } */
+/* { dg-final { scan-tree-dump-times "PREDICATE: p_.* ne_expr 0" 1 "vrp" { target { ! keeps_null_pointer_checks } } } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate p_.*to 1" 0 "vrp" { target { keeps_null_pointer_checks } } } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp09.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp09.c
index 9ff0f14f7..6a2c98344 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp09.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp09.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
foo (int *p)
{
@@ -27,5 +27,5 @@ L78:
}
}
-/* { dg-final { scan-tree-dump-times "Folding predicate p_.. != 0B to 1" 2 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate p_.. != 0B to 1" 2 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp16.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp16.c
index 166529ab9..cb8a5d747 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp16.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp16.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fdump-tree-vrp-details" } */
extern void abort (void) __attribute__ ((__noreturn__));
@@ -18,6 +18,5 @@ nonlocal_mentioned_p (rtx x)
abort ();
}
-/* { dg-final { scan-tree-dump-times "Folding predicate .*to 0" 1 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
-
+/* { dg-final { scan-tree-dump-times "Folding predicate .*to 0" 1 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp17.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp17.c
index c04b9ba78..f236e4004 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp17.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp17.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
extern void abort (void) __attribute__ ((__noreturn__));
union tree_node;
@@ -27,6 +27,5 @@ gimplify_for_stmt (tree stmt)
abort ();
}
-/* { dg-final { scan-tree-dump-times "Simplified relational" 1 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
-
+/* { dg-final { scan-tree-dump-times "Simplified relational" 1 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp18.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp18.c
index a3cc536ae..366c0795d 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp18.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp18.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
static int blocksize = 4096;
@@ -30,5 +30,5 @@ void foo (void)
eof_reached = 1;
}
-/* { dg-final { scan-tree-dump-times "Simplified relational" 1 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Simplified relational" 1 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp19.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp19.c
index e4c884a85..45a85fafe 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp19.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp19.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fwrapv -O1 -ftree-vrp -fdump-tree-vrp1" } */
+/* { dg-options "-fwrapv -O1 -ftree-vrp -fdump-tree-vrp" } */
#include <limits.h>
extern void abort ();
@@ -22,6 +22,6 @@ int g (int b) {
}
return 1;
}
-/* { dg-final { scan-tree-dump "Folding predicate a_. < 0 to 0" "vrp1" } } */
-/* { dg-final { scan-tree-dump "Folding predicate b_. >= 0 to 1" "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump "Folding predicate a_. < 0 to 0" "vrp" } } */
+/* { dg-final { scan-tree-dump "Folding predicate b_. >= 0 to 1" "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp20.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp20.c
index 14da7df48..91c195b3b 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp20.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp20.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fwrapv -O1 -ftree-vrp -fdump-tree-vrp1" } */
+/* { dg-options "-fwrapv -O1 -ftree-vrp -fdump-tree-vrp" } */
extern void abort ();
extern void exit (int);
@@ -23,6 +23,6 @@ int g (int b) {
return 1;
}
-/* { dg-final { scan-tree-dump "Folding predicate a_. == 0 to 0" "vrp1" } } */
-/* { dg-final { scan-tree-dump "Folding predicate b_. != 0 to 1" "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump "Folding predicate a_. == 0 to 0" "vrp" } } */
+/* { dg-final { scan-tree-dump "Folding predicate b_. != 0 to 1" "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp23.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp23.c
index 77899a65f..1f379e814 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp23.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp23.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fdump-tree-vrp-details" } */
blah (int code1, int code2)
{
@@ -40,6 +40,5 @@ L8:
/* The n_sets > 0 test can be simplified into n_sets == 1 since the
only way to reach the test is when n_sets <= 1, and the only value
which satisfies both conditions is n_sets == 1. */
-/* { dg-final { scan-tree-dump-times "Simplified relational" 1 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
-
+/* { dg-final { scan-tree-dump-times "Simplified relational" 1 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp24.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp24.c
index 85e5b62d1..1aae964df 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp24.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp24.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fdump-tree-vrp-details" } */
struct rtx_def;
@@ -86,6 +86,5 @@ L7:
The second n_sets > 0 test can also be simplified into n_sets == 1
as the only way to reach the tests is when n_sets <= 1 and the only
value which satisfies both conditions is n_sets == 1. */
-/* { dg-final { scan-tree-dump-times "Simplified relational" 2 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
-
+/* { dg-final { scan-tree-dump-times "Simplified relational" 2 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp25.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp25.c
index fa8bbfd4c..79411bf26 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp25.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp25.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fdump-tree-vrp-details" } */
extern void abort ();
int tree_code_length[100];
@@ -47,6 +47,5 @@ L9:
/* The second test of (code1 != 53) and the test (D18670 <= 2) are
both totally subsumed by earlier tests and thus should be folded
away using VRP. */
-/* { dg-final { scan-tree-dump-times "Folding predicate" 2 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
-
+/* { dg-final { scan-tree-dump-times "Folding predicate" 2 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp33.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp33.c
index 13f60a6e7..3a1b9e48c 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp33.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp33.c
@@ -1,9 +1,9 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
/* This is from PR14052. */
int f2(int x) { return x == 1 || x == 3 || x == 1; }
-/* { dg-final { scan-tree-dump "Folding predicate.*== 1 to 0" "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump "Folding predicate.*== 1 to 0" "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp34.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp34.c
index fd92eca65..7b2020252 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp34.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp34.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
void bar (void);
@@ -15,6 +15,6 @@ foo (int a)
}
}
-/* { dg-final { scan-tree-dump "Folding predicate a_. > 2 to 1" "vrp1" } } */
-/* { dg-final { scan-tree-dump "Folding predicate a_. <= 5 to 1" "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump "Folding predicate a_. > 2 to 1" "vrp" } } */
+/* { dg-final { scan-tree-dump "Folding predicate a_. <= 5 to 1" "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp46.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp46.c
index a67e839de..6c29adeac 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp46.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp46.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
void
func_18 ( int t )
@@ -24,5 +24,5 @@ func_18 ( int t )
/* There should be a single if left. */
-/* { dg-final { scan-tree-dump-times "if" 1 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "if" 1 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp55.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp55.c
index 7a3e726b2..764911cb3 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp55.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp55.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1-blocks-vops-details" } */
+/* { dg-options "-O2 -fdump-tree-vrp-blocks-vops-details" } */
fu (char *p, int x)
{
@@ -9,7 +9,6 @@ fu (char *p, int x)
arf ();
}
-/* { dg-final { scan-tree-dump-times "Threaded jump" 1 "vrp1" { target { ! keeps_null_pointer_checks } } } } */
-/* { dg-final { scan-tree-dump-times "Threaded jump" 0 "vrp1" { target { keeps_null_pointer_checks } } } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
-
+/* { dg-final { scan-tree-dump-times "Threaded jump" 1 "vrp" { target { ! keeps_null_pointer_checks } } } } */
+/* { dg-final { scan-tree-dump-times "Threaded jump" 0 "vrp" { target { keeps_null_pointer_checks } } } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp56.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp56.c
index 912d28e0f..55ea1e355 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp56.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp56.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fdump-tree-vrp-details" } */
typedef struct basic_block_def *basic_block;
struct basic_block_def;
struct edge_def;
@@ -37,6 +37,5 @@ cleanup_empty_eh (basic_block bb)
foo ();
}
}
-/* { dg-final { scan-tree-dump-times "Threaded" 1 "vrp1"} } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
-
+/* { dg-final { scan-tree-dump-times "Threaded" 1 "vrp"} } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp58.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp58.c
index aa10af249..7462f4da5 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp58.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp58.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1-details" } */
+/* { dg-options "-O2 -fdump-tree-vrp-details" } */
long long
foo (long long a, signed char b, signed char c)
@@ -8,6 +8,6 @@ foo (long long a, signed char b, signed char c)
return a + (short)bc;
}
-/* { dg-final { scan-tree-dump "Folded into" "vrp1" { target int32plus } } } */
-/* { dg-final { scan-tree-dump "Folding statement: _\[0-9\]\* = \\(long long int\\) bc_\[0-9\]\*;" "vrp1" { target int16 } } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump "Folded into" "vrp" { target int32plus } } } */
+/* { dg-final { scan-tree-dump "Folding statement: _\[0-9\]\* = \\(long long int\\) bc_\[0-9\]\*;" "vrp" { target int16 } } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp67.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp67.c
index f02d83780..74a264761 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp67.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp67.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-options "-O2 -fdump-tree-vrp" } */
unsigned foo (unsigned i)
{
@@ -34,5 +34,5 @@ unsigned baz (unsigned i)
return i;
}
-/* { dg-final { scan-tree-dump-times "Folding predicate" 3 "vrp1" } } */
-/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate" 3 "vrp" } } */
+/* { dg-final { cleanup-tree-dump "vrp" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp87.c b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp87.c
index ab399b50e..9d1471bb4 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp87.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/vrp87.c
@@ -2,7 +2,7 @@
when evaluating an && condition. VRP is not able to optimize this. */
/* { dg-do compile { target { ! { logical_op_short_circuit || { m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* picochip*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* hppa*-*-* } } } } } */
-/* { dg-options "-O2 -fdump-tree-vrp2-details -fdump-tree-cddce2-details" } */
+/* { dg-options "-O2 -fdump-tree-vrp1-details -fdump-tree-cddce1-details" } */
struct bitmap_head_def;
typedef struct bitmap_head_def *bitmap;
@@ -75,10 +75,9 @@ bitmap_ior_into (bitmap a, const_bitmap b)
}
/* Verify that VRP simplified an "if" statement. */
-/* { dg-final { scan-tree-dump "Folded into: if.*" "vrp2"} } */
-/* Verify that DCE after VRP2 eliminates a dead conversion
+/* { dg-final { scan-tree-dump "Folded into: if.*" "vrp1"} } */
+/* Verify that DCE after VRP1 eliminates a dead conversion
to a (Bool). */
-/* { dg-final { scan-tree-dump "Deleting.*_Bool.*;" "cddce2"} } */
-/* { dg-final { cleanup-tree-dump "vrp2" } } */
-/* { dg-final { cleanup-tree-dump "cddce2" } } */
-
+/* { dg-final { scan-tree-dump "Deleting.*_Bool.*;" "cddce1"} } */
+/* { dg-final { cleanup-tree-dump "vrp1" } } */
+/* { dg-final { cleanup-tree-dump "cddce1" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/vect/slp-perm-7.c b/gcc-4.9/gcc/testsuite/gcc.dg/vect/slp-perm-7.c
index 6291096f0..9bb2e625a 100644
--- a/gcc-4.9/gcc/testsuite/gcc.dg/vect/slp-perm-7.c
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/vect/slp-perm-7.c
@@ -70,8 +70,6 @@ int main (int argc, const char* argv[])
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_perm } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_perm } } } */
/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_perm } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
-
-
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c b/gcc-4.9/gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c
index 321d8f002..523941d47 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c
@@ -12,17 +12,3 @@ test (int a, double b, int c, int d, int e)
);
return c * d + e;
}
-/* { dg-do assemble } */
-/* { dg-options "-O2 -mfix-cortex-a53-835769" } */
-
-int
-test (int a, double b, int c, int d, int e)
-{
- double result;
- __asm__ __volatile ("// %0, %1"
- : "=w" (result)
- : "0" (b)
- : /* No clobbers */
- );
- return c * d + e;
-}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/aarch64/pr62040.c b/gcc-4.9/gcc/testsuite/gcc.target/aarch64/pr62040.c
index c6cae4d5b..cfb4979f8 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/aarch64/pr62040.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/aarch64/pr62040.c
@@ -19,24 +19,3 @@ foo ()
int32x4_t out = vtrn1q_s32 (xxx, xxx);
bar (out);
}
-/* { dg-do compile } */
-/* { dg-options "-g -Os" } */
-
-#include "arm_neon.h"
-
-extern void bar (int32x4_t);
-
-void
-foo ()
-{
- int32x4x4_t rows;
- uint64x2x2_t row01;
-
- row01.val[0] = vreinterpretq_u64_s32 (rows.val[0]);
- row01.val[1] = vreinterpretq_u64_s32 (rows.val[1]);
- uint64x1_t row3l = vget_low_u64 (row01.val[0]);
- row01.val[0] = vcombine_u64 (vget_low_u64 (row01.val[1]), row3l);
- int32x4_t xxx = vreinterpretq_s32_u64 (row01.val[0]);
- int32x4_t out = vtrn1q_s32 (xxx, xxx);
- bar (out);
-}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/aarch64/pr62262.c b/gcc-4.9/gcc/testsuite/gcc.target/aarch64/pr62262.c
index 20763b499..5bf90bf7f 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/aarch64/pr62262.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/aarch64/pr62262.c
@@ -18,23 +18,3 @@ int foo(int value)
int packed = (unsigned)(value << 9) >> 9;
return packed;
}
-/* { dg-do compile } */
-/* { dg-options "-O2 -fprofile-use" } */
-
-static inline int CLZ(int mask) {
- return mask ? __builtin_clz(mask) : 32;
-}
-
-int foo(int value)
-{
- if (value == 0)
- return 0;
-
- int bias = CLZ(value);
- value >>= bias;
- int zeros = CLZ(value << 1);
- value <<= zeros;
-
- int packed = (unsigned)(value << 9) >> 9;
- return packed;
-}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c b/gcc-4.9/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c
index 71dd0a24a..da32337e7 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c
@@ -3,7 +3,7 @@
causes them to appear twice in the file. */
/* { dg-do compile { target { powerpc64le-*-* } } } */
-/* { dg-options "-O0 -Wno-deprecated" } */
+/* { dg-options "-mcpu=power7 -O0 -Wno-deprecated" } */
/* { dg-final { scan-assembler-times "lvsl" 2 } } */
/* { dg-final { scan-assembler-times "lvsr" 2 } } */
/* { dg-final { scan-assembler-times "lxvd2x" 2 } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c b/gcc-4.9/gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c
index bf889aaa2..db81e17eb 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c
@@ -1,7 +1,7 @@
/* Test for deprecation messages on use of lvsl and lvsr for little endian. */
/* { dg-do compile { target { powerpc64le-*-* } } } */
-/* { dg-options "-O0 -Wdeprecated" } */
+/* { dg-options "-maltivec -O0 -Wdeprecated" } */
#include <altivec.h>
diff --git a/gcc-4.9/gcc/toplev.c b/gcc-4.9/gcc/toplev.c
index 21e07bc8e..15f39c52d 100644
--- a/gcc-4.9/gcc/toplev.c
+++ b/gcc-4.9/gcc/toplev.c
@@ -2004,7 +2004,7 @@ toplev_main (int argc, char **argv)
enough to default flags appropriately. */
decode_options (&global_options, &global_options_set,
save_decoded_options, save_decoded_options_count,
- UNKNOWN_LOCATION, global_dc);
+ UNKNOWN_LOCATION, global_dc, true);
handle_common_deferred_options ();
diff --git a/gcc-4.9/gcc/tree-pass.h b/gcc-4.9/gcc/tree-pass.h
index 5f00e642a..9c0412424 100644
--- a/gcc-4.9/gcc/tree-pass.h
+++ b/gcc-4.9/gcc/tree-pass.h
@@ -347,6 +347,8 @@ extern gimple_opt_pass *make_pass_asan (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_asan_O0 (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_tsan (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_tsan_O0 (gcc::context *ctxt);
+extern gimple_opt_pass *make_pass_sancov (gcc::context *ctxt);
+extern gimple_opt_pass *make_pass_sancov_O0 (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_lower_cf (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_refactor_eh (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_lower_eh (gcc::context *ctxt);
@@ -431,6 +433,7 @@ extern gimple_opt_pass *make_pass_fre (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_check_data_deps (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_copy_prop (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_isolate_erroneous_paths (gcc::context *ctxt);
+extern gimple_opt_pass *make_pass_early_vrp (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_vrp (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_uncprop (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_return_slot (gcc::context *ctxt);
diff --git a/gcc-4.9/gcc/tree-profile.c b/gcc-4.9/gcc/tree-profile.c
index 6e1d643ce..9504da45c 100644
--- a/gcc-4.9/gcc/tree-profile.c
+++ b/gcc-4.9/gcc/tree-profile.c
@@ -864,8 +864,20 @@ gimple_gen_edge_profiler (int edgeno, edge e)
{
gimple call;
tree tree_edgeno = build_int_cst (gcov_type_node, edgeno);
- tree tree_uid = build_int_cst (gcov_type_node,
+
+ tree tree_uid;
+ if (PARAM_VALUE (PARAM_PROFILE_FUNC_INTERNAL_ID))
+ {
+ tree_uid = build_int_cst (gcov_type_node,
current_function_funcdef_no);
+ }
+ else
+ {
+ gcc_assert (coverage_node_map_initialized_p ());
+
+ tree_uid = build_int_cst
+ (gcov_type_node, cgraph_get_node (current_function_decl)->profile_id);
+ }
tree callback_fn_type
= build_function_type_list (void_type_node,
gcov_type_node,
diff --git a/gcc-4.9/gcc/tree-ssa-threadedge.c b/gcc-4.9/gcc/tree-ssa-threadedge.c
index 604123e10..2549789a4 100644
--- a/gcc-4.9/gcc/tree-ssa-threadedge.c
+++ b/gcc-4.9/gcc/tree-ssa-threadedge.c
@@ -912,8 +912,8 @@ thread_around_empty_blocks (edge taken_edge,
static bool
fsm_find_thread_path (basic_block start_bb, basic_block end_bb,
- vec<basic_block, va_gc> *&path,
- pointer_set_t *visited_bbs, loop_p loop)
+ vec<basic_block, va_gc> *&path,
+ pointer_set_t *visited_bbs, loop_p loop)
{
if (loop != start_bb->loop_father)
return false;
@@ -947,7 +947,7 @@ static int max_threaded_paths;
static void
fsm_find_control_statement_thread_paths (tree expr,
- pointer_set_t *visited_bbs,
+ pointer_set_t *visited_bbs,
vec<basic_block, va_gc> *&path,
bool seen_loop_phi)
{
@@ -976,7 +976,7 @@ fsm_find_control_statement_thread_paths (tree expr,
{
/* Do not walk through more than one loop PHI node. */
if (seen_loop_phi)
- return;
+ return;
seen_loop_phi = true;
}
@@ -997,23 +997,23 @@ fsm_find_control_statement_thread_paths (tree expr,
if (fsm_find_thread_path (var_bb, e->src, next_path, visited_bbs,
e->src->loop_father))
- ++e_count;
+ ++e_count;
- pointer_set_destroy (visited_bbs);
+ pointer_set_destroy (visited_bbs);
- /* If there is more than one path, stop. */
- if (e_count > 1)
+ /* If there is more than one path, stop. */
+ if (e_count > 1)
{
- vec_free (next_path);
- return;
+ vec_free (next_path);
+ return;
}
- }
+ }
/* Stop if we have not found a path: this could occur when the recursion
is stopped by one of the bounds. */
if (e_count == 0)
{
- vec_free (next_path);
+ vec_free (next_path);
return;
}
@@ -1034,18 +1034,17 @@ fsm_find_control_statement_thread_paths (tree expr,
/* Skip edges pointing outside the current loop. */
if (!arg || var_bb->loop_father != bbi->loop_father)
- continue;
+ continue;
if (TREE_CODE (arg) == SSA_NAME)
- {
+ {
vec_safe_push (path, bbi);
- /* Recursively follow SSA_NAMEs looking for a constant definition. */
+ /* Recursively follow SSA_NAMEs looking for a constant definition. */
fsm_find_control_statement_thread_paths (arg, visited_bbs, path,
seen_loop_phi);
-
path->pop ();
continue;
- }
+ }
if (TREE_CODE (arg) != INTEGER_CST)
continue;
@@ -1066,12 +1065,12 @@ fsm_find_control_statement_thread_paths (tree expr,
if (max_threaded_paths <= 0)
{
- if (dump_file && (dump_flags & TDF_DETAILS))
- fprintf (dump_file, "FSM jump-thread path not considered: "
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ fprintf (dump_file, "FSM jump-thread path not considered: "
"the number of previously recorded FSM paths to thread "
"exceeds PARAM_MAX_FSM_THREAD_PATHS.\n");
continue;
- }
+ }
/* Add BBI to the path. */
vec_safe_push (path, bbi);
@@ -1085,8 +1084,8 @@ fsm_find_control_statement_thread_paths (tree expr,
/* Count the number of instructions on the path: as these instructions
will have to be duplicated, we will not record the path if there are
- too many instructions on the path. Also check that all the blocks in
- the path belong to a single loop. */
+ too many instructions on the path. Also check that all the blocks in
+ the path belong to a single loop. */
for (j = 1; j < path_length - 1; j++)
{
basic_block bb = (*path)[j];
@@ -1109,23 +1108,23 @@ fsm_find_control_statement_thread_paths (tree expr,
}
if (path_crosses_loops)
- {
+ {
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "FSM jump-thread path not considered: "
"the path crosses loops.\n");
path->pop ();
- continue;
+ continue;
}
if (n_insns >= PARAM_VALUE (PARAM_MAX_FSM_THREAD_PATH_INSNS))
- {
+ {
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "FSM jump-thread path not considered: "
"the number of instructions on the path "
"exceeds PARAM_MAX_FSM_THREAD_PATH_INSNS.\n");
path->pop ();
- continue;
- }
+ continue;
+ }
vec<jump_thread_edge *> *jump_thread_path
= new vec<jump_thread_edge *> ();
@@ -1137,7 +1136,7 @@ fsm_find_control_statement_thread_paths (tree expr,
(*path)[path_length - j - 2]);
gcc_assert (e);
jump_thread_edge *x = new jump_thread_edge (e, EDGE_FSM_THREAD);
- jump_thread_path->safe_push (x);
+ jump_thread_path->safe_push (x);
}
/* Add the edge taken when the control variable has value ARG. */
diff --git a/gcc-4.9/gcc/tree-ssa-threadupdate.c b/gcc-4.9/gcc/tree-ssa-threadupdate.c
index c2f02a6ab..e2c2dbeff 100644
--- a/gcc-4.9/gcc/tree-ssa-threadupdate.c
+++ b/gcc-4.9/gcc/tree-ssa-threadupdate.c
@@ -156,9 +156,9 @@ dump_jump_thread_path (FILE *dump_file, vec<jump_thread_edge *> path,
bool registering)
{
fprintf (dump_file,
- " %s%s jump thread: (%d, %d) incoming edge; ",
+ " %s jump thread: (%d, %d) incoming edge; ",
(registering ? "Registering" : "Cancelling"),
- (path[0]->type == EDGE_FSM_THREAD ? " FSM": ""),
+ (path[0]->type == EDGE_FSM_THREAD ? " FSM": ""),
path[0]->e->src->index, path[0]->e->dest->index);
for (unsigned int i = 1; i < path.length (); i++)
@@ -700,6 +700,10 @@ ssa_redirect_edges (struct redirection_data **slot,
if ((*path)[1]->type != EDGE_COPY_SRC_JOINER_BLOCK)
EDGE_SUCC (rd->dup_blocks[0], 0)->count += e->count;
+ /* If we redirect a loop latch edge cancel its loop. */
+ if (e->src == e->src->loop_father->latch)
+ mark_loop_for_removal (e->src->loop_father);
+
/* Redirect the incoming edge (possibly to the joiner block) to the
appropriate duplicate block. */
e2 = redirect_edge_and_branch (e, rd->dup_blocks[0]);
@@ -780,7 +784,6 @@ thread_block_1 (basic_block bb, bool noloop_only, bool joiners)
edge e, e2;
edge_iterator ei;
ssa_local_info_t local_info;
- struct loop *loop = bb->loop_father;
/* To avoid scanning a linear array for the element we need we instead
use a hash table. For normal code there should be no noticeable
@@ -788,32 +791,6 @@ thread_block_1 (basic_block bb, bool noloop_only, bool joiners)
incoming and outgoing edges such linear searches can get expensive. */
redirection_data.create (EDGE_COUNT (bb->succs));
- /* If we thread the latch of the loop to its exit, the loop ceases to
- exist. Make sure we do not restrict ourselves in order to preserve
- this loop. */
- if (loop->header == bb)
- {
- e = loop_latch_edge (loop);
- vec<jump_thread_edge *> *path = THREAD_PATH (e);
-
- if (path
- && (((*path)[1]->type == EDGE_COPY_SRC_JOINER_BLOCK && joiners)
- || ((*path)[1]->type == EDGE_COPY_SRC_BLOCK && !joiners)))
- {
- for (unsigned int i = 1; i < path->length (); i++)
- {
- edge e2 = (*path)[i]->e;
-
- if (loop_exit_edge_p (loop, e2))
- {
- loop->header = NULL;
- loop->latch = NULL;
- loops_state_set (LOOPS_NEED_FIXUP);
- }
- }
- }
- }
-
/* Record each unique threaded destination into a hash table for
efficient lookups. */
FOR_EACH_EDGE (e, ei, bb->preds)
@@ -1257,9 +1234,7 @@ thread_through_loop_header (struct loop *loop, bool may_peel_loop_headers)
{
/* If the loop ceased to exist, mark it as such, and thread through its
original header. */
- loop->header = NULL;
- loop->latch = NULL;
- loops_state_set (LOOPS_NEED_FIXUP);
+ mark_loop_for_removal (loop);
return thread_block (header, false);
}
@@ -1626,7 +1601,7 @@ bb_ends_with_multiway_branch (basic_block bb ATTRIBUTE_UNUSED)
/* Verify that the REGION is a valid jump thread. A jump thread is a special
case of SEME Single Entry Multiple Exits region in which all nodes in the
REGION have exactly one incoming edge. The only exception is the first block
- that may not have been connected to the rest of the cfg yet. */
+ that may not have been connected to the rest of the cfg yet. */
DEBUG_FUNCTION void
verify_jump_thread (basic_block *region, unsigned n_region)
@@ -1643,7 +1618,6 @@ bb_in_bbs (basic_block bb, basic_block *bbs, int n)
for (int i = 0; i < n; i++)
if (bb == bbs[i])
return true;
-
return false;
}
@@ -1661,11 +1635,11 @@ bb_in_bbs (basic_block bb, basic_block *bbs, int n)
static bool
duplicate_thread_path (edge entry, edge exit,
- basic_block *region, unsigned n_region,
- basic_block *region_copy)
+ basic_block *region, unsigned n_region,
+ basic_block *region_copy)
{
unsigned i;
- bool free_region_copy = false, copying_header = false;
+ bool free_region_copy = false;
struct loop *loop = entry->dest->loop_father;
edge exit_copy;
edge redirected;
@@ -1682,17 +1656,14 @@ duplicate_thread_path (edge entry, edge exit,
for (i = 0; i < n_region; i++)
{
/* We do not handle subloops, i.e. all the blocks must belong to the
- same loop. */
+ same loop. */
if (region[i]->loop_father != loop)
- return false;
+ return false;
}
initialize_original_copy_tables ();
- if (copying_header)
- set_loop_copy (loop, loop_outer (loop));
- else
- set_loop_copy (loop, loop);
+ set_loop_copy (loop, loop);
if (!region_copy)
{
@@ -1705,25 +1676,24 @@ duplicate_thread_path (edge entry, edge exit,
total_count = entry->dest->count;
entry_count = entry->count;
/* Fix up corner cases, to avoid division by zero or creation of negative
- frequencies. */
+ frequencies. */
if (entry_count > total_count)
- entry_count = total_count;
+ entry_count = total_count;
}
else
{
total_freq = entry->dest->frequency;
entry_freq = EDGE_FREQUENCY (entry);
/* Fix up corner cases, to avoid division by zero or creation of negative
- frequencies. */
+ frequencies. */
if (total_freq == 0)
- total_freq = 1;
+ total_freq = 1;
else if (entry_freq > total_freq)
- entry_freq = total_freq;
+ entry_freq = total_freq;
}
copy_bbs (region, n_region, region_copy, &exit, 1, &exit_copy, loop,
- split_edge_bb_loc (entry), false);
-
+ split_edge_bb_loc (entry), false);
/* Fix up: copy_bbs redirects all edges pointing to copied blocks. The
following code ensures that all the edges exiting the jump-thread path are
redirected back to the original code: these edges are exceptions
@@ -1737,50 +1707,50 @@ duplicate_thread_path (edge entry, edge exit,
basic_block bb = region_copy[i];
if (single_succ_p (bb))
- {
- /* Make sure the successor is the next node in the path. */
- gcc_assert (i + 1 == n_region
- || region_copy[i + 1] == single_succ_edge (bb)->dest);
- continue;
- }
+ {
+ /* Make sure the successor is the next node in the path. */
+ gcc_assert (i + 1 == n_region
+ || region_copy[i + 1] == single_succ_edge (bb)->dest);
+ continue;
+ }
/* Special case the last block on the path: make sure that it does not
- jump back on the copied path. */
+ jump back on the copied path. */
if (i + 1 == n_region)
- {
- FOR_EACH_EDGE (e, ei, bb->succs)
- if (bb_in_bbs (e->dest, region_copy, n_region - 1))
- {
- basic_block orig = get_bb_original (e->dest);
- if (orig)
- redirect_edge_and_branch_force (e, orig);
- }
- continue;
- }
+ {
+ FOR_EACH_EDGE (e, ei, bb->succs)
+ if (bb_in_bbs (e->dest, region_copy, n_region - 1))
+ {
+ basic_block orig = get_bb_original (e->dest);
+ if (orig)
+ redirect_edge_and_branch_force (e, orig);
+ }
+ continue;
+ }
/* Redirect all other edges jumping to non-adjacent blocks back to the
- original code. */
+ original code. */
FOR_EACH_EDGE (e, ei, bb->succs)
- if (region_copy[i + 1] != e->dest)
- {
- basic_block orig = get_bb_original (e->dest);
- if (orig)
- redirect_edge_and_branch_force (e, orig);
- }
+ if (region_copy[i + 1] != e->dest)
+ {
+ basic_block orig = get_bb_original (e->dest);
+ if (orig)
+ redirect_edge_and_branch_force (e, orig);
+ }
}
if (total_count)
{
scale_bbs_frequencies_gcov_type (region, n_region,
- total_count - entry_count,
- total_count);
+ total_count - entry_count,
+ total_count);
scale_bbs_frequencies_gcov_type (region_copy, n_region, entry_count,
- total_count);
+ total_count);
}
else
{
scale_bbs_frequencies_int (region, n_region, total_freq - entry_freq,
- total_freq);
+ total_freq);
scale_bbs_frequencies_int (region_copy, n_region, entry_freq, total_freq);
}
@@ -1799,6 +1769,8 @@ duplicate_thread_path (edge entry, edge exit,
}
/* Redirect the entry and add the phi node arguments. */
+ if (entry->dest == loop->header)
+ mark_loop_for_removal (loop);
redirected = redirect_edge_and_branch (entry, get_bb_copy (entry->dest));
gcc_assert (redirected != NULL);
flush_pending_stmts (entry);
@@ -1872,31 +1844,31 @@ thread_through_all_blocks (bool may_peel_loop_headers)
/* Do not jump-thread twice from the same block. */
if (bitmap_bit_p (threaded_blocks, entry->src->index)
- /* Verify that the jump thread path is still valid: a
- previous jump-thread may have changed the CFG, and
- invalidated the current path. */
- || !valid_jump_thread_path (path))
- {
- /* Remove invalid FSM jump-thread paths. */
- delete_jump_thread_path (path);
- paths.unordered_remove (i);
- continue;
- }
+ /* Verify that the jump thread path is still valid: a
+ previous jump-thread may have changed the CFG, and
+ invalidated the current path. */
+ || !valid_jump_thread_path (path))
+ {
+ /* Remove invalid FSM jump-thread paths. */
+ delete_jump_thread_path (path);
+ paths.unordered_remove (i);
+ continue;
+ }
unsigned len = path->length ();
edge exit = (*path)[len - 1]->e;
basic_block *region = XNEWVEC (basic_block, len - 1);
for (unsigned int j = 0; j < len - 1; j++)
- region[j] = (*path)[j]->e->dest;
+ region[j] = (*path)[j]->e->dest;
if (duplicate_thread_path (entry, exit, region, len - 1, NULL))
- {
- /* We do not update dominance info. */
- free_dominance_info (CDI_DOMINATORS);
- bitmap_set_bit (threaded_blocks, entry->src->index);
- retval = true;
- }
+ {
+ /* We do not update dominance info. */
+ free_dominance_info (CDI_DOMINATORS);
+ bitmap_set_bit (threaded_blocks, entry->src->index);
+ retval = true;
+ }
delete_jump_thread_path (path);
paths.unordered_remove (i);
@@ -1911,12 +1883,12 @@ thread_through_all_blocks (bool may_peel_loop_headers)
/* Do not jump-thread twice from the same block. */
if (bitmap_bit_p (threaded_blocks, entry->src->index))
- {
- delete_jump_thread_path (path);
- paths.unordered_remove (i);
- }
+ {
+ delete_jump_thread_path (path);
+ paths.unordered_remove (i);
+ }
else
- i++;
+ i++;
}
bitmap_clear (threaded_blocks);
@@ -2006,16 +1978,8 @@ thread_through_all_blocks (bool may_peel_loop_headers)
/* Our path is still valid, thread it. */
if (e->aux)
{
- struct loop *loop = (*path)[0]->e->dest->loop_father;
-
if (thread_block ((*path)[0]->e->dest, false))
- {
- /* This jump thread likely totally scrambled this loop.
- So arrange for it to be fixed up. */
- loop->header = NULL;
- loop->latch = NULL;
- e->aux = NULL;
- }
+ e->aux = NULL;
else
{
delete_jump_thread_path (path);
diff --git a/gcc-4.9/gcc/tree-vect-data-refs.c b/gcc-4.9/gcc/tree-vect-data-refs.c
index c3e423a5f..74268089c 100644
--- a/gcc-4.9/gcc/tree-vect-data-refs.c
+++ b/gcc-4.9/gcc/tree-vect-data-refs.c
@@ -615,7 +615,6 @@ vect_compute_data_ref_alignment (struct data_reference *dr)
tree ref = DR_REF (dr);
tree vectype;
tree base, base_addr;
- bool base_aligned;
tree misalign;
tree aligned_to, alignment;
@@ -688,6 +687,18 @@ vect_compute_data_ref_alignment (struct data_reference *dr)
}
base = build_fold_indirect_ref (base_addr);
+ /* To look at alignment of the base we have to preserve an inner MEM_REF
+ as that carriese alignment information of the actual access. */
+ while (handled_component_p (base))
+ base = TREE_OPERAND (base, 0);
+ if (TREE_CODE (base) == MEM_REF)
+ base = build2 (MEM_REF, TREE_TYPE(base), base_addr,
+ build_int_cst (TREE_TYPE (TREE_OPERAND (base, 1)), 0));
+ unsigned int base_alignment = get_object_alignment (base);
+
+ if (base_alignment >= TYPE_ALIGN (TREE_TYPE (vectype)))
+ DR_VECT_AUX (dr)->base_element_aligned = true;
+
alignment = ssize_int (TYPE_ALIGN (vectype)/BITS_PER_UNIT);
if ((aligned_to && tree_int_cst_compare (aligned_to, alignment) < 0)
@@ -703,19 +714,7 @@ vect_compute_data_ref_alignment (struct data_reference *dr)
return true;
}
- if ((DECL_P (base)
- && tree_int_cst_compare (ssize_int (DECL_ALIGN_UNIT (base)),
- alignment) >= 0)
- || (TREE_CODE (base_addr) == SSA_NAME
- && tree_int_cst_compare (ssize_int (TYPE_ALIGN_UNIT (TREE_TYPE (
- TREE_TYPE (base_addr)))),
- alignment) >= 0)
- || (get_pointer_alignment (base_addr) >= TYPE_ALIGN (vectype)))
- base_aligned = true;
- else
- base_aligned = false;
-
- if (!base_aligned)
+ if (base_alignment < TYPE_ALIGN (vectype))
{
/* Do not change the alignment of global variables here if
flag_section_anchors is enabled as we already generated
@@ -744,8 +743,9 @@ vect_compute_data_ref_alignment (struct data_reference *dr)
dump_printf (MSG_NOTE, "\n");
}
- ((dataref_aux *)dr->aux)->base_decl = base;
- ((dataref_aux *)dr->aux)->base_misaligned = true;
+ DR_VECT_AUX (dr)->base_decl = base;
+ DR_VECT_AUX (dr)->base_misaligned = true;
+ DR_VECT_AUX (dr)->base_element_aligned = true;
}
/* If this is a backward running DR then first access in the larger
@@ -3920,12 +3920,6 @@ vect_create_addr_base_for_vector_ref (gimple stmt,
base_offset = fold_build2 (PLUS_EXPR, sizetype,
base_offset, byte_offset);
}
- if (byte_offset)
- {
- byte_offset = fold_convert (sizetype, byte_offset);
- base_offset = fold_build2 (PLUS_EXPR, sizetype,
- base_offset, byte_offset);
- }
/* base + base_offset */
if (loop_vinfo)
diff --git a/gcc-4.9/gcc/tree-vect-stmts.c b/gcc-4.9/gcc/tree-vect-stmts.c
index 7d5366136..07a1bb51f 100644
--- a/gcc-4.9/gcc/tree-vect-stmts.c
+++ b/gcc-4.9/gcc/tree-vect-stmts.c
@@ -4900,14 +4900,14 @@ ensure_base_align (stmt_vec_info stmt_info, struct data_reference *dr)
if (!dr->aux)
return;
- if (((dataref_aux *)dr->aux)->base_misaligned)
+ if (DR_VECT_AUX (dr)->base_misaligned)
{
tree vectype = STMT_VINFO_VECTYPE (stmt_info);
- tree base_decl = ((dataref_aux *)dr->aux)->base_decl;
+ tree base_decl = DR_VECT_AUX (dr)->base_decl;
DECL_ALIGN (base_decl) = TYPE_ALIGN (vectype);
DECL_USER_ALIGN (base_decl) = 1;
- ((dataref_aux *)dr->aux)->base_misaligned = false;
+ DR_VECT_AUX (dr)->base_misaligned = false;
}
}
@@ -5391,11 +5391,15 @@ vectorizable_store (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
misalign = 0;
else if (DR_MISALIGNMENT (first_dr) == -1)
{
+ if (DR_VECT_AUX (first_dr)->base_element_aligned)
+ align = TYPE_ALIGN_UNIT (elem_type);
+ else
+ align = get_object_alignment (DR_REF (first_dr))
+ / BITS_PER_UNIT;
+ misalign = 0;
TREE_TYPE (data_ref)
= build_aligned_type (TREE_TYPE (data_ref),
- TYPE_ALIGN (elem_type));
- align = TYPE_ALIGN_UNIT (elem_type);
- misalign = 0;
+ align * BITS_PER_UNIT);
}
else
{
@@ -6373,11 +6377,15 @@ vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
}
else if (DR_MISALIGNMENT (first_dr) == -1)
{
+ if (DR_VECT_AUX (first_dr)->base_element_aligned)
+ align = TYPE_ALIGN_UNIT (elem_type);
+ else
+ align = (get_object_alignment (DR_REF (first_dr))
+ / BITS_PER_UNIT);
+ misalign = 0;
TREE_TYPE (data_ref)
= build_aligned_type (TREE_TYPE (data_ref),
- TYPE_ALIGN (elem_type));
- align = TYPE_ALIGN_UNIT (elem_type);
- misalign = 0;
+ align * BITS_PER_UNIT);
}
else
{
diff --git a/gcc-4.9/gcc/tree-vectorizer.h b/gcc-4.9/gcc/tree-vectorizer.h
index 09ca48e4c..c34ed26fb 100644
--- a/gcc-4.9/gcc/tree-vectorizer.h
+++ b/gcc-4.9/gcc/tree-vectorizer.h
@@ -703,11 +703,16 @@ typedef struct _stmt_vec_info {
#define STMT_SLP_TYPE(S) (S)->slp_type
struct dataref_aux {
- tree base_decl;
- bool base_misaligned;
int misalignment;
+ /* If true the alignment of base_decl needs to be increased. */
+ bool base_misaligned;
+ /* If true we know the base is at least vector element alignment aligned. */
+ bool base_element_aligned;
+ tree base_decl;
};
+#define DR_VECT_AUX(dr) ((dataref_aux *)(dr)->aux)
+
#define VECT_MAX_COST 1000
/* The maximum number of intermediate steps required in multi-step type
@@ -906,14 +911,13 @@ destroy_cost_data (void *data)
targetm.vectorize.destroy_cost_data (data);
}
-
/*-----------------------------------------------------------------*/
/* Info on data references alignment. */
/*-----------------------------------------------------------------*/
inline void
set_dr_misalignment (struct data_reference *dr, int val)
{
- dataref_aux *data_aux = (dataref_aux *) dr->aux;
+ dataref_aux *data_aux = DR_VECT_AUX (dr);
if (!data_aux)
{
@@ -927,8 +931,7 @@ set_dr_misalignment (struct data_reference *dr, int val)
inline int
dr_misalignment (struct data_reference *dr)
{
- gcc_assert (dr->aux);
- return ((dataref_aux *) dr->aux)->misalignment;
+ return DR_VECT_AUX (dr)->misalignment;
}
/* Reflects actual alignment of first access in the vectorized loop,
diff --git a/gcc-4.9/gcc/tree-vrp.c b/gcc-4.9/gcc/tree-vrp.c
index fb3e05d85..cdbafeb0c 100644
--- a/gcc-4.9/gcc/tree-vrp.c
+++ b/gcc-4.9/gcc/tree-vrp.c
@@ -97,6 +97,11 @@ typedef struct value_range_d value_range_t;
for still active basic-blocks. */
static sbitmap *live;
+/* Certain VRP actions should not be done in the early VRP pass. This
+ variable indicates whether or not we are in the early VRP pass, and
+ is used to control those actions. */
+static bool is_early_vrp = false;
+
/* Return true if the SSA name NAME is live on the edge E. */
static bool
@@ -3594,7 +3599,8 @@ extract_range_basic (value_range_t *vr, gimple stmt)
array bound warnings.
??? We could do this as early as inlining is finished. */
arg = gimple_call_arg (stmt, 0);
- if (TREE_CODE (arg) == SSA_NAME
+ if (!is_early_vrp
+ && TREE_CODE (arg) == SSA_NAME
&& SSA_NAME_IS_DEFAULT_DEF (arg)
&& TREE_CODE (SSA_NAME_VAR (arg)) == PARM_DECL)
{
@@ -6218,6 +6224,9 @@ check_array_ref (location_t location, tree ref, bool ignore_off_by_one)
if (TREE_NO_WARNING (ref))
return;
+ if (is_early_vrp)
+ return;
+
low_sub = up_sub = TREE_OPERAND (ref, 1);
up_bound = array_ref_up_bound (ref);
@@ -9821,12 +9830,14 @@ vrp_finalize (void)
probabilities to aid branch prediction. */
static unsigned int
-execute_vrp (void)
+execute_vrp (bool early_pass)
{
int i;
edge e;
switch_update *su;
+ is_early_vrp = early_pass;
+
loop_optimizer_init (LOOPS_NORMAL | LOOPS_HAVE_RECORDED_EXITS);
rewrite_into_loop_closed_ssa (NULL, TODO_update_ssa);
scev_initialize ();
@@ -9925,6 +9936,23 @@ const pass_data pass_data_vrp =
| TODO_verify_flow ), /* todo_flags_finish */
};
+const pass_data pass_data_early_vrp =
+{
+ GIMPLE_PASS, /* type */
+ "vrp", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
+ true, /* has_gate */
+ true, /* has_execute */
+ TV_TREE_VRP, /* tv_id */
+ PROP_ssa, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ ( TODO_cleanup_cfg | TODO_update_ssa
+ | TODO_verify_ssa
+ | TODO_verify_flow ), /* todo_flags_finish */
+};
+
class pass_vrp : public gimple_opt_pass
{
public:
@@ -9935,10 +9963,24 @@ public:
/* opt_pass methods: */
opt_pass * clone () { return new pass_vrp (m_ctxt); }
bool gate () { return gate_vrp (); }
- unsigned int execute () { return execute_vrp (); }
+ unsigned int execute () { return execute_vrp (false); }
}; // class pass_vrp
+class pass_early_vrp : public gimple_opt_pass
+{
+public:
+ pass_early_vrp (gcc::context *ctxt)
+ : gimple_opt_pass (pass_data_early_vrp, ctxt)
+ {}
+
+ /* opt_pass methods: */
+ opt_pass * clone () { return new pass_early_vrp (m_ctxt); }
+ bool gate () { return gate_vrp (); }
+ unsigned int execute () { return execute_vrp (true); }
+
+}; // class pass_early_vrp
+
} // anon namespace
gimple_opt_pass *
@@ -9946,3 +9988,9 @@ make_pass_vrp (gcc::context *ctxt)
{
return new pass_vrp (ctxt);
}
+
+gimple_opt_pass *
+make_pass_early_vrp (gcc::context *ctxt)
+{
+ return new pass_early_vrp (ctxt);
+}
diff --git a/gcc-4.9/gcc/tree.c b/gcc-4.9/gcc/tree.c
index 3b1ff7645..3b88a4e66 100644
--- a/gcc-4.9/gcc/tree.c
+++ b/gcc-4.9/gcc/tree.c
@@ -1120,8 +1120,10 @@ int_cst_hash_hash (const void *x)
{
const_tree const t = (const_tree) x;
- return (TREE_INT_CST_HIGH (t) ^ TREE_INT_CST_LOW (t)
- ^ TYPE_UID (TREE_TYPE (t)));
+ hashval_t hash = TYPE_UID (TREE_TYPE (t));
+ hash = iterative_hash_host_wide_int (TREE_INT_CST_HIGH (t), hash);
+ hash = iterative_hash_host_wide_int (TREE_INT_CST_LOW (t), hash);
+ return hash;
}
/* Return nonzero if the value represented by *X (an INTEGER_CST tree node)
diff --git a/gcc-4.9/libatomic/acinclude.m4 b/gcc-4.9/libatomic/acinclude.m4
index a86e52b4f..34db650be 100644
--- a/gcc-4.9/libatomic/acinclude.m4
+++ b/gcc-4.9/libatomic/acinclude.m4
@@ -197,6 +197,11 @@ AC_DEFUN([LIBAT_CHECK_IFUNC], [
void *foo_sel(void) { return foo_alt; }
int foo(void) __attribute__((ifunc("foo_sel")));],
[return foo();], libat_cv_have_ifunc=yes, libat_cv_have_ifunc=no)])
+
+ if test $enable_libatomic_ifuncs = no; then
+ libat_cv_have_ifunc=no
+ fi
+
LIBAT_DEFINE_YESNO([HAVE_IFUNC], [$libat_cv_have_ifunc],
[Define to 1 if the target supports __attribute__((ifunc(...))).])
])
diff --git a/gcc-4.9/libatomic/aclocal.m4 b/gcc-4.9/libatomic/aclocal.m4
index 48f5ef54f..aa82d0aa8 100644
--- a/gcc-4.9/libatomic/aclocal.m4
+++ b/gcc-4.9/libatomic/aclocal.m4
@@ -277,7 +277,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
break
fi
;;
- msvisualcpp | msvcmsys)
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
# This compiler won't grok `-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
@@ -342,10 +342,13 @@ AC_DEFUN([AM_DEP_TRACK],
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
+ am__nodep='_no'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
AC_SUBST([AMDEPBACKSLASH])dnl
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
])
# Generate code to set up dependency tracking. -*- Autoconf -*-
@@ -918,10 +921,11 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# a tarball read from stdin.
# $(am__untar) < result.tar
AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
m4_if([$1], [v7],
- [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
[m4_case([$1], [ustar],, [pax],,
[m4_fatal([Unknown tar format])])
AC_MSG_CHECKING([how to create a $1 tar archive])
diff --git a/gcc-4.9/libatomic/configure b/gcc-4.9/libatomic/configure
index 5ca62abc2..bbcdd509e 100755
--- a/gcc-4.9/libatomic/configure
+++ b/gcc-4.9/libatomic/configure
@@ -4059,7 +4059,6 @@ else
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
- rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
@@ -4194,7 +4193,6 @@ else
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
- rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
@@ -11125,7 +11123,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11109 "configure"
+#line 11126 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11231,7 +11229,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11215 "configure"
+#line 11232 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -14695,6 +14693,11 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libat_cv_have_ifunc" >&5
$as_echo "$libat_cv_have_ifunc" >&6; }
+ if test $enable_libatomic_ifuncs = no; then
+ libat_cv_have_ifunc=no
+ fi
+
+
yesno=`echo $libat_cv_have_ifunc | tr 'yesno' '1 0 '`
cat >>confdefs.h <<_ACEOF
@@ -14703,6 +14706,9 @@ _ACEOF
+ if test $enable_libatomic_ifuncs = no; then
+ libat_cv_have_ifunc=no
+ fi
fi
# Check linker support.
diff --git a/gcc-4.9/libatomic/configure.ac b/gcc-4.9/libatomic/configure.ac
index ff241c26a..b8c02c3dd 100644
--- a/gcc-4.9/libatomic/configure.ac
+++ b/gcc-4.9/libatomic/configure.ac
@@ -218,6 +218,9 @@ LIBAT_CHECK_ATTRIBUTE_DLLEXPORT
LIBAT_CHECK_ATTRIBUTE_ALIAS
if test x$try_ifunc = xyes; then
LIBAT_CHECK_IFUNC
+ if test $enable_libatomic_ifuncs = no; then
+ libat_cv_have_ifunc=no
+ fi
fi
# Check linker support.
diff --git a/gcc-4.9/libgcc/config.host b/gcc-4.9/libgcc/config.host
index b089fb918..896a31d17 100644
--- a/gcc-4.9/libgcc/config.host
+++ b/gcc-4.9/libgcc/config.host
@@ -1247,7 +1247,7 @@ i[34567]86-*-linux* | x86_64-*-linux* | \
i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu | \
i[34567]86-*-knetbsd*-gnu | \
i[34567]86-*-gnu*)
- tmake_file="${tmake_file} t-tls i386/t-linux"
+ tmake_file="${tmake_file} t-tls i386/t-linux t-slibgcc-libgcc"
if test "$libgcc_cv_cfi" = "yes"; then
tmake_file="${tmake_file} t-stack i386/t-stack-i386"
fi
diff --git a/gcc-4.9/libgcc/config/i386/cpuinfo.c b/gcc-4.9/libgcc/config/i386/cpuinfo.c
index 6ff7502bb..3cfda0270 100644
--- a/gcc-4.9/libgcc/config/i386/cpuinfo.c
+++ b/gcc-4.9/libgcc/config/i386/cpuinfo.c
@@ -34,6 +34,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#endif
int __cpu_indicator_init (void)
+#if !defined(SHARED)
+ __attribute__ ((visibility("hidden")))
+#endif
__attribute__ ((constructor CONSTRUCTOR_PRIORITY));
/* Processor Vendor and Models. */
@@ -99,13 +102,16 @@ enum processor_features
FEATURE_FMA
};
+#if !defined(SHARED)
+ __attribute__ ((visibility("hidden")))
+#endif
struct __processor_model
{
unsigned int __cpu_vendor;
unsigned int __cpu_type;
unsigned int __cpu_subtype;
unsigned int __cpu_features[1];
-} __cpu_model;
+} __cpu_model = { };
/* Get the specific type of AMD CPU. */
@@ -321,6 +327,9 @@ __get_cpuid_output (unsigned int __level,
needs to be called explicitly there. */
int __attribute__ ((constructor CONSTRUCTOR_PRIORITY))
+#if !defined(SHARED)
+ __attribute__ ((visibility("hidden")))
+#endif
__cpu_indicator_init (void)
{
unsigned int eax, ebx, ecx, edx;
@@ -403,3 +412,8 @@ __cpu_indicator_init (void)
return 0;
}
+
+#if defined SHARED && defined USE_ELF_SYMVER
+__asm__ (".symver __cpu_indicator_init, __cpu_indicator_init@GCC_4.8.0");
+__asm__ (".symver __cpu_model, __cpu_model@GCC_4.8.0");
+#endif
diff --git a/gcc-4.9/libgcc/config/i386/t-linux b/gcc-4.9/libgcc/config/i386/t-linux
index 4f47f7bfa..12aab16b6 100644
--- a/gcc-4.9/libgcc/config/i386/t-linux
+++ b/gcc-4.9/libgcc/config/i386/t-linux
@@ -3,4 +3,8 @@
# t-slibgcc-elf-ver and t-linux
SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/i386/libgcc-glibc.ver
-HOST_LIBGCC2_CFLAGS += -mlong-double-80
+# Work around gold bug:
+# https://sourceware.org/bugzilla/show_bug.cgi?id=18703
+SHLIB_LDFLAGS += -fuse-ld=bfd
+
+HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER
diff --git a/gcc-4.9/libgo/go/debug/elf/testdata/go-relocation-test-gcc447-ppc64.obj b/gcc-4.9/libgo/go/debug/elf/testdata/go-relocation-test-gcc447-ppc64.obj
new file mode 100644
index 000000000..8b68eef7a
--- /dev/null
+++ b/gcc-4.9/libgo/go/debug/elf/testdata/go-relocation-test-gcc447-ppc64.obj
Binary files differ
diff --git a/gcc-4.9/libstdc++-v3/Makefile.in b/gcc-4.9/libstdc++-v3/Makefile.in
index bede54253..4e23a9954 100644
--- a/gcc-4.9/libstdc++-v3/Makefile.in
+++ b/gcc-4.9/libstdc++-v3/Makefile.in
@@ -201,6 +201,7 @@ SHELL = @SHELL@
STRIP = @STRIP@
SYMVER_FILE = @SYMVER_FILE@
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
+USE_BIONIC_LIBS = @USE_BIONIC_LIBS@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
VTV_CXXFLAGS = @VTV_CXXFLAGS@
@@ -263,6 +264,7 @@ install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
libtool_VERSION = @libtool_VERSION@
+libtool_version_info_string = @libtool_version_info_string@
localedir = @localedir@
localstatedir = @localstatedir@
lt_host_flags = @lt_host_flags@
diff --git a/gcc-4.9/libstdc++-v3/acinclude.m4 b/gcc-4.9/libstdc++-v3/acinclude.m4
index 45972948d..4e7a441d8 100644
--- a/gcc-4.9/libstdc++-v3/acinclude.m4
+++ b/gcc-4.9/libstdc++-v3/acinclude.m4
@@ -2317,6 +2317,32 @@ AC_DEFUN([GLIBCXX_ENABLE_VTABLE_VERIFY], [
])
dnl
+dnl Use Bionic libstdc++ libraries.
+dnl
+dnl --enable-bionic-libs defines _GLIBCXX_BIONIC_LIBS to 1
+dnl --disable-bionic-libs defines _GLIBCXX_BIONIC_LIBS to 0
+
+dnl + Usage: GLIBCXX_ENABLE_BIONIC_LIBS[(DEFAULT)]
+dnl Where DEFAULT is `yes' or `no'.
+dnl
+AC_DEFUN([GLIBCXX_ENABLE_BIONIC_LIBS], [
+
+ GLIBCXX_ENABLE(bionic-libs,$1,,[enable bionic libs])
+
+ AC_MSG_CHECKING([for bionic libs support])
+ AC_MSG_RESULT([$enable_bionic_libs])
+
+ if test $enable_bionic_libs = yes; then
+ USE_BIONIC_LIBS="TRUE"
+ else
+ USE_BIONIC_LIBS="FALSE"
+ fi
+
+ AC_SUBST(USE_BIONIC_LIBS)
+ GLIBCXX_CONDITIONAL(ENABLE_BIONIC_LIBS, test $enable_bionic_libs = yes)
+])
+
+dnl
dnl Check for parallel mode pre-requisites, including OpenMP support.
dnl
dnl + Usage: GLIBCXX_ENABLE_PARALLEL
@@ -3524,7 +3550,7 @@ AC_DEFUN([GLIBCXX_CHECK_GTHREADS], [
AC_MSG_CHECKING([for gthreads library])
- AC_TRY_COMPILE([#include "gthr.h"],
+ AC_TRY_COMPILE([#include "gthr-$target_thread_file.h"],
[
#ifndef __GTHREADS_CXX0X
#error
diff --git a/gcc-4.9/libstdc++-v3/configure b/gcc-4.9/libstdc++-v3/configure
index 44bc17bc2..836beca1f 100755
--- a/gcc-4.9/libstdc++-v3/configure
+++ b/gcc-4.9/libstdc++-v3/configure
@@ -665,6 +665,9 @@ LIBICONV
OPT_LDFLAGS
SECTION_LDFLAGS
GLIBCXX_LIBS
+ENABLE_BIONIC_LIBS_FALSE
+ENABLE_BIONIC_LIBS_TRUE
+USE_BIONIC_LIBS
ENABLE_VTABLE_VERIFY_FALSE
ENABLE_VTABLE_VERIFY_TRUE
VTV_CXXLINKFLAGS
@@ -873,6 +876,7 @@ enable_extern_template
with_python_dir
enable_werror
enable_vtable_verify
+enable_bionic_libs
enable_libstdcxx_time
enable_tls
enable_rpath
@@ -1566,6 +1570,7 @@ Optional Features:
enable extern template [default=yes]
--enable-werror turns on -Werror [default=yes]
--enable-vtable-verify enable vtable verify [default=no]
+ --enable-bionic-libs enable bionic libs [default=no]
--enable-libstdcxx-time[=KIND]
use KIND for check type [default=auto]
--enable-tls Use thread-local storage [default=yes]
@@ -11542,7 +11547,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11544 "configure"
+#line 11550 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11648,7 +11653,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11650 "configure"
+#line 11656 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -15068,7 +15073,7 @@ fi
#
# Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
cat > conftest.$ac_ext << EOF
-#line 15070 "configure"
+#line 15076 "configure"
struct S { ~S(); };
void bar();
void foo()
@@ -15420,7 +15425,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; }
# Fake what AC_TRY_COMPILE does.
cat > conftest.$ac_ext << EOF
-#line 15420 "configure"
+#line 15428 "configure"
int main()
{
typedef bool atomic_type;
@@ -15455,7 +15460,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; }
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15455 "configure"
+#line 15463 "configure"
int main()
{
typedef short atomic_type;
@@ -15490,7 +15495,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; }
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15490 "configure"
+#line 15498 "configure"
int main()
{
// NB: _Atomic_word not necessarily int.
@@ -15526,7 +15531,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; }
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15526 "configure"
+#line 15534 "configure"
int main()
{
typedef long long atomic_type;
@@ -15605,7 +15610,7 @@ $as_echo "$as_me: WARNING: Performance of certain classes will degrade as a resu
# unnecessary for this test.
cat > conftest.$ac_ext << EOF
-#line 15605 "configure"
+#line 15613 "configure"
int main()
{
_Decimal32 d1;
@@ -15647,7 +15652,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
# unnecessary for this test.
cat > conftest.$ac_ext << EOF
-#line 15647 "configure"
+#line 15655 "configure"
template<typename T1, typename T2>
struct same
{ typedef T2 type; };
@@ -15681,7 +15686,7 @@ $as_echo "$enable_int128" >&6; }
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15681 "configure"
+#line 15689 "configure"
template<typename T1, typename T2>
struct same
{ typedef T2 type; };
@@ -17453,6 +17458,36 @@ $as_echo "$enable_vtable_verify" >&6; }
+
+ # Check whether --enable-bionic-libs was given.
+if test "${enable_bionic_libs+set}" = set; then :
+ enableval=$enable_bionic_libs;
+ case "$enableval" in
+ yes|no) ;;
+ *) as_fn_error "Argument to enable/disable bionic-libs must be yes or no" "$LINENO" 5 ;;
+ esac
+
+else
+ enable_bionic_libs=no
+fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bionic libs support" >&5
+$as_echo_n "checking for bionic libs support... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_bionic_libs" >&5
+$as_echo "$enable_bionic_libs" >&6; }
+
+ if test $enable_bionic_libs = yes; then
+ USE_BIONIC_LIBS="TRUE"
+ else
+ USE_BIONIC_LIBS="FALSE"
+ fi
+
+
+
+
+
# Checks for operating systems support that doesn't require linking.
@@ -78115,12 +78150,14 @@ fi
$as_echo "$glibcxx_ptrdiff_t_is_i" >&6; }
+
case "$target" in
- *android*) libtool_version_info_string="-avoid-version" ;;
- *) libtool_version_info_string="-version-info $libtool_VERSION"
+ *android*) libtool_version_info_string="-avoid-version" ;;
+ *) libtool_version_info_string="-version-info $libtool_VERSION"
esac
+
# Check whether --enable-libstdcxx-visibility was given.
if test "${enable_libstdcxx_visibility+set}" = set; then :
enableval=$enable_libstdcxx_visibility;
@@ -79293,6 +79330,15 @@ else
fi
+ if test $enable_bionic_libs = yes; then
+ ENABLE_BIONIC_LIBS_TRUE=
+ ENABLE_BIONIC_LIBS_FALSE='#'
+else
+ ENABLE_BIONIC_LIBS_TRUE='#'
+ ENABLE_BIONIC_LIBS_FALSE=
+fi
+
+
if test $enable_symvers != no; then
ENABLE_SYMVERS_TRUE=
ENABLE_SYMVERS_FALSE='#'
@@ -79740,6 +79786,10 @@ if test -z "${ENABLE_VTABLE_VERIFY_TRUE}" && test -z "${ENABLE_VTABLE_VERIFY_FAL
as_fn_error "conditional \"ENABLE_VTABLE_VERIFY\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${ENABLE_BIONIC_LIBS_TRUE}" && test -z "${ENABLE_BIONIC_LIBS_FALSE}"; then
+ as_fn_error "conditional \"ENABLE_BIONIC_LIBS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${ENABLE_SYMVERS_TRUE}" && test -z "${ENABLE_SYMVERS_FALSE}"; then
as_fn_error "conditional \"ENABLE_SYMVERS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/gcc-4.9/libstdc++-v3/configure.ac b/gcc-4.9/libstdc++-v3/configure.ac
index 350744aa7..80d46a95f 100644
--- a/gcc-4.9/libstdc++-v3/configure.ac
+++ b/gcc-4.9/libstdc++-v3/configure.ac
@@ -175,6 +175,7 @@ GLIBCXX_ENABLE_EXTERN_TEMPLATE([yes])
GLIBCXX_ENABLE_PYTHON
GLIBCXX_ENABLE_WERROR([yes])
GLIBCXX_ENABLE_VTABLE_VERIFY([no])
+GLIBCXX_ENABLE_BIONIC_LIBS([no])
# Checks for operating systems support that doesn't require linking.
GLIBCXX_CHECK_STDIO_PROTO
diff --git a/gcc-4.9/libstdc++-v3/doc/Makefile.in b/gcc-4.9/libstdc++-v3/doc/Makefile.in
index 04e0d7d97..0b8f78445 100644
--- a/gcc-4.9/libstdc++-v3/doc/Makefile.in
+++ b/gcc-4.9/libstdc++-v3/doc/Makefile.in
@@ -173,6 +173,7 @@ SHELL = @SHELL@
STRIP = @STRIP@
SYMVER_FILE = @SYMVER_FILE@
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
+USE_BIONIC_LIBS = @USE_BIONIC_LIBS@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
VTV_CXXFLAGS = @VTV_CXXFLAGS@
@@ -241,6 +242,7 @@ install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
libtool_VERSION = @libtool_VERSION@
+libtool_version_info_string = @libtool_version_info_string@
localedir = @localedir@
localstatedir = @localstatedir@
lt_host_flags = @lt_host_flags@
diff --git a/gcc-4.9/libstdc++-v3/include/Makefile.in b/gcc-4.9/libstdc++-v3/include/Makefile.in
index e66f0dce0..8d4e79960 100644
--- a/gcc-4.9/libstdc++-v3/include/Makefile.in
+++ b/gcc-4.9/libstdc++-v3/include/Makefile.in
@@ -173,6 +173,7 @@ SHELL = @SHELL@
STRIP = @STRIP@
SYMVER_FILE = @SYMVER_FILE@
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
+USE_BIONIC_LIBS = @USE_BIONIC_LIBS@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
VTV_CXXFLAGS = @VTV_CXXFLAGS@
@@ -235,6 +236,7 @@ install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
libtool_VERSION = @libtool_VERSION@
+libtool_version_info_string = @libtool_version_info_string@
localedir = @localedir@
localstatedir = @localstatedir@
lt_host_flags = @lt_host_flags@
diff --git a/gcc-4.9/libstdc++-v3/include/bits/stl_tree.h b/gcc-4.9/libstdc++-v3/include/bits/stl_tree.h
index 61156dbf7..00ff1ac83 100644
--- a/gcc-4.9/libstdc++-v3/include/bits/stl_tree.h
+++ b/gcc-4.9/libstdc++-v3/include/bits/stl_tree.h
@@ -144,7 +144,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_M_valptr() const
{ return std::__addressof(_M_value_field); }
#else
- __gnu_cxx::__aligned_buffer<_Val> _M_storage;
+ __gnu_cxx::__aligned_membuf<_Val> _M_storage;
_Val*
_M_valptr()
@@ -186,7 +186,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: _M_node() { }
explicit
- _Rb_tree_iterator(_Link_type __x) _GLIBCXX_NOEXCEPT
+ _Rb_tree_iterator(_Base_ptr __x) _GLIBCXX_NOEXCEPT
: _M_node(__x) { }
reference
@@ -258,7 +258,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: _M_node() { }
explicit
- _Rb_tree_const_iterator(_Link_type __x) _GLIBCXX_NOEXCEPT
+ _Rb_tree_const_iterator(_Base_ptr __x) _GLIBCXX_NOEXCEPT
: _M_node(__x) { }
_Rb_tree_const_iterator(const iterator& __it) _GLIBCXX_NOEXCEPT
@@ -266,8 +266,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
iterator
_M_const_cast() const _GLIBCXX_NOEXCEPT
- { return iterator(static_cast<typename iterator::_Link_type>
- (const_cast<typename iterator::_Base_ptr>(_M_node))); }
+ { return iterator(const_cast<typename iterator::_Base_ptr>(_M_node)); }
reference
operator*() const _GLIBCXX_NOEXCEPT
@@ -764,28 +763,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
iterator
begin() _GLIBCXX_NOEXCEPT
- {
- return iterator(static_cast<_Link_type>
- (this->_M_impl._M_header._M_left));
- }
+ { return iterator(this->_M_impl._M_header._M_left); }
const_iterator
begin() const _GLIBCXX_NOEXCEPT
- {
- return const_iterator(static_cast<_Const_Link_type>
- (this->_M_impl._M_header._M_left));
- }
+ { return const_iterator(this->_M_impl._M_header._M_left); }
iterator
end() _GLIBCXX_NOEXCEPT
- { return iterator(static_cast<_Link_type>(&this->_M_impl._M_header)); }
+ { return iterator(&this->_M_impl._M_header); }
const_iterator
end() const _GLIBCXX_NOEXCEPT
- {
- return const_iterator(static_cast<_Const_Link_type>
- (&this->_M_impl._M_header));
- }
+ { return const_iterator(&this->_M_impl._M_header); }
reverse_iterator
rbegin() _GLIBCXX_NOEXCEPT
diff --git a/gcc-4.9/libstdc++-v3/include/c_compatibility/complex.h b/gcc-4.9/libstdc++-v3/include/c_compatibility/complex.h
index b15361ea0..a79b4e4cc 100644
--- a/gcc-4.9/libstdc++-v3/include/c_compatibility/complex.h
+++ b/gcc-4.9/libstdc++-v3/include/c_compatibility/complex.h
@@ -39,7 +39,7 @@
// <complex.h> is defined to provide only what C++11's <ccomplex> does in a
// different namespace.
#ifdef _GLIBCXX_COMPLEX
-# error Cannot include both <complex> and C99's <complex.h>
+# error "Cannot include both <complex> and C99 <complex.h>"
#endif
// Delegate to a system complex.h if we don't provide it as part of the C++
diff --git a/gcc-4.9/libstdc++-v3/include/debug/array b/gcc-4.9/libstdc++-v3/include/debug/array
index cd3eb0a20..637ab51a3 100644
--- a/gcc-4.9/libstdc++-v3/include/debug/array
+++ b/gcc-4.9/libstdc++-v3/include/debug/array
@@ -220,7 +220,7 @@ namespace __debug
const_pointer
data() const noexcept
- { return _AT_Type::_S_ptrr(_M_elems, 0); }
+ { return _AT_Type::_S_ptr(_M_elems, 0); }
};
// Array comparisons.
diff --git a/gcc-4.9/libstdc++-v3/include/ext/aligned_buffer.h b/gcc-4.9/libstdc++-v3/include/ext/aligned_buffer.h
index 861de5be3..99c4575c5 100644
--- a/gcc-4.9/libstdc++-v3/include/ext/aligned_buffer.h
+++ b/gcc-4.9/libstdc++-v3/include/ext/aligned_buffer.h
@@ -39,7 +39,48 @@
namespace __gnu_cxx
{
+ // A utility type containing a POD object that can hold an object of type
+ // _Tp initialized via placement new or allocator_traits::construct.
+ // Intended for use as a data member subobject, use __aligned_buffer for
+ // complete objects.
template<typename _Tp>
+ struct __aligned_membuf
+ {
+ // Target macro ADJUST_FIELD_ALIGN can produce different alignment for
+ // types when used as class members. __aligned_membuf is intended
+ // for use as a class member, so align the buffer as for a class member.
+ struct _Tp2 { _Tp _M_t; };
+
+ alignas(__alignof__(_Tp2::_M_t)) unsigned char _M_storage[sizeof(_Tp)];
+
+ __aligned_membuf() = default;
+
+ // Can be used to avoid value-initialization zeroing _M_storage.
+ __aligned_membuf(std::nullptr_t) { }
+
+ void*
+ _M_addr() noexcept
+ { return static_cast<void*>(&_M_storage); }
+
+ const void*
+ _M_addr() const noexcept
+ { return static_cast<const void*>(&_M_storage); }
+
+ _Tp*
+ _M_ptr() noexcept
+ { return static_cast<_Tp*>(_M_addr()); }
+
+ const _Tp*
+ _M_ptr() const noexcept
+ { return static_cast<const _Tp*>(_M_addr()); }
+ };
+
+ // Similar to __aligned_membuf but aligned for complete objects, not members.
+ // This type is used in <forward_list>, <future>, <bits/shared_ptr_base.h>
+ // and <bits/hashtable_policy.h>, but ideally they would use __aligned_membuf
+ // instead, as it has smaller size for some types on some targets.
+ // This type is still used to avoid an ABI change.
+ template<typename _Tp>
struct __aligned_buffer
: std::aligned_storage<sizeof(_Tp), std::alignment_of<_Tp>::value>
{
diff --git a/gcc-4.9/libstdc++-v3/include/std/array b/gcc-4.9/libstdc++-v3/include/std/array
index b7abeb09b..58557901a 100644
--- a/gcc-4.9/libstdc++-v3/include/std/array
+++ b/gcc-4.9/libstdc++-v3/include/std/array
@@ -50,7 +50,18 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
static constexpr _Tp*
_S_ptr(const _Type& __t, std::size_t __n) noexcept
+#if __google_stl_debug_array
+ {
+ return __n < _Nm
+ ? const_cast<_Tp*>(std::__addressof(__t[__n]))
+ : (std::__throw_out_of_range_fmt(__N("array::_S_ptr: __n "
+ "(which is %zu) >= size() "
+ "(which is %zu)"),
+ __n, _Nm), nullptr);
+ }
+#else
{ return const_cast<_Tp*>(std::__addressof(__t[__n])); }
+#endif
};
template<typename _Tp>
diff --git a/gcc-4.9/libstdc++-v3/include/std/complex b/gcc-4.9/libstdc++-v3/include/std/complex
index 3104b584e..f4fe2f35f 100644
--- a/gcc-4.9/libstdc++-v3/include/std/complex
+++ b/gcc-4.9/libstdc++-v3/include/std/complex
@@ -50,7 +50,7 @@
// <complex.h> is defined to provide only what C++11's <ccomplex> does in a
// different namespace.
#ifdef _GLIBCXX_C99_COMPLEX_H
-#error Cannot include both <complex> and C99's <complex.h>
+#error "Cannot include both <complex> and C99 <complex.h>"
#endif
namespace std _GLIBCXX_VISIBILITY(default)
@@ -147,11 +147,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// DR 387. std::complex over-encapsulated.
_GLIBCXX_ABI_TAG_CXX11
constexpr _Tp
- real() { return _M_real; }
+ real() const { return _M_real; }
_GLIBCXX_ABI_TAG_CXX11
constexpr _Tp
- imag() { return _M_imag; }
+ imag() const { return _M_imag; }
#else
/// Return real part of complex number.
_Tp&
diff --git a/gcc-4.9/libstdc++-v3/libsupc++/Makefile.in b/gcc-4.9/libstdc++-v3/libsupc++/Makefile.in
index b836f7086..eee50fa2b 100644
--- a/gcc-4.9/libstdc++-v3/libsupc++/Makefile.in
+++ b/gcc-4.9/libstdc++-v3/libsupc++/Makefile.in
@@ -93,17 +93,18 @@ LTLIBRARIES = $(noinst_LTLIBRARIES) $(toolexeclib_LTLIBRARIES)
libsupc___la_LIBADD =
am__objects_1 = array_type_info.lo atexit_arm.lo atexit_thread.lo \
bad_alloc.lo bad_array_length.lo bad_array_new.lo bad_cast.lo \
- bad_typeid.lo class_type_info.lo del_op.lo del_opsz.lo del_opnt.lo \
- del_opv.lo del_opvnt.lo dyncast.lo eh_alloc.lo eh_arm.lo \
- eh_aux_runtime.lo eh_call.lo eh_catch.lo eh_exception.lo \
- eh_globals.lo eh_personality.lo eh_ptr.lo eh_term_handler.lo \
- eh_terminate.lo eh_tm.lo eh_throw.lo eh_type.lo \
- eh_unex_handler.lo enum_type_info.lo function_type_info.lo \
- fundamental_type_info.lo guard.lo guard_error.lo hash_bytes.lo \
- nested_exception.lo new_handler.lo new_op.lo new_opnt.lo \
- new_opv.lo new_opvnt.lo pbase_type_info.lo pmem_type_info.lo \
- pointer_type_info.lo pure.lo si_class_type_info.lo tinfo.lo \
- tinfo2.lo vec.lo vmi_class_type_info.lo vterminate.lo
+ bad_typeid.lo class_type_info.lo del_op.lo del_opsz.lo \
+ del_opnt.lo del_opv.lo del_opvnt.lo dyncast.lo eh_alloc.lo \
+ eh_arm.lo eh_aux_runtime.lo eh_call.lo eh_catch.lo \
+ eh_exception.lo eh_globals.lo eh_personality.lo eh_ptr.lo \
+ eh_term_handler.lo eh_terminate.lo eh_tm.lo eh_throw.lo \
+ eh_type.lo eh_unex_handler.lo enum_type_info.lo \
+ function_type_info.lo fundamental_type_info.lo guard.lo \
+ guard_error.lo hash_bytes.lo nested_exception.lo \
+ new_handler.lo new_op.lo new_opnt.lo new_opv.lo new_opvnt.lo \
+ pbase_type_info.lo pmem_type_info.lo pointer_type_info.lo \
+ pure.lo si_class_type_info.lo tinfo.lo tinfo2.lo vec.lo \
+ vmi_class_type_info.lo vterminate.lo
@GLIBCXX_HOSTED_TRUE@am__objects_2 = cp-demangle.lo
@ENABLE_VTABLE_VERIFY_TRUE@am__objects_3 = vtv_stubs.lo
am_libsupc___la_OBJECTS = $(am__objects_1) $(am__objects_2) \
@@ -236,6 +237,7 @@ SHELL = @SHELL@
STRIP = @STRIP@
SYMVER_FILE = @SYMVER_FILE@
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
+USE_BIONIC_LIBS = @USE_BIONIC_LIBS@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
VTV_CXXFLAGS = @VTV_CXXFLAGS@
@@ -298,6 +300,7 @@ install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
libtool_VERSION = @libtool_VERSION@
+libtool_version_info_string = @libtool_version_info_string@
localedir = @localedir@
localstatedir = @localstatedir@
lt_host_flags = @lt_host_flags@
diff --git a/gcc-4.9/libstdc++-v3/po/Makefile.in b/gcc-4.9/libstdc++-v3/po/Makefile.in
index 52f5256a6..97ccb1885 100644
--- a/gcc-4.9/libstdc++-v3/po/Makefile.in
+++ b/gcc-4.9/libstdc++-v3/po/Makefile.in
@@ -173,6 +173,7 @@ SHELL = @SHELL@
STRIP = @STRIP@
SYMVER_FILE = @SYMVER_FILE@
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
+USE_BIONIC_LIBS = @USE_BIONIC_LIBS@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
VTV_CXXFLAGS = @VTV_CXXFLAGS@
@@ -235,6 +236,7 @@ install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
libtool_VERSION = @libtool_VERSION@
+libtool_version_info_string = @libtool_version_info_string@
localedir = @localedir@
localstatedir = @localstatedir@
lt_host_flags = @lt_host_flags@
diff --git a/gcc-4.9/libstdc++-v3/python/Makefile.in b/gcc-4.9/libstdc++-v3/python/Makefile.in
index 21d74a909..6fb77e23b 100644
--- a/gcc-4.9/libstdc++-v3/python/Makefile.in
+++ b/gcc-4.9/libstdc++-v3/python/Makefile.in
@@ -197,6 +197,7 @@ SHELL = @SHELL@
STRIP = @STRIP@
SYMVER_FILE = @SYMVER_FILE@
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
+USE_BIONIC_LIBS = @USE_BIONIC_LIBS@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
VTV_CXXFLAGS = @VTV_CXXFLAGS@
@@ -259,6 +260,7 @@ install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
libtool_VERSION = @libtool_VERSION@
+libtool_version_info_string = @libtool_version_info_string@
localedir = @localedir@
localstatedir = @localstatedir@
lt_host_flags = @lt_host_flags@
diff --git a/gcc-4.9/libstdc++-v3/python/libstdcxx/v6/printers.py b/gcc-4.9/libstdc++-v3/python/libstdcxx/v6/printers.py
index 1fa08fbd5..65b8a9358 100644
--- a/gcc-4.9/libstdc++-v3/python/libstdcxx/v6/printers.py
+++ b/gcc-4.9/libstdc++-v3/python/libstdcxx/v6/printers.py
@@ -443,11 +443,12 @@ class StdRbtreeIteratorPrinter:
def __init__ (self, typename, val):
self.val = val
+ valtype = self.val.type.template_argument(0).strip_typedefs()
+ nodetype = gdb.lookup_type('std::_Rb_tree_node<' + str(valtype) + '>')
+ self.link_type = nodetype.strip_typedefs().pointer()
def to_string (self):
- typename = str(self.val.type.strip_typedefs()) + '::_Link_type'
- nodetype = gdb.lookup_type(typename).strip_typedefs()
- node = self.val.cast(nodetype).dereference()
+ node = self.val['_M_node'].cast(self.link_type).dereference()
return get_value_from_Rb_tree_node(node)
class StdDebugIteratorPrinter:
diff --git a/gcc-4.9/libstdc++-v3/src/Makefile.am b/gcc-4.9/libstdc++-v3/src/Makefile.am
index 7f58ce432..3209ae06f 100644
--- a/gcc-4.9/libstdc++-v3/src/Makefile.am
+++ b/gcc-4.9/libstdc++-v3/src/Makefile.am
@@ -25,7 +25,11 @@ include $(top_srcdir)/fragment.am
SUBDIRS = c++98 c++11
# Cross compiler support.
-toolexeclib_LTLIBRARIES = libstdc++.la
+if ENABLE_BIONIC_LIBS
+ toolexeclib_LTLIBRARIES = libgnustl_shared.la
+else
+ toolexeclib_LTLIBRARIES = libstdc++.la
+endif
vpath % $(top_srcdir)/src/c++98
vpath % $(top_srcdir)/src/c++11
@@ -54,6 +58,25 @@ cxx11_sources = \
compatibility-chrono.cc \
compatibility-condvar.cc
+libgnustl_shared_la_SOURCES = $(cxx98_sources) $(cxx11_sources)
+
+libgnustl_shared_la_LIBADD = \
+ $(GLIBCXX_LIBS) \
+ $(top_builddir)/libsupc++/libsupc++convenience.la \
+ $(top_builddir)/src/c++98/libc++98convenience.la \
+ $(top_builddir)/src/c++11/libc++11convenience.la
+
+libgnustl_shared_la_DEPENDENCIES = \
+ ${version_dep} \
+ $(top_builddir)/libsupc++/libsupc++convenience.la \
+ $(top_builddir)/src/c++98/libc++98convenience.la \
+ $(top_builddir)/src/c++11/libc++11convenience.la
+
+libgnustl_shared_la_LDFLAGS = \
+ ${libtool_version_info_string} ${version_arg} -lm
+
+libgnustl_shared_la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS)
+
libstdc___la_SOURCES = $(cxx98_sources) $(cxx11_sources)
libstdc___la_LIBADD = \
@@ -224,12 +247,12 @@ version_arg = -Wl,-M,libstdc++-symbols.ver-sun
version_dep = libstdc++-symbols.ver-sun
libstdc++-symbols.ver-sun : libstdc++-symbols.ver \
$(toplevel_srcdir)/contrib/make_sunver.pl \
- $(libstdc___la_OBJECTS) $(libstdc___la_LIBADD)
+ $(libgnustl_shared_la_OBJECTS) $(libgnustl_shared_la_LIBADD)
CXXFILT="$(CXXFILT)"; export CXXFILT; \
perl $(toplevel_srcdir)/contrib/make_sunver.pl \
libstdc++-symbols.ver \
- $(libstdc___la_OBJECTS:%.lo=.libs/%.o) \
- `echo $(libstdc___la_LIBADD) | \
+ $(libgnustl_shared_la_OBJECTS:%.lo=.libs/%.o) \
+ `echo $(libgnustl_shared_la_LIBADD) | \
sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \
> $@ || (rm -f $@ ; exit 1)
endif
diff --git a/gcc-4.9/libstdc++-v3/src/Makefile.in b/gcc-4.9/libstdc++-v3/src/Makefile.in
index 8bac916a3..3fa09e068 100644
--- a/gcc-4.9/libstdc++-v3/src/Makefile.in
+++ b/gcc-4.9/libstdc++-v3/src/Makefile.in
@@ -95,15 +95,21 @@ am__objects_2 = compatibility.lo compatibility-debug_list.lo \
am__objects_3 = compatibility-c++0x.lo compatibility-atomic-c++0x.lo \
compatibility-thread-c++0x.lo compatibility-chrono.lo \
compatibility-condvar.lo
+am_libgnustl_shared_la_OBJECTS = $(am__objects_2) $(am__objects_3)
+libgnustl_shared_la_OBJECTS = $(am_libgnustl_shared_la_OBJECTS)
+@ENABLE_BIONIC_LIBS_TRUE@am_libgnustl_shared_la_rpath = -rpath \
+@ENABLE_BIONIC_LIBS_TRUE@ $(toolexeclibdir)
am_libstdc___la_OBJECTS = $(am__objects_2) $(am__objects_3)
libstdc___la_OBJECTS = $(am_libstdc___la_OBJECTS)
+@ENABLE_BIONIC_LIBS_FALSE@am_libstdc___la_rpath = -rpath \
+@ENABLE_BIONIC_LIBS_FALSE@ $(toolexeclibdir)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp =
am__depfiles_maybe =
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
-SOURCES = $(libstdc___la_SOURCES)
+SOURCES = $(libgnustl_shared_la_SOURCES) $(libstdc___la_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
@@ -224,6 +230,7 @@ SHELL = @SHELL@
STRIP = @STRIP@
SYMVER_FILE = @SYMVER_FILE@
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
+USE_BIONIC_LIBS = @USE_BIONIC_LIBS@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
VTV_CXXFLAGS = @VTV_CXXFLAGS@
@@ -341,9 +348,10 @@ WARN_CXXFLAGS = \
# -I/-D flags to pass when compiling.
AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
SUBDIRS = c++98 c++11
+@ENABLE_BIONIC_LIBS_FALSE@toolexeclib_LTLIBRARIES = libstdc++.la
# Cross compiler support.
-toolexeclib_LTLIBRARIES = libgnustl_shared.la
+@ENABLE_BIONIC_LIBS_TRUE@toolexeclib_LTLIBRARIES = libgnustl_shared.la
@GLIBCXX_LDBL_COMPAT_FALSE@ldbl_compat_sources =
@GLIBCXX_LDBL_COMPAT_TRUE@ldbl_compat_sources = compatibility-ldbl.cc
parallel_compat_sources = \
@@ -362,6 +370,23 @@ cxx11_sources = \
compatibility-chrono.cc \
compatibility-condvar.cc
+libgnustl_shared_la_SOURCES = $(cxx98_sources) $(cxx11_sources)
+libgnustl_shared_la_LIBADD = \
+ $(GLIBCXX_LIBS) \
+ $(top_builddir)/libsupc++/libsupc++convenience.la \
+ $(top_builddir)/src/c++98/libc++98convenience.la \
+ $(top_builddir)/src/c++11/libc++11convenience.la
+
+libgnustl_shared_la_DEPENDENCIES = \
+ ${version_dep} \
+ $(top_builddir)/libsupc++/libsupc++convenience.la \
+ $(top_builddir)/src/c++98/libc++98convenience.la \
+ $(top_builddir)/src/c++11/libc++11convenience.la
+
+libgnustl_shared_la_LDFLAGS = \
+ ${libtool_version_info_string} ${version_arg} -lm
+
+libgnustl_shared_la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS)
libstdc___la_SOURCES = $(cxx98_sources) $(cxx11_sources)
libstdc___la_LIBADD = \
$(GLIBCXX_LIBS) \
@@ -551,11 +576,10 @@ clean-toolexeclibLTLIBRARIES:
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
+libgnustl_shared.la: $(libgnustl_shared_la_OBJECTS) $(libgnustl_shared_la_DEPENDENCIES)
+ $(libgnustl_shared_la_LINK) $(am_libgnustl_shared_la_rpath) $(libgnustl_shared_la_OBJECTS) $(libgnustl_shared_la_LIBADD) $(LIBS)
libstdc++.la: $(libstdc___la_OBJECTS) $(libstdc___la_DEPENDENCIES)
- $(libstdc___la_LINK) -rpath $(toolexeclibdir) $(libstdc___la_OBJECTS) $(libstdc___la_LIBADD) $(LIBS)
-
-libgnustl_shared.la: $(libstdc___la_OBJECTS) $(libstdc___la_DEPENDENCIES)
- $(libstdc___la_LINK) -rpath $(toolexeclibdir) $(libstdc___la_OBJECTS) $(libstdc___la_LIBADD) $(LIBS)
+ $(libstdc___la_LINK) $(am_libstdc___la_rpath) $(libstdc___la_OBJECTS) $(libstdc___la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -893,12 +917,12 @@ compatibility-condvar.o: compatibility-condvar.cc
@ENABLE_SYMVERS_TRUE@ rm -f $@.tmp
@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@libstdc++-symbols.ver-sun : libstdc++-symbols.ver \
@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ $(toplevel_srcdir)/contrib/make_sunver.pl \
-@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ $(libstdc___la_OBJECTS) $(libstdc___la_LIBADD)
+@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ $(libgnustl_shared_la_OBJECTS) $(libgnustl_shared_la_LIBADD)
@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ CXXFILT="$(CXXFILT)"; export CXXFILT; \
@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ perl $(toplevel_srcdir)/contrib/make_sunver.pl \
@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ libstdc++-symbols.ver \
-@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ $(libstdc___la_OBJECTS:%.lo=.libs/%.o) \
-@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ `echo $(libstdc___la_LIBADD) | \
+@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ $(libgnustl_shared_la_OBJECTS:%.lo=.libs/%.o) \
+@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ `echo $(libgnustl_shared_la_LIBADD) | \
@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \
@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ > $@ || (rm -f $@ ; exit 1)
@ENABLE_SYMVERS_DARWIN_TRUE@@ENABLE_SYMVERS_TRUE@libstdc++-symbols.explist : libstdc++-symbols.ver \
diff --git a/gcc-4.9/libstdc++-v3/src/c++11/Makefile.in b/gcc-4.9/libstdc++-v3/src/c++11/Makefile.in
index d39096e42..003e7d504 100644
--- a/gcc-4.9/libstdc++-v3/src/c++11/Makefile.in
+++ b/gcc-4.9/libstdc++-v3/src/c++11/Makefile.in
@@ -191,6 +191,7 @@ SHELL = @SHELL@
STRIP = @STRIP@
SYMVER_FILE = @SYMVER_FILE@
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
+USE_BIONIC_LIBS = @USE_BIONIC_LIBS@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
VTV_CXXFLAGS = @VTV_CXXFLAGS@
@@ -253,6 +254,7 @@ install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
libtool_VERSION = @libtool_VERSION@
+libtool_version_info_string = @libtool_version_info_string@
localedir = @localedir@
localstatedir = @localstatedir@
lt_host_flags = @lt_host_flags@
diff --git a/gcc-4.9/libstdc++-v3/src/c++98/Makefile.in b/gcc-4.9/libstdc++-v3/src/c++98/Makefile.in
index cf9cda5f4..456b6ebe0 100644
--- a/gcc-4.9/libstdc++-v3/src/c++98/Makefile.in
+++ b/gcc-4.9/libstdc++-v3/src/c++98/Makefile.in
@@ -206,6 +206,7 @@ SHELL = @SHELL@
STRIP = @STRIP@
SYMVER_FILE = @SYMVER_FILE@
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
+USE_BIONIC_LIBS = @USE_BIONIC_LIBS@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
VTV_CXXFLAGS = @VTV_CXXFLAGS@
@@ -268,6 +269,7 @@ install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
libtool_VERSION = @libtool_VERSION@
+libtool_version_info_string = @libtool_version_info_string@
localedir = @localedir@
localstatedir = @localstatedir@
lt_host_flags = @lt_host_flags@
diff --git a/gcc-4.9/libstdc++-v3/testsuite/23_containers/array/tuple_interface/get_neg.cc b/gcc-4.9/libstdc++-v3/testsuite/23_containers/array/tuple_interface/get_neg.cc
index 979d7f6b5..64ecfc604 100644
--- a/gcc-4.9/libstdc++-v3/testsuite/23_containers/array/tuple_interface/get_neg.cc
+++ b/gcc-4.9/libstdc++-v3/testsuite/23_containers/array/tuple_interface/get_neg.cc
@@ -28,6 +28,6 @@ int n1 = std::get<1>(a);
int n2 = std::get<1>(std::move(a));
int n3 = std::get<1>(ca);
-// { dg-error "static assertion failed" "" { target *-*-* } 274 }
-// { dg-error "static assertion failed" "" { target *-*-* } 283 }
-// { dg-error "static assertion failed" "" { target *-*-* } 291 }
+// { dg-error "static assertion failed" "" { target *-*-* } 285 }
+// { dg-error "static assertion failed" "" { target *-*-* } 294 }
+// { dg-error "static assertion failed" "" { target *-*-* } 302 }
diff --git a/gcc-4.9/libstdc++-v3/testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc b/gcc-4.9/libstdc++-v3/testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc
index f80798c91..0806ac16a 100644
--- a/gcc-4.9/libstdc++-v3/testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc
+++ b/gcc-4.9/libstdc++-v3/testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc
@@ -23,4 +23,4 @@
typedef std::tuple_element<1, std::array<int, 1>>::type type;
-// { dg-error "static assertion failed" "" { target *-*-* } 320 }
+// { dg-error "static assertion failed" "" { target *-*-* } 331 }
diff --git a/gcc-4.9/libstdc++-v3/testsuite/26_numerics/complex/value_operations/constexpr2.cc b/gcc-4.9/libstdc++-v3/testsuite/26_numerics/complex/value_operations/constexpr2.cc
new file mode 100644
index 000000000..9f157d37b
--- /dev/null
+++ b/gcc-4.9/libstdc++-v3/testsuite/26_numerics/complex/value_operations/constexpr2.cc
@@ -0,0 +1,29 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++14" }
+
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include <complex>
+
+int main()
+{
+ constexpr std::complex<int> c{};
+ constexpr auto r __attribute__((unused)) = real(c);
+ constexpr auto i __attribute__((unused)) = imag(c);
+}
+
diff --git a/gcc-4.9/libstdc++-v3/testsuite/Makefile.in b/gcc-4.9/libstdc++-v3/testsuite/Makefile.in
index 7a923f36d..a61a5a9ac 100644
--- a/gcc-4.9/libstdc++-v3/testsuite/Makefile.in
+++ b/gcc-4.9/libstdc++-v3/testsuite/Makefile.in
@@ -173,6 +173,7 @@ SHELL = @SHELL@
STRIP = @STRIP@
SYMVER_FILE = @SYMVER_FILE@
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
+USE_BIONIC_LIBS = @USE_BIONIC_LIBS@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
VTV_CXXFLAGS = @VTV_CXXFLAGS@
@@ -235,6 +236,7 @@ install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
libtool_VERSION = @libtool_VERSION@
+libtool_version_info_string = @libtool_version_info_string@
localedir = @localedir@
localstatedir = @localstatedir@
lt_host_flags = @lt_host_flags@