From patchwork Thu Oct 17 15:32:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georg-Johann Lay X-Patchwork-Id: 1178764 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-511230-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gjlay.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="s2bd9d8F"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gjlay.de header.i=@gjlay.de header.b="tYanAyvk"; dkim-atps=neutral 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 46vCpp1c4zz9sPF for ; Fri, 18 Oct 2019 02:32:50 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to:cc :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=Y/YJ81cCdOJTMyVB3VlF6DLAmPqtx2i3EYbK21W31yVYjzZQnv H948rlFqWAU5Op3oDlVz1wy52j3fE01f32SGQuZJEnjrEkSM58B13Enu5HguocU9 9rt8pRPGSz/4M2EDHmtj6GJ+WR43HffkhrszBa/tHg0x4pOXXrmvKb2HQ= 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:to:cc :from:subject:message-id:date:mime-version:content-type; s= default; bh=Ym95oE5vlJXwMLCMnNjOyzG/+qA=; b=s2bd9d8Fb0nUlPNIUYCr ROoj2K8wWOgAqB7AMMz3ZcbDwlwZuNkbV43qBGQalWzOaQNZPSRm8dcSRtPGKlun Bpr14tI4DsqILetnI37r7l4mQpQvEQV+3Sb1Bi9hOsPDpZcAyile2QFPHFoojYRj ylImH4KElsLIBxR+l0F3cKI= Received: (qmail 119516 invoked by alias); 17 Oct 2019 15:32:42 -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 119497 invoked by uid 89); 17 Oct 2019 15:32:42 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=fprintf-2.c, UD:fprintf-2.c, fprintf2c, UD:printf-2.c X-HELO: mo4-p00-ob.smtp.rzone.de Received: from mo4-p00-ob.smtp.rzone.de (HELO mo4-p00-ob.smtp.rzone.de) (85.215.255.25) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 17 Oct 2019 15:32:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1571326357; s=strato-dkim-0002; d=gjlay.de; h=Date:Message-ID:Subject:From:Cc:To:X-RZG-CLASS-ID:X-RZG-AUTH:From: Subject:Sender; bh=OB+HnSsQgn6yEmuF8z6kWtzJDm1pLqcU4OuDH/S69ek=; b=tYanAyvkbkya7z+ZIb47cKhXStn2Sp9FbhPj6dVj3EO26oDhrKksMwMsIfqGB8wGyG IYbZNuibcfTnrKyIQ7OIk3k9rE3t5p22j2TOJHBcO/MucK2d4rVi4tAjnzHh8j97VOsz 6D25Yhjl6SNMJo8yfjxr/Y384GoVwNwj7W8GmFUIhwFYEAH8ZnmCyo0DN6CB6bY0q15b FUsVlIRkaZ9UTrkdDSAz+J79S8xvLREBFVjyTfTF8LU9CzhSEG3+r0YUMlF7XsPukROB PDpOf5NI2udvXAkoWS8Umk2w8SXEJpG2belscUXyDtKX1EhBDcnF6Pz7SUCOjkauJoz/ 1QIA== Received: from [192.168.114.100] by smtp.strato.de (RZmta 44.28.1 DYNA|AUTH) with ESMTPSA id t01740v9HFWa4rP (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Thu, 17 Oct 2019 17:32:36 +0200 (CEST) To: gcc-patches@gcc.gnu.org Cc: Mike Stump From: Georg-Johann Lay Subject: [patch,testuite]: Fix some fllout for small targets. Message-ID: <49393fac-670e-1e04-8077-663d0ce925b3@gjlay.de> Date: Thu, 17 Oct 2019 17:32:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 X-IsSubscribed: yes Hi, this fixes some FAILs for small targets, fixed or skipped by size32plus, double64[plus] etc. Ok to apply? Johann Fix some fallout for small targets. * gcc.c-torture/execute/20190820-1.c: Add dg-require-effective-target int32plus. * gcc.c-torture/execute/pr85331.c Add dg-require-effective-target double64plus. * gcc.dg/pow-sqrt-1.c: Same. * gcc.dg/pow-sqrt-2.c: Same. * gcc.dg/pow-sqrt-3.c: Same. * gcc.c-torture/execute/20190901-1.c: Same. * gcc.c-torture/execute/user-printf.c [avr]: Skip. * gcc.c-torture/execute/fprintf-2.c [avr]: Skip. * gcc.c-torture/execute/printf-2.c [avr]: Skip. * gcc.dg/Wlarger-than3.c [avr]: Skip. * gcc.c-torture/execute/ieee/20041213-1.c (sqrt) [avr,double=float]: Provide custom prototype. * gcc.dg/pr36017.c: Same. * gcc.c-torture/execute/pr90025.c: Use 32-bit int. * gcc.dg/complex-7.c: Add dg-require-effective-target double64. * gcc.dg/loop-versioning-1.c: Add dg-require-effective-target size32plus. * gcc.dg/loop-versioning-2.c: Same. Index: gcc.c-torture/execute/20190820-1.c =================================================================== --- gcc.c-torture/execute/20190820-1.c (revision 277097) +++ gcc.c-torture/execute/20190820-1.c (working copy) @@ -1,5 +1,6 @@ /* PR rtl-optimization/91347 */ /* Reported by John David Anglin */ +/* { dg-require-effective-target int32plus } */ typedef unsigned short __u16; typedef __signed__ int __s32; Index: gcc.c-torture/execute/20190901-1.c =================================================================== --- gcc.c-torture/execute/20190901-1.c (revision 277097) +++ gcc.c-torture/execute/20190901-1.c (working copy) @@ -1,7 +1,12 @@ /* PR target/91472 */ /* Reported by John Paul Adrian Glaubitz */ +/* { dg-require-effective-target double64plus } */ +#if __SIZEOF_INT__ >= 4 typedef unsigned int gmp_uint_least32_t; +#else +typedef __UINT_LEAST32_TYPE__ gmp_uint_least32_t; +#endif union ieee_double_extract { Index: gcc.c-torture/execute/fprintf-2.c =================================================================== --- gcc.c-torture/execute/fprintf-2.c (revision 277097) +++ gcc.c-torture/execute/fprintf-2.c (working copy) @@ -1,6 +1,7 @@ /* Verify that calls to fprintf don't get eliminated even if their result on success can be computed at compile time (they can fail). The calls can still be transformed into those of other functions. + { dg-skip-if "requires io" { avr-*-* } } { dg-skip-if "requires io" { freestanding } } */ #include Index: gcc.c-torture/execute/ieee/20041213-1.c =================================================================== --- gcc.c-torture/execute/ieee/20041213-1.c (revision 277097) +++ gcc.c-torture/execute/ieee/20041213-1.c (working copy) @@ -1,4 +1,8 @@ +#if defined (__AVR__) && (__SIZEOF_DOUBLE__ == __SIZEOF_FLOAT__) +extern double sqrt (double) __asm ("sqrtf"); +#else extern double sqrt (double); +#endif extern void abort (void); int once; Index: gcc.c-torture/execute/pr85331.c =================================================================== --- gcc.c-torture/execute/pr85331.c (revision 277097) +++ gcc.c-torture/execute/pr85331.c (working copy) @@ -1,4 +1,5 @@ /* PR tree-optimization/85331 */ +/* { dg-require-effective-target double64plus } */ typedef double V __attribute__((vector_size (2 * sizeof (double)))); typedef long long W __attribute__((vector_size (2 * sizeof (long long)))); Index: gcc.c-torture/execute/pr90025.c =================================================================== --- gcc.c-torture/execute/pr90025.c (revision 277097) +++ gcc.c-torture/execute/pr90025.c (working copy) @@ -13,10 +13,10 @@ bar (char *p) } __attribute__((noipa)) void -foo (unsigned int x) +foo (__UINT32_TYPE__ x) { char s[32] = { 'f', 'o', 'o', 'b', 'a', 'r', 0 }; - ((unsigned int *) s)[2] = __builtin_bswap32 (x); + ((__UINT32_TYPE__ *) s)[2] = __builtin_bswap32 (x); bar (s); } Index: gcc.c-torture/execute/printf-2.c =================================================================== --- gcc.c-torture/execute/printf-2.c (revision 277097) +++ gcc.c-torture/execute/printf-2.c (working copy) @@ -2,6 +2,7 @@ result on success can be computed at compile time (they can fail). The calls can still be transformed into those of other functions. { dg-require-effective-target unwrapped } + { dg-skip-if "requires io" { avr-*-* } } { dg-skip-if "requires io" { freestanding } } */ #include Index: gcc.c-torture/execute/user-printf.c =================================================================== --- gcc.c-torture/execute/user-printf.c (revision 277097) +++ gcc.c-torture/execute/user-printf.c (working copy) @@ -2,6 +2,7 @@ don't get eliminated even if their result on success can be computed at compile time (they can fail). { dg-require-effective-target unwrapped } + { dg-skip-if "requires io" { avr-*-* } } { dg-skip-if "requires io" { freestanding } } */ #include Index: gcc.dg/Wlarger-than3.c =================================================================== --- gcc.dg/Wlarger-than3.c (revision 277097) +++ gcc.dg/Wlarger-than3.c (working copy) @@ -1,6 +1,6 @@ /* Exercise -Wlarger-than= with a byte-size suffix. { dg-do compile } - { dg-skip-if "small address space" { "pdp11-*-*" } } + { dg-skip-if "small address space" { "pdp11-*-*" } { "avr-*-*" } } { dg-options "-Wlarger-than=1MiB" } */ #define MB (1000 * 1000) /* MegaByte */ Index: gcc.dg/complex-7.c =================================================================== --- gcc.dg/complex-7.c (revision 277097) +++ gcc.dg/complex-7.c (working copy) @@ -2,6 +2,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-cplxlower" } */ +/* { dg-require-effective-target double64 } */ __complex double foo (__complex double a, __complex double b) Index: gcc.dg/loop-versioning-1.c =================================================================== --- gcc.dg/loop-versioning-1.c (revision 277097) +++ gcc.dg/loop-versioning-1.c (working copy) @@ -1,4 +1,5 @@ /* { dg-options "-O3 -fdump-tree-lversion-details" } */ +/* { dg-require-effective-target size32plus } */ /* The simplest IV case. */ Index: gcc.dg/loop-versioning-2.c =================================================================== --- gcc.dg/loop-versioning-2.c (revision 277097) +++ gcc.dg/loop-versioning-2.c (working copy) @@ -1,4 +1,5 @@ /* { dg-options "-O3 -fdump-tree-lversion-details" } */ +/* { dg-require-effective-target size32plus } */ /* Versioning for step == 1 in these loops would allow loop interchange, but otherwise isn't worthwhile. At the moment we decide not to version. */ Index: gcc.dg/pow-sqrt-1.c =================================================================== --- gcc.dg/pow-sqrt-1.c (revision 277097) +++ gcc.dg/pow-sqrt-1.c (working copy) @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-O2 -ffast-math --param max-pow-sqrt-depth=5" } */ +/* { dg-require-effective-target double64plus } */ #define EXPN (-6 * (0.5*0.5*0.5*0.5)) Index: gcc.dg/pow-sqrt-2.c =================================================================== --- gcc.dg/pow-sqrt-2.c (revision 277097) +++ gcc.dg/pow-sqrt-2.c (working copy) @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-O2 -ffast-math --param max-pow-sqrt-depth=5" } */ +/* { dg-require-effective-target double64plus } */ #define EXPN (-5.875) #include "pow-sqrt.x" Index: gcc.dg/pow-sqrt-3.c =================================================================== --- gcc.dg/pow-sqrt-3.c (revision 277097) +++ gcc.dg/pow-sqrt-3.c (working copy) @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-O2 -ffast-math --param max-pow-sqrt-depth=3" } */ +/* { dg-require-effective-target double64plus } */ #define EXPN (1.25) #include "pow-sqrt.x" Index: gcc.dg/pr36017.c =================================================================== --- gcc.dg/pr36017.c (revision 277097) +++ gcc.dg/pr36017.c (working copy) @@ -2,7 +2,11 @@ /* { dg-do run } */ /* { dg-options "-O2" } */ +#if defined (__AVR__) && (__SIZEOF_DOUBLE__ == __SIZEOF_FLOAT__) +extern double sqrt (double) __asm ("sqrtf"); +#else extern double sqrt (double); +#endif extern void abort (void); __attribute__((noinline)) double