aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/lib
diff options
context:
space:
mode:
authorBen Cheng <bccheng@google.com>2014-04-22 13:33:12 -0700
committerBen Cheng <bccheng@google.com>2014-04-22 13:33:12 -0700
commite3cc64dec20832769406aa38cde83c7dd4194bf4 (patch)
treeef8e39be37cfe0cb69d850043b7924389ff17164 /gcc-4.9/gcc/testsuite/lib
parentf33c7b3122b1d7950efa88067c9a156229ba647b (diff)
downloadtoolchain_gcc-e3cc64dec20832769406aa38cde83c7dd4194bf4.tar.gz
toolchain_gcc-e3cc64dec20832769406aa38cde83c7dd4194bf4.tar.bz2
toolchain_gcc-e3cc64dec20832769406aa38cde83c7dd4194bf4.zip
[4.9] GCC 4.9.0 official release refresh
Change-Id: Ic99a7da8b44b789a48aeec93b33e93944d6e6767
Diffstat (limited to 'gcc-4.9/gcc/testsuite/lib')
-rw-r--r--gcc-4.9/gcc/testsuite/lib/cilk-plus-dg.exp104
-rw-r--r--gcc-4.9/gcc/testsuite/lib/gcc-dg.exp1
-rw-r--r--gcc-4.9/gcc/testsuite/lib/prune.exp2
-rw-r--r--gcc-4.9/gcc/testsuite/lib/target-supports.exp32
4 files changed, 137 insertions, 2 deletions
diff --git a/gcc-4.9/gcc/testsuite/lib/cilk-plus-dg.exp b/gcc-4.9/gcc/testsuite/lib/cilk-plus-dg.exp
new file mode 100644
index 000000000..bfb4b71de
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/lib/cilk-plus-dg.exp
@@ -0,0 +1,104 @@
+# Copyright (C) 2014 Free Software Foundation, Inc.
+
+# This program 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 of the License, or
+# (at your option) any later version.
+#
+# This program 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/>.
+
+#
+# cilkplus_link_flags -- compute library path and flags to find libcilkrts.
+# (originally from g++.exp)
+#
+
+proc cilkplus_link_flags { paths } {
+ global srcdir
+ global ld_library_path
+ global shlib_ext
+
+ set gccpath ${paths}
+ set flags ""
+
+ set shlib_ext [get_shlib_extension]
+
+ if { $gccpath != "" } {
+ if { [file exists "${gccpath}/libcilkrts/.libs/libcilkrts.a"]
+ || [file exists "${gccpath}/libcilkrts/.libs/libcilkrts.${shlib_ext}"] } {
+ append flags " -B${gccpath}/libcilkrts/ "
+ append flags " -L${gccpath}/libcilkrts/.libs"
+ append ld_library_path ":${gccpath}/libcilkrts/.libs"
+ }
+ } else {
+ global tool_root_dir
+
+ set libcilkrts [lookfor_file ${tool_root_dir} libcilkrts]
+ if { $libcilkrts != "" } {
+ append flags "-L${libcilkrts} "
+ append ld_library_path ":${libcilkrts}"
+ }
+ }
+
+ set_ld_library_path_env_vars
+
+ return "$flags"
+}
+
+#
+# cilkplus_init -- called at the start of each subdir of tests
+#
+
+proc cilkplus_init { args } {
+ global TEST_ALWAYS_FLAGS
+ global ALWAYS_CXXFLAGS
+ global TOOL_OPTIONS
+ global cilkplus_saved_TEST_ALWAYS_FLAGS
+
+ set link_flags ""
+ if ![is_remote host] {
+ if [info exists TOOL_OPTIONS] {
+ set link_flags "[cilkplus_link_flags [get_multilibs ${TOOL_OPTIONS}]]"
+ } else {
+ set link_flags "[cilkplus_link_flags [get_multilibs]]"
+ }
+ }
+
+ if [info exists TEST_ALWAYS_FLAGS] {
+ set cilkplus_saved_TEST_ALWAYS_FLAGS $TEST_ALWAYS_FLAGS
+ }
+ if [info exists ALWAYS_CXXFLAGS] {
+ set ALWAYS_CXXFLAGS [concat "{ldflags=$link_flags}" $ALWAYS_CXXFLAGS]
+ } else {
+ if [info exists TEST_ALWAYS_FLAGS] {
+ set TEST_ALWAYS_FLAGS "$link_flags $TEST_ALWAYS_FLAGS"
+ } else {
+ set TEST_ALWAYS_FLAGS "$link_flags"
+ }
+ }
+ if { $link_flags != "" } {
+ return 1
+ }
+ return 0
+}
+
+#
+# cilkplus_finish -- called at the end of each subdir of tests
+#
+
+proc cilkplus_finish { args } {
+ global TEST_ALWAYS_FLAGS
+ global cilkplus_saved_TEST_ALWAYS_FLAGS
+
+ if [info exists cilkplus_saved_TEST_ALWAYS_FLAGS] {
+ set TEST_ALWAYS_FLAGS $cilkplus_saved_TEST_ALWAYS_FLAGS
+ } else {
+ unset TEST_ALWAYS_FLAGS
+ }
+}
diff --git a/gcc-4.9/gcc/testsuite/lib/gcc-dg.exp b/gcc-4.9/gcc/testsuite/lib/gcc-dg.exp
index f9d52bcf6..a758d4740 100644
--- a/gcc-4.9/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc-4.9/gcc/testsuite/lib/gcc-dg.exp
@@ -181,6 +181,7 @@ proc gcc-dg-test-1 { target_compile prog do_what extra_tool_flags } {
lappend options "additional_flags=$extra_tool_flags"
}
+ verbose "$target_compile $prog $output_file $compile_type $options" 4
set comp_output [$target_compile "$prog" "$output_file" "$compile_type" $options]
# Look for an internal compiler error, which sometimes masks the fact
diff --git a/gcc-4.9/gcc/testsuite/lib/prune.exp b/gcc-4.9/gcc/testsuite/lib/prune.exp
index 72ecde770..679d894e2 100644
--- a/gcc-4.9/gcc/testsuite/lib/prune.exp
+++ b/gcc-4.9/gcc/testsuite/lib/prune.exp
@@ -59,7 +59,7 @@ proc prune_gcc_output { text } {
# Ignore harmless warnings from Xcode 3.2.x.
regsub -all "(^|\n)\[^\n\]*ld: warning: can't add line info to anonymous symbol\[^\n\]*" $text "" text
- regsub -all "(^|\n)\[^\n\]*warning: DWARFDebugInfoEntry::AppendDependants\[^\n\]*AT_\[^\n\]*_bound\[^\n\]*FORM_ref4\[^\n\]*" $text "" text
+ regsub -all "(^|\n)\[^\n\]*warning: DWARFDebugInfoEntry::AppendDependants\[^\n\]*AT_\[^\n\]*FORM_ref4\[^\n\]*" $text "" text
regsub -all "(^|\n)\[^\n\]*warning:\[^\n\]*TAG_variable: AT_location\[^\n\]*didn't have valid function low pc\[^\n\]*" $text "" text
# Ignore harmless warnings from Xcode 4.0.
diff --git a/gcc-4.9/gcc/testsuite/lib/target-supports.exp b/gcc-4.9/gcc/testsuite/lib/target-supports.exp
index bee847133..57b10d0a8 100644
--- a/gcc-4.9/gcc/testsuite/lib/target-supports.exp
+++ b/gcc-4.9/gcc/testsuite/lib/target-supports.exp
@@ -746,7 +746,14 @@ proc check_effective_target_mmap {} {
# Return 1 if the target supports dlopen, 0 otherwise.
proc check_effective_target_dlopen {} {
- return [check_function_available "dlopen"]
+ return [check_no_compiler_messages dlopen executable {
+ #include <dlfcn.h>
+ int main(void) { dlopen ("dummy.so", RTLD_NOW); }
+ } [add_options_for_dlopen ""]]
+}
+
+proc add_options_for_dlopen { flags } {
+ return "$flags -ldl"
}
# Return 1 if the target supports clone, 0 otherwise.
@@ -3732,6 +3739,28 @@ proc check_effective_target_vect_widen_mult_hi_to_si_pattern { } {
}
# Return 1 if the target plus current options supports a vector
+# widening multiplication of *int* args into *long* result, 0 otherwise.
+#
+# This won't change for different subtargets so cache the result.
+
+proc check_effective_target_vect_widen_mult_si_to_di_pattern { } {
+ global et_vect_widen_mult_si_to_di_pattern
+
+ if [info exists et_vect_widen_mult_si_to_di_pattern_saved] {
+ verbose "check_effective_target_vect_widen_mult_si_to_di_pattern: using cached result" 2
+ } else {
+ set et_vect_widen_mult_si_to_di_pattern_saved 0
+ if {[istarget ia64-*-*]
+ || [istarget i?86-*-*]
+ || [istarget x86_64-*-*] } {
+ set et_vect_widen_mult_si_to_di_pattern_saved 1
+ }
+ }
+ verbose "check_effective_target_vect_widen_mult_si_to_di_pattern: returning $et_vect_widen_mult_si_to_di_pattern_saved" 2
+ return $et_vect_widen_mult_si_to_di_pattern_saved
+}
+
+# Return 1 if the target plus current options supports a vector
# widening shift, 0 otherwise.
#
# This won't change for different subtargets so cache the result.
@@ -5712,6 +5741,7 @@ proc check_effective_target_logical_op_short_circuit {} {
|| [istarget arc*-*-*]
|| [istarget avr*-*-*]
|| [istarget crisv32-*-*] || [istarget cris-*-*]
+ || [istarget s390*-*-*]
|| [check_effective_target_arm_cortex_m] } {
return 1
}