From patchwork Sat Nov 17 00:51:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jozef Lawrynowicz X-Patchwork-Id: 999220 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-490354-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="l9g6Tm0l"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mittosystems.com header.i=@mittosystems.com header.b="ao672Uzn"; 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 42xc4L6dYkz9s9h for ; Sat, 17 Nov 2018 11:51:44 +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:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=PNws+KM6aItjiEZ/IOh47CffpQRn6ohi30qwE9UbD5dHNXv7Ywcmp 8lgD0UfooZGTKuY3U/ldNlcTnu2hafDLWaLlLOsUU0Ct1Ym7BPTGbTjVNBwwt4Ee gguGVa1XxzgrZrWajwLXtT8tHyDCKFaOaG+rd4/+0idtV/xuth6GT8= 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=f1EZIOodTW2FuDMz8a17pgpFvSc=; b=l9g6Tm0lvP5RHkKmYH7l a/7qyLTkUuAygbPf/SwUB89hAHV9tlBsx11De+zQg7nKwSgQSlm5MCNziXXWI4Uy sY5r0dNSava+QFCllrijTywCrcFqeidKLcK4MtvJUiXFyfg4sLpWN27SJceUqTi0 ciGa4wH5gW2QvjQ12Fj7rlo= Received: (qmail 47801 invoked by alias); 17 Nov 2018 00:51:36 -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 47790 invoked by uid 89); 17 Nov 2018 00:51:35 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.3 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=TESTSUITE, size32plus, pdp11-*-*, pdp11** X-HELO: mail-wm1-f46.google.com Received: from mail-wm1-f46.google.com (HELO mail-wm1-f46.google.com) (209.85.128.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 17 Nov 2018 00:51:34 +0000 Received: by mail-wm1-f46.google.com with SMTP id s11so245785wmh.1 for ; Fri, 16 Nov 2018 16:51:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mittosystems.com; s=google; h=date:from:to:subject:message-id:mime-version; bh=KxKQMTsn+wifl2j5Vu5+IKIA/ikUOoR2JVFOtPn66dI=; b=ao672Uzno06+qdeACjBgQIiAyKS2/LR72ykxj1y1tIeZjlkAXVfPrFYN+11HHYdl4p OlyLvLxFAjHhKN9CSIcNvLgXmGYjC8fDPkFadgjvNq0ImIJIqAxmEesFOkRVDKHr3cfu YM07xGmfchQ74t5S6pRUS/QFJZOHRM0N97zmpvRBeFyHi3HW6lv9dp1Sit21wEwmHA/M FeKDb7sEzT5oRmemnrDN4rxpA+EDp9Jgb4ZQQZB06G7I33TmkvH72d0SIhWUC+/AsrtD 3YXhh4UAOFNtAzukMedGA+Ba5X1lHk9RLMnA7OQXAn8j9EM4s+ZFjAsuxzLlCX7eXhc5 9yXQ== Received: from jozef-Aspire-VN7-793G ([88.98.203.54]) by smtp.gmail.com with ESMTPSA id p6sm26766110wrx.39.2018.11.16.16.51.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Nov 2018 16:51:31 -0800 (PST) Date: Sat, 17 Nov 2018 00:51:28 +0000 From: Jozef Lawrynowicz To: gcc-patches@gcc.gnu.org Subject: [TESTSUITE][committed] Amend tests for PR87854 fixes Message-ID: <20181117005128.758ed20c@jozef-Aspire-VN7-793G> MIME-Version: 1.0 X-IsSubscribed: yes The fix for PR87854 outputs an error when a string literal is too large to compile. This patch adds dg-error directives to tests affected by the new error message. Committed to trunk. From 6a00590f762be4267f5d8febb375c3192371de2f Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Sat, 17 Nov 2018 00:36:18 +0000 Subject: [PATCH] [TESTSUITE] Fix test failures when compiling large string literals on 16-bit targets 2018-11-17 Jozef Lawrynowicz PR middle-end/87854 gcc/testsuite/ChangeLog: * g++.dg/parse/concat1.C: Add dg-error for targets with size_t < 32 bits. Update comment. * gcc.dg/concat2.c: Likewise. * gcc.c-torture/compile/pr46534.c: Likewise. --- gcc/testsuite/g++.dg/parse/concat1.C | 6 ++---- gcc/testsuite/gcc.c-torture/compile/pr46534.c | 4 ++-- gcc/testsuite/gcc.dg/concat2.c | 6 ++---- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/gcc/testsuite/g++.dg/parse/concat1.C b/gcc/testsuite/g++.dg/parse/concat1.C index 7bf97a6..7d19a7d 100644 --- a/gcc/testsuite/g++.dg/parse/concat1.C +++ b/gcc/testsuite/g++.dg/parse/concat1.C @@ -1,11 +1,9 @@ /* PR c/3581 */ /* { dg-do compile } */ -/* Intended as a compile-time test for string literal concatenation. - The fact that the string isn't actually used in the resulting program - should allow this to compile for any target. */ +/* Intended as a compile-time test for string literal concatenation. */ -#define e0 "a" +#define e0 "a" /* { dg-error "size of string literal is too large" "" { target { ! size32plus } } } */ #define e1 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0 #define e2 e1 e1 e1 e1 e1 e1 e1 e1 e1 e1 #define e3 e2 e2 e2 e2 e2 e2 e2 e2 e2 e2 diff --git a/gcc/testsuite/gcc.c-torture/compile/pr46534.c b/gcc/testsuite/gcc.c-torture/compile/pr46534.c index 885aa6d..1894636 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr46534.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr46534.c @@ -1,4 +1,4 @@ -/* { dg-skip-if "too big" { avr-*-* nvptx-*-* pdp11-*-* } } */ +/* { dg-skip-if "too big" { nvptx-*-* } } */ /* PR middle-end/46534 */ extern int printf (const char *, ...); @@ -14,5 +14,5 @@ extern int printf (const char *, ...); void foo (void) { - printf (S7 "\n"); + printf (S7 "\n"); /* { dg-error "size of string literal is too large" "" { target { ! size32plus } } } */ } diff --git a/gcc/testsuite/gcc.dg/concat2.c b/gcc/testsuite/gcc.dg/concat2.c index 1e92400..e9fa216 100644 --- a/gcc/testsuite/gcc.dg/concat2.c +++ b/gcc/testsuite/gcc.dg/concat2.c @@ -2,9 +2,7 @@ /* { dg-do compile } */ /* { dg-options "" } */ -/* Intended as a compile-time test for string literal concatenation. - The fact that the string isn't actually used in the resulting program - should allow this to compile for any target. */ +/* Intended as a compile-time test for string literal concatenation. */ #define e0 "a" #define e1 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0 @@ -13,4 +11,4 @@ #define e4 e3 e3 e3 e3 e3 e3 e3 e3 e3 e3 #define e5 e4 e4 e4 e4 e4 e4 e4 e4 e4 e4 -void foo() { (void)(e5); } +void foo() { (void)(e5); } /* { dg-error "size of string literal is too large" "" { target { ! size32plus } } } */ -- 2.7.4