From patchwork Wed Nov 14 15:56:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jozef Lawrynowicz X-Patchwork-Id: 997803 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-490090-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mittosystems.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="yB7NzBf5"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mittosystems.com header.i=@mittosystems.com header.b="decULrxW"; 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 42w8JB3jkcz9s3C for ; Thu, 15 Nov 2018 02:56:57 +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 :subject:from:to:cc:references:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=Ke+XG8YPcIb+UtOCw CYKsBS9JtDu8RmNqs3XciDimxMDmBcWe8lnULEa55pDxof2jveSzzqUO95d/vS2R Vnzhk1Laul1IacTEqFhBihsIi0KDBquiz4fsHqCi+kdBTSBnbDKrnTBpC7wcFehM w6Yv4p8Z1agZpPrpa7pbL/LZv0= 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 :subject:from:to:cc:references:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=kWICqa04+xOO+1NpmXrQOU1 KldI=; b=yB7NzBf5yfLfngmQhAOVZt8Avrov0IZsmyPDe+QpNfzO944Wdn/XYy8 A+slIBBMOR69JjX3wZD04iF5Me7cKNgPTsG2wy5/h5YGPeMm8l8+DRQgevSDAkLq vRizRt0N6PWRkF8J73+Jjn4bkh4YTY+gcFWycHoQtrDG+iietzXU= Received: (qmail 77159 invoked by alias); 14 Nov 2018 15:56: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 77141 invoked by uid 89); 14 Nov 2018 15:56:49 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=pr79223c, pr79223.c, UD:pr79223.c, wchar_t X-HELO: mail-wm1-f51.google.com Received: from mail-wm1-f51.google.com (HELO mail-wm1-f51.google.com) (209.85.128.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 14 Nov 2018 15:56:43 +0000 Received: by mail-wm1-f51.google.com with SMTP id f10-v6so15904899wme.3 for ; Wed, 14 Nov 2018 07:56:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mittosystems.com; s=google; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=0vYlCkOj6ZPFA98rBDPsQKdW9Jmkl4YG9wKfrRhWJ3Q=; b=decULrxWdz5tTcaCEV1zrjIQmvaV3t3MMHPDODI/xauo6MccPEkrinhogpZqtUEh2h vBi4BhKDCMvx3ZPk6L32+F5MC7td7N2UAyEV8RnGb8/BYVmY7SgmXUqVgpUuNxu9Etqq l7fU7V8eu8+0fmFz2YS7s/8zQVacg9z6EJnMgu6j+ENr4HJjWa6tv7mPhSPzVU8Zq3Vl CvOTYdmQQF/zNtAAOHy7ZKOZnxSS+P2fzfLa1gtHtvA7Y+x2UkMRzDyOfEBOD7nl0txe Y4UP3qdwxAuofAkMqt1HI/tcreYd1ZU7a/I21XYDSQVBmcsZna1RkWZ3Btp/gZM0laxA lTyg== Received: from [192.168.1.145] ([88.98.203.54]) by smtp.gmail.com with ESMTPSA id o126-v6sm11796360wmo.3.2018.11.14.07.56.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Nov 2018 07:56:40 -0800 (PST) Subject: [PATCH 5/7][MSP430][TESTSUITE] Prune messages about ISO C not supporting __int20 from output of tests From: Jozef Lawrynowicz To: GCC Patches Cc: Nick Clifton References: Message-ID: Date: Wed, 14 Nov 2018 15:56:40 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: X-IsSubscribed: yes Patch 5 deals with ISO C errors emitted by tests when the large memory model is used. size_t and ptrdiff_t are __int20 with -mlarge, and if the test is compiled with -pedantic-errors and -std=* or -ansi, then use of these types causes an error of the form: ISO C does not support __int20 types I fixed this by adding dg-prune-output directives to tests which cause this error. Alternatively, I considered adding typedefs preceded by __extension__ to fix these errors, but in many cases __SIZE_TYPE__ is directly used so replacing all these with a new typedef'd type changes the code in more places, in some cases changing the offset for dg-warning or dg-error directives. Changing the line numbers for dg-warning/dg-error adds further manual steps to comparing testresults and as these are generic tests I wanted to minimize the effect on the testresults for other targets. From ed24754b1d97992400bb374916d87cce151f7e89 Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Sat, 10 Nov 2018 15:47:21 +0000 Subject: [PATCH 5/7] [TESTSUITE] Prune messages about ISO C not supporting __int20 from output of tests 2018-11-14 Jozef Lawrynowicz gcc/testsuite/ChangeLog: * gcc.dg/addr_builtin-1.c: Prune ISO C does not support __int20 message from output. * gcc.dg/c11-static-assert-3.c: Likewise. * gcc.dg/c11-uni-string-1.c: Likewise. * gcc.dg/c99-const-expr-10.c: Likewise. * gcc.dg/c99-const-expr-6.c: Likewise. * gcc.dg/c99-const-expr-9.c: Likewise. * gcc.dg/c99-init-1.c: Likewise. * gcc.dg/c99-stdint-5.c: Likewise. * gcc.dg/c99-stdint-6.c: Likewise. * gcc.dg/pr52549.c: Likewise. * gcc.dg/pr61240.c: Likewise. * gcc.dg/pr71558.c: Likewise. * gcc.dg/pr77587.c: Likewise. * gcc.dg/pr79223.c: Likewise. * gcc.dg/vla-11.c: Likewise. * gcc.dg/vla-9.c: Likewise. --- gcc/testsuite/gcc.dg/addr_builtin-1.c | 3 ++- gcc/testsuite/gcc.dg/c11-static-assert-3.c | 1 + gcc/testsuite/gcc.dg/c11-uni-string-1.c | 1 + gcc/testsuite/gcc.dg/c99-const-expr-10.c | 1 + gcc/testsuite/gcc.dg/c99-const-expr-6.c | 1 + gcc/testsuite/gcc.dg/c99-const-expr-9.c | 1 + gcc/testsuite/gcc.dg/c99-init-1.c | 1 + gcc/testsuite/gcc.dg/c99-stdint-5.c | 1 + gcc/testsuite/gcc.dg/c99-stdint-6.c | 1 + gcc/testsuite/gcc.dg/pr52549.c | 1 + gcc/testsuite/gcc.dg/pr61240.c | 1 + gcc/testsuite/gcc.dg/pr71558.c | 1 + gcc/testsuite/gcc.dg/pr77587.c | 1 + gcc/testsuite/gcc.dg/pr79223.c | 3 ++- gcc/testsuite/gcc.dg/vla-11.c | 1 + gcc/testsuite/gcc.dg/vla-9.c | 1 + 16 files changed, 18 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.dg/addr_builtin-1.c b/gcc/testsuite/gcc.dg/addr_builtin-1.c index 4a0888a..7d91c62 100644 --- a/gcc/testsuite/gcc.dg/addr_builtin-1.c +++ b/gcc/testsuite/gcc.dg/addr_builtin-1.c @@ -1,5 +1,6 @@ /* PR66516 - missing diagnostic on taking the address of a builtin function - { dg-do compile } */ + { dg-do compile } + { dg-prune-output "ISO C does not support.*__int20" } */ typedef void (F)(void); typedef __UINTPTR_TYPE__ uintptr_t; diff --git a/gcc/testsuite/gcc.dg/c11-static-assert-3.c b/gcc/testsuite/gcc.dg/c11-static-assert-3.c index 9799b97..ea369e9 100644 --- a/gcc/testsuite/gcc.dg/c11-static-assert-3.c +++ b/gcc/testsuite/gcc.dg/c11-static-assert-3.c @@ -1,6 +1,7 @@ /* Test C11 static assertions. Invalid assertions. */ /* { dg-do compile } */ /* { dg-options "-std=c11 -pedantic-errors" } */ +/* { dg-prune-output "ISO C does not support.*__int20" } */ _Static_assert (__INT_MAX__ * 2, "overflow"); /* { dg-warning "integer overflow in expression" } */ /* { dg-error "overflow in constant expression" "error" { target *-*-* } .-1 } */ diff --git a/gcc/testsuite/gcc.dg/c11-uni-string-1.c b/gcc/testsuite/gcc.dg/c11-uni-string-1.c index 9f86bea..9b47f6a6 100644 --- a/gcc/testsuite/gcc.dg/c11-uni-string-1.c +++ b/gcc/testsuite/gcc.dg/c11-uni-string-1.c @@ -1,6 +1,7 @@ /* Test Unicode strings in C11. Test valid code. */ /* { dg-do run } */ /* { dg-options "-std=c11 -pedantic-errors" } */ +/* { dg-prune-output "ISO C does not support.*__int20" } */ /* More thorough tests are in c-c++-common/raw-string-*.c; this test verifies the particular subset (Unicode but not raw strings) that diff --git a/gcc/testsuite/gcc.dg/c99-const-expr-10.c b/gcc/testsuite/gcc.dg/c99-const-expr-10.c index 2aca610..bb5af01 100644 --- a/gcc/testsuite/gcc.dg/c99-const-expr-10.c +++ b/gcc/testsuite/gcc.dg/c99-const-expr-10.c @@ -4,6 +4,7 @@ /* Origin: Joseph Myers */ /* { dg-do compile } */ /* { dg-options "-std=iso9899:1999 -pedantic-errors" } */ +/* { dg-prune-output "ISO C does not support.*__int20" } */ void *p = (__SIZE_TYPE__)(void *)0; /* { dg-error "without a cast" } */ struct s { void *a; } q = { (__SIZE_TYPE__)(void *)0 }; /* { dg-error "without a cast|near initialization" } */ diff --git a/gcc/testsuite/gcc.dg/c99-const-expr-6.c b/gcc/testsuite/gcc.dg/c99-const-expr-6.c index ca60243..b985ade 100644 --- a/gcc/testsuite/gcc.dg/c99-const-expr-6.c +++ b/gcc/testsuite/gcc.dg/c99-const-expr-6.c @@ -3,6 +3,7 @@ /* Origin: Joseph Myers */ /* { dg-do compile } */ /* { dg-options "-std=iso9899:1999 -pedantic-errors" } */ +/* { dg-prune-output "ISO C does not support.*__int20" } */ /* PR 29116. */ int n = 0, p[n * 0 + 1]; /* { dg-error "variabl" } */ diff --git a/gcc/testsuite/gcc.dg/c99-const-expr-9.c b/gcc/testsuite/gcc.dg/c99-const-expr-9.c index 11e0b2c..eaacfa7 100644 --- a/gcc/testsuite/gcc.dg/c99-const-expr-9.c +++ b/gcc/testsuite/gcc.dg/c99-const-expr-9.c @@ -4,6 +4,7 @@ /* Origin: Joseph Myers */ /* { dg-do compile } */ /* { dg-options "-std=iso9899:1999 -pedantic-errors -ftrack-macro-expansion=0" } */ +/* { dg-prune-output "ISO C does not support.*__int20" } */ struct s { int a; diff --git a/gcc/testsuite/gcc.dg/c99-init-1.c b/gcc/testsuite/gcc.dg/c99-init-1.c index 95803c2..6a7300e 100644 --- a/gcc/testsuite/gcc.dg/c99-init-1.c +++ b/gcc/testsuite/gcc.dg/c99-init-1.c @@ -2,6 +2,7 @@ /* Origin: Jakub Jelinek */ /* { dg-do run } */ /* { dg-options "-std=iso9899:1999 -pedantic-errors" } */ +/* { dg-prune-output "ISO C does not support.*__int20" } */ typedef __SIZE_TYPE__ size_t; typedef __WCHAR_TYPE__ wchar_t; diff --git a/gcc/testsuite/gcc.dg/c99-stdint-5.c b/gcc/testsuite/gcc.dg/c99-stdint-5.c index 6051323..3946f79 100644 --- a/gcc/testsuite/gcc.dg/c99-stdint-5.c +++ b/gcc/testsuite/gcc.dg/c99-stdint-5.c @@ -4,6 +4,7 @@ /* { dg-do compile } */ /* { dg-options "-std=iso9899:1999 -pedantic-errors" } */ /* { dg-additional-options "-DSIGNAL_SUPPRESS" { target { ! signal } } } */ +/* { dg-prune-output "ISO C does not support.*__int20" } */ #include #ifndef SIGNAL_SUPPRESS diff --git a/gcc/testsuite/gcc.dg/c99-stdint-6.c b/gcc/testsuite/gcc.dg/c99-stdint-6.c index 60ac31f..554f47a 100644 --- a/gcc/testsuite/gcc.dg/c99-stdint-6.c +++ b/gcc/testsuite/gcc.dg/c99-stdint-6.c @@ -3,6 +3,7 @@ /* { dg-do compile { target inttypes_types } } */ /* { dg-options "-std=iso9899:1999 -pedantic-errors" } */ /* { dg-additional-options "-DSIGNAL_SUPPRESS" { target { ! signal } } } */ +/* { dg-prune-output "ISO C does not support.*__int20" } */ #include #ifndef SIGNAL_SUPPRESS diff --git a/gcc/testsuite/gcc.dg/pr52549.c b/gcc/testsuite/gcc.dg/pr52549.c index 4d0a3e0..bb81d5c 100644 --- a/gcc/testsuite/gcc.dg/pr52549.c +++ b/gcc/testsuite/gcc.dg/pr52549.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-prune-output "ISO C does not support.*__int20" } */ #ifdef __SIZE_TYPE__ _mark (__SIZE_TYPE__ obj, int i, char *a) diff --git a/gcc/testsuite/gcc.dg/pr61240.c b/gcc/testsuite/gcc.dg/pr61240.c index 6332918..af7c3f6 100644 --- a/gcc/testsuite/gcc.dg/pr61240.c +++ b/gcc/testsuite/gcc.dg/pr61240.c @@ -1,5 +1,6 @@ /* PR c/61240 */ /* { dg-do compile } */ +/* { dg-prune-output "ISO C does not support.*__int20" } */ typedef __PTRDIFF_TYPE__ ptrdiff_t; diff --git a/gcc/testsuite/gcc.dg/pr71558.c b/gcc/testsuite/gcc.dg/pr71558.c index 33a648e..6c97f3a 100644 --- a/gcc/testsuite/gcc.dg/pr71558.c +++ b/gcc/testsuite/gcc.dg/pr71558.c @@ -1,4 +1,5 @@ /* PR tree-optimization/71588 */ +/* { dg-prune-output "ISO C does not support.*__int20" } */ /* strcpy must not be pure, but make sure we don't ICE even when it is declared incorrectly. */ diff --git a/gcc/testsuite/gcc.dg/pr77587.c b/gcc/testsuite/gcc.dg/pr77587.c index 8f5afef..3028d07 100644 --- a/gcc/testsuite/gcc.dg/pr77587.c +++ b/gcc/testsuite/gcc.dg/pr77587.c @@ -3,6 +3,7 @@ /* { dg-require-alias "" } */ /* { dg-require-weak-override "" } */ /* { dg-additional-sources "pr77587a.c" } */ +/* { dg-prune-output "ISO C does not support.*__int20" } */ void bar (long x, long y, long z) diff --git a/gcc/testsuite/gcc.dg/pr79223.c b/gcc/testsuite/gcc.dg/pr79223.c index ef0dd1b..24c5f52 100644 --- a/gcc/testsuite/gcc.dg/pr79223.c +++ b/gcc/testsuite/gcc.dg/pr79223.c @@ -1,6 +1,7 @@ /* PR middle-end/79223 - missing -Wstringop-overflow on a memmove overflow { dg-do compile } - { dg-additional-options "-O2 -Wall -Wno-array-bounds -std=gnu99" } */ + { dg-additional-options "-O2 -Wall -Wno-array-bounds -std=gnu99" } + { dg-prune-output "ISO C does not support.*__int20" } */ typedef __SIZE_TYPE__ size_t; diff --git a/gcc/testsuite/gcc.dg/vla-11.c b/gcc/testsuite/gcc.dg/vla-11.c index 1504853..f52d65d 100644 --- a/gcc/testsuite/gcc.dg/vla-11.c +++ b/gcc/testsuite/gcc.dg/vla-11.c @@ -5,6 +5,7 @@ /* Origin: Joseph Myers */ /* { dg-do compile } */ /* { dg-options "-std=c99 -pedantic-errors" } */ +/* { dg-prune-output "ISO C does not support.*__int20" } */ void foo11a(int x[sizeof(int *(*)[*])]); /* { dg-warning "not in a declaration" } */ void foo11b(__SIZE_TYPE__ x, int y[(__UINTPTR_TYPE__)(int (*)[*])x]); /* { dg-warning "not in a declaration" } */ diff --git a/gcc/testsuite/gcc.dg/vla-9.c b/gcc/testsuite/gcc.dg/vla-9.c index 506a1a2..e6506d7 100644 --- a/gcc/testsuite/gcc.dg/vla-9.c +++ b/gcc/testsuite/gcc.dg/vla-9.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-std=c99 -pedantic-errors -W -Wall" } */ +/* { dg-prune-output "ISO C does not support.*__int20" } */ /* PR c/28280 */ void f(__SIZE_TYPE__ d) -- 2.7.4