[COMMITTED] a68: fix handling of algol68_module_objects
Jose E. Marchesi
jemarch@gnu.org
Thu Nov 27 10:34:32 GMT 2025
---
.../algol68/execute/modules/execute.exp | 2 --
gcc/testsuite/lib/algol68-torture.exp | 17 ++++++++++-------
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/gcc/testsuite/algol68/execute/modules/execute.exp b/gcc/testsuite/algol68/execute/modules/execute.exp
index 0067fa9d16f..cf61857aac1 100644
--- a/gcc/testsuite/algol68/execute/modules/execute.exp
+++ b/gcc/testsuite/algol68/execute/modules/execute.exp
@@ -37,8 +37,6 @@ foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/program-*.a68]] {
}
algol68-torture-execute $testcase
set algol68_compile_args ""
- global module_objects
- set module_objects ""
}
torture-finish
diff --git a/gcc/testsuite/lib/algol68-torture.exp b/gcc/testsuite/lib/algol68-torture.exp
index 8425889edac..6da563687d4 100644
--- a/gcc/testsuite/lib/algol68-torture.exp
+++ b/gcc/testsuite/lib/algol68-torture.exp
@@ -55,14 +55,12 @@ set BUILT_MODULES_DIR ""
# specify additional options to be passed to ga68 when it compiles the
# modules.
-set module_objects ""
-
proc dg-modules { args } {
global objdir
global srcdir
global subdir
- global module_objects
+ global algol68_module_objects
if { [llength $args] != 2 && [llength $args] != 3 } {
error "[lindex $args 0]: invalid arguments"
@@ -80,7 +78,7 @@ proc dg-modules { args } {
# Compile the module
set comp_output [algol68_target_compile $srcdir/$subdir/$srcfile \
$objdir/$objfile object $module_options]
- lappend module_objects $objfile
+ lappend algol68_module_objects $objfile
}
}
@@ -187,8 +185,8 @@ proc algol68-torture-execute { src } {
global compiler_conditional_xfail_data
global TORTURE_OPTIONS
global BUILT_MODULES_DIR
- global module_objects
global errorCode errorInfo
+ global algol68_module_objects
global algol68_compile_args
global algol68_execute_args
global dg-extra-tool-flags
@@ -202,6 +200,11 @@ proc algol68-torture-execute { src } {
# Leave second element off for now (indicates "don't perform test")
set dg-output-text "P"
+ # The list of module objects to include in the compilation line
+ # is built by dg-get-options while processing the { dg-modules }
+ # marks. See the dg-modules procedure above.
+ set algol68_module_objects ""
+
set tmp [dg-get-options $src]
foreach op $tmp {
verbose "Processing option: $op" 3
@@ -285,8 +288,8 @@ proc algol68-torture-execute { src } {
if { $BUILT_MODULES_DIR != "" } {
lappend options "additional_flags=-I$BUILT_MODULES_DIR"
}
- if { $module_objects != "" } {
- lappend options "additional_flags=$module_objects"
+ if { $algol68_module_objects != "" } {
+ lappend options "additional_flags=$algol68_module_objects"
}
set comp_output [algol68_target_compile "$src" "$executable" executable $options]
--
2.30.2
More information about the Algol68
mailing list