https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120519

--- Comment #4 from Alice Carlotti <acarlotti at gcc dot gnu.org> ---
I've discussed this with Alfie, and we have the following conclusions:

The checks of the form "scan-assembler-times \n\t.quad\t_Z3foov.default\n 1"
are far too fragile so should probably be deleted entirely (I think this is 6
lines in each test file).  They were intended to demonstrate that the resolver
would use all of the possible function versions, but I don't think this is
particularly worth checking here.  It's also not really practical to check,
since there are far too many ways to load the address of the selected function
version into a register (my original patch, Alfie's revision of my patch, and
the assembly you shared included three different ways of doing it).

The check for "scan-assembler-times \n\tbl _Z3foov\n 1" fails because of the
notoc relocation, which results in the assembly line "tbl _Z3foov@notoc"
instead.  I think this check is worth including, because it's intended to show
the caller uses the resolved symbol name rather than calling one of the
versions directly.  We can relax the check by looking for either "\n" or "@"
after the base name (anything that isn't a "." is probably fine, but I don't
know of any other posibilities).

So, to summarize, while I haven't written a full patch, I think we should:
- delete the 6 tests that look for ".quad"
- modify the other two failing tests to instead search for "\n\tbl
_Z3foov(\n|@)" (and the same for fooi, modulo any mistakes in my untested
regex).

Reply via email to