aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2021-02-18 07:33:12 -0800
committerNathan Sidwell <nathan@acm.org>2021-02-18 12:39:42 -0800
commit1021222ee4d291ccb4f49cd0ae3393c83d8ff5d0 (patch)
tree8e742cb93523f4f3dce2181afb4047ebdbb604fa
parenta796f8a43a45e04d395a599924bdad77c9809e8f (diff)
downloadgcc-1021222ee4d291ccb4f49cd0ae3393c83d8ff5d0.zip
gcc-1021222ee4d291ccb4f49cd0ae3393c83d8ff5d0.tar.gz
gcc-1021222ee4d291ccb4f49cd0ae3393c83d8ff5d0.tar.bz2
c++: Remove obsolete dg-module-headers [PR 99023]
PR99023's testcase is highlighting some missing functionality of the modules test harness. I did have some partial support, but it's only use in one place for a now-obsolete test. This patch expunges that support so I can add better functionality now I understand better what is necessary. PR c++/99023 gcc/testsuite/ * g++.dg/modules/modules.exp: Remove dg-module-headers support * g++.dg/modules/alias-2_a.H: Delete. * g++.dg/modules/sys/alias-2_a.H: Delete.
-rw-r--r--gcc/testsuite/g++.dg/modules/alias-2_a.H9
-rw-r--r--gcc/testsuite/g++.dg/modules/modules.exp44
-rw-r--r--gcc/testsuite/g++.dg/modules/sys/alias-2_a.H9
3 files changed, 0 insertions, 62 deletions
diff --git a/gcc/testsuite/g++.dg/modules/alias-2_a.H b/gcc/testsuite/g++.dg/modules/alias-2_a.H
deleted file mode 100644
index 1befe85..0000000
--- a/gcc/testsuite/g++.dg/modules/alias-2_a.H
+++ /dev/null
@@ -1,9 +0,0 @@
-// { dg-additional-options "-fmodule-header -isystem [srcdir]/sys" }
-// { dg-module-cmi {} }
-// { dg-module-headers test sys/alias-2_a.H }
-#ifndef ALIAS_2_A
-#define ALIAS_2_A
-
-int frob ();
-
-#endif
diff --git a/gcc/testsuite/g++.dg/modules/modules.exp b/gcc/testsuite/g++.dg/modules/modules.exp
index 28d627d..c17120f 100644
--- a/gcc/testsuite/g++.dg/modules/modules.exp
+++ b/gcc/testsuite/g++.dg/modules/modules.exp
@@ -41,7 +41,6 @@ dg-init
global module_do
global module_cmis
-global module_headers
set DEFAULT_REPO "gcm.cache"
@@ -132,39 +131,6 @@ proc module_cmi_p { src ifs } {
return $res
}
-# Append required header unit names to module_headers var
-proc dg-module-headers { args } {
- if { [llength $args] != 3 } {
- error "[lindex $args 0]: wrong number of arguments"
- return
- }
-}
-
-proc do_module_headers { srcdir subdir std flags} {
- global module_headers
- foreach header $module_headers {
- set kind [lindex $header 0]
- set hdr [lindex $header 1]
- verbose "Header $hdr $std" 1
- switch $kind {
- test {
- global module_cmis
- set module_cmis {}
- dg-test -keep-output $srcdir/$subdir/$hdr "$std" $flags
- global mod_files
- lappend mod_files [module_cmi_p $subdir/$hdr $module_cmis]
- }
- system -
- user {
- # FIXME
- }
- default {
- error "$kind unknown header"
- }
- }
- }
-}
-
# link and maybe run a set of object files
# dg-module-do WHAT WHEN
proc dg-module-do { args } {
@@ -277,8 +243,6 @@ proc srcdir {} {
proc module-init { src } {
set tmp [dg-get-options $src]
set option_list {}
- global module_headers
- set module_headers {}
set have_std 0
set std_prefix "-std=c++"
@@ -295,12 +259,6 @@ proc module-init { src } {
set have_std 1
}
}
- "dg-module-headers" {
- set kind [lindex $op 2]
- foreach header [lindex $op 3] {
- lappend module_headers [list $kind $header]
- }
- }
}
}
@@ -324,7 +282,6 @@ foreach test [prune [lsort [find $srcdir/$subdir {*.[CH]}]] \
set std_list [module-init $test]
foreach std $std_list {
- do_module_headers $srcdir $subdir $std $DEFAULT_MODFLAGS
set module_cmis {}
verbose "Testing $nshort $std" 1
dg-test $test "$std" $DEFAULT_MODFLAGS
@@ -347,7 +304,6 @@ foreach src [lsort [find $srcdir/$subdir {*_a.[CH}]] {
global module_do
set module_do {"compile" "P"}
set asm_list {}
- do_module_headers $srcdir $subdir $std $DEFAULT_MODFLAGS
foreach test $tests {
if { [lindex $module_do 1] != "N" } {
set module_cmis {}
diff --git a/gcc/testsuite/g++.dg/modules/sys/alias-2_a.H b/gcc/testsuite/g++.dg/modules/sys/alias-2_a.H
deleted file mode 100644
index 5a05808..0000000
--- a/gcc/testsuite/g++.dg/modules/sys/alias-2_a.H
+++ /dev/null
@@ -1,9 +0,0 @@
-// { dg-additional-options "-fmodule-header -isystem [srcdir]/sys" }
-// { dg-module-cmi {} }
-
-#ifndef ALIAS_2_A_SYS
-#define ALIAS_2_A_SYS
-
-int frob (int);
-
-#endif