From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- gcc/testsuite/gcc.dg/guality/guality.exp | 53 ++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/guality/guality.exp (limited to 'gcc/testsuite/gcc.dg/guality/guality.exp') diff --git a/gcc/testsuite/gcc.dg/guality/guality.exp b/gcc/testsuite/gcc.dg/guality/guality.exp new file mode 100644 index 000000000..49e2ac5a5 --- /dev/null +++ b/gcc/testsuite/gcc.dg/guality/guality.exp @@ -0,0 +1,53 @@ +# This harness is for tests that should be run at all optimisation levels. + +load_lib gcc-dg.exp +load_lib gcc-gdb-test.exp + +# Disable on darwin until radr://7264615 is resolved. +if { [istarget *-*-darwin*] } { + return +} + +proc check_guality {args} { + set result [eval check_compile guality_check executable $args "-g -O0"] + set lines [lindex $result 0] + set output [lindex $result 1] + set ret 0 + if {[string match "" $lines]} { + set execout [gcc_load "./$output"] + set ret [string match "*1 PASS, 0 FAIL, 0 UNRESOLVED*" $execout] + } + remote_file build delete $output + return $ret +} + +dg-init + +global GDB +if ![info exists ::env(GUALITY_GDB_NAME)] { + if [info exists GDB] { + set guality_gdb_name "$GDB" + } else { + set guality_gdb_name "[transform gdb]" + } + setenv GUALITY_GDB_NAME "$guality_gdb_name" +} + +if {[check_guality " + #include \"$srcdir/$subdir/guality.h\" + volatile long int varl = 6; + int main (int argc, char *argv\[\]) + { + GUALCHKVAL (varl); + return 0; + } +"]} { + gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] "" + gcc-dg-runtest [lsort [glob $srcdir/c-c++-common/guality/*.c]] "-Wc++-compat" +} + +if [info exists guality_gdb_name] { + unsetenv GUALITY_GDB_NAME +} + +dg-finish -- cgit v1.2.3