Hi! On 2020-06-30T18:35:36+0200, I wrote: > On 2020-06-22T11:32:46-0300, Alexandre Oliva wrote: >> --- /dev/null >> +++ b/gcc/testsuite/lib/scanoffload.exp > >> +# Utility for scanning offloading dump output, used by libgomp.exp. > > ;-) Yeah, I was about to say that having this file in > 'gcc/testsuite/lib/' seems to be a bit of an abstraction violation, given > that... > >> +# Format an offload dump suffix given the offload target name in >> +# OFFTGT and any suffix, probably empty, in SUFFIX. >> +proc scoff-format { offtgt suffix } { >> + return ".x$offtgt.mkoffload$suffix" >> +} >> + >> +# Wrapper for scan procs. >> +# Argument 0 is the index of the argument to replace when calling >> +# argument 1 with the remaining arguments. Use end-1 or end or so. >> +proc scoff { args } { >> + set idx [lindex $args 0] >> + set prc [lindex $args 1] >> + set args [lreplace $args 0 1] >> + >> + global offload_target >> + if [info exists offload_target] { >> + set target $offload_target >> + if { "$target" != "disable" } { >> + eval $prc [lreplace $args $idx $idx "[scoff-format $target [lindex $args $idx]]"] >> + } >> + } else { >> + global offload_targets >> + foreach target [split $offload_targets ","] { >> + eval $prc [lreplace $args $idx $idx "[scoff-format $target [lindex $args $idx]]"] >> + } >> + } >> +} > > ... only libgomp testing defines the 'offload_target', 'offload_targets' > variables. But anyway, it works, and we've got worse things in GCC. ;-) Actually, there is one problem. To cure it, I've pushed commit fdc9db25395e5a6e77069c04fe713f165a9c52a4 "[testsuite] Unset 'offload_target' after use" to master branch, see attached. Grüße Thomas ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter