[patch] Fix altivec-7.C testsuite failure due to vector name mangling.
Brooks Moses
bmoses@google.com
Fri Oct 11 20:25:00 GMT 2013
Hi, all -
We recently built a compiler with a default -fabi-version value that's
different from the 2 that's used as default on trunk. The result of
this was a test failure in g++.dg/ext/altivec-7.C, which compiles a
bunch of empty functions with vector arguments and inspects the
generated assembly for the mangled names.
The failure is because the test is searching for mangled names of the
form "_Z3fooU8__vectorh", which are only generated by ABI versions 1,
2, and 3. As noted in the documentation, "Version 4, which first
appeared in G++ 4.5, implements a standard mangling for vector types";
this standard mangling looks like "_Z3fooDv16_h" instead.
This patch fixes the failure by adjusting the test to look for the
names using the standard mangling. It passes with all ABI versions;
the compiler always emits the standard symbols, and with versions 1,
2, and 3 it also emits duplicate symbols with the old mangling.
Ok to commit?
(An alternate approach would be to force -mabi-version=2, and check
for the presence of both sets of symbols. That seems overkill to me,
but I can alter the test to do that if desired.)
Thanks,
- Brooks
----
2013-10-11 Brooks Moses <bmoses@google.com>
* g++.dg/ext/altivec-7.C: Check for standard vector-type
name mangling.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2013-10-11_altivec-7-fix.diff
Type: application/octet-stream
Size: 1744 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20131011/8a2439de/attachment.obj>
More information about the Gcc-patches
mailing list