* [testsuite, i386] Change mpx effective-target test into link test
@ 2014-12-18 10:13 Rainer Orth
2014-12-18 11:33 ` Uros Bizjak
0 siblings, 1 reply; 2+ messages in thread
From: Rainer Orth @ 2014-12-18 10:13 UTC (permalink / raw)
To: gcc-patches; +Cc: Uros Bizjak, Ilya Enkovich
[-- Attachment #1: Type: text/plain, Size: 1746 bytes --]
Currently, the new gcc.dg/lto/chkp-privatize test FAILs on Solaris/x86
with gas and ld for 64-bit:
UNRESOLVED: gcc.dg/lto/chkp-privatize c_lto_chkp-privatize_0.o-c_lto_chkp-privatize_1.o execute -fPIC -flto -flto-partition=max -fcheck-pointer-bounds -mmpx
FAIL: gcc.dg/lto/chkp-privatize c_lto_chkp-privatize_0.o-c_lto_chkp-privatize_1.o link, -fPIC -flto -flto-partition=max -fcheck-pointer-bounds -mmpx
output is:
ld: fatal: relocation error: file c_lto_chkp-privatize_0.o: section [4].rela.text: invalid relocation type: 0x28
ld: fatal: symbol referencing errors
collect2: error: ld returned 1 exit status
This relocation type 0x28 (40) is R_X86_64_PLT32_BND, which Solaris 10
and 11 ld know nothing about.
Given that there's no test whatsoever in gcc/configure.ac that the whole
toolchain supports the necessary mnemonics and relocs, the logical place
seems to be the testsuite.
The following patch does just that, turning the mpx effective-target
test into a link test, thus checking both assembler and linker used.
Tested with the appropriate runtest invocations on i386-pc-solaris2.11
with as/ld (both 32 and 64-bit tests unsupported due to missing
assembler support), gas/ld (32-bit tests pass, 64-bit tests unsupported
due to missing linker support), and x86_64-unknown-linux-gnu (both 32
and 64-bit tests pass).
I wonder what's the point of having mpx-dg.exp at all: I'd rather move
the single test to target-supports.exp, avoiding the whole flurry of
mpx-dg.exp inclusions all over gcc/testsuite. Ilya? However that may
be, it can be done as a followup.
Ok for mainline?
Rainer
2014-12-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* lib/mpx-dg.exp (check_effective_target_mpx): Change into link test.
Add main.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: testsuite-i386-mpx-link.patch --]
[-- Type: text/x-patch, Size: 607 bytes --]
# HG changeset patch
# Parent bf453dbd938f27cf7eced4b5df3c29f5e452a55f
Change mpx effective-target test into link test
diff --git a/gcc/testsuite/lib/mpx-dg.exp b/gcc/testsuite/lib/mpx-dg.exp
--- a/gcc/testsuite/lib/mpx-dg.exp
+++ b/gcc/testsuite/lib/mpx-dg.exp
@@ -18,7 +18,8 @@
# error-free for trivial code, 0 otherwise.
proc check_effective_target_mpx {} {
- return [check_no_compiler_messages mpx object {
+ return [check_no_compiler_messages mpx executable {
int *foo (int *arg) { return arg; }
+ int main (void) { return foo ((void *)0) == 0; }
} "-fcheck-pointer-bounds -mmpx"]
}
[-- Attachment #3: Type: text/plain, Size: 143 bytes --]
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [testsuite, i386] Change mpx effective-target test into link test
2014-12-18 10:13 [testsuite, i386] Change mpx effective-target test into link test Rainer Orth
@ 2014-12-18 11:33 ` Uros Bizjak
0 siblings, 0 replies; 2+ messages in thread
From: Uros Bizjak @ 2014-12-18 11:33 UTC (permalink / raw)
To: Rainer Orth; +Cc: gcc-patches, Ilya Enkovich
On Thu, Dec 18, 2014 at 11:12 AM, Rainer Orth
<ro@cebitec.uni-bielefeld.de> wrote:
> Currently, the new gcc.dg/lto/chkp-privatize test FAILs on Solaris/x86
> with gas and ld for 64-bit:
>
> UNRESOLVED: gcc.dg/lto/chkp-privatize c_lto_chkp-privatize_0.o-c_lto_chkp-privatize_1.o execute -fPIC -flto -flto-partition=max -fcheck-pointer-bounds -mmpx
> FAIL: gcc.dg/lto/chkp-privatize c_lto_chkp-privatize_0.o-c_lto_chkp-privatize_1.o link, -fPIC -flto -flto-partition=max -fcheck-pointer-bounds -mmpx
>
> output is:
> ld: fatal: relocation error: file c_lto_chkp-privatize_0.o: section [4].rela.text: invalid relocation type: 0x28
> ld: fatal: symbol referencing errors
> collect2: error: ld returned 1 exit status
>
> This relocation type 0x28 (40) is R_X86_64_PLT32_BND, which Solaris 10
> and 11 ld know nothing about.
>
> Given that there's no test whatsoever in gcc/configure.ac that the whole
> toolchain supports the necessary mnemonics and relocs, the logical place
> seems to be the testsuite.
>
> The following patch does just that, turning the mpx effective-target
> test into a link test, thus checking both assembler and linker used.
>
> Tested with the appropriate runtest invocations on i386-pc-solaris2.11
> with as/ld (both 32 and 64-bit tests unsupported due to missing
> assembler support), gas/ld (32-bit tests pass, 64-bit tests unsupported
> due to missing linker support), and x86_64-unknown-linux-gnu (both 32
> and 64-bit tests pass).
>
> I wonder what's the point of having mpx-dg.exp at all: I'd rather move
> the single test to target-supports.exp, avoiding the whole flurry of
> mpx-dg.exp inclusions all over gcc/testsuite. Ilya? However that may
> be, it can be done as a followup.
>
> Ok for mainline?
>
> Rainer
>
>
> 2014-12-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
>
> * lib/mpx-dg.exp (check_effective_target_mpx): Change into link test.
> Add main.
OK.
Thanks,
Uros.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-18 11:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-18 10:13 [testsuite, i386] Change mpx effective-target test into link test Rainer Orth
2014-12-18 11:33 ` Uros Bizjak
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).