Message ID | yddo9tp5xs7.fsf@CeBiTec.Uni-Bielefeld.DE |
---|---|
State | New |
Headers | show |
On 15/06/17 12:51 +0200, Rainer Orth wrote: >I happened to notice that recently a couple of testcases have sneaked in >that are restricted to x86_64-*-* targets only. This is always wrong: >it should be i?86-*-* and x86_64-*-* alike, eventually restricing the >test to ilp32 or lp64. There were also instances of i?86-*-* only, >which I've handled as well. [...] >diff --git a/libstdc++-v3/testsuite/20_util/variant/index_type.cc b/libstdc++-v3/testsuite/20_util/variant/index_type.cc >--- a/libstdc++-v3/testsuite/20_util/variant/index_type.cc >+++ b/libstdc++-v3/testsuite/20_util/variant/index_type.cc >@@ -1,5 +1,5 @@ > // { dg-options "-std=gnu++17" } >-// { dg-do compile { target x86_64-*-* powerpc*-*-* } } >+// { dg-do compile { target i?86-*-* x86_64-*-* powerpc*-*-* } } > > // Copyright (C) 2017 Free Software Foundation, Inc. > // The concern here was just that we don't want the test to fail on targets with weird integer sizes, so the list of targets was restricted to just those where Ville had tested it. But { target ilp32 lp64 } would surely be fine. The test will only fail if a struct with two char-sized subobjects is the same size as size_t. Feel free to change it to { target ilp32 lp64 }.
Hi Jonathan, > On 15/06/17 12:51 +0200, Rainer Orth wrote: >>I happened to notice that recently a couple of testcases have sneaked in >>that are restricted to x86_64-*-* targets only. This is always wrong: >>it should be i?86-*-* and x86_64-*-* alike, eventually restricing the >>test to ilp32 or lp64. There were also instances of i?86-*-* only, >>which I've handled as well. > > [...] > >>diff --git a/libstdc++-v3/testsuite/20_util/variant/index_type.cc >> b/libstdc++-v3/testsuite/20_util/variant/index_type.cc >>--- a/libstdc++-v3/testsuite/20_util/variant/index_type.cc >>+++ b/libstdc++-v3/testsuite/20_util/variant/index_type.cc >>@@ -1,5 +1,5 @@ >> // { dg-options "-std=gnu++17" } >>-// { dg-do compile { target x86_64-*-* powerpc*-*-* } } >>+// { dg-do compile { target i?86-*-* x86_64-*-* powerpc*-*-* } } >> >> // Copyright (C) 2017 Free Software Foundation, Inc. >> // > > The concern here was just that we don't want the test to fail on > targets with weird integer sizes, so the list of targets was > restricted to just those where Ville had tested it. > > But { target ilp32 lp64 } would surely be fine. The test will only > fail if a struct with two char-sized subobjects is the same size as > size_t. Feel free to change it to { target ilp32 lp64 }. once I got the syntax right, this worked fine: it needs { target { ilp32 || lp64 } } instead ;-) I've also now managed to complete a Darwin/x86_64 bootstrap by locally reverting the two culprit patches for PR bootstrap/81033 and confirmed that the patched testcases are fine there, two. Given that there were no other comments, I've installed the patch. It would still be nice if the Cygwin/MingW maintainer could comment on the testcase situation for those targets. Rainer
On 06/20/2017 01:01 PM, Rainer Orth wrote: > > once I got the syntax right, this worked fine: it needs > > { target { ilp32 || lp64 } } > > instead ;-) > > I've also now managed to complete a Darwin/x86_64 bootstrap by locally > reverting the two culprit patches for PR bootstrap/81033 and confirmed > that the patched testcases are fine there, two. > > Given that there were no other comments, I've installed the patch. It > would still be nice if the Cygwin/MingW maintainer could comment on the > testcase situation for those targets. > > Rainer > Honestly, I'm not sure how ms-bitfields work on non-Windows targets, beyond that, the patch looks like it won't change the tests that run for mingw/cygwin.
JonY <10walls@gmail.com> writes: > On 06/20/2017 01:01 PM, Rainer Orth wrote: >> Given that there were no other comments, I've installed the patch. It >> would still be nice if the Cygwin/MingW maintainer could comment on the >> testcase situation for those targets. > > Honestly, I'm not sure how ms-bitfields work on non-Windows targets, I just noticed that it's handled in generic code in i386.c and the affected tests worked on the likes of Linux and Solaris ;-) > beyond that, the patch looks like it won't change the tests that run for > mingw/cygwin. True: as I mentioned in the submission https://gcc.gnu.org/ml/gcc-patches/2017-06/msg01103.html I didn't touch the Cygwin/MingW patches listed there except for those where I could verify that they would/should work on any x86 target. Maybe you can have a look a the questions raised there ("There's one group of targets I've omitted completely"...)? Thanks. Rainer
On 06/20/2017 01:35 PM, Rainer Orth wrote: > JonY <10walls@gmail.com> writes: > >> On 06/20/2017 01:01 PM, Rainer Orth wrote: >>> Given that there were no other comments, I've installed the patch. It >>> would still be nice if the Cygwin/MingW maintainer could comment on the >>> testcase situation for those targets. >> >> Honestly, I'm not sure how ms-bitfields work on non-Windows targets, > > I just noticed that it's handled in generic code in i386.c and the > affected tests worked on the likes of Linux and Solaris ;-) gcc/testsuite/gcc.dg/array-quals-1.c asm bits probably won't work due to object format difference gcc/testsuite/gcc.dg/lto/20091013-1_1.c I'm not familiar with LTO enough to comment on it gcc/testsuite/gcc.dg/lto/20091013-1_2.c dto. gcc/testsuite/gcc.dg/pr32370.c This probably should be safe to enable for all. gcc/testsuite/gcc.dg/pr50251.c dto. gcc/testsuite/gcc.dg/tls/thr-cse-1.c I think this should stay as is. gcc/testsuite/gcc.dg/weak/weak-15.c ELF weak symbols don't really work on Windows PE format and are known to be broken gcc/testsuite/gcc.dg/weak/weak-16.c dto. gcc/testsuite/gcc.dg/weak/weak-2.c dto. gcc/testsuite/gcc.dg/weak/weak-3.c dto. gcc/testsuite/gcc.dg/weak/weak-4.c dto. gcc/testsuite/gcc.dg/weak/weak-5.c dto. libffi/testsuite/libffi.call/cls_longdouble_va.c iirc libffi hasn't been ported for 64bit Windows gcc/testsuite/g++.dg/abi/bitfield3.C Should remain 32bit specific gcc/testsuite/g++.dg/ext/dllexport3.C Should be x86_64-*-cygwin too gcc/testsuite/g++.dg/ext/selectany1.C dto. gcc/testsuite/g++.dg/ext/selectany2.C dto. gcc/testsuite/g++.old-deja/g++.ext/attrib5.C Probably broken due to the underscore prefix in asm names for 32bit mingw/cygwin gcc/testsuite/gcc.dg/dll-3.c Should be x86_64-*-cygwin too gcc/testsuite/gcc.dg/dll-4.c dto. gcc/testsuite/gcc.dg/dll-5.c dto. gcc/testsuite/gcc.dg/dll-8.c dto. gcc/testsuite/gcc.dg/tree-ssa/loop-1.c dto. gcc/testsuite/gcc.target/i386/fastcall-1.c Keep as is, x86 specific test case. I can't comment on the ARM mingw* port, I have no experience with it.
# HG changeset patch # Parent 34b90e4a4ec0ea7811b438e5973a01ef09d324a1 Always check for target i?86 and x86_64 diff --git a/gcc/testsuite/c-c++-common/fold-masked-cmp-1.c b/gcc/testsuite/c-c++-common/fold-masked-cmp-1.c --- a/gcc/testsuite/c-c++-common/fold-masked-cmp-1.c +++ b/gcc/testsuite/c-c++-common/fold-masked-cmp-1.c @@ -1,6 +1,6 @@ /* Based on PR 67328 */ -/* { dg-do compile { target x86_64-*-* } } */ +/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-O2" } */ enum output_type diff --git a/gcc/testsuite/c-c++-common/fold-masked-cmp-2.c b/gcc/testsuite/c-c++-common/fold-masked-cmp-2.c --- a/gcc/testsuite/c-c++-common/fold-masked-cmp-2.c +++ b/gcc/testsuite/c-c++-common/fold-masked-cmp-2.c @@ -1,6 +1,6 @@ /* Based on PR 67328 */ -/* { dg-do compile { target x86_64-*-* } } */ +/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-O2" } */ enum output_type diff --git a/gcc/testsuite/c-c++-common/fold-masked-cmp-3.c b/gcc/testsuite/c-c++-common/fold-masked-cmp-3.c --- a/gcc/testsuite/c-c++-common/fold-masked-cmp-3.c +++ b/gcc/testsuite/c-c++-common/fold-masked-cmp-3.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target x86_64-*-* } } */ +/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-fdump-tree-original" } */ void foo (int *p, int x) diff --git a/gcc/testsuite/g++.dg/cpp0x/alignas4.C b/gcc/testsuite/g++.dg/cpp0x/alignas4.C --- a/gcc/testsuite/g++.dg/cpp0x/alignas4.C +++ b/gcc/testsuite/g++.dg/cpp0x/alignas4.C @@ -1,6 +1,6 @@ // PR c++/59012 // { dg-do compile { target c++11 } } -// { dg-final { scan-assembler "align 8" { target x86_64-*-*-gnu } } } +// { dg-final { scan-assembler "align 8" { target { { i?86-*-* x86_64-*-* } && { ! *-*-darwin* } } } } } template <class... T> struct A diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/const2b.C b/gcc/testsuite/g++.dg/debug/dwarf2/const2b.C --- a/gcc/testsuite/g++.dg/debug/dwarf2/const2b.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/const2b.C @@ -1,4 +1,4 @@ -/* { dg-do compile { target i386*-*-* } } */ +/* { dg-do compile { target i386*-*-* x86_64-*-* } } */ /* { dg-options "-O -gdwarf-2 -dA -msse" } */ /* { dg-require-effective-target sse } */ /* { dg-final { scan-assembler "DW_AT_const_value" } } */ diff --git a/gcc/testsuite/g++.dg/vect/pr70944.cc b/gcc/testsuite/g++.dg/vect/pr70944.cc --- a/gcc/testsuite/g++.dg/vect/pr70944.cc +++ b/gcc/testsuite/g++.dg/vect/pr70944.cc @@ -1,4 +1,4 @@ -/* { dg-do compile { target x86_64-*-* } } */ +/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-additional-options "-O3 -march=core-avx2" } */ unsigned *a; diff --git a/gcc/testsuite/gcc.dg/attr-ms_struct-1.c b/gcc/testsuite/gcc.dg/attr-ms_struct-1.c --- a/gcc/testsuite/gcc.dg/attr-ms_struct-1.c +++ b/gcc/testsuite/gcc.dg/attr-ms_struct-1.c @@ -1,5 +1,5 @@ /* Test for MS structure sizes. */ -/* { dg-do run { target *-*-mingw* *-*-cygwin* i?86-*-darwin* } } */ +/* { dg-do run { target i?86-*-* x86_64-*-* } } */ /* { dg-require-effective-target ilp32 } */ /* { dg-options "-std=gnu99" } */ diff --git a/gcc/testsuite/gcc.dg/attr-ms_struct-2.c b/gcc/testsuite/gcc.dg/attr-ms_struct-2.c --- a/gcc/testsuite/gcc.dg/attr-ms_struct-2.c +++ b/gcc/testsuite/gcc.dg/attr-ms_struct-2.c @@ -1,5 +1,5 @@ /* Test for MS structure sizes. */ -/* { dg-do run { target *-*-mingw* *-*-cygwin* i?86-*-darwin* } } */ +/* { dg-do run { target i?86-*-* x86_64-*-* } } */ /* { dg-require-effective-target ilp32 } */ /* { dg-options "-std=gnu99" } */ diff --git a/gcc/testsuite/gcc.dg/attr-ms_struct-packed1.c b/gcc/testsuite/gcc.dg/attr-ms_struct-packed1.c --- a/gcc/testsuite/gcc.dg/attr-ms_struct-packed1.c +++ b/gcc/testsuite/gcc.dg/attr-ms_struct-packed1.c @@ -1,5 +1,5 @@ /* Test for MS structure with packed attribute. */ -/* { dg-do run { target *-*-mingw* *-*-cygwin* i?86-*-darwin* } } +/* { dg-do run { target i?86-*-* x86_64-*-* } } /* { dg-options "-std=gnu99" } */ extern void abort (); diff --git a/gcc/testsuite/gcc.dg/bf-ms-layout-2.c b/gcc/testsuite/gcc.dg/bf-ms-layout-2.c --- a/gcc/testsuite/gcc.dg/bf-ms-layout-2.c +++ b/gcc/testsuite/gcc.dg/bf-ms-layout-2.c @@ -5,7 +5,7 @@ posted to GCC-patches http://gcc.gnu.org/ml/gcc-patches/2000-08/msg00577.html */ -/* { dg-do run { target *-*-mingw* *-*-cygwin* i?86-*-darwin* } } */ +/* { dg-do run { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-D_TEST_MS_LAYOUT" } */ /* This test uses the attribute instead of the command line option. */ diff --git a/gcc/testsuite/gcc.dg/bf-ms-layout.c b/gcc/testsuite/gcc.dg/bf-ms-layout.c --- a/gcc/testsuite/gcc.dg/bf-ms-layout.c +++ b/gcc/testsuite/gcc.dg/bf-ms-layout.c @@ -5,7 +5,7 @@ posted to GCC-patches http://gcc.gnu.org/ml/gcc-patches/2000-08/msg00577.html */ -/* { dg-do run { target *-*-mingw* *-*-cygwin* i?86-*-darwin* } } */ +/* { dg-do run { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-mms-bitfields -D_TEST_MS_LAYOUT" } */ #include <stddef.h> diff --git a/gcc/testsuite/gcc.dg/loop-invariant.c b/gcc/testsuite/gcc.dg/loop-invariant.c --- a/gcc/testsuite/gcc.dg/loop-invariant.c +++ b/gcc/testsuite/gcc.dg/loop-invariant.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target x86_64-*-* } } */ +/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-O2 -fdump-rtl-loop2_invariant" } */ /* NOTE: The target list above could be extended to other targets that have conditional moves, but don't have zero registers. */ diff --git a/gcc/testsuite/gcc.dg/lto/pr70955_0.c b/gcc/testsuite/gcc.dg/lto/pr70955_0.c --- a/gcc/testsuite/gcc.dg/lto/pr70955_0.c +++ b/gcc/testsuite/gcc.dg/lto/pr70955_0.c @@ -1,5 +1,5 @@ -/* __builtin_ms_va_list is only supported for x86_64 -m64. */ -/* { dg-skip-if "" { ! {x86_64-*-* && { ! ilp32 } } } } */ +/* __builtin_ms_va_list is only supported for x86 -m64. */ +/* { dg-skip-if "" { ! { { i?86-*-* x86_64-*-* } && { ! ilp32 } } } } */ #include <stdio.h> diff --git a/gcc/testsuite/gcc.dg/pic-macro-define.c b/gcc/testsuite/gcc.dg/pic-macro-define.c --- a/gcc/testsuite/gcc.dg/pic-macro-define.c +++ b/gcc/testsuite/gcc.dg/pic-macro-define.c @@ -1,4 +1,5 @@ -/* { dg-do run { target "i?86-*-*-darwin" powerpc*-*-darwin* } } */ +/* { dg-do run } */ +/* { dg-require-effective-target fpic } */ /* { dg-options "-fPIC" } */ #if defined __PIC__ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr69196-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr69196-1.c --- a/gcc/testsuite/gcc.dg/tree-ssa/pr69196-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr69196-1.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target sparc*-*-* x86_64-*-* } } */ +/* { dg-do compile { target sparc*-*-* i?86-*-* x86_64-*-* } } */ /* { dg-options "-O2 -fdump-tree-thread1-details -fdisable-tree-ethread" } */ /* { dg-final { scan-tree-dump "FSM did not thread around loop and would copy too many statements" "thread1" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr79803.c b/gcc/testsuite/gcc.dg/tree-ssa/pr79803.c --- a/gcc/testsuite/gcc.dg/tree-ssa/pr79803.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr79803.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { x86_64-*-* } } } */ +/* { dg-do compile { target { i?86-*-* x86_64-*-* } } } */ /* { dg-options "-march=opteron-sse3 -Ofast --param l1-cache-line-size=3 -Wdisabled-optimization" } */ /* { dg-require-effective-target indirect_jumps } */ diff --git a/gcc/testsuite/gcc.target/i386/bitfield1.c b/gcc/testsuite/gcc.target/i386/bitfield1.c --- a/gcc/testsuite/gcc.target/i386/bitfield1.c +++ b/gcc/testsuite/gcc.target/i386/bitfield1.c @@ -2,7 +2,7 @@ // { dg-do run } // { dg-require-effective-target ia32 } // { dg-options "-O2" } -// { dg-options "-mno-align-double -mno-ms-bitfields" { target i?86-*-cygwin* i?86-*-mingw*} } +// { dg-options "-mno-align-double -mno-ms-bitfields" { target i?86-*-* x86_64-*-* } } extern void abort (void); extern void exit (int); diff --git a/gcc/testsuite/gcc.target/i386/bitfield2.c b/gcc/testsuite/gcc.target/i386/bitfield2.c --- a/gcc/testsuite/gcc.target/i386/bitfield2.c +++ b/gcc/testsuite/gcc.target/i386/bitfield2.c @@ -2,7 +2,7 @@ // { dg-do run } // { dg-require-effective-target ia32 } // { dg-options "-O2" } -// { dg-options "-mno-align-double -mno-ms-bitfields" { target i?86-*-cygwin* i?86-*-mingw* } } +// { dg-options "-mno-align-double -mno-ms-bitfields" { target i?86-*-* x86_64-*-* } } extern void abort (void); extern void exit (int); diff --git a/gcc/testsuite/gcc.target/i386/darwin-fpmath.c b/gcc/testsuite/gcc.target/i386/darwin-fpmath.c --- a/gcc/testsuite/gcc.target/i386/darwin-fpmath.c +++ b/gcc/testsuite/gcc.target/i386/darwin-fpmath.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target i?86-*-darwin* } } */ +/* { dg-do compile { target i?86-*-darwin* x86_64-*-darwin* } } */ /* { dg-final { scan-assembler "addsd" } } */ /* Do not add -msse or -msse2 or -mfpmath=sse to the options. GCC is supposed to use SSE math on Darwin by default, and libm won't work diff --git a/gcc/testsuite/gfortran.dg/fmt_pf.f90 b/gcc/testsuite/gfortran.dg/fmt_pf.f90 --- a/gcc/testsuite/gfortran.dg/fmt_pf.f90 +++ b/gcc/testsuite/gfortran.dg/fmt_pf.f90 @@ -223,4 +223,4 @@ contains end subroutine end program -! { dg-output "All kinds rounded to nearest" { xfail { i?86-*-solaris2.9* hppa*-*-hpux* } } } +! { dg-output "All kinds rounded to nearest" { xfail { hppa*-*-hpux* } } } diff --git a/gcc/testsuite/gfortran.dg/pr68078.f90 b/gcc/testsuite/gfortran.dg/pr68078.f90 --- a/gcc/testsuite/gfortran.dg/pr68078.f90 +++ b/gcc/testsuite/gfortran.dg/pr68078.f90 @@ -1,4 +1,4 @@ -! { dg-do run { target x86_64-*-linux* } } +! { dg-do run { target i?86-*-linux* x86_64-*-linux* } } ! { dg-additional-sources set_vm_limit.c } ! ! This test calls set_vm_limit to set an artificially low address space diff --git a/libstdc++-v3/testsuite/20_util/variant/index_type.cc b/libstdc++-v3/testsuite/20_util/variant/index_type.cc --- a/libstdc++-v3/testsuite/20_util/variant/index_type.cc +++ b/libstdc++-v3/testsuite/20_util/variant/index_type.cc @@ -1,5 +1,5 @@ // { dg-options "-std=gnu++17" } -// { dg-do compile { target x86_64-*-* powerpc*-*-* } } +// { dg-do compile { target i?86-*-* x86_64-*-* powerpc*-*-* } } // Copyright (C) 2017 Free Software Foundation, Inc. //