aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2019-03-13 00:18:37 +0000
committerIain Buclaw <ibuclaw@gcc.gnu.org>2019-03-13 00:18:37 +0000
commit50e021a590c75eae2ad86d3874b29eedf63b9646 (patch)
treeb8c07ef93a2c6aa260999fb2150c398e6dfc36d8
parent1ad43ab9a39f20819ea8d237878ed64adc8f7941 (diff)
downloadgcc-50e021a590c75eae2ad86d3874b29eedf63b9646.zip
gcc-50e021a590c75eae2ad86d3874b29eedf63b9646.tar.gz
gcc-50e021a590c75eae2ad86d3874b29eedf63b9646.tar.bz2
pr88957.d: Move to gdc.dg/ubsan.
gcc/testsuite/ChangeLog: 2019-03-13 Iain Buclaw <ibuclaw@gdcproject.org> * gdc.dg/pr88957.d: Move to gdc.dg/ubsan. * gdc.dg/ubsan/ubsan.exp: New file. * lib/gdc.exp (gdc_include_flags): Remove unused target variable. Explicitly return flags from procedure. From-SVN: r269632
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/gdc.dg/ubsan/pr88957.d (renamed from gcc/testsuite/gdc.dg/pr88957.d)0
-rw-r--r--gcc/testsuite/gdc.dg/ubsan/ubsan.exp32
-rw-r--r--gcc/testsuite/lib/gdc.exp3
4 files changed, 41 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 94144c9..d09651c 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,12 @@
2019-03-13 Iain Buclaw <ibuclaw@gdcproject.org>
+ * gdc.dg/pr88957.d: Move to gdc.dg/ubsan.
+ * gdc.dg/ubsan/ubsan.exp: New file.
+ * lib/gdc.exp (gdc_include_flags): Remove unused target variable.
+ Explicitly return flags from procedure.
+
+2019-03-13 Iain Buclaw <ibuclaw@gdcproject.org>
+
PR d/88957
* gdc.dg/pr88957.d: New test.
* gdc.dg/simd.d: Add new vector tests.
diff --git a/gcc/testsuite/gdc.dg/pr88957.d b/gcc/testsuite/gdc.dg/ubsan/pr88957.d
index e6366d4..e6366d4 100644
--- a/gcc/testsuite/gdc.dg/pr88957.d
+++ b/gcc/testsuite/gdc.dg/ubsan/pr88957.d
diff --git a/gcc/testsuite/gdc.dg/ubsan/ubsan.exp b/gcc/testsuite/gdc.dg/ubsan/ubsan.exp
new file mode 100644
index 0000000..a2e2da0
--- /dev/null
+++ b/gcc/testsuite/gdc.dg/ubsan/ubsan.exp
@@ -0,0 +1,32 @@
+# Copyright (C) 2019 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/>.
+
+# Load support procs.
+load_lib gdc-dg.exp
+load_lib ubsan-dg.exp
+
+# Initialize `dg'.
+dg-init
+ubsan_init
+
+# Main loop.
+if [check_effective_target_fsanitize_undefined] {
+ gdc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.d]] "" ""
+}
+
+# All done.
+ubsan_finish
+dg-finish
diff --git a/gcc/testsuite/lib/gdc.exp b/gcc/testsuite/lib/gdc.exp
index f5957c3..e09f5ee 100644
--- a/gcc/testsuite/lib/gdc.exp
+++ b/gcc/testsuite/lib/gdc.exp
@@ -78,7 +78,6 @@ proc gdc_include_flags { paths } {
}
set gccpath ${paths}
- set target [file tail [file normalize ${paths}]]
if { $gccpath != "" } {
if [file exists "${gccpath}/libphobos/libdruntime"] {
@@ -95,6 +94,8 @@ proc gdc_include_flags { paths } {
set idx [lsearch $cxxflags "-nostdinc++"]
append flags [lreplace $cxxflags $idx $idx]
}
+
+ return "$flags"
}
#