Steve Ellcey <[email protected]> writes:
> On Mon, 2012-11-05 at 20:38 +0000, Richard Sandiford wrote:
>> This sort of thing should usually be handled automatically by
>> scan-assembler, and is for me:
>>
>> /foo/gcc/xgcc -B/foo/gcc/ /bar/gcc/testsuite/gcc.dg/torture/mips-sdata-1.c
>> -fno-diagnostics-show-caret
>> -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects -mexplicit-relocs
>> -ffat-lto-objects -S
>> -isystem /foo/mipsisa64-elf/soft-float/newlib/targ-include -isystem
>> /bar/newlib/libc/include -EB
>> -msoft-float -o mips-sdata-1.s
>>
>> So the test passes all variations here. I wonder what's different in
>> your case?
>>
>> Richard
>
> Well that is weird. I took out my change and I still see the error:
>
> Executing on
> host: /local/home/sellcey/nightly/obj-mips-mti-elf/gcc/final/gcc/xgcc
> -B/local/home/sellcey/nightly/obj-mips-mti-elf/gcc/final/gcc/
> /local/home/sellcey/nightly/src/gcc/gcc/testsuite/gcc.dg/torture/mips-sdata-1.c
> -fno-diagnostics-show-caret -O2 -flto -fuse-linker-plugin
> -fno-fat-lto-objects -mexplicit-relocs -S -o mips-sdata-1.s (timeout =
> 300)
> spawn /local/home/sellcey/nightly/obj-mips-mti-elf/gcc/final/gcc/xgcc
> -B/local/home/sellcey/nightly/obj-mips-mti-elf/gcc/final/gcc/
> /local/home/sellcey/nightly/src/gcc/gcc/testsuite/gcc.dg/torture/mips-sdata-1.c
> -fno-diagnostics-show-caret -O2 -flto -fuse-linker-plugin
> -fno-fat-lto-objects -mexplicit-relocs -S -o mips-sdata-1.s^M
> PASS: gcc.dg/torture/mips-sdata-1.c -O2 -flto -fuse-linker-plugin
> -fno-fat-lto-objects (test for excess errors)
> FAIL: gcc.dg/torture/mips-sdata-1.c -O2 -flto -fuse-linker-plugin
> -fno-fat-lto-objects scan-assembler gp_?rel\\(my_struct
>
>
> Do you know where the -ffat-lto-objects option in your run came from? I
> don't have that in my results and my tree is up-to-date.
gcc.dg.exp has:
if [check_effective_target_lto] {
# When having plugin test both slim and fat LTO and plugin/nonplugin
# path.
if [check_linker_plugin_available] {
set LTO_TORTURE_OPTIONS [list \
{ -O2 -flto -fno-use-linker-plugin -flto-partition=none } \
{ -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects }
]
set gcc_force_conventional_output "-fcfat-lto-objects"
} else {
set LTO_TORTURE_OPTIONS [list \
{ -O2 -flto -flto-partition=none } \
{ -O2 -flto }
]
}
}
and scanasm.exp has:
proc scan-assembler_required_options { args } {
global gcc_force_conventional_output
return $gcc_force_conventional_output
}
(similarly for scan-assembler-not, etc.). Those options are then
supposed to be added by gcc.dg.exp:gcc-dg-test-1:
# Let { dg-final { action } } force options as returned by an
# optional proc ${action}_required_options.
upvar 2 dg-final-code finalcode
foreach x [split $finalcode "\n"] {
set finalcmd [lindex $x 0]
if { [info procs ${finalcmd}_required_options] != "" } {
set req [${finalcmd}_required_options]
if { $req != "" } {
lappend extra_tool_flags $req
}
}
}
if { $extra_tool_flags != "" } {
lappend options "additional_flags=$extra_tool_flags"
}
set comp_output [$target_compile "$prog" "$output_file" "$compile_type"
$options]
Does it work for you if you run it separately? E.g. with:
make check-gcc RUNTESTFLAGS=dg-torture.exp=mips-sdata-1.c
Richard