aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2014-04-14 00:25:55 -0400
committerJason Merrill <jason@gcc.gnu.org>2014-04-14 00:25:55 -0400
commitb82b06487ef2331db4610d74a2d2816b8bb0ddd2 (patch)
treed157c8c92ff1eedeaa33f92bd477482a1cb4eb70 /gcc
parent9dc85053e1831cb0bb2320b67d7731221cf44869 (diff)
downloadgcc-b82b06487ef2331db4610d74a2d2816b8bb0ddd2.zip
gcc-b82b06487ef2331db4610d74a2d2816b8bb0ddd2.tar.gz
gcc-b82b06487ef2331db4610d74a2d2816b8bb0ddd2.tar.bz2
revert: gcc-dg.exp (dg-build-dso): New.
Revert: * lib/gcc-dg.exp (dg-build-dso): New. (gcc-dg-test-1): Handle dg-do-what "dso". From-SVN: r209353
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/g++.dg/dso/dlclose1-dso.cc9
-rw-r--r--gcc/testsuite/g++.dg/dso/dlclose1.C30
-rw-r--r--gcc/testsuite/lib/gcc-dg.exp26
4 files changed, 6 insertions, 65 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 666ba05..cb235b3 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2014-04-14 Jason Merrill <jason@redhat.com>
+
+ Revert:
+ * lib/gcc-dg.exp (dg-build-dso): New.
+ (gcc-dg-test-1): Handle dg-do-what "dso".
+
2014-04-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/60717
diff --git a/gcc/testsuite/g++.dg/dso/dlclose1-dso.cc b/gcc/testsuite/g++.dg/dso/dlclose1-dso.cc
deleted file mode 100644
index cede483..0000000
--- a/gcc/testsuite/g++.dg/dso/dlclose1-dso.cc
+++ /dev/null
@@ -1,9 +0,0 @@
-// { dg-options "-fno-gnu-unique" }
-
-// A static variable in an inline function uses STB_GNU_UNIQUE normally.
-inline int foo() { static int i; return ++i; }
-
-extern "C" int fn()
-{
- return foo();
-}
diff --git a/gcc/testsuite/g++.dg/dso/dlclose1.C b/gcc/testsuite/g++.dg/dso/dlclose1.C
deleted file mode 100644
index 80f270c..0000000
--- a/gcc/testsuite/g++.dg/dso/dlclose1.C
+++ /dev/null
@@ -1,30 +0,0 @@
-// PR c++/60731
-// { dg-do run { target { dlopen && disable-for-4.9 } } }
-// { dg-add-options dlopen }
-// { dg-build-dso "dlclose1-dso.cc" }
-
-#include <dlfcn.h>
-extern "C" void abort();
-extern "C" int printf (const char *, ...);
-
-// Open and close the DSO for each call so that statics are reinitialized.
-int call()
-{
- void *h = dlopen ("./dlclose1-dso.so", RTLD_NOW);
- if (!h) { printf ("dlopen failed: %s\n", dlerror()); abort(); }
- int (*fn)() = (int(*)())dlsym (h, "fn");
- if (!fn) { printf ("dlsym failed: %s\n", dlerror()); abort(); }
- int r = fn();
- dlclose (h);
- return r;
-}
-
-int main() {
- int i = call();
- int j = call();
- if (i != j)
- {
- printf ("mismatch: %d != %d\n", i, j);
- abort();
- }
-}
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index 21ef0c2..a758d47 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -144,11 +144,6 @@ proc gcc-dg-test-1 { target_compile prog do_what extra_tool_flags } {
# The following line is needed for targets like the i960 where
# the default output file is b.out. Sigh.
}
- "dso" {
- set compile_type "executable"
- set output_file "[file rootname [file tail $prog]].so"
- set extra_tool_flags "$extra_tool_flags -fPIC -shared"
- }
"repo" {
set compile_type "object"
set output_file "[file rootname [file tail $prog]].o"
@@ -214,27 +209,6 @@ proc gcc-dg-test { prog do_what extra_tool_flags } {
return [gcc-dg-test-1 gcc_target_compile $prog $do_what $extra_tool_flags]
}
-# Usage: { dg-build-dso "file.ext" }
-# Compiles the specified file into "file.so" (treating that compilation as
-# a separate test) for use by the main test, and schedules it for removal
-# when the main test is complete. The DSO source file should not use "dg-do".
-# This relies on a couple of local variable names in dg-test.
-
-proc dg-build-dso { args } {
- global dg-do-what-default
- upvar prog main_file
- upvar dg-final-code final-code
-
- set file [lindex $args 1]
- set dir "[file dirname $main_file]"
- set dg-do-what-default dso
- dg-test -keep-output $dir/$file "" ""
- set dg-do-what-default compile
-
- set output_file "[file rootname [file tail $file]].so"
- append final-code "remove-build-file $output_file"
-}
-
proc gcc-dg-prune { system text } {
global additional_prunes