From patchwork Wed Nov 15 07:58:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 165195 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp2385071vqg; Tue, 14 Nov 2023 23:58:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IGmebw7YcLEfnWgaGJcELqnItmczCfjXlvcckLnn1L4NWvY0E9cUEN9FlezbuXrvFa65l0j X-Received: by 2002:a0c:bf07:0:b0:670:fa29:eb51 with SMTP id m7-20020a0cbf07000000b00670fa29eb51mr4950296qvi.12.1700035129459; Tue, 14 Nov 2023 23:58:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700035129; cv=pass; d=google.com; s=arc-20160816; b=YaAiXMKwHR+yM0gtgGs9jd5iNmlNy9a3Bl3lroM2aQ0zOSB4rKOGqtpyRPKcKijo0C mWohIBH/cT353/YDEA1SyGJyqFbYcqq70dahdbU1/KpLjQHNsa8B9eslRXTge/I5MIfM vk/VVvo2XbwSxTyvtq3fawYC8zzWcHPyW2RgqhyugohKrydx6f5hjk1bvq/zTdlA0yDl XYyy6j6v/YqYubaBhJdzO2DgsS7s7UxRq17jbFC2RsNgLpl8d8yQPi7rWt6eT54eklNX 6CozzxBzXSkVHk3sL4hQwxhH/NxAnushcuc7pTiJI5SxmMfoypPGctrMUJKCmHOGy07Q zpsQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:reply-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :content-disposition:in-reply-to:mime-version:references:message-id :subject:cc:to:from:date:dkim-signature:arc-filter:dmarc-filter :delivered-to; bh=H0r9CSCC4OLM6jSCWmtaoR8b9W23IzzUYmkD+JEftB0=; fh=VFYKhycdV9LwdeSpfTSE1NY4uw7b1/hnBKNw9yjkSQM=; b=US04sPbK5Kt0eBV191AiluUQO0WOOYtnj+JcwxNl9gXryn6OKKVGzk9/I6Wh7Fi50I FDa6l2meLt9ZbsS0mzSpC0jTw/AL/2RM4Z4C9hnb3wHv/22aNzL1KB2PxrX+YE9PoEGy +2oc4rBjspaC+UsqYPgOfMHvS3WTzcstPbFko+93OKXPiojQmyA3oiXgXy0n6qB7wHnp cIw8eqnWJmSdatyIs0d4/WNtWZkKsYWj7cm7lZXTJI2KnZQSvYQHsjumxZZq2zQJTuJI gu5667D7BC/eYiD/2RhUhQD3DVSR1s6te1AFpQwHs28+Wtibn5z6/uyRPnEj/e4Wi0rA LJuw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ug80fWa9; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id a11-20020ad441cb000000b0066d10e104cdsi8532414qvq.363.2023.11.14.23.58.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 23:58:49 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ug80fWa9; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DC28938582A0 for ; Wed, 15 Nov 2023 07:58:48 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 1C4B93858C78 for ; Wed, 15 Nov 2023 07:58:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1C4B93858C78 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1C4B93858C78 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700035106; cv=none; b=n2UUDgCcoVxhitkuY0hWlC4eaLdFWKHb+woUFR8aE5qp3NsX0MaZ1ZqBDvLm1I0JYPQvql/563ndmZjdS0OyIhw6GsIq9SUghkdbeQrYe8dVgi/JHHiUUqB+69MU1hqW+r5xk9LFGBLSaikY1fR5aEhStmFXFAvIVeob9U2aoic= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700035106; c=relaxed/simple; bh=EP5OapLOF7JKg8P+GkYTlE0KFyvC45i+kFnG3Go6caY=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=In3KNNgJRNeixGu1J8MDpG1j5qLkV0hsSP9eh/c2koMtVcIKhfUp3jPTpu7S434VF/I9tIUynjAAu6UW7g8SBJgWW8zYklcHJfUb0z/x2ytkTO8ou3QAk/Ap2rjHdITc4L8o3kx0qxnkSUqehT16GqkBZii3vZzRJeJyuOUDDv0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700035104; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H0r9CSCC4OLM6jSCWmtaoR8b9W23IzzUYmkD+JEftB0=; b=Ug80fWa9HNT8+EejptYVzQkrVNGOEtB494M/Q7D6P/LWroaDu0zAPZRJB97O25KGIKqUSC ArTfGE6Kvx4pC4nF4GELuAp6zwp8+qZPIVU2vWYH3wUz65fkjRWGBk1tybHzb2X7j/XaB1 jfMvqGYxDyVrYhbnrRVkN5HMWn0rmWE= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-287-lnEMyEuVMR-fKfCwubx1sA-1; Wed, 15 Nov 2023 02:58:22 -0500 X-MC-Unique: lnEMyEuVMR-fKfCwubx1sA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8BF381C04328; Wed, 15 Nov 2023 07:58:22 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.194.53]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4EFC2134; Wed, 15 Nov 2023 07:58:22 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 3AF7wJQ4267140 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 15 Nov 2023 08:58:20 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 3AF7wJ4B267139; Wed, 15 Nov 2023 08:58:19 +0100 Date: Wed, 15 Nov 2023 08:58:18 +0100 From: Jakub Jelinek To: Jeff Law Cc: gcc-patches@gcc.gnu.org Subject: [committed] testsuite: Adjust gcc.dg/cpp/if-2.c for 16-bit targets Message-ID: References: <8101d316-a134-429d-9d8b-4fe8db355fb2@ventanamicro.com> MIME-Version: 1.0 In-Reply-To: <8101d316-a134-429d-9d8b-4fe8db355fb2@ventanamicro.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782616035916414210 X-GMAIL-MSGID: 1782616035916414210 On Tue, Nov 14, 2023 at 09:47:31PM -0700, Jeff Law wrote: > > c++: Implement C++26 P1854R4 - Making non-encodable string literals ill-formed [PR110341] > > This paper voted in as DR makes some multi-character literals ill-formed. > > 'abcd' stays valid, but e.g. 'รก' is newly invalid in UTF-8 exec charset > > while valid e.g. in ISO-8859-1, because it is a single character which needs > > 2 bytes to be encoded. > > Is causing 16 bit targets such as arc-elf, msp430-elf, rl78-elf to fail > gcc.dg/cpp/if-2.c: > > > Tests that now fail, but worked before (2 tests): > > > > arc-sim: gcc.dg/cpp/if-2.c (test for excess errors) > > arc-sim: gcc.dg/cpp/if-2.c multi-character charconst (test for warnings, line 21) > > It's visible with just a cross compiler, so you don't need a full cross > setup. I'm not currently looking into these failures at all, just thought > you might want to know. Fixed thusly, tested with msp430-elf cross and on x86_64-linux, committed to trunk as obvious: 2023-11-15 Jakub Jelinek * gcc.dg/cpp/if-2.c: Adjust expected diagnostics for 16-bit targets. Jakub --- gcc/testsuite/gcc.dg/cpp/if-2.c.jj 2023-11-14 18:28:21.068696191 +0100 +++ gcc/testsuite/gcc.dg/cpp/if-2.c 2023-11-15 08:49:05.805629059 +0100 @@ -17,8 +17,8 @@ #error 0x1234 /* { dg-bogus "error" "wide charconst recognition 3" } */ #endif -/* The 'character constant (is )?too long' message is produced by 16-bit targets. */ -#if 'abcd' /* { dg-warning "(multi-character character constant)|(character constant (is )?too long)" "multi-character charconst" } */ +/* The 'multi-character literal with 4 characters exceeds 'int' size of \[0-9]+ bytes' message is produced by 16-bit targets. */ +#if 'abcd' /* { dg-warning "(multi-character character constant)|(multi-character literal with 4 characters exceeds 'int' size of \[0-9]+ bytes)" "multi-character charconst" } */ #endif #if 'abcdefghi' /* { dg-warning "multi-character literal with \[0-9]+ characters exceeds 'int' size of \[0-9]+ bytes" } */