From patchwork Thu Jun 15 10:51:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 776209 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wpL1T2YFSz9s2G for ; Thu, 15 Jun 2017 20:52:28 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="KpbfdkLf"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:cc:subject:date:message-id:mime-version:content-type; q= dns; s=default; b=IovUc+cwlzkMK4PZpP4d+/Pz2+slQjDlp8OimMKYe89AQa yjLaQxj3CQZsGNkGQiP1AyWOkuuPQWaP0GvxNYxT1/RP724lPEmQ4vfEE/0Gd9Qr nTDoL6V02v5qKj1Qn9d1opp8R+dx7QeIJRARK40dqaGeVPLaB2YWNUkTOuL84= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:cc:subject:date:message-id:mime-version:content-type; s= default; bh=Hw3ZT85f+IqzyUr2FhqAVl9nxa4=; b=KpbfdkLfbvyAt0DQJwjY JaqJr/iTBf+1WyAtENJyZ5ByWnGkrqpAG45Q812D0MSz5uP1caW9WoeFEnA2A4Sy htc+nDCPbwOIPFioE14vbZcfRRRQd7xp601L2+Jb/iC4yz1xdjTfJO0hmA8Uvfij PMUQnOdF2JDAzLo9ifbhFNE= Received: (qmail 5555 invoked by alias); 15 Jun 2017 10:51:50 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 5462 invoked by uid 89); 15 Jun 2017 10:51:48 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=dto, artificially, HX-Amavis-Alert:field, HX-Amavis-Alert:header X-Spam-User: qpsmtpd, 3 recipients X-HELO: smtp.CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE (HELO smtp.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 15 Jun 2017 10:51:45 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 93E5524F; Thu, 15 Jun 2017 12:51:47 +0200 (CEST) X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "Cc" Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id mgom03D1B6Wy; Thu, 15 Jun 2017 12:51:38 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p5DCE05A3.dip0.t-ipconnect.de [93.206.5.163]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id 8E6CE24E; Thu, 15 Jun 2017 12:51:37 +0200 (CEST) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: libstdc++@gcc.gnu.org, fortran@gcc.gnu.org Cc: Uros Bizjak , Jonathan Yong <10walls@gmail.com>, Mike Stump Subject: [testsuite, i386] Always check for target i?86 and x86_64 Date: Thu, 15 Jun 2017 12:51:36 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes 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. Most of the changes are straightforward, with a few exceptions: * g++.dg/cpp0x/alignas4.C was restricted to x86_64-*-*-gnu, but it passes just as well on i386-pc-solaris2.12 (both multilibs). However, it fails on x86_64-apple-darwin which uses .zerofill __DATA,__pu_bss3,_a,8,3 instead of .align 8 so there may be more fallout from that change. * pic-macro-define.c has nothing Darwin specific in it if it's restricted to fpic targets. * gcc.target/i386/darwin-fpmath.c already FAILs on i386-apple-darwin11.4.2 -m32 and also now on x86_64-apple-darwin11.4.2 -m32 so there's something amiss here even before this patch. * The gcc.dg/attr-ms_struct*, gcc.dg/bf-ms-layout*, and gcc.target/i386/bitfield* tests work on all x86 targets, so there's no need to artifically restrict them to *-*-mingw* *-*-cygwin* i?86-*-darwin*. The gcc.dg/bf-no-ms-layout.c test FAILs to execute on both i386-pc-solaris2.12 and x86_64-pc-linux-gnu (-m32 only), so I've left it alone. * In gfortran.dg/fmt_pf.f90, I've removed i?86-*-solaris2.9* from an xfail since that target has long been removed. This leaves us with two i386-*-freebsd* xfails in gfortran.dg/ieee/ieee_4.f90 and gfortran.dg/round_4.f90 which I haven't touched since I cannot say if they are still relevant and why they shouldn't apply to x86_64-*-freebsd* -m32 as well. There's one group of targets I've omitted completely because I know nothing about them and cannot test them: {i?86,x86_64}-*-{cygwin,mingw}*. There are quite a number of testcases restricted to either the i?86 or x86_64 variant of them with no way (for me) to tell what the intention was. I'll defer to the Cygwin/MingW maintainer to figure this out. Here's the list: gcc/testsuite/gcc.dg/array-quals-1.c x86_64-*-mingw* gcc/testsuite/gcc.dg/lto/20091013-1_1.c dto. gcc/testsuite/gcc.dg/lto/20091013-1_2.c dto. gcc/testsuite/gcc.dg/pr32370.c dto. gcc/testsuite/gcc.dg/pr50251.c dto. gcc/testsuite/gcc.dg/tls/thr-cse-1.c dto., separate i?86-*-mingw* gcc/testsuite/gcc.dg/weak/weak-15.c x86_64-*-mingw* 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 dto. gcc/testsuite/g++.dg/abi/bitfield3.C i?86-*-mingw* gcc/testsuite/g++.dg/ext/dllexport3.C i?86-*-cygwin, *-*-mingw gcc/testsuite/g++.dg/ext/selectany1.C i?86-pc-cygwin, i?86-*-mingw*, x86_64-*-mingw*, dg-do twice!? gcc/testsuite/g++.dg/ext/selectany2.C dto. gcc/testsuite/g++.old-deja/g++.ext/attrib5.C i?86-pc-cygwin gcc/testsuite/gcc.dg/dll-3.c i?86-pc-cygwin 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 separate x86_64-*-mingw* gcc/testsuite/gcc.target/i386/fastcall-1.c i?86-*-mingw32*, i?86-*-cygwin* Also note that the target triplet is spelled differently in different tests; this should certainly be regularized. The following patch fixes the non-Cygwin/MingW part. Bootstrapped without regressions on i386-pc-solaris2.12 and x86_64-pc-linux-gnu, plus some manual x86_64-apple-darwin11.4.2 testing which is currently massively hampered by PR bootstrap/81033. I think I can just apply this based on my testsuite maintainership but still would be grateful for comments. Rainer # 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 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 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 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. //