public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-5799] testsuite, lib: Re-allow mulitple function start labels.
@ 2023-11-23 19:55 Iain D Sandoe
0 siblings, 0 replies; only message in thread
From: Iain D Sandoe @ 2023-11-23 19:55 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:3a51dc3fc0c2403de999c3b5d9c509f26e2bab4b
commit r14-5799-g3a51dc3fc0c2403de999c3b5d9c509f26e2bab4b
Author: Iain Sandoe <iain@sandoe.co.uk>
Date: Thu Nov 23 09:44:55 2023 +0000
testsuite, lib: Re-allow mulitple function start labels.
The change applied in r14-5760-g2a46e0e7e20 changed the behaviour of
functions with assembly like:
bar:
__acle_se_bar:
Where both bar and __acle_se_bar are globals refering to the same
function body. The old behaviour overrides 'bar' with '__acle_se_bar'
and the scan tests for that label.
The change here re-allows the override.
Case like this are not legal Mach-O (where two global symbols cannot
have the same address in the assembler output). However, given the
constraints on the Mach-O scanning, it does not seem that it is
necessary to skip the change (any incorrect case should be easily
evident in the assembler).
gcc/testsuite/ChangeLog:
* lib/scanasm.exp: Allow multiple function start symbols,
taking the last as the function name.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
Diff:
---
gcc/testsuite/lib/scanasm.exp | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/gcc/testsuite/lib/scanasm.exp b/gcc/testsuite/lib/scanasm.exp
index 4fbf65744e9..d30e3617fe9 100644
--- a/gcc/testsuite/lib/scanasm.exp
+++ b/gcc/testsuite/lib/scanasm.exp
@@ -877,7 +877,14 @@ proc parse_function_bodies { config filename result } {
set in_function 0
}
} elseif { $in_function } {
- if { [regexp $up_config(end) $line] } {
+ # We allow multiple function start labels, taking the last one seen
+ # as the function name.
+ if { [regexp [lindex $up_config(start) 0] \
+ $line dummy maybe_function_name] } {
+ verbose "parse_function_bodies: overriding $function_name with $maybe_function_name"
+ set function_name $maybe_function_name
+ set in_function 1
+ } elseif { [regexp $up_config(end) $line] } {
verbose "parse_function_bodies: $function_name:\n$function_body"
set up_result($function_name) $function_body
set in_function 0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-11-23 19:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-23 19:55 [gcc r14-5799] testsuite, lib: Re-allow mulitple function start labels Iain D Sandoe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).