diff mbox series

c++: Remove obsolete dg-module-headers [PR 99023]

Message ID 1e0e9609-5425-8308-5d78-5823bb7f307e@acm.org
State New
Headers show
Series c++: Remove obsolete dg-module-headers [PR 99023] | expand

Commit Message

Nathan Sidwell Feb. 18, 2021, 8:39 p.m. UTC
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/
         * modules.exp: Remove dg-module-headers support
         * alias-2_a.H: Delete.
         * sys/alias-2_a.H: Delete.
diff mbox series

Patch

diff --git c/gcc/testsuite/g++.dg/modules/alias-2_a.H w/gcc/testsuite/g++.dg/modules/alias-2_a.H
deleted file mode 100644
index 1befe85cf49..00000000000
--- c/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 c/gcc/testsuite/g++.dg/modules/modules.exp w/gcc/testsuite/g++.dg/modules/modules.exp
index 28d627dcb86..c17120f2c00 100644
--- c/gcc/testsuite/g++.dg/modules/modules.exp
+++ w/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 c/gcc/testsuite/g++.dg/modules/sys/alias-2_a.H w/gcc/testsuite/g++.dg/modules/sys/alias-2_a.H
deleted file mode 100644
index 5a058089725..00000000000
--- c/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