aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc
diff options
context:
space:
mode:
authorCaroline Tice <cmtice@google.com>2016-02-10 22:40:41 (GMT)
committerCaroline Tice <cmtice@google.com>2016-02-26 16:25:55 (GMT)
commit817a788f9eb01eff367191401d48f2aaa8d4f428 (patch)
tree637f745404b37fbf3fcff629227d7d542725e5fe /gcc-4.9/gcc
parenta4ca82cac69c3147143d7b4b4d7cdeb5e02f20ef (diff)
downloadtoolchain_gcc-817a788f9eb01eff367191401d48f2aaa8d4f428.zip
toolchain_gcc-817a788f9eb01eff367191401d48f2aaa8d4f428.tar.gz
toolchain_gcc-817a788f9eb01eff367191401d48f2aaa8d4f428.tar.bz2
Unify ChromeOS and Android versions of GCC.
This CL updates Android's GCC to match ChromeOS's GCC (with appropriate patches applied in both places to make sure no cherry-picked changes are lost). Change-Id: I390140c449b0e5df9ee78a06268319c8c510302f
Diffstat (limited to 'gcc-4.9/gcc')
-rw-r--r--gcc-4.9/gcc/BASE-VER2
-rw-r--r--gcc-4.9/gcc/ChangeLog65
-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/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/linux-grte.h0
-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/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
-rwxr-xr-xgcc-4.9/gcc/configure18
-rw-r--r--gcc-4.9/gcc/configure.ac10
-rw-r--r--gcc-4.9/gcc/cp/cp-lang.c4
-rw-r--r--gcc-4.9/gcc/cp/cp-tree.h3
-rw-r--r--gcc-4.9/gcc/cp/decl2.c5
-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/final.c2
-rw-r--r--gcc-4.9/gcc/gcc.c14
-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/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.def3
-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/ChangeLog31
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp1y/testinc/phoobhar.h (renamed from gcc-4.9/gcc/config/rs6000/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/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.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.h2
-rw-r--r--gcc-4.9/gcc/tree-profile.c14
-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.c6
62 files changed, 1096 insertions, 221 deletions
diff --git a/gcc-4.9/gcc/BASE-VER b/gcc-4.9/gcc/BASE-VER
index 86a9588..d792740 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 c8a6ad1..dee0fa3 100644
--- a/gcc-4.9/gcc/ChangeLog
+++ b/gcc-4.9/gcc/ChangeLog
@@ -1,3 +1,10 @@
+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-03-26 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport of r214242, r214254, and bug fix patches from mainline
@@ -656,12 +663,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 +682,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 +701,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 +852,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 +918,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 +1251,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 +1531,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 +3436,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 0309b37..568dec4 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 5a76ba3..e34e772 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 41f8122..ec1785d 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/common.opt b/gcc-4.9/gcc/common.opt
index d4e989b..3137ec4 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 925658a..c0fdd2c 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 7883eb3..83c51ce 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 67271b2..99611c5 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 f42ea1a..7b77c42 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/linux-grte.h b/gcc-4.9/gcc/config/arm/linux-grte.h
deleted file mode 100644
index e69de29..0000000
--- a/gcc-4.9/gcc/config/arm/linux-grte.h
+++ /dev/null
diff --git a/gcc-4.9/gcc/config/arm/thumb2.md b/gcc-4.9/gcc/config/arm/thumb2.md
index d84938f..1411a68 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 9f57c6e..614b8db 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/linux-grte.h b/gcc-4.9/gcc/config/linux-grte.h
deleted file mode 100644
index e69de29..0000000
--- 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 8597558..524c6d5 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 f24c320..fe2eaa1 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/configure b/gcc-4.9/gcc/configure
index 746c375..436278b 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
@@ -27945,6 +27948,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 a871103..6893dfc 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/cp-lang.c b/gcc-4.9/gcc/cp/cp-lang.c
index 22f8e4b..bd2c2b7 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 ac60ad5..793c848 100644
--- a/gcc-4.9/gcc/cp/cp-tree.h
+++ b/gcc-4.9/gcc/cp/cp-tree.h
@@ -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 */
@@ -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);
diff --git a/gcc-4.9/gcc/cp/decl2.c b/gcc-4.9/gcc/cp/decl2.c
index 074108e..ff0d304 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/parser.c b/gcc-4.9/gcc/cp/parser.c
index 29b590e..aadb36e 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 f94ae17..678674a 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 b5d9c4b..698ecd6 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/final.c b/gcc-4.9/gcc/final.c
index 3bf3fdb..c7efcc5 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 e187cd1..cc71782 100644
--- a/gcc-4.9/gcc/gcc.c
+++ b/gcc-4.9/gcc/gcc.c
@@ -751,6 +751,19 @@ proper position among the other output files. */
%{fvtable-verify=preinit: -lvtv -u_vtable_map_vars_start -u_vtable_map_vars_end}}"
#endif
+#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
doesn't handle -static. */
@@ -773,6 +786,7 @@ 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)}\
diff --git a/gcc-4.9/gcc/incpath.c b/gcc-4.9/gcc/incpath.c
index ddd856c..c25a376 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 b2f58d1..22d6135 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 43c5146..c9e1f49 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 3cc155f..c084b10 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 f24bcdd..e89a58b 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/opts-global.c b/gcc-4.9/gcc/opts-global.c
index 425c3c0..e837660 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 ac58941..e999ed0 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 790be53..7caed79 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 4d2ea6d..b88bcb2 100644
--- a/gcc-4.9/gcc/passes.def
+++ b/gcc-4.9/gcc/passes.def
@@ -195,6 +195,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 +287,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 +310,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 0000000..8f2f3fd
--- /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 b1e6f04..ad18d36 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 2d76bdc..509b097 100644
--- a/gcc-4.9/gcc/testsuite/ChangeLog
+++ b/gcc-4.9/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2016-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR target/69403
+ * gcc.c-torture/execute/pr69403.c: New test.
+
2015-03-26 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Backport r214254 and related tests from mainline
@@ -113,6 +118,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 +341,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 +774,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 +888,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 +5479,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/rs6000/linux-grte.h b/gcc-4.9/gcc/testsuite/g++.dg/cpp1y/testinc/phoobhar.h
index e69de29..e69de29 100644
--- a/gcc-4.9/gcc/config/rs6000/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 0000000..1f024de
--- /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 0000000..d1ea788
--- /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 0000000..98f7408
--- /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 0000000..9708ad9
--- /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 0000000..2550136
--- /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 0000000..f00afb0
--- /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 0000000..097d366
--- /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/sancov/asan.c b/gcc-4.9/gcc/testsuite/gcc.dg/sancov/asan.c
new file mode 100644
index 0000000..64a36b5
--- /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 0000000..af69b2d
--- /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 0000000..e0ae5b4
--- /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 0000000..ac2ec78
--- /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.target/aarch64/madd_after_asm_1.c b/gcc-4.9/gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c
index 321d8f0..523941d 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 c6cae4d..cfb4979 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 20763b4..5bf90bf 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 71dd0a2..da32337 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 bf889aa..db81e17 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 21e07bc..15f39c5 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 5f00e64..3d81a71 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);
diff --git a/gcc-4.9/gcc/tree-profile.c b/gcc-4.9/gcc/tree-profile.c
index 6e1d643..9504da4 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-vect-data-refs.c b/gcc-4.9/gcc/tree-vect-data-refs.c
index c3e423a..7426808 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 7d53661..07a1bb5 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 09ca48e..c34ed26 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.c b/gcc-4.9/gcc/tree.c
index 3b1ff76..3b88a4e 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)