From patchwork Mon Oct 6 13:28:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Polacek X-Patchwork-Id: 396806 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 85613140085 for ; Tue, 7 Oct 2014 00:28:25 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=GaHScX9yYoJlIeHh2y9bR+NBDOZ/S5fgO7qyxeEgLz0UDc2EA2t1z MkWzedSQJab7+qpR6VZdsurY8pkp8WUHaHmT8T72R9F8QWaM/GkbpYVy0JZHHbmu J8fZuhLPIn3ZVIeqCcCLc+vPzU2AepjMgXmmO0hY+0ZjK5nvPlEUs4= 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:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=XOg9cBByytYOxWyauTTgB5KvEyA=; b=yvF2m5iznyflEFqquXAV 1/Buo6qWJ+V9GmSCEvf0QL4H/8MSia5u4kOu6B+qPgrJdpqzBpcTMkb9oD8GdF8j JjiBFNwqd49oCR+62jWkKFUBzJddbvddyr9MVQ9XSrPyETGxMccgvJa5jcZQ8yd5 y7vK/hPSuq2npdQLy9sw7sY= Received: (qmail 32721 invoked by alias); 6 Oct 2014 13:28:18 -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 32709 invoked by uid 89); 6 Oct 2014 13:28:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 06 Oct 2014 13:28:13 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s96DSCej005414 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 6 Oct 2014 09:28:12 -0400 Received: from redhat.com (ovpn-116-41.ams2.redhat.com [10.36.116.41]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s96DS9H7018801 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO) for ; Mon, 6 Oct 2014 09:28:11 -0400 Date: Mon, 6 Oct 2014 15:28:08 +0200 From: Marek Polacek To: GCC Patches Subject: [PATCH] gcc.target/i386/ cleanup Message-ID: <20141006132808.GU3503@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) This patch is a cleanup of tests in gcc.target/i386/ directory. See https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02656.html for more info. Tested on x86_64-linux: vanilla results == results with this patch == results with this patch and gnu11 as a default. Applying to trunk. 2014-10-06 Marek Polacek * gcc.target/i386/20040112-1.c: Fix defaulting to int. * gcc.target/i386/avxfp-1.c: Likewise. * gcc.target/i386/avxfp-2.c: Likewise. * gcc.target/i386/cadd.c: Likewise. * gcc.target/i386/cmov2.c: Likewise. * gcc.target/i386/cmov3.c: Likewise. * gcc.target/i386/cmov4.c: Likewise. * gcc.target/i386/cold-attribute-1.c: Likewise. * gcc.target/i386/cvt-1.c: Likewise. * gcc.target/i386/fpcvt-1.c: Likewise. * gcc.target/i386/fpcvt-2.c: Likewise. * gcc.target/i386/fpcvt-3.c: Likewise. * gcc.target/i386/local.c: Likewise. * gcc.target/i386/memcpy-2.c: Likewise. * gcc.target/i386/memcpy-3.c: Likewise. * gcc.target/i386/memset-1.c: Likewise. * gcc.target/i386/minmax-1.c: Likewise. * gcc.target/i386/minmax-2.c: Likewise. * gcc.target/i386/pr45352-2.c: Likewise. * gcc.target/i386/pr46253.c: Likewise. * gcc.target/i386/pr53623.c: Likewise. * gcc.target/i386/pr60902.c: Likewise. * gcc.target/i386/pr57003.c: Likewise. * gcc.target/i386/sse-14.c: Likewise. * gcc.target/i386/sse-19.c: Likewise. * gcc.target/i386/sse-22.c: Likewise. * gcc.target/i386/sse4a-extract.c: Likewise. * gcc.target/i386/sse4a-insert.c: Likewise. * gcc.target/i386/ssefp-1.c: Likewise. * gcc.target/i386/ssefp-2.c: Likewise. * gcc.target/i386/testimm-10.c: Likewise. * gcc.target/i386/vectorize4-avx.c: Likewise. * gcc.target/i386/980709-1.c: Fix implicit declarations. * gcc.target/i386/avx-pr57233.c: Likewise. * gcc.target/i386/avx2-pr57233.c: Likewise. * gcc.target/i386/avx2-vpop-check.h: Likewise. * gcc.target/i386/avx256-unaligned-load-7.c: Likewise. * gcc.target/i386/avx256-unaligned-store-7.c: Likewise. * gcc.target/i386/crc32-4.c: Likewise. * gcc.target/i386/pr20204.c: Likewise. * gcc.target/i386/pr23570.c: Likewise. * gcc.target/i386/pr26449-1.c: Likewise. * gcc.target/i386/pr28839.c: Likewise. * gcc.target/i386/pr37101.c: Likewise. * gcc.target/i386/pr61923.c: Likewise. * gcc.target/i386/shrink_wrap_1.c: Likewise. * gcc.target/i386/sse2-pr57233.c: Likewise. * gcc.target/i386/vect-abs-s16.c: Likewise. * gcc.target/i386/vect-abs-s32.c: Likewise. * gcc.target/i386/vect-abs-s8.c: Likewise. * gcc.target/i386/xop-pr57233.c: Likewise. * gcc.target/i386/xop-rotate2-vector.c: Likewise. * gcc.target/i386/cold-attribute-2.c: Fix defaulting to int. Fix implicit declarations. * gcc.target/i386/xop-shift1-vector.c: Fix typo. * gcc.target/i386/xop-shift2-vector.c: Likewise. * gcc.target/i386/xop-shift3-vector.c: Likewise. Marek diff --git gcc/gcc/testsuite/gcc.target/i386/20040112-1.c gcc/gcc/testsuite/gcc.target/i386/20040112-1.c index 168fd2f..9dd0989 100644 --- gcc/gcc/testsuite/gcc.target/i386/20040112-1.c +++ gcc/gcc/testsuite/gcc.target/i386/20040112-1.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2" } */ /* { dg-final { scan-assembler "testb" } } */ +void ftn (char *sp) { char status; diff --git gcc/gcc/testsuite/gcc.target/i386/980709-1.c gcc/gcc/testsuite/gcc.target/i386/980709-1.c index 595b7cb..dcc873f 100644 --- gcc/gcc/testsuite/gcc.target/i386/980709-1.c +++ gcc/gcc/testsuite/gcc.target/i386/980709-1.c @@ -13,6 +13,7 @@ extern __inline__ int test_and_set_bit(int nr, volatile void * addr) struct buffer_head { unsigned long b_state; }; +void __wait_on_buffer (struct buffer_head *); extern void lock_buffer(struct buffer_head * bh) { while (test_and_set_bit(2 , &bh->b_state)) diff --git gcc/gcc/testsuite/gcc.target/i386/avx-pr57233.c gcc/gcc/testsuite/gcc.target/i386/avx-pr57233.c index ffc71d9..1363495 100644 --- gcc/gcc/testsuite/gcc.target/i386/avx-pr57233.c +++ gcc/gcc/testsuite/gcc.target/i386/avx-pr57233.c @@ -4,6 +4,8 @@ #include "avx-check.h" +int do_main (void); + static void avx_test (void) { diff --git gcc/gcc/testsuite/gcc.target/i386/avx2-pr57233.c gcc/gcc/testsuite/gcc.target/i386/avx2-pr57233.c index 3fb2608..e0c8b96 100644 --- gcc/gcc/testsuite/gcc.target/i386/avx2-pr57233.c +++ gcc/gcc/testsuite/gcc.target/i386/avx2-pr57233.c @@ -4,6 +4,8 @@ #include "avx2-check.h" +int do_main (void); + static void avx2_test (void) { diff --git gcc/gcc/testsuite/gcc.target/i386/avx2-vpop-check.h gcc/gcc/testsuite/gcc.target/i386/avx2-vpop-check.h index 204b11c..c590940 100644 --- gcc/gcc/testsuite/gcc.target/i386/avx2-vpop-check.h +++ gcc/gcc/testsuite/gcc.target/i386/avx2-vpop-check.h @@ -6,6 +6,7 @@ TYPE a[SIZE]; TYPE b[SIZE]; TYPE c[SIZE]; volatile TYPE c_ref[SIZE]; +extern int memcmp (const void *, const void *, size_t); __attribute__ ((__noinline__)) void diff --git gcc/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-7.c gcc/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-7.c index ad16a53..4a94e03 100644 --- gcc/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-7.c +++ gcc/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-7.c @@ -10,6 +10,7 @@ char **ep; char **fp; char **mp; char **lp; +extern int strcmp (const char *, const char *); __attribute__ ((noinline)) void diff --git gcc/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-7.c gcc/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-7.c index 4272dc3..85e387a 100644 --- gcc/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-7.c +++ gcc/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-7.c @@ -8,6 +8,7 @@ char **ep; char **fp; +extern int strcmp (const char *, const char *); __attribute__ ((noinline)) void diff --git gcc/gcc/testsuite/gcc.target/i386/avxfp-1.c gcc/gcc/testsuite/gcc.target/i386/avxfp-1.c index 70bc8f1..f8af94b 100644 --- gcc/gcc/testsuite/gcc.target/i386/avxfp-1.c +++ gcc/gcc/testsuite/gcc.target/i386/avxfp-1.c @@ -3,12 +3,14 @@ /* { dg-final { scan-assembler "vmaxsd" } } */ /* { dg-final { scan-assembler "vminsd" } } */ double x; +void t() { x=x>5?x:5; } double x; +void q() { x=x<5?x:5; diff --git gcc/gcc/testsuite/gcc.target/i386/avxfp-2.c gcc/gcc/testsuite/gcc.target/i386/avxfp-2.c index c34a1bd..c4a00ad 100644 --- gcc/gcc/testsuite/gcc.target/i386/avxfp-2.c +++ gcc/gcc/testsuite/gcc.target/i386/avxfp-2.c @@ -3,12 +3,14 @@ /* { dg-final { scan-assembler "vmaxsd" } } */ /* { dg-final { scan-assembler "vminsd" } } */ double x; +void q() { x=x<5?5:x; } double x; +void q1() { x=x>5?5:x; diff --git gcc/gcc/testsuite/gcc.target/i386/cadd.c gcc/gcc/testsuite/gcc.target/i386/cadd.c index 7a39c67..0c03ec3 100644 --- gcc/gcc/testsuite/gcc.target/i386/cadd.c +++ gcc/gcc/testsuite/gcc.target/i386/cadd.c @@ -6,6 +6,7 @@ extern void abort (void); /* Conditional increment is best done using sbb $-1, val. */ int t[]={0,0,0,0,1,1,1,1,1,1}; +void q() { int sum=0; @@ -16,6 +17,7 @@ q() if (sum != 6) abort (); } +int main() { int i; diff --git gcc/gcc/testsuite/gcc.target/i386/cmov2.c gcc/gcc/testsuite/gcc.target/i386/cmov2.c index 2b7c696..d5fa16b 100644 --- gcc/gcc/testsuite/gcc.target/i386/cmov2.c +++ gcc/gcc/testsuite/gcc.target/i386/cmov2.c @@ -3,6 +3,7 @@ /* { dg-final { scan-assembler "sbb" } } */ /* This conditional move is fastest to be done using sbb. */ +int t(unsigned int a, unsigned int b) { return (a<=b?5:-5); diff --git gcc/gcc/testsuite/gcc.target/i386/cmov3.c gcc/gcc/testsuite/gcc.target/i386/cmov3.c index 34df0aa..a2cf77a 100644 --- gcc/gcc/testsuite/gcc.target/i386/cmov3.c +++ gcc/gcc/testsuite/gcc.target/i386/cmov3.c @@ -3,6 +3,7 @@ /* { dg-final { scan-assembler "cmov\[^3\]" } } */ /* This conditional move is fastest to be done using cmov. */ +int t(int a, int b) { return (a<=b?5:-5); diff --git gcc/gcc/testsuite/gcc.target/i386/cmov4.c gcc/gcc/testsuite/gcc.target/i386/cmov4.c index 6a955ea..2bcb74f 100644 --- gcc/gcc/testsuite/gcc.target/i386/cmov4.c +++ gcc/gcc/testsuite/gcc.target/i386/cmov4.c @@ -6,6 +6,7 @@ int ARCHnodes; int *nodekind; float *nodekindf; +void t() { int i; diff --git gcc/gcc/testsuite/gcc.target/i386/cold-attribute-1.c gcc/gcc/testsuite/gcc.target/i386/cold-attribute-1.c index db81ee8..57666ac 100644 --- gcc/gcc/testsuite/gcc.target/i386/cold-attribute-1.c +++ gcc/gcc/testsuite/gcc.target/i386/cold-attribute-1.c @@ -2,11 +2,12 @@ /* { dg-options "-O2" } */ #include static inline -__attribute__ ((cold)) +__attribute__ ((cold)) void my_cold_memset (void *a, int b,int c) { memset (a,b,c); } +void t(void *a,int b,int c) { if (a) diff --git gcc/gcc/testsuite/gcc.target/i386/cold-attribute-2.c gcc/gcc/testsuite/gcc.target/i386/cold-attribute-2.c index 4b61b9d..4e6647e 100644 --- gcc/gcc/testsuite/gcc.target/i386/cold-attribute-2.c +++ gcc/gcc/testsuite/gcc.target/i386/cold-attribute-2.c @@ -1,6 +1,8 @@ /* { dg-do compile } */ /* { dg-options "-O2 --param=builtin-expect-probability=100" } */ #include +void cold_hint (void); +int t(int c) { if (__builtin_expect (c, 0)) diff --git gcc/gcc/testsuite/gcc.target/i386/crc32-4.c gcc/gcc/testsuite/gcc.target/i386/crc32-4.c index 65ef4aa..a2051ed 100644 --- gcc/gcc/testsuite/gcc.target/i386/crc32-4.c +++ gcc/gcc/testsuite/gcc.target/i386/crc32-4.c @@ -2,6 +2,9 @@ /* { dg-options "-O2 -mno-sse4.2 -mno-crc32" } */ /* { dg-final { scan-assembler "__builtin_ia32_crc32di" } } */ +unsigned long long __builtin_ia32_crc32di (unsigned long long x, + unsigned long long y); + unsigned long long crc32d (unsigned long long x, unsigned long long y) { diff --git gcc/gcc/testsuite/gcc.target/i386/cvt-1.c gcc/gcc/testsuite/gcc.target/i386/cvt-1.c index 9535725..fdcd9e0 100644 --- gcc/gcc/testsuite/gcc.target/i386/cvt-1.c +++ gcc/gcc/testsuite/gcc.target/i386/cvt-1.c @@ -5,6 +5,7 @@ int a,a1; double b; float b1; +void t() { a=b; diff --git gcc/gcc/testsuite/gcc.target/i386/fpcvt-1.c gcc/gcc/testsuite/gcc.target/i386/fpcvt-1.c index 1c3b9b8..db2d6d5 100644 --- gcc/gcc/testsuite/gcc.target/i386/fpcvt-1.c +++ gcc/gcc/testsuite/gcc.target/i386/fpcvt-1.c @@ -2,6 +2,7 @@ /* { dg-options "-O2 -msse2 -march=k8" } */ /* { dg-final { scan-assembler-not "cvtss2sd" } } */ float a,b; +int main() { a=b*3.0; diff --git gcc/gcc/testsuite/gcc.target/i386/fpcvt-2.c gcc/gcc/testsuite/gcc.target/i386/fpcvt-2.c index 066d843..5da7686 100644 --- gcc/gcc/testsuite/gcc.target/i386/fpcvt-2.c +++ gcc/gcc/testsuite/gcc.target/i386/fpcvt-2.c @@ -2,6 +2,7 @@ /* { dg-options "-O2 -msse2 -march=k8" } */ /* { dg-final { scan-assembler-not "cvtss2sd" } } */ float a,b; +int main() { return a<0.0; diff --git gcc/gcc/testsuite/gcc.target/i386/fpcvt-3.c gcc/gcc/testsuite/gcc.target/i386/fpcvt-3.c index 569d21a..3d53624 100644 --- gcc/gcc/testsuite/gcc.target/i386/fpcvt-3.c +++ gcc/gcc/testsuite/gcc.target/i386/fpcvt-3.c @@ -3,6 +3,7 @@ /* { dg-final { scan-assembler-not "cvtss2sd" } } */ extern double fabs (double); float a,b; +int main() { a=fabs(b)+1.0; diff --git gcc/gcc/testsuite/gcc.target/i386/local.c gcc/gcc/testsuite/gcc.target/i386/local.c index 4423001..9a353d9 100644 --- gcc/gcc/testsuite/gcc.target/i386/local.c +++ gcc/gcc/testsuite/gcc.target/i386/local.c @@ -4,7 +4,7 @@ /* { dg-final { scan-assembler "magic\[^\\n\]*(edi|ecx)" { target { ! { ia32 } } } } } */ /* Verify that local calling convention is used. */ -static t(int) __attribute__ ((noinline)); +static void t(int) __attribute__ ((noinline)); extern volatile int i; void m(void) @@ -12,7 +12,7 @@ void m(void) t(i); } -static t(int a) +static void t(int a) { asm("magic %0"::"g"(a)); } diff --git gcc/gcc/testsuite/gcc.target/i386/memcpy-2.c gcc/gcc/testsuite/gcc.target/i386/memcpy-2.c index 56cdd56..76725c9 100644 --- gcc/gcc/testsuite/gcc.target/i386/memcpy-2.c +++ gcc/gcc/testsuite/gcc.target/i386/memcpy-2.c @@ -2,6 +2,7 @@ /* { dg-options "-O2" } */ void *a; void *b; +void t(unsigned int c) { if (c<10) diff --git gcc/gcc/testsuite/gcc.target/i386/memcpy-3.c gcc/gcc/testsuite/gcc.target/i386/memcpy-3.c index b9ea9c2..424d2f8 100644 --- gcc/gcc/testsuite/gcc.target/i386/memcpy-3.c +++ gcc/gcc/testsuite/gcc.target/i386/memcpy-3.c @@ -2,6 +2,7 @@ /* { dg-options "-O2" } */ void *a; void *b; +void t(int c) { if (c<10) diff --git gcc/gcc/testsuite/gcc.target/i386/memset-1.c gcc/gcc/testsuite/gcc.target/i386/memset-1.c index eaf3230..5e0f0b1 100644 --- gcc/gcc/testsuite/gcc.target/i386/memset-1.c +++ gcc/gcc/testsuite/gcc.target/i386/memset-1.c @@ -36,6 +36,7 @@ static union { char A = 'A'; +int main () { int off, len, i; diff --git gcc/gcc/testsuite/gcc.target/i386/minmax-1.c gcc/gcc/testsuite/gcc.target/i386/minmax-1.c index ca7fb6a..b92b8f9 100644 --- gcc/gcc/testsuite/gcc.target/i386/minmax-1.c +++ gcc/gcc/testsuite/gcc.target/i386/minmax-1.c @@ -3,6 +3,7 @@ /* { dg-final { scan-assembler "test" } } */ /* { dg-final { scan-assembler-not "cmp" } } */ #define max(a,b) (((a) > (b))? (a) : (b)) +int t(int a) { return (max(a,1)); diff --git gcc/gcc/testsuite/gcc.target/i386/minmax-2.c gcc/gcc/testsuite/gcc.target/i386/minmax-2.c index 2021aaa..a5cdf93 100644 --- gcc/gcc/testsuite/gcc.target/i386/minmax-2.c +++ gcc/gcc/testsuite/gcc.target/i386/minmax-2.c @@ -3,6 +3,7 @@ /* { dg-final { scan-assembler "test" } } */ /* { dg-final { scan-assembler-not "cmp" } } */ #define max(a,b) (((a) > (b))? (a) : (b)) +unsigned int t(unsigned int a) { return (max(a,1)); diff --git gcc/gcc/testsuite/gcc.target/i386/pr20204.c gcc/gcc/testsuite/gcc.target/i386/pr20204.c index ca97a3a..3d1f015 100644 --- gcc/gcc/testsuite/gcc.target/i386/pr20204.c +++ gcc/gcc/testsuite/gcc.target/i386/pr20204.c @@ -1,6 +1,8 @@ /* { dg-do run } */ /* { dg-options "-O2" } */ +extern int memcmp (const void *, const void *, __SIZE_TYPE__); + void *x (void *pdst, const void *psrc, unsigned int pn) { register void *return_dst = pdst; diff --git gcc/gcc/testsuite/gcc.target/i386/pr23570.c gcc/gcc/testsuite/gcc.target/i386/pr23570.c index 1542663..bf4e95a 100644 --- gcc/gcc/testsuite/gcc.target/i386/pr23570.c +++ gcc/gcc/testsuite/gcc.target/i386/pr23570.c @@ -71,6 +71,9 @@ sse_swap_rowf (float *r1, float *r2, int n) } } +void swap_index (int *, int, int); +void sse_add_rowf (float *, float *, float, int); + void ludcompf (float *m, int nw, int *prow, int n) { diff --git gcc/gcc/testsuite/gcc.target/i386/pr26449-1.c gcc/gcc/testsuite/gcc.target/i386/pr26449-1.c index b4ef780..47849d3 100644 --- gcc/gcc/testsuite/gcc.target/i386/pr26449-1.c +++ gcc/gcc/testsuite/gcc.target/i386/pr26449-1.c @@ -3,6 +3,7 @@ typedef short __v8hi __attribute__ ((__vector_size__ (16))); typedef long long __m128i __attribute__ ((__vector_size__ (16))); +extern int memcmp (const void *, const void *, __SIZE_TYPE__); void sse2_test (void) { diff --git gcc/gcc/testsuite/gcc.target/i386/pr28839.c gcc/gcc/testsuite/gcc.target/i386/pr28839.c index 6a21516..ff4c79d 100644 --- gcc/gcc/testsuite/gcc.target/i386/pr28839.c +++ gcc/gcc/testsuite/gcc.target/i386/pr28839.c @@ -3,6 +3,7 @@ static int ready[10]; void abort (void); +int b (void); void test_once (int t,int t1) { int i, repeat; diff --git gcc/gcc/testsuite/gcc.target/i386/pr37101.c gcc/gcc/testsuite/gcc.target/i386/pr37101.c index 8fd3bfc..0675f0f 100644 --- gcc/gcc/testsuite/gcc.target/i386/pr37101.c +++ gcc/gcc/testsuite/gcc.target/i386/pr37101.c @@ -20,6 +20,7 @@ typedef struct _ClientResource } ClientResourceRec; static ClientResourceRec clientTable[256]; +int Hash (int, unsigned int); void RebuildTable (int client) diff --git gcc/gcc/testsuite/gcc.target/i386/pr45352-2.c gcc/gcc/testsuite/gcc.target/i386/pr45352-2.c index 52e5522..47e428c 100644 --- gcc/gcc/testsuite/gcc.target/i386/pr45352-2.c +++ gcc/gcc/testsuite/gcc.target/i386/pr45352-2.c @@ -2,8 +2,8 @@ /* { dg-options "-O1 -mtune=amdfam10 -fexpensive-optimizations -fgcse -foptimize-register-move -freorder-blocks -fschedule-insns2 -funswitch-loops -fgcse-las -fselective-scheduling2 -fsel-sched-pipelining -funroll-all-loops" } */ typedef char uint8_t; -typedef uint32_t; -typedef vo_frame_t; +typedef int uint32_t; +typedef int vo_frame_t; __extension__ typedef __SIZE_TYPE__ size_t; struct vo_frame_s @@ -47,7 +47,7 @@ static int bitstream_init (picture_t * picture, void *start) picture->bitstream_ptr = start; return (int) (size_t) start; } -static slice_xvmc_init (picture_t * picture, int code) +static void slice_xvmc_init (picture_t * picture, int code) { int offset; struct vo_frame_s *forward_reference_frame; diff --git gcc/gcc/testsuite/gcc.target/i386/pr46253.c gcc/gcc/testsuite/gcc.target/i386/pr46253.c index 406790a..93d5f1f 100644 --- gcc/gcc/testsuite/gcc.target/i386/pr46253.c +++ gcc/gcc/testsuite/gcc.target/i386/pr46253.c @@ -1,7 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O -g -mf16c -mtune=generic -dp" } */ -typedef __m256i __attribute__ ((__vector_size__ (32))); +typedef int __m256i __attribute__ ((__vector_size__ (32))); __m256i bar (void); void foo (void) diff --git gcc/gcc/testsuite/gcc.target/i386/pr53623.c gcc/gcc/testsuite/gcc.target/i386/pr53623.c index 35c578b..05435ed 100644 --- gcc/gcc/testsuite/gcc.target/i386/pr53623.c +++ gcc/gcc/testsuite/gcc.target/i386/pr53623.c @@ -4,7 +4,7 @@ #include -typedef (*inst_t)(int64_t rdi, int64_t rsi, int64_t rdx); +typedef int (*inst_t)(int64_t rdi, int64_t rsi, int64_t rdx); int16_t code[256]; inst_t dispatch[256]; diff --git gcc/gcc/testsuite/gcc.target/i386/pr57003.c gcc/gcc/testsuite/gcc.target/i386/pr57003.c index dfa6b8b..7300c2d 100644 --- gcc/gcc/testsuite/gcc.target/i386/pr57003.c +++ gcc/gcc/testsuite/gcc.target/i386/pr57003.c @@ -21,7 +21,7 @@ baz (unsigned long x) return d; } -__attribute__ ((ms_abi, noinline, noclone)) +__attribute__ ((ms_abi, noinline, noclone)) void foo (void) { unsigned d; diff --git gcc/gcc/testsuite/gcc.target/i386/pr60902.c gcc/gcc/testsuite/gcc.target/i386/pr60902.c index b81dcd7..8fd27a4 100644 --- gcc/gcc/testsuite/gcc.target/i386/pr60902.c +++ gcc/gcc/testsuite/gcc.target/i386/pr60902.c @@ -5,6 +5,7 @@ extern void exit (int); int x; +void foo() { static int count; diff --git gcc/gcc/testsuite/gcc.target/i386/pr61923.c gcc/gcc/testsuite/gcc.target/i386/pr61923.c index 458158c..0ef8af5 100644 --- gcc/gcc/testsuite/gcc.target/i386/pr61923.c +++ gcc/gcc/testsuite/gcc.target/i386/pr61923.c @@ -19,6 +19,7 @@ struct ext4_map_blocks int m_flags; }; int ext4_da_map_blocks_ei_0; +void fn2 (int, int); void fn1 (int p1, struct ext4_map_blocks *p2) { int ret; diff --git gcc/gcc/testsuite/gcc.target/i386/shrink_wrap_1.c gcc/gcc/testsuite/gcc.target/i386/shrink_wrap_1.c index 18d28d3..8a1baef 100644 --- gcc/gcc/testsuite/gcc.target/i386/shrink_wrap_1.c +++ gcc/gcc/testsuite/gcc.target/i386/shrink_wrap_1.c @@ -20,6 +20,7 @@ extern rtx c_readstr (const char *, enum machine_mode); extern rtx convert_to_mode (enum machine_mode, rtx, int); extern rtx expand_mult (enum machine_mode, rtx, rtx, rtx, int); extern rtx force_reg (enum machine_mode, rtx); +extern unsigned char mode_size_inline (enum machine_mode); extern void *memset (void *__s, int __c, size_t __n); rtx diff --git gcc/gcc/testsuite/gcc.target/i386/sse-14.c gcc/gcc/testsuite/gcc.target/i386/sse-14.c index 2641b80..82099dd 100644 --- gcc/gcc/testsuite/gcc.target/i386/sse-14.c +++ gcc/gcc/testsuite/gcc.target/i386/sse-14.c @@ -68,13 +68,13 @@ { return func (A, B, C, imm1, imm2, imm3); } #define test_3v(func, op1_type, op2_type, op3_type, imm) \ - _CONCAT(_,func) (op1_type A, op2_type B, \ - op3_type C, int const I) \ + int _CONCAT(_,func) (op1_type A, op2_type B, \ + op3_type C, int const I) \ { func (A, B, C, imm); } #define test_3vx(func, op1_type, op2_type, op3_type, imm1, imm2) \ - _CONCAT(_,func) (op1_type A, op2_type B, \ - op3_type C, int const I, int const L) \ + int _CONCAT(_,func) (op1_type A, op2_type B, \ + op3_type C, int const I, int const L) \ { func (A, B, C, imm1, imm2); } #define test_4(func, type, op1_type, op2_type, op3_type, op4_type, imm) \ @@ -93,8 +93,8 @@ { return func (A, B, C, D, imm1, imm2, imm3); } #define test_4v(func, op1_type, op2_type, op3_type, op4_type, imm) \ - _CONCAT(_,func) (op1_type A, op2_type B, \ - op3_type C, op4_type D, int const I) \ + int _CONCAT(_,func) (op1_type A, op2_type B, \ + op3_type C, op4_type D, int const I) \ { func (A, B, C, D, imm); } diff --git gcc/gcc/testsuite/gcc.target/i386/sse-19.c gcc/gcc/testsuite/gcc.target/i386/sse-19.c index 3025567..2981cd4 100644 --- gcc/gcc/testsuite/gcc.target/i386/sse-19.c +++ gcc/gcc/testsuite/gcc.target/i386/sse-19.c @@ -13,6 +13,7 @@ __m128i bar (char x) { return _mm_set_epi8 (x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x); } +int main() { int i, j; union u { __m128i v; char c[16]; }; diff --git gcc/gcc/testsuite/gcc.target/i386/sse-22.c gcc/gcc/testsuite/gcc.target/i386/sse-22.c index 26b805d..0b0bc3d 100644 --- gcc/gcc/testsuite/gcc.target/i386/sse-22.c +++ gcc/gcc/testsuite/gcc.target/i386/sse-22.c @@ -67,13 +67,13 @@ { return func (A, B, C, imm1, imm2, imm3); } #define test_3v(func, op1_type, op2_type, op3_type, imm) \ - _CONCAT(_,func) (op1_type A, op2_type B, \ - op3_type C, int const I) \ + int _CONCAT(_,func) (op1_type A, op2_type B, \ + op3_type C, int const I) \ { func (A, B, C, imm); } #define test_3vx(func, op1_type, op2_type, op3_type, imm1, imm2) \ - _CONCAT(_,func) (op1_type A, op2_type B, \ - op3_type C, int const I, int const L) \ + int _CONCAT(_,func) (op1_type A, op2_type B, \ + op3_type C, int const I, int const L) \ { func (A, B, C, imm1, imm2); } #define test_4(func, type, op1_type, op2_type, op3_type, op4_type, imm) \ @@ -93,8 +93,8 @@ #define test_4v(func, op1_type, op2_type, op3_type, op4_type, imm) \ - _CONCAT(_,func) (op1_type A, op2_type B, \ - op3_type C, op4_type D, int const I) \ + int _CONCAT(_,func) (op1_type A, op2_type B, \ + op3_type C, op4_type D, int const I) \ { func (A, B, C, D, imm); } diff --git gcc/gcc/testsuite/gcc.target/i386/sse2-pr57233.c gcc/gcc/testsuite/gcc.target/i386/sse2-pr57233.c index 8a3bb2f..561691a 100644 --- gcc/gcc/testsuite/gcc.target/i386/sse2-pr57233.c +++ gcc/gcc/testsuite/gcc.target/i386/sse2-pr57233.c @@ -4,6 +4,8 @@ #include "sse2-check.h" +int do_main (void); + static void sse2_test (void) { diff --git gcc/gcc/testsuite/gcc.target/i386/sse4a-extract.c gcc/gcc/testsuite/gcc.target/i386/sse4a-extract.c index 5fb190e..2f9344c 100644 --- gcc/gcc/testsuite/gcc.target/i386/sse4a-extract.c +++ gcc/gcc/testsuite/gcc.target/i386/sse4a-extract.c @@ -37,7 +37,7 @@ sse4a_test_extrqi (long long in) return (v_out.i[0]); } -static chk (long long i1, long long i2) +static int chk (long long i1, long long i2) { int n_fails =0; if (i1 != i2) diff --git gcc/gcc/testsuite/gcc.target/i386/sse4a-insert.c gcc/gcc/testsuite/gcc.target/i386/sse4a-insert.c index c1bd100..7d9ec48 100644 --- gcc/gcc/testsuite/gcc.target/i386/sse4a-insert.c +++ gcc/gcc/testsuite/gcc.target/i386/sse4a-insert.c @@ -38,7 +38,7 @@ sse4a_test_inserti (long long in1, long long in2) return (v_out.i[0]); } -static chk (long long i1, long long i2) +static int chk (long long i1, long long i2) { int n_fails =0; if (i1 != i2) diff --git gcc/gcc/testsuite/gcc.target/i386/ssefp-1.c gcc/gcc/testsuite/gcc.target/i386/ssefp-1.c index 621e362..cd13652 100644 --- gcc/gcc/testsuite/gcc.target/i386/ssefp-1.c +++ gcc/gcc/testsuite/gcc.target/i386/ssefp-1.c @@ -3,12 +3,14 @@ /* { dg-final { scan-assembler "maxsd" } } */ /* { dg-final { scan-assembler "minsd" } } */ double x; +void t() { x=x>5?x:5; } double x; +void q() { x=x<5?x:5; diff --git gcc/gcc/testsuite/gcc.target/i386/ssefp-2.c gcc/gcc/testsuite/gcc.target/i386/ssefp-2.c index a6caee3..98e00f3 100644 --- gcc/gcc/testsuite/gcc.target/i386/ssefp-2.c +++ gcc/gcc/testsuite/gcc.target/i386/ssefp-2.c @@ -3,12 +3,14 @@ /* { dg-final { scan-assembler "maxsd" } } */ /* { dg-final { scan-assembler "minsd" } } */ double x; +void q() { x=x<5?5:x; } double x; +void q1() { x=x>5?5:x; diff --git gcc/gcc/testsuite/gcc.target/i386/testimm-10.c gcc/gcc/testsuite/gcc.target/i386/testimm-10.c index d744e1c..c2bf0db 100644 --- gcc/gcc/testsuite/gcc.target/i386/testimm-10.c +++ gcc/gcc/testsuite/gcc.target/i386/testimm-10.c @@ -142,6 +142,7 @@ test8bit (void) } +void test1bit (void) { m256d = _mm512_extractf64x4_pd (m512d, 256); /* { dg-error "the last argument must be a 1-bit immediate" } */ m256d = _mm512_mask_extractf64x4_pd (m256d, mmask8, m512d, 256); /* { dg-error "the last argument must be a 1-bit immediate" } */ @@ -160,6 +161,7 @@ test1bit (void) { m512i = _mm512_maskz_inserti64x4 (mmask8, m512i, m256i, 256); /* { dg-error "the last argument must be a 1-bit immediate" } */ } +void test2bit (void) { m128 = _mm512_extractf32x4_ps(m512, 256); /* { dg-error "the last argument must be a 2-bit immediate" } */ m128 = _mm512_mask_extractf32x4_ps(m128, mmask8, m512, 256); /* { dg-error "the last argument must be a 2-bit immediate" } */ @@ -178,6 +180,7 @@ test2bit (void) { m512i = _mm512_maskz_inserti32x4 (mmask16, m512i, m128i, 256); /* { dg-error "the last argument must be a 2-bit immediate" } */ } +void test4bit (void) { m512d = _mm512_getmant_pd (m512d, 1, 64); /* { dg-error "the immediate argument must be a 4-bit immediate" } */ m512d = _mm512_mask_getmant_pd (m512d, mmask8, m512d, 1, 64); /* { dg-error "the immediate argument must be a 4-bit immediate" } */ diff --git gcc/gcc/testsuite/gcc.target/i386/vect-abs-s16.c gcc/gcc/testsuite/gcc.target/i386/vect-abs-s16.c index 191ae34..f6edfde 100644 --- gcc/gcc/testsuite/gcc.target/i386/vect-abs-s16.c +++ gcc/gcc/testsuite/gcc.target/i386/vect-abs-s16.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -ftree-vectorize -msse2 -mno-sse3 -fdump-tree-vect-details" } */ +int abs (int); void test (short* a, short* b) { diff --git gcc/gcc/testsuite/gcc.target/i386/vect-abs-s32.c gcc/gcc/testsuite/gcc.target/i386/vect-abs-s32.c index 575e8ef..adde9c9 100644 --- gcc/gcc/testsuite/gcc.target/i386/vect-abs-s32.c +++ gcc/gcc/testsuite/gcc.target/i386/vect-abs-s32.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -ftree-vectorize -msse2 -mno-sse3 -fdump-tree-vect-details" } */ +int abs (int); void test (int* a, int* b) { diff --git gcc/gcc/testsuite/gcc.target/i386/vect-abs-s8.c gcc/gcc/testsuite/gcc.target/i386/vect-abs-s8.c index 3f3f3fa..424e8cb 100644 --- gcc/gcc/testsuite/gcc.target/i386/vect-abs-s8.c +++ gcc/gcc/testsuite/gcc.target/i386/vect-abs-s8.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -ftree-vectorize -msse2 -mno-sse3 -fdump-tree-vect-details" } */ +int abs (int); void test (char* a, char* b) { diff --git gcc/gcc/testsuite/gcc.target/i386/vectorize4-avx.c gcc/gcc/testsuite/gcc.target/i386/vectorize4-avx.c index 33e9918..e7762eb 100644 --- gcc/gcc/testsuite/gcc.target/i386/vectorize4-avx.c +++ gcc/gcc/testsuite/gcc.target/i386/vectorize4-avx.c @@ -3,6 +3,7 @@ extern double sqrt (double __x); +void calc_freq (int *dest) { float tmp_out[257]; diff --git gcc/gcc/testsuite/gcc.target/i386/xop-pr57233.c gcc/gcc/testsuite/gcc.target/i386/xop-pr57233.c index 6129dc2..c579821 100644 --- gcc/gcc/testsuite/gcc.target/i386/xop-pr57233.c +++ gcc/gcc/testsuite/gcc.target/i386/xop-pr57233.c @@ -4,6 +4,8 @@ #include "xop-check.h" +int do_main (void); + static void xop_test (void) { diff --git gcc/gcc/testsuite/gcc.target/i386/xop-rotate2-vector.c gcc/gcc/testsuite/gcc.target/i386/xop-rotate2-vector.c index 11435a7..02d1c4d 100644 --- gcc/gcc/testsuite/gcc.target/i386/xop-rotate2-vector.c +++ gcc/gcc/testsuite/gcc.target/i386/xop-rotate2-vector.c @@ -5,6 +5,7 @@ /* { dg-options "-O2 -mxop -mno-avx2 -ftree-vectorize" } */ extern void exit (int); +extern void right_rotate (void); typedef long __m128i __attribute__ ((__vector_size__ (16), __may_alias__)); diff --git gcc/gcc/testsuite/gcc.target/i386/xop-shift1-vector.c gcc/gcc/testsuite/gcc.target/i386/xop-shift1-vector.c index 12e1caf..aa5568b 100644 --- gcc/gcc/testsuite/gcc.target/i386/xop-shift1-vector.c +++ gcc/gcc/testsuite/gcc.target/i386/xop-shift1-vector.c @@ -27,7 +27,7 @@ left_shift32 (void) int main () { - left_shfit32 (); + left_shift32 (); exit (0); } diff --git gcc/gcc/testsuite/gcc.target/i386/xop-shift2-vector.c gcc/gcc/testsuite/gcc.target/i386/xop-shift2-vector.c index 5533721..2c01684 100644 --- gcc/gcc/testsuite/gcc.target/i386/xop-shift2-vector.c +++ gcc/gcc/testsuite/gcc.target/i386/xop-shift2-vector.c @@ -27,7 +27,7 @@ right_sign_shift32 (void) int main () { - right_sign_shfit32 (); + right_sign_shift32 (); exit (0); } diff --git gcc/gcc/testsuite/gcc.target/i386/xop-shift3-vector.c gcc/gcc/testsuite/gcc.target/i386/xop-shift3-vector.c index e12edce..2662fe6 100644 --- gcc/gcc/testsuite/gcc.target/i386/xop-shift3-vector.c +++ gcc/gcc/testsuite/gcc.target/i386/xop-shift3-vector.c @@ -27,7 +27,7 @@ right_uns_shift32 (void) int main () { - right_uns_shfit32 (); + right_uns_shift32 (); exit (0); }