From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by sourceware.org (Postfix) with ESMTPS id 1EA6F3854162 for ; Wed, 5 Apr 2023 14:06:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1EA6F3854162 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com Received: by mail-wm1-x334.google.com with SMTP id d11-20020a05600c3acb00b003ef6e6754c5so18372471wms.5 for ; Wed, 05 Apr 2023 07:06:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1680703577; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=WlN7u7RgXQgZZ2m1GFUQeOAOSGxK7KPIDiB1VOchWFQ=; b=BCuwXFYI33yifzstpObYDE74UG2IcRtReu5Ey7sZgFWvUP+jehJEYHLDIQHj8URlc1 ZRLzjv6Z1NatFYylmJi13NKnnCOqdXX2PRj/b7riZxMEhrDkyl9WMy9dfTRZ6axgFQIv 9UYiyI1eHxCTTcAuEibCI3hmDRRcyzdpWMO93YNqMlQS6L5iOlL7uWEfTOBxgqahYV4b JbDlsuXTwwey158Tmxr8Lgd7F729elgYIAG1ZSSmG3SOPiVagVhU2+TqOahSDiZ7k0Un rFj8zqhYWVlaot5Tz2sEvXqdFNNx39LB/vDnoLTh/kG1vcai8NtVr/n6S3yylPs+eA4y me3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680703577; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=WlN7u7RgXQgZZ2m1GFUQeOAOSGxK7KPIDiB1VOchWFQ=; b=T6LBhgBJ6fRg8nZiyNdr/WBbfgxyg5VGS86EsPG+cnbB/sJH+i0YcgYbnxAerdS9S+ RAwdKvyjndx+QPU+vQWpr7/pxlozy+/MgKn8HH+3aQKmb3NUWK7b/8X7IQtjJGqi0DSl B/R2wEJtrpRa3QioKVdcCjTKMIbnbT68Vc881SAZVCSXbkyKj9s36FILm5i1YUdMIc3L 16XbDq97Sa2D25L89KN/2IY+zHQWpY7b8v88q7KSOTWt9Od6QE2Yv3qPD2v61syh6IEB hmIKa5hFY9PsxP6QHwuj+Jl5DjhhLKOYaKcFpv9+zq9OhhwqR9xWb3THOGynZk7nSKH+ R86w== X-Gm-Message-State: AAQBX9en8XlqRcBETw+YZg3U246D9YwTonIebTx1myOFbVNeWXKOt6P/ dNqU7Jer/a5ZaCOPCTh7Co9B X-Google-Smtp-Source: AKy350a1HTV0dcr7PB9JBkmsbzd4VJH2XU52jPZm6n3BqNikutKdGzgj5A/kV7pY0cYuTm4JN7m5Dw== X-Received: by 2002:a05:600c:b4f:b0:3ed:d64f:ec30 with SMTP id k15-20020a05600c0b4f00b003edd64fec30mr4624309wmr.33.1680703577763; Wed, 05 Apr 2023 07:06:17 -0700 (PDT) Received: from platypus.localdomain ([62.23.166.218]) by smtp.gmail.com with ESMTPSA id ay8-20020a05600c1e0800b003edddae1068sm2330150wmb.9.2023.04.05.07.06.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 07:06:17 -0700 (PDT) From: arthur.cohen@embecosm.com To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Pierre-Emmanuel Patry Subject: [committed 70/88] gccrs: testsuite: Add empty string macro test Date: Wed, 5 Apr 2023 16:03:54 +0200 Message-Id: <20230405140411.3016563-71-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230405140411.3016563-1-arthur.cohen@embecosm.com> References: <20230405140411.3016563-1-arthur.cohen@embecosm.com> Reply-To: arthur.cohen@embecosm.com MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-14.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: From: Pierre-Emmanuel Patry Add two new tests with empty string for include_str and include_bytes macros. gcc/testsuite/ChangeLog: * rust/compile/issue-1830_bytes.rs: New test. * rust/compile/issue-1830_str.rs: New test. Signed-off-by: Pierre-Emmanuel Patry --- gcc/testsuite/rust/compile/issue-1830_bytes.rs | 8 ++++++++ gcc/testsuite/rust/compile/issue-1830_str.rs | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100644 gcc/testsuite/rust/compile/issue-1830_bytes.rs create mode 100644 gcc/testsuite/rust/compile/issue-1830_str.rs diff --git a/gcc/testsuite/rust/compile/issue-1830_bytes.rs b/gcc/testsuite/rust/compile/issue-1830_bytes.rs new file mode 100644 index 00000000000..dcc53b73b19 --- /dev/null +++ b/gcc/testsuite/rust/compile/issue-1830_bytes.rs @@ -0,0 +1,8 @@ +#[rustc_builtin_macro] +macro_rules! include_bytes { + () => {{}}; +} + +fn main() { + include_bytes!(""); // { dg-excess-errors "Is a directory" } +} diff --git a/gcc/testsuite/rust/compile/issue-1830_str.rs b/gcc/testsuite/rust/compile/issue-1830_str.rs new file mode 100644 index 00000000000..6cf835ba9bd --- /dev/null +++ b/gcc/testsuite/rust/compile/issue-1830_str.rs @@ -0,0 +1,8 @@ +#[rustc_builtin_macro] +macro_rules! include_str { + () => {{}}; +} + +fn main() { + include_str!(""); // { dg-excess-errors "Is a directory" } +} -- 2.40.0