From patchwork Wed Apr 5 14:02:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arthur Cohen X-Patchwork-Id: 79640 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp343503vqo; Wed, 5 Apr 2023 07:19:05 -0700 (PDT) X-Google-Smtp-Source: AKy350YIQLgFT2jImyaXkyOI0XC05rLcQqAZFlT93LRMAggl4iuWBeHs6vI+dop/EEyu0Btcy7Y2 X-Received: by 2002:a17:907:3d92:b0:93d:1c2b:bd23 with SMTP id he18-20020a1709073d9200b0093d1c2bbd23mr4165649ejc.39.1680704345756; Wed, 05 Apr 2023 07:19:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680704345; cv=none; d=google.com; s=arc-20160816; b=TRoARkSoJmnn+iN5sNVF3CgWxjbxMQ+TsuEvzVeppK3FpilY+KN/twwW9CrYLyXyaj /hMz5/EawNCNOkEdVyMUc9hz1TuaHxqzbUqSICw8pM4ZNoSMql+bdfEviLoH8MfbTvMj M6/Kp0iRvdZQx5aketDIHfwilPBJ3vUshmiBP1Fg/ZV1bxupIWxEO93lbd4GObwmvR8W 9tQ9fMQcDMh6X6gxXkIMJOb7Ja1+RDsHXyHOyDF0V0Gf9X0LMKZcSZhK61kBQFOrumrO IUS0i1lc7fvAPQECrvqpoPdeVhAmjbhvaroFCEo7vmM46c+vjNjRuEhRwNeFbnVJQLnr TB9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dmarc-filter :delivered-to; bh=I62DKEyh9VWZHoh2Wavuo9yxy6Cfr1NJrWVLtVSueQQ=; b=O/gCBoQeWvd5TPn/1El/ZwH5BmKdNgGcifXdT8A/ss/VpJ+772Tk8YjakOvhCCUvG5 t4ftSP47hGSI/lUEy68TSjsKYksozbWFQ24taX9QZ6Ifm+fejZkEaLsI1sRPQrknthCP +AY3IGz3uyWLluwSDZZYvgePO52Jvw3MrRwOid4kpdKYI7aVJIU+4rsaVhvF4RDJM0N0 q3rsnnIBbCCySSCOBJLujgilmvFZKoJ95G5pKVx6WOGiCq4xXM1cpiGbAJ+77EizwQzo WfnuVJXIZz70+2aQW3wrbi5FG9Eg08/QoBvlLr/nKT8h8I4WpzU5vwaDB9QYWAuB37ze ex/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=HRN4dIbM; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id b1-20020a170906150100b0092bec96207asi10311099ejd.309.2023.04.05.07.19.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 07:19:05 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=HRN4dIbM; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A078B385B518 for ; Wed, 5 Apr 2023 14:09:45 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by sourceware.org (Postfix) with ESMTPS id AE7E43856DF9 for ; Wed, 5 Apr 2023 14:05:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AE7E43856DF9 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-x329.google.com with SMTP id l15-20020a05600c4f0f00b003ef6d684102so18505910wmq.3 for ; Wed, 05 Apr 2023 07:05:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1680703537; 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=I62DKEyh9VWZHoh2Wavuo9yxy6Cfr1NJrWVLtVSueQQ=; b=HRN4dIbMngiJnKh5zH/9GauwmtfeYORaQ7jEoKch8cTvHoI16iiJubBQEI9zfXW7KM xxdWJM/8JUvQ2+6PJxp1B6x9Ygu7AMXOaFxhlNGkRuPTPwCeix4YlUdgyXP41XcaXuaa y+DOhJYXawmoKyNMWOwFgY3Jr/J1COZBmnjBqOddCntsIIG+4KVmxJJ0HJx0Aw31208r k9FxvyBCBC+GPkhO1C1JDxnwm+/+79FSzJBInt+YUiwtPFoZ8D15HN+jLMP860eCGci8 3/F5hpk12fMVV3EbWxrp8aUgVxz1gQjGjgxgPPPDFP/Frj7h2t7KyJP4np5bxzhlGDn0 ZXJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680703537; 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=I62DKEyh9VWZHoh2Wavuo9yxy6Cfr1NJrWVLtVSueQQ=; b=D5G/wcPoPiaadD7IA5M1tDT40boUdJJDBseYEQc1XslX1PKOURFeDeVftpsQ55w2YJ lSq+3AeuqNTgPWtyLztoWKHUZW/y70MI6bMmIgAwaU2oJ8SpjqDUtNG+9HXowB0eUr1N AF5O+aTIKc9LmilX3PdmnsYcY7BK+v0LQj34r7Qohqq5OMvn90eJ199cdrz8T9qDZRf5 t9RHhvx6tCmOXgNbmlsENZr5AGqiqRcMg9lpwCB2r+1PunkwNIi2eth0KMXhkIbQbLHA nTt7bL9JVacQYl48rn9XFLGisOxM+tPktl0zCAVENHo9FfuZxCvyrLI06W4NM0Q/VuKv +b7A== X-Gm-Message-State: AAQBX9e+YSvvru5NUsa5OjtZasQILJWp+BVhxaWzK6skeKQ3gdn04O7h CSAN6u7MNNEtwwhIfHvHxBORQ3gV0lXXhrXefg== X-Received: by 2002:a05:600c:21c1:b0:3ee:3d2d:841a with SMTP id x1-20020a05600c21c100b003ee3d2d841amr4697276wmj.24.1680703536413; Wed, 05 Apr 2023 07:05:36 -0700 (PDT) Received: from platypus.localdomain ([62.23.166.218]) by smtp.gmail.com with ESMTPSA id ay8-20020a05600c1e0800b003edddae1068sm2330150wmb.9.2023.04.05.07.05.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 07:05:36 -0700 (PDT) From: arthur.cohen@embecosm.com To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Arthur Cohen Subject: [committed 12/88] gccrs: testsuite: Handle Windows carriage returns properly Date: Wed, 5 Apr 2023 16:02:56 +0200 Message-Id: <20230405140411.3016563-13-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> MIME-Version: 1.0 X-Spam-Status: No, score=-14.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=unavailable 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: arthur.cohen@embecosm.com Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762346239910711699?= X-GMAIL-MSGID: =?utf-8?q?1762346239910711699?= From: Arthur Cohen In dg-output, check for \r* carriage returns to make sure execution tests pass on windows platforms gcc/testsuite/ChangeLog: * rust/execute/torture/builtin_macro_cfg.rs: Handle carriage returns properly. * rust/execute/torture/builtin_macro_concat.rs: Likewise. * rust/execute/torture/builtin_macro_env.rs: Likewise. * rust/execute/torture/builtin_macro_include_bytes.rs: Likewise. * rust/execute/torture/builtin_macro_include_str.rs: Likewise. * rust/execute/torture/builtin_macro_line.rs: Likewise. * rust/execute/torture/builtin_macros1.rs: Likewise. * rust/execute/torture/builtin_macros3.rs: Likewise. * rust/execute/torture/cfg1.rs: Likewise. * rust/execute/torture/cfg2.rs: Likewise. * rust/execute/torture/cfg3.rs: Likewise. * rust/execute/torture/cfg4.rs: Likewise. * rust/execute/torture/coercion1.rs: Likewise. * rust/execute/torture/coercion2.rs: Likewise. * rust/execute/torture/extern_mod4.rs: Likewise. * rust/execute/torture/helloworld1.rs: Likewise. * rust/execute/torture/helloworld2.rs: Likewise. * rust/execute/torture/issue-1198.rs: Likewise. * rust/execute/torture/issue-1231.rs: Likewise. * rust/execute/torture/issue-1232.rs: Likewise. * rust/execute/torture/issue-1249.rs: Likewise. * rust/execute/torture/issue-1436.rs: Likewise. * rust/execute/torture/issue-1496.rs: Likewise. * rust/execute/torture/issue-647.rs: Likewise. * rust/execute/torture/issue-845.rs: Likewise. * rust/execute/torture/issue-851.rs: Likewise. * rust/execute/torture/issue-858.rs: Likewise. * rust/execute/torture/issue-976.rs: Likewise. * rust/execute/torture/macros10.rs: Likewise. * rust/execute/torture/macros11.rs: Likewise. * rust/execute/torture/macros12.rs: Likewise. * rust/execute/torture/macros13.rs: Likewise. * rust/execute/torture/macros14.rs: Likewise. * rust/execute/torture/macros2.rs: Likewise. * rust/execute/torture/macros22.rs: Likewise. * rust/execute/torture/macros29.rs: Likewise. * rust/execute/torture/macros3.rs: Likewise. * rust/execute/torture/macros30.rs: Likewise. * rust/execute/torture/macros31.rs: Likewise. * rust/execute/torture/macros7.rs: Likewise. * rust/execute/torture/macros8.rs: Likewise. * rust/execute/torture/macros9.rs: Likewise. * rust/execute/torture/match1.rs: Likewise. * rust/execute/torture/match2.rs: Likewise. * rust/execute/torture/match3.rs: Likewise. * rust/execute/torture/match_bool1.rs: Likewise. * rust/execute/torture/match_byte1.rs: Likewise. * rust/execute/torture/match_char1.rs: Likewise. * rust/execute/torture/match_int1.rs: Likewise. * rust/execute/torture/match_loop1.rs: Likewise. * rust/execute/torture/match_range1.rs: Likewise. * rust/execute/torture/match_range2.rs: Likewise. * rust/execute/torture/match_tuple1.rs: Likewise. * rust/execute/torture/method1.rs: Likewise. * rust/execute/torture/method2.rs: Likewise. * rust/execute/torture/method3.rs: Likewise. * rust/execute/torture/method4.rs: Likewise. * rust/execute/torture/operator_overload_1.rs: Likewise. * rust/execute/torture/operator_overload_10.rs: Likewise. * rust/execute/torture/operator_overload_11.rs: Likewise. * rust/execute/torture/operator_overload_12.rs: Likewise. * rust/execute/torture/operator_overload_2.rs: Likewise. * rust/execute/torture/operator_overload_4.rs: Likewise. * rust/execute/torture/operator_overload_5.rs: Likewise. * rust/execute/torture/operator_overload_6.rs: Likewise. * rust/execute/torture/operator_overload_7.rs: Likewise. * rust/execute/torture/operator_overload_8.rs: Likewise. * rust/execute/torture/operator_overload_9.rs: Likewise. * rust/execute/torture/str-layout1.rs: Likewise. * rust/execute/torture/str-zero.rs: Likewise. * rust/execute/torture/trait1.rs: Likewise. * rust/execute/torture/trait10.rs: Likewise. * rust/execute/torture/trait11.rs: Likewise. * rust/execute/torture/trait12.rs: Likewise. * rust/execute/torture/trait13.rs: Likewise. * rust/execute/torture/trait2.rs: Likewise. * rust/execute/torture/trait3.rs: Likewise. * rust/execute/torture/trait4.rs: Likewise. * rust/execute/torture/trait5.rs: Likewise. * rust/execute/torture/trait6.rs: Likewise. * rust/execute/torture/trait7.rs: Likewise. * rust/execute/torture/trait8.rs: Likewise. * rust/execute/torture/trait9.rs: Likewise. * rust/execute/torture/closure2.rs: Likewise. * rust/execute/torture/closure3.rs: Likewise. * rust/execute/torture/loop-condition-eval.rs: Likewise. * rust/execute/torture/operator_overload_3.rs: Likewise. --- .../rust/execute/torture/builtin_macro_cfg.rs | 8 ++--- .../execute/torture/builtin_macro_concat.rs | 2 +- .../rust/execute/torture/builtin_macro_env.rs | 2 +- .../torture/builtin_macro_include_bytes.rs | 2 +- .../torture/builtin_macro_include_str.rs | 2 +- .../execute/torture/builtin_macro_line.rs | 2 +- .../rust/execute/torture/builtin_macros1.rs | 2 +- .../rust/execute/torture/builtin_macros3.rs | 5 ++- gcc/testsuite/rust/execute/torture/cfg1.rs | 2 +- gcc/testsuite/rust/execute/torture/cfg2.rs | 2 +- gcc/testsuite/rust/execute/torture/cfg3.rs | 2 +- gcc/testsuite/rust/execute/torture/cfg4.rs | 2 +- .../rust/execute/torture/closure2.rs | 2 +- .../rust/execute/torture/closure3.rs | 2 +- .../rust/execute/torture/coercion1.rs | 2 +- .../rust/execute/torture/coercion2.rs | 2 +- .../rust/execute/torture/extern_mod4.rs | 2 +- .../rust/execute/torture/helloworld1.rs | 2 +- .../rust/execute/torture/helloworld2.rs | 2 +- .../rust/execute/torture/issue-1198.rs | 2 +- .../rust/execute/torture/issue-1231.rs | 2 +- .../rust/execute/torture/issue-1232.rs | 2 +- .../rust/execute/torture/issue-1249.rs | 2 +- .../rust/execute/torture/issue-1436.rs | 1 - .../rust/execute/torture/issue-1496.rs | 2 +- .../rust/execute/torture/issue-647.rs | 2 +- .../rust/execute/torture/issue-845.rs | 2 +- .../rust/execute/torture/issue-851.rs | 2 +- .../rust/execute/torture/issue-858.rs | 2 +- .../rust/execute/torture/issue-976.rs | 2 +- .../execute/torture/loop-condition-eval.rs | 2 +- .../rust/execute/torture/macros10.rs | 2 +- .../rust/execute/torture/macros11.rs | 2 +- .../rust/execute/torture/macros12.rs | 2 +- .../rust/execute/torture/macros13.rs | 2 +- .../rust/execute/torture/macros14.rs | 2 +- gcc/testsuite/rust/execute/torture/macros2.rs | 2 +- .../rust/execute/torture/macros22.rs | 2 +- .../rust/execute/torture/macros29.rs | 2 +- gcc/testsuite/rust/execute/torture/macros3.rs | 2 +- .../rust/execute/torture/macros30.rs | 2 +- .../rust/execute/torture/macros31.rs | 2 +- gcc/testsuite/rust/execute/torture/macros7.rs | 2 +- gcc/testsuite/rust/execute/torture/macros8.rs | 2 +- gcc/testsuite/rust/execute/torture/macros9.rs | 2 +- gcc/testsuite/rust/execute/torture/match1.rs | 2 +- gcc/testsuite/rust/execute/torture/match2.rs | 2 +- gcc/testsuite/rust/execute/torture/match3.rs | 2 +- .../rust/execute/torture/match_bool1.rs | 2 +- .../rust/execute/torture/match_byte1.rs | 2 +- .../rust/execute/torture/match_char1.rs | 2 +- .../rust/execute/torture/match_int1.rs | 2 +- .../rust/execute/torture/match_loop1.rs | 2 +- .../rust/execute/torture/match_range1.rs | 2 +- .../rust/execute/torture/match_range2.rs | 2 +- .../rust/execute/torture/match_tuple1.rs | 2 +- gcc/testsuite/rust/execute/torture/method1.rs | 2 +- gcc/testsuite/rust/execute/torture/method2.rs | 2 +- gcc/testsuite/rust/execute/torture/method3.rs | 2 +- gcc/testsuite/rust/execute/torture/method4.rs | 2 +- .../execute/torture/operator_overload_1.rs | 2 +- .../execute/torture/operator_overload_10.rs | 2 +- .../execute/torture/operator_overload_11.rs | 2 +- .../execute/torture/operator_overload_12.rs | 2 +- .../execute/torture/operator_overload_2.rs | 2 +- .../execute/torture/operator_overload_3.rs | 2 +- .../execute/torture/operator_overload_4.rs | 2 +- .../execute/torture/operator_overload_5.rs | 2 +- .../execute/torture/operator_overload_6.rs | 2 +- .../execute/torture/operator_overload_7.rs | 2 +- .../execute/torture/operator_overload_8.rs | 2 +- .../execute/torture/operator_overload_9.rs | 2 +- .../rust/execute/torture/str-layout1.rs | 2 +- .../rust/execute/torture/str-zero.rs | 33 +++++++++---------- gcc/testsuite/rust/execute/torture/trait1.rs | 2 +- gcc/testsuite/rust/execute/torture/trait10.rs | 2 +- gcc/testsuite/rust/execute/torture/trait11.rs | 2 +- gcc/testsuite/rust/execute/torture/trait12.rs | 2 +- gcc/testsuite/rust/execute/torture/trait13.rs | 2 +- gcc/testsuite/rust/execute/torture/trait2.rs | 2 +- gcc/testsuite/rust/execute/torture/trait3.rs | 2 +- gcc/testsuite/rust/execute/torture/trait4.rs | 2 +- gcc/testsuite/rust/execute/torture/trait5.rs | 2 +- gcc/testsuite/rust/execute/torture/trait6.rs | 2 +- gcc/testsuite/rust/execute/torture/trait7.rs | 2 +- gcc/testsuite/rust/execute/torture/trait8.rs | 2 +- gcc/testsuite/rust/execute/torture/trait9.rs | 2 +- 87 files changed, 104 insertions(+), 109 deletions(-) diff --git a/gcc/testsuite/rust/execute/torture/builtin_macro_cfg.rs b/gcc/testsuite/rust/execute/torture/builtin_macro_cfg.rs index fad2daef6bc..a8d6ae0f7ca 100644 --- a/gcc/testsuite/rust/execute/torture/builtin_macro_cfg.rs +++ b/gcc/testsuite/rust/execute/torture/builtin_macro_cfg.rs @@ -1,5 +1,5 @@ // { dg-additional-options "-w -frust-cfg=A" } -// { dg-output "A\n" } +// { dg-output "A\r*\n" } #[rustc_builtin_macro] macro_rules! cfg { () => {{}}; @@ -12,7 +12,7 @@ extern "C" { fn print(s: &str) { unsafe { printf( - "%s\n" as *const str as *const i8, + "%s\n\0" as *const str as *const i8, s as *const str as *const i8, ); } @@ -21,11 +21,11 @@ fn print(s: &str) { fn main() -> i32 { let cfg = cfg!(A); if cfg { - print("A"); + print("A\0"); } let cfg = cfg!(B); if cfg { - print("B"); + print("B\0"); } 0 diff --git a/gcc/testsuite/rust/execute/torture/builtin_macro_concat.rs b/gcc/testsuite/rust/execute/torture/builtin_macro_concat.rs index 9b33924f5a1..a9d68e0cd35 100644 --- a/gcc/testsuite/rust/execute/torture/builtin_macro_concat.rs +++ b/gcc/testsuite/rust/execute/torture/builtin_macro_concat.rs @@ -1,4 +1,4 @@ -// { dg-output "\ntest10btrue2.15\ntest10bfalse2.151\n" } +// { dg-output "\r*\ntest10btrue2.15\r*\ntest10bfalse2.151\r*\n" } #[rustc_builtin_macro] macro_rules! concat { () => {{}}; diff --git a/gcc/testsuite/rust/execute/torture/builtin_macro_env.rs b/gcc/testsuite/rust/execute/torture/builtin_macro_env.rs index a5c80b25728..d64e2a00097 100644 --- a/gcc/testsuite/rust/execute/torture/builtin_macro_env.rs +++ b/gcc/testsuite/rust/execute/torture/builtin_macro_env.rs @@ -1,4 +1,4 @@ -// { dg-output "VALUE\nVALUE\n" } +// { dg-output "VALUE\r*\nVALUE\r*\n" } // { dg-set-compiler-env-var ENV_MACRO_TEST "VALUE" } #[rustc_builtin_macro] macro_rules! env { diff --git a/gcc/testsuite/rust/execute/torture/builtin_macro_include_bytes.rs b/gcc/testsuite/rust/execute/torture/builtin_macro_include_bytes.rs index 087f0220de5..8be55773036 100644 --- a/gcc/testsuite/rust/execute/torture/builtin_macro_include_bytes.rs +++ b/gcc/testsuite/rust/execute/torture/builtin_macro_include_bytes.rs @@ -1,4 +1,4 @@ -// { dg-output "104\n33\n1\n" } +// { dg-output "104\r*\n33\r*\n1\r*\n" } #[rustc_builtin_macro] macro_rules! include_bytes { () => {{}}; diff --git a/gcc/testsuite/rust/execute/torture/builtin_macro_include_str.rs b/gcc/testsuite/rust/execute/torture/builtin_macro_include_str.rs index 6f9871d379c..43d40c9c0df 100644 --- a/gcc/testsuite/rust/execute/torture/builtin_macro_include_str.rs +++ b/gcc/testsuite/rust/execute/torture/builtin_macro_include_str.rs @@ -1,4 +1,4 @@ -// { dg-output "hello, include!\n" } +// { dg-output "hello, include!\r*\n" } #[rustc_builtin_macro] macro_rules! include_str { () => {{}}; diff --git a/gcc/testsuite/rust/execute/torture/builtin_macro_line.rs b/gcc/testsuite/rust/execute/torture/builtin_macro_line.rs index 02541ed52e2..9998de1402d 100644 --- a/gcc/testsuite/rust/execute/torture/builtin_macro_line.rs +++ b/gcc/testsuite/rust/execute/torture/builtin_macro_line.rs @@ -1,4 +1,4 @@ -// { dg-output "18\n21\n" } +// { dg-output "18\r*\n21\r*\n" } extern "C" { fn printf(fmt: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/builtin_macros1.rs b/gcc/testsuite/rust/execute/torture/builtin_macros1.rs index 5976478e426..5bccb16e0f9 100644 --- a/gcc/testsuite/rust/execute/torture/builtin_macros1.rs +++ b/gcc/testsuite/rust/execute/torture/builtin_macros1.rs @@ -1,4 +1,4 @@ -// { dg-output "rust/execute/torture/builtin_macros1.rs" } +// { dg-output "rust/execute/torture/builtin_macros1.rs\r*" } #[rustc_builtin_macro] macro_rules! file { () => {{}}; diff --git a/gcc/testsuite/rust/execute/torture/builtin_macros3.rs b/gcc/testsuite/rust/execute/torture/builtin_macros3.rs index 24555cbdb8a..5a024fa0e24 100644 --- a/gcc/testsuite/rust/execute/torture/builtin_macros3.rs +++ b/gcc/testsuite/rust/execute/torture/builtin_macros3.rs @@ -1,4 +1,4 @@ -// { dg-output "14\n42\n" } +// { dg-output "14\r*\n42\r*\n" } #[rustc_builtin_macro] macro_rules! column { () => {{}}; @@ -19,10 +19,9 @@ fn main() -> i32 { print(c0); - let c1 = column!(); + let c1 = /* --------------------- */ column!(); print(c1); 0 } - diff --git a/gcc/testsuite/rust/execute/torture/cfg1.rs b/gcc/testsuite/rust/execute/torture/cfg1.rs index d3c56295503..648d1f1ff72 100644 --- a/gcc/testsuite/rust/execute/torture/cfg1.rs +++ b/gcc/testsuite/rust/execute/torture/cfg1.rs @@ -1,5 +1,5 @@ // { dg-additional-options "-w -frust-cfg=A" } -// { dg-output "test1\n" } +// { dg-output "test1\r*\n" } extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/cfg2.rs b/gcc/testsuite/rust/execute/torture/cfg2.rs index 5048bcb2791..7b75ac6962f 100644 --- a/gcc/testsuite/rust/execute/torture/cfg2.rs +++ b/gcc/testsuite/rust/execute/torture/cfg2.rs @@ -1,5 +1,5 @@ // { dg-additional-options "-w -frust-cfg=A" } -// { dg-output "test1\n" } +// { dg-output "test1\r*\n" } extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/cfg3.rs b/gcc/testsuite/rust/execute/torture/cfg3.rs index 89312344b23..97a8fb8e461 100644 --- a/gcc/testsuite/rust/execute/torture/cfg3.rs +++ b/gcc/testsuite/rust/execute/torture/cfg3.rs @@ -1,5 +1,5 @@ // { dg-additional-options "-w -frust-cfg=A" } -// { dg-output "test1\n" } +// { dg-output "test1\r*\n" } extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/cfg4.rs b/gcc/testsuite/rust/execute/torture/cfg4.rs index d1c2a22a0ff..97026d902d0 100644 --- a/gcc/testsuite/rust/execute/torture/cfg4.rs +++ b/gcc/testsuite/rust/execute/torture/cfg4.rs @@ -1,5 +1,5 @@ // { dg-additional-options "-w -frust-cfg=A" } -// { dg-output "test1\ntest2\n" } +// { dg-output "test1\r*\ntest2\r*\n" } extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/closure2.rs b/gcc/testsuite/rust/execute/torture/closure2.rs index 45b3b5ce8b4..8e1502dfa43 100644 --- a/gcc/testsuite/rust/execute/torture/closure2.rs +++ b/gcc/testsuite/rust/execute/torture/closure2.rs @@ -1,4 +1,4 @@ -// { dg-output "3\n" } +// { dg-output "3\r*\n" } extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/closure3.rs b/gcc/testsuite/rust/execute/torture/closure3.rs index 62cf3a082cf..8fa9445ab62 100644 --- a/gcc/testsuite/rust/execute/torture/closure3.rs +++ b/gcc/testsuite/rust/execute/torture/closure3.rs @@ -1,4 +1,4 @@ -// { dg-output "3\n" } +// { dg-output "3\r*\n" } extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/coercion1.rs b/gcc/testsuite/rust/execute/torture/coercion1.rs index 2cdb9bbca38..6ca28233d60 100644 --- a/gcc/testsuite/rust/execute/torture/coercion1.rs +++ b/gcc/testsuite/rust/execute/torture/coercion1.rs @@ -1,4 +1,4 @@ -/* { dg-output "123\n123\n" } */ +/* { dg-output "123\r*\n123\r*\n" } */ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/coercion2.rs b/gcc/testsuite/rust/execute/torture/coercion2.rs index 12dd68ff5f7..047fd536dca 100644 --- a/gcc/testsuite/rust/execute/torture/coercion2.rs +++ b/gcc/testsuite/rust/execute/torture/coercion2.rs @@ -1,4 +1,4 @@ -/* { dg-output "123\n123\n" } */ +/* { dg-output "123\r*\n123\r*\n" } */ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/extern_mod4.rs b/gcc/testsuite/rust/execute/torture/extern_mod4.rs index 99b6fb5c9ba..55be2b8115f 100644 --- a/gcc/testsuite/rust/execute/torture/extern_mod4.rs +++ b/gcc/testsuite/rust/execute/torture/extern_mod4.rs @@ -1,5 +1,5 @@ // { dg-additional-options "-w" } -// { dg-output "12" } +// { dg-output "12\r*" } mod modules; extern "C" { diff --git a/gcc/testsuite/rust/execute/torture/helloworld1.rs b/gcc/testsuite/rust/execute/torture/helloworld1.rs index d416efa33af..8803156b5fd 100644 --- a/gcc/testsuite/rust/execute/torture/helloworld1.rs +++ b/gcc/testsuite/rust/execute/torture/helloworld1.rs @@ -1,4 +1,4 @@ -/* { dg-output "Hello World" }*/ +/* { dg-output "Hello World\r*" }*/ extern "C" { fn puts(s: *const i8); } diff --git a/gcc/testsuite/rust/execute/torture/helloworld2.rs b/gcc/testsuite/rust/execute/torture/helloworld2.rs index cc05f3798fa..912301bcb26 100644 --- a/gcc/testsuite/rust/execute/torture/helloworld2.rs +++ b/gcc/testsuite/rust/execute/torture/helloworld2.rs @@ -1,4 +1,4 @@ -/* { dg-output "Hello World 123\n" }*/ +/* { dg-output "Hello World 123\r*\n" }*/ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/issue-1198.rs b/gcc/testsuite/rust/execute/torture/issue-1198.rs index fce44ad1994..bbc58f0f370 100644 --- a/gcc/testsuite/rust/execute/torture/issue-1198.rs +++ b/gcc/testsuite/rust/execute/torture/issue-1198.rs @@ -1,4 +1,4 @@ -/* { dg-output "foo_deref\nimm_deref\n123\n" } */ +/* { dg-output "foo_deref\r*\nimm_deref\r*\n123\r*\n" } */ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/issue-1231.rs b/gcc/testsuite/rust/execute/torture/issue-1231.rs index 970e86f917a..321df5fec55 100644 --- a/gcc/testsuite/rust/execute/torture/issue-1231.rs +++ b/gcc/testsuite/rust/execute/torture/issue-1231.rs @@ -1,5 +1,5 @@ // { dg-additional-options "-w" } -// { dg-output "outer\ninner\n" } +// { dg-output "outer\r*\ninner\r*\n" } extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/issue-1232.rs b/gcc/testsuite/rust/execute/torture/issue-1232.rs index c56d5c18695..9215efdba6c 100644 --- a/gcc/testsuite/rust/execute/torture/issue-1232.rs +++ b/gcc/testsuite/rust/execute/torture/issue-1232.rs @@ -1,5 +1,5 @@ // { dg-additional-options "-w" } -// { dg-output "slice_access=3\n" } +// { dg-output "slice_access=3\r*\n" } extern "rust-intrinsic" { #[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")] fn offset(dst: *const T, offset: isize) -> *const T; diff --git a/gcc/testsuite/rust/execute/torture/issue-1249.rs b/gcc/testsuite/rust/execute/torture/issue-1249.rs index 072204ea877..06911074c30 100644 --- a/gcc/testsuite/rust/execute/torture/issue-1249.rs +++ b/gcc/testsuite/rust/execute/torture/issue-1249.rs @@ -1,5 +1,5 @@ // { dg-options "-w" } -// { dg-output "1\n2\n" } +// { dg-output "1\r*\n2\r*\n" } extern "C" { fn printf(s: *const i8, ...); diff --git a/gcc/testsuite/rust/execute/torture/issue-1436.rs b/gcc/testsuite/rust/execute/torture/issue-1436.rs index 5c079a61f07..96de5d69194 100644 --- a/gcc/testsuite/rust/execute/torture/issue-1436.rs +++ b/gcc/testsuite/rust/execute/torture/issue-1436.rs @@ -1,5 +1,4 @@ // { dg-options "-w" } -// { dg-output "" } mod intrinsics { extern "rust-intrinsic" { #[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")] diff --git a/gcc/testsuite/rust/execute/torture/issue-1496.rs b/gcc/testsuite/rust/execute/torture/issue-1496.rs index 9f08b2ae98a..af4201b7d3e 100644 --- a/gcc/testsuite/rust/execute/torture/issue-1496.rs +++ b/gcc/testsuite/rust/execute/torture/issue-1496.rs @@ -1,4 +1,4 @@ -/* { dg-output "foo_deref\nimm_deref\n123\n" } */ +/* { dg-output "foo_deref\r*\nimm_deref\r*\n123\r*\n" } */ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/issue-647.rs b/gcc/testsuite/rust/execute/torture/issue-647.rs index 3f427ccb785..d76d43b6110 100644 --- a/gcc/testsuite/rust/execute/torture/issue-647.rs +++ b/gcc/testsuite/rust/execute/torture/issue-647.rs @@ -1,4 +1,4 @@ -/* { dg-output "Hello World 123\n" }*/ +/* { dg-output "Hello World 123\r*\n" }*/ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/issue-845.rs b/gcc/testsuite/rust/execute/torture/issue-845.rs index 4c689e3b6c8..f96714d4bae 100644 --- a/gcc/testsuite/rust/execute/torture/issue-845.rs +++ b/gcc/testsuite/rust/execute/torture/issue-845.rs @@ -1,4 +1,4 @@ -// { dg-output "Foo::bar\n" } +// { dg-output "Foo::bar\r*\n" } // { dg-additional-options "-w" } extern "C" { fn printf(s: *const i8, ...); diff --git a/gcc/testsuite/rust/execute/torture/issue-851.rs b/gcc/testsuite/rust/execute/torture/issue-851.rs index 3881c7a2ada..b3b2b480ec2 100644 --- a/gcc/testsuite/rust/execute/torture/issue-851.rs +++ b/gcc/testsuite/rust/execute/torture/issue-851.rs @@ -1,4 +1,4 @@ -/* { dg-output "Result: 123\n" } */ +/* { dg-output "Result: 123\r*\n" } */ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/issue-858.rs b/gcc/testsuite/rust/execute/torture/issue-858.rs index 5a43f3e1b1a..51a15613844 100644 --- a/gcc/testsuite/rust/execute/torture/issue-858.rs +++ b/gcc/testsuite/rust/execute/torture/issue-858.rs @@ -1,4 +1,4 @@ -/* { dg-output "Result: 123\n" } */ +/* { dg-output "Result: 123\r*\n" } */ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/issue-976.rs b/gcc/testsuite/rust/execute/torture/issue-976.rs index 42cf596fb7d..cf6cfa66cd1 100644 --- a/gcc/testsuite/rust/execute/torture/issue-976.rs +++ b/gcc/testsuite/rust/execute/torture/issue-976.rs @@ -1,4 +1,4 @@ -/* { dg-output "hi" } */ +/* { dg-output "hi\r*" } */ fn main() -> i32 { { extern "C" { diff --git a/gcc/testsuite/rust/execute/torture/loop-condition-eval.rs b/gcc/testsuite/rust/execute/torture/loop-condition-eval.rs index 008965917ab..67ac00ced59 100644 --- a/gcc/testsuite/rust/execute/torture/loop-condition-eval.rs +++ b/gcc/testsuite/rust/execute/torture/loop-condition-eval.rs @@ -1,4 +1,4 @@ -// { dg-output "1\n" } +// { dg-output "1\r*\n" } pub fn test() -> u64 { let mut n = 113383; // #20 in https://oeis.org/A006884 while n != 1 { diff --git a/gcc/testsuite/rust/execute/torture/macros10.rs b/gcc/testsuite/rust/execute/torture/macros10.rs index 155a440ee04..4f976f0b317 100644 --- a/gcc/testsuite/rust/execute/torture/macros10.rs +++ b/gcc/testsuite/rust/execute/torture/macros10.rs @@ -1,4 +1,4 @@ -// { dg-output "18\n" } +// { dg-output "18\r*\n" } extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/macros11.rs b/gcc/testsuite/rust/execute/torture/macros11.rs index 5bde97d3dd4..70e5f25cf71 100644 --- a/gcc/testsuite/rust/execute/torture/macros11.rs +++ b/gcc/testsuite/rust/execute/torture/macros11.rs @@ -1,4 +1,4 @@ -// { dg-output "2" } +// { dg-output "2\r*" } extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/macros12.rs b/gcc/testsuite/rust/execute/torture/macros12.rs index d310dff9ba8..deb424ffdbc 100644 --- a/gcc/testsuite/rust/execute/torture/macros12.rs +++ b/gcc/testsuite/rust/execute/torture/macros12.rs @@ -1,4 +1,4 @@ -// { dg-output "0\n" } +// { dg-output "0\r*\n" } extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/macros13.rs b/gcc/testsuite/rust/execute/torture/macros13.rs index afb20264625..ec36a21f26e 100644 --- a/gcc/testsuite/rust/execute/torture/macros13.rs +++ b/gcc/testsuite/rust/execute/torture/macros13.rs @@ -1,4 +1,4 @@ -// { dg-output "18\n" } +// { dg-output "18\r*\n" } extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/macros14.rs b/gcc/testsuite/rust/execute/torture/macros14.rs index 00656546d4c..189fadd9861 100644 --- a/gcc/testsuite/rust/execute/torture/macros14.rs +++ b/gcc/testsuite/rust/execute/torture/macros14.rs @@ -1,4 +1,4 @@ -// { dg-output "15\n" } +// { dg-output "15\r*\n" } extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/macros2.rs b/gcc/testsuite/rust/execute/torture/macros2.rs index ba5098710ea..aca528a08aa 100644 --- a/gcc/testsuite/rust/execute/torture/macros2.rs +++ b/gcc/testsuite/rust/execute/torture/macros2.rs @@ -1,4 +1,4 @@ -// { dg-output "arg\narg\narg\n" } +// { dg-output "arg\r*\narg\r*\narg\r*\n" } extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/macros22.rs b/gcc/testsuite/rust/execute/torture/macros22.rs index 3f291ace98e..60ffae145ed 100644 --- a/gcc/testsuite/rust/execute/torture/macros22.rs +++ b/gcc/testsuite/rust/execute/torture/macros22.rs @@ -1,4 +1,4 @@ -// { dg-output "1\n2\nNaN\n3\n" } +// { dg-output "1\r*\n2\r*\nNaN\r*\n3\r*\n" } macro_rules! print_num { ($l:literal) => {{ diff --git a/gcc/testsuite/rust/execute/torture/macros29.rs b/gcc/testsuite/rust/execute/torture/macros29.rs index 306979b9b5b..9c2cc0e6a1b 100644 --- a/gcc/testsuite/rust/execute/torture/macros29.rs +++ b/gcc/testsuite/rust/execute/torture/macros29.rs @@ -1,4 +1,4 @@ -// { dg-output "1\n" } +// { dg-output "1\r*\n" } #[rustc_builtin_macro] macro_rules! concat { () => {{}}; diff --git a/gcc/testsuite/rust/execute/torture/macros3.rs b/gcc/testsuite/rust/execute/torture/macros3.rs index 00f6d253f50..91936c1ca83 100644 --- a/gcc/testsuite/rust/execute/torture/macros3.rs +++ b/gcc/testsuite/rust/execute/torture/macros3.rs @@ -1,4 +1,4 @@ -// { dg-output "invok\ninvok\ninvok\ninvok\ninvok\n" } +// { dg-output "invok\r*\ninvok\r*\ninvok\r*\ninvok\r*\ninvok\r*\n" } extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/macros30.rs b/gcc/testsuite/rust/execute/torture/macros30.rs index ab36f5e78af..7ec77d06982 100644 --- a/gcc/testsuite/rust/execute/torture/macros30.rs +++ b/gcc/testsuite/rust/execute/torture/macros30.rs @@ -1,4 +1,4 @@ -// { dg-output "1\n" } +// { dg-output "1\r*\n" } #[rustc_builtin_macro] macro_rules! concat { () => {{}}; diff --git a/gcc/testsuite/rust/execute/torture/macros31.rs b/gcc/testsuite/rust/execute/torture/macros31.rs index 483f897a92b..4c6378a68c2 100644 --- a/gcc/testsuite/rust/execute/torture/macros31.rs +++ b/gcc/testsuite/rust/execute/torture/macros31.rs @@ -1,5 +1,5 @@ // { dg-additional-options "-w -frust-cfg=A" } -// { dg-output "A\nB\n" } +// { dg-output "A\r*\nB\r*\n" } #[rustc_builtin_macro] macro_rules! cfg { () => {{}}; diff --git a/gcc/testsuite/rust/execute/torture/macros7.rs b/gcc/testsuite/rust/execute/torture/macros7.rs index ed1f922f581..b8af009aed4 100644 --- a/gcc/testsuite/rust/execute/torture/macros7.rs +++ b/gcc/testsuite/rust/execute/torture/macros7.rs @@ -1,4 +1,4 @@ -// { dg-output "any\nany\nany\n" } +// { dg-output "any\r*\nany\r*\nany\r*\n" } extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/macros8.rs b/gcc/testsuite/rust/execute/torture/macros8.rs index a12aca4910e..e532237ecde 100644 --- a/gcc/testsuite/rust/execute/torture/macros8.rs +++ b/gcc/testsuite/rust/execute/torture/macros8.rs @@ -1,4 +1,4 @@ -// { dg-output "zo1\nzo1\n" } +// { dg-output "zo1\r*\nzo1\r*\n" } extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/macros9.rs b/gcc/testsuite/rust/execute/torture/macros9.rs index 0e3fd24e8a9..81aa3683bb3 100644 --- a/gcc/testsuite/rust/execute/torture/macros9.rs +++ b/gcc/testsuite/rust/execute/torture/macros9.rs @@ -1,4 +1,4 @@ -// { dg-output "oom\noom\noom\n" } +// { dg-output "oom\r*\noom\r*\noom\r*\n" } extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/match1.rs b/gcc/testsuite/rust/execute/torture/match1.rs index e5af512f15d..66a5be3792a 100644 --- a/gcc/testsuite/rust/execute/torture/match1.rs +++ b/gcc/testsuite/rust/execute/torture/match1.rs @@ -1,4 +1,4 @@ -// { dg-output "Foo::A\nFoo::B\nFoo::C x\nFoo::D 20 80\n" } +// { dg-output "Foo::A\r*\nFoo::B\r*\nFoo::C x\r*\nFoo::D 20 80\r*\n" } extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/match2.rs b/gcc/testsuite/rust/execute/torture/match2.rs index 02cedf29b3c..3c9fbde262a 100644 --- a/gcc/testsuite/rust/execute/torture/match2.rs +++ b/gcc/testsuite/rust/execute/torture/match2.rs @@ -1,4 +1,4 @@ -// { dg-output "123\n80\n" } +// { dg-output "123\r*\n80\r*\n" } extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/match3.rs b/gcc/testsuite/rust/execute/torture/match3.rs index 8cded3044df..3dda9a35db3 100644 --- a/gcc/testsuite/rust/execute/torture/match3.rs +++ b/gcc/testsuite/rust/execute/torture/match3.rs @@ -1,4 +1,4 @@ -// { dg-output "Foo::A\nwildcard\nwildcard\nFoo::D 20 80\n" } +// { dg-output "Foo::A\r*\nwildcard\r*\nwildcard\r*\nFoo::D 20 80\r*\n" } extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/match_bool1.rs b/gcc/testsuite/rust/execute/torture/match_bool1.rs index 101dbb58571..2fb5e02b273 100644 --- a/gcc/testsuite/rust/execute/torture/match_bool1.rs +++ b/gcc/testsuite/rust/execute/torture/match_bool1.rs @@ -1,4 +1,4 @@ -// { dg-output "182 is more than 100\n55 is less than 100\n" } +// { dg-output "182 is more than 100\r*\n55 is less than 100\r*\n" } extern "C" { fn printf(s: *const i8, ...); diff --git a/gcc/testsuite/rust/execute/torture/match_byte1.rs b/gcc/testsuite/rust/execute/torture/match_byte1.rs index 3546cfb9d8b..4261b2b9f5e 100644 --- a/gcc/testsuite/rust/execute/torture/match_byte1.rs +++ b/gcc/testsuite/rust/execute/torture/match_byte1.rs @@ -1,4 +1,4 @@ -// { dg-output "a\nseven\nquote\nelse" } +// { dg-output "a\r*\nseven\r*\nquote\r*\nelse" } extern "C" { fn printf(s: *const i8, ...); diff --git a/gcc/testsuite/rust/execute/torture/match_char1.rs b/gcc/testsuite/rust/execute/torture/match_char1.rs index fa65876a907..1584b419daa 100644 --- a/gcc/testsuite/rust/execute/torture/match_char1.rs +++ b/gcc/testsuite/rust/execute/torture/match_char1.rs @@ -1,4 +1,4 @@ -// { dg-output "amazing\nwildcard\ncompiler\nproductivity\n" } +// { dg-output "amazing\r*\nwildcard\r*\ncompiler\r*\nproductivity\r*\n" } extern "C" { fn printf(s: *const i8, ...); diff --git a/gcc/testsuite/rust/execute/torture/match_int1.rs b/gcc/testsuite/rust/execute/torture/match_int1.rs index 209429added..a7deefbaa02 100644 --- a/gcc/testsuite/rust/execute/torture/match_int1.rs +++ b/gcc/testsuite/rust/execute/torture/match_int1.rs @@ -1,4 +1,4 @@ -// { dg-output "other!\nother!\nother!\nfifteen!\nfifteen!\nother!\nother!\nfifteen!\n" } +// { dg-output "other!\r*\nother!\r*\nother!\r*\nfifteen!\r*\nfifteen!\r*\nother!\r*\nother!\r*\nfifteen!\r*\n" } extern "C" { fn printf(s: *const i8, ...); diff --git a/gcc/testsuite/rust/execute/torture/match_loop1.rs b/gcc/testsuite/rust/execute/torture/match_loop1.rs index bb6aee946f6..578712fa7f5 100644 --- a/gcc/testsuite/rust/execute/torture/match_loop1.rs +++ b/gcc/testsuite/rust/execute/torture/match_loop1.rs @@ -1,4 +1,4 @@ -// { dg-output "E::One\nE::Two\nbreak!\n" } +// { dg-output "E::One\r*\nE::Two\r*\nbreak!\r*\n" } extern "C" { fn printf(s: *const i8, ...); diff --git a/gcc/testsuite/rust/execute/torture/match_range1.rs b/gcc/testsuite/rust/execute/torture/match_range1.rs index 82e9e34a989..3b705407fb2 100644 --- a/gcc/testsuite/rust/execute/torture/match_range1.rs +++ b/gcc/testsuite/rust/execute/torture/match_range1.rs @@ -1,4 +1,4 @@ -// { dg-output "zero to END_RANGE\nzero to END_RANGE\nelse\n" } +// { dg-output "zero to END_RANGE\r*\nzero to END_RANGE\r*\nelse\r*\n" } extern "C" { fn printf(s: *const i8, ...); diff --git a/gcc/testsuite/rust/execute/torture/match_range2.rs b/gcc/testsuite/rust/execute/torture/match_range2.rs index 8153f9e1c7e..517f2bbeb84 100644 --- a/gcc/testsuite/rust/execute/torture/match_range2.rs +++ b/gcc/testsuite/rust/execute/torture/match_range2.rs @@ -1,4 +1,4 @@ -// { dg-output "lowercase\nuppercase\nother\n" } +// { dg-output "lowercase\r*\nuppercase\r*\nother\r*\n" } extern "C" { fn printf(s: *const i8, ...); diff --git a/gcc/testsuite/rust/execute/torture/match_tuple1.rs b/gcc/testsuite/rust/execute/torture/match_tuple1.rs index cb61cc0847c..2ae3ca7db4e 100644 --- a/gcc/testsuite/rust/execute/torture/match_tuple1.rs +++ b/gcc/testsuite/rust/execute/torture/match_tuple1.rs @@ -1,4 +1,4 @@ -// { dg-output "x:15\ny:20\n" } +// { dg-output "x:15\r*\ny:20\r*\n" } extern "C" { fn printf(s: *const i8, ...); diff --git a/gcc/testsuite/rust/execute/torture/method1.rs b/gcc/testsuite/rust/execute/torture/method1.rs index 6af6133939b..c57944b93eb 100644 --- a/gcc/testsuite/rust/execute/torture/method1.rs +++ b/gcc/testsuite/rust/execute/torture/method1.rs @@ -1,4 +1,4 @@ -/* { dg-output "124\n458" } */ +/* { dg-output "124\r*\n458" } */ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/method2.rs b/gcc/testsuite/rust/execute/torture/method2.rs index f532b4488c6..79a35eb53d8 100644 --- a/gcc/testsuite/rust/execute/torture/method2.rs +++ b/gcc/testsuite/rust/execute/torture/method2.rs @@ -1,5 +1,5 @@ // { dg-additional-options "-w" } -// { dg-output "foo_deref\nimm_deref\n" } +// { dg-output "foo_deref\r*\nimm_deref\r*\n" } extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/method3.rs b/gcc/testsuite/rust/execute/torture/method3.rs index 0e9e8ff42a0..7217d35c4b3 100644 --- a/gcc/testsuite/rust/execute/torture/method3.rs +++ b/gcc/testsuite/rust/execute/torture/method3.rs @@ -1,5 +1,5 @@ // { dg-additional-options "-w" } -// { dg-output "mut_deref\nfoobar: 123\n" } +// { dg-output "mut_deref\r*\nfoobar: 123\r*\n" } extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/method4.rs b/gcc/testsuite/rust/execute/torture/method4.rs index 5c6fdfe02c3..ba1ffd1da36 100644 --- a/gcc/testsuite/rust/execute/torture/method4.rs +++ b/gcc/testsuite/rust/execute/torture/method4.rs @@ -1,5 +1,5 @@ // { dg-additional-options "-w" } -// { dg-output "mut_deref\nfoobar: 123\n" } +// { dg-output "mut_deref\r*\nfoobar: 123\r*\n" } extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/operator_overload_1.rs b/gcc/testsuite/rust/execute/torture/operator_overload_1.rs index 5a28c5f4e93..064a77651ad 100644 --- a/gcc/testsuite/rust/execute/torture/operator_overload_1.rs +++ b/gcc/testsuite/rust/execute/torture/operator_overload_1.rs @@ -1,4 +1,4 @@ -/* { dg-output "3\n" } */ +/* { dg-output "3\r*\n" } */ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/operator_overload_10.rs b/gcc/testsuite/rust/execute/torture/operator_overload_10.rs index f5d45db5338..3fa5afd01f3 100644 --- a/gcc/testsuite/rust/execute/torture/operator_overload_10.rs +++ b/gcc/testsuite/rust/execute/torture/operator_overload_10.rs @@ -1,4 +1,4 @@ -/* { dg-output "foo_deref\n123\n" } */ +/* { dg-output "foo_deref\r*\n123\r*\n" } */ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/operator_overload_11.rs b/gcc/testsuite/rust/execute/torture/operator_overload_11.rs index 1919941c486..94bc1cd9d96 100644 --- a/gcc/testsuite/rust/execute/torture/operator_overload_11.rs +++ b/gcc/testsuite/rust/execute/torture/operator_overload_11.rs @@ -1,4 +1,4 @@ -// { dg-output "1\n" } +// { dg-output "1\r*\n" } // { dg-additional-options "-w" } extern "C" { fn printf(s: *const i8, ...); diff --git a/gcc/testsuite/rust/execute/torture/operator_overload_12.rs b/gcc/testsuite/rust/execute/torture/operator_overload_12.rs index 7433330fa31..d525ec44e8f 100644 --- a/gcc/testsuite/rust/execute/torture/operator_overload_12.rs +++ b/gcc/testsuite/rust/execute/torture/operator_overload_12.rs @@ -1,4 +1,4 @@ -// { dg-output "1\n" } +// { dg-output "1\r*\n" } // { dg-additional-options "-w" } extern "C" { fn printf(s: *const i8, ...); diff --git a/gcc/testsuite/rust/execute/torture/operator_overload_2.rs b/gcc/testsuite/rust/execute/torture/operator_overload_2.rs index a577718451d..fab3a83b7f5 100644 --- a/gcc/testsuite/rust/execute/torture/operator_overload_2.rs +++ b/gcc/testsuite/rust/execute/torture/operator_overload_2.rs @@ -1,4 +1,4 @@ -/* { dg-output "3\n" } */ +/* { dg-output "3\r*\n" } */ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/operator_overload_3.rs b/gcc/testsuite/rust/execute/torture/operator_overload_3.rs index 57f58076c3e..2bcb1c4267c 100644 --- a/gcc/testsuite/rust/execute/torture/operator_overload_3.rs +++ b/gcc/testsuite/rust/execute/torture/operator_overload_3.rs @@ -1,4 +1,4 @@ -/* { dg-output "3\n3\n" } */ +/* { dg-output "3\r*\n3\r*\n" } */ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/operator_overload_4.rs b/gcc/testsuite/rust/execute/torture/operator_overload_4.rs index ce9887b2ead..e1fcbac1c77 100644 --- a/gcc/testsuite/rust/execute/torture/operator_overload_4.rs +++ b/gcc/testsuite/rust/execute/torture/operator_overload_4.rs @@ -1,4 +1,4 @@ -/* { dg-output "neg\n" } */ +/* { dg-output "neg\r*\n" } */ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/operator_overload_5.rs b/gcc/testsuite/rust/execute/torture/operator_overload_5.rs index a525f743680..2ba87285ef1 100644 --- a/gcc/testsuite/rust/execute/torture/operator_overload_5.rs +++ b/gcc/testsuite/rust/execute/torture/operator_overload_5.rs @@ -1,4 +1,4 @@ -/* { dg-output "not\n" } */ +/* { dg-output "not\r*\n" } */ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/operator_overload_6.rs b/gcc/testsuite/rust/execute/torture/operator_overload_6.rs index fbd2a8fa9d3..50463e74761 100644 --- a/gcc/testsuite/rust/execute/torture/operator_overload_6.rs +++ b/gcc/testsuite/rust/execute/torture/operator_overload_6.rs @@ -1,4 +1,4 @@ -/* { dg-output "add_assign\n3\n" } */ +/* { dg-output "add_assign\r*\n3\r*\n" } */ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/operator_overload_7.rs b/gcc/testsuite/rust/execute/torture/operator_overload_7.rs index 886a7010efc..50107bb4324 100644 --- a/gcc/testsuite/rust/execute/torture/operator_overload_7.rs +++ b/gcc/testsuite/rust/execute/torture/operator_overload_7.rs @@ -1,4 +1,4 @@ -/* { dg-output "imm_deref\n123\n" } */ +/* { dg-output "imm_deref\r*\n123\r*\n" } */ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/operator_overload_8.rs b/gcc/testsuite/rust/execute/torture/operator_overload_8.rs index 862e29a4bc6..e0338b917f5 100644 --- a/gcc/testsuite/rust/execute/torture/operator_overload_8.rs +++ b/gcc/testsuite/rust/execute/torture/operator_overload_8.rs @@ -1,4 +1,4 @@ -/* { dg-output "imm_deref\n123\n" } */ +/* { dg-output "imm_deref\r*\n123\r*\n" } */ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/operator_overload_9.rs b/gcc/testsuite/rust/execute/torture/operator_overload_9.rs index fd972e28ab3..608ad0fe94e 100644 --- a/gcc/testsuite/rust/execute/torture/operator_overload_9.rs +++ b/gcc/testsuite/rust/execute/torture/operator_overload_9.rs @@ -1,4 +1,4 @@ -/* { dg-output "mut_deref\n123\n" } */ +/* { dg-output "mut_deref\r*\n123\r*\n" } */ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/str-layout1.rs b/gcc/testsuite/rust/execute/torture/str-layout1.rs index 80bdc2a9c9f..39c1e38d77b 100644 --- a/gcc/testsuite/rust/execute/torture/str-layout1.rs +++ b/gcc/testsuite/rust/execute/torture/str-layout1.rs @@ -1,5 +1,5 @@ // { dg-additional-options "-w" } -// { dg-output "t1sz=5 t2sz=10" } +// { dg-output "t1sz=5 t2sz=10\r*" } mod mem { extern "rust-intrinsic" { #[rustc_const_stable(feature = "const_transmute", since = "1.46.0")] diff --git a/gcc/testsuite/rust/execute/torture/str-zero.rs b/gcc/testsuite/rust/execute/torture/str-zero.rs index e7fba0d1372..9042f54436e 100644 --- a/gcc/testsuite/rust/execute/torture/str-zero.rs +++ b/gcc/testsuite/rust/execute/torture/str-zero.rs @@ -1,26 +1,23 @@ -/* { dg-output "bar foo baz foobar\n" } */ -extern "C" -{ - fn printf(s: *const i8, ...); - fn memchr(s: *const i8, c: u8, n: usize) -> *const i8; +/* { dg-output "bar foo baz foobar\r*\n" } */ +extern "C" { + fn printf(s: *const i8, ...); + fn memchr(s: *const i8, c: u8, n: usize) -> *const i8; } -pub fn main () -> i32 -{ - let f = "%s %s %s %s\n\0"; - let s = "bar\0\ +pub fn main() -> i32 { + let f = "%s %s %s %s\n\0"; + let s = "bar\0\ foo\ \x00\ baz\u{0000}\ foobar\0"; - let cf = f as *const str as *const i8; - let cs = s as *const str as *const i8; - unsafe - { - let cs2 = memchr (cs, b'f', 5); - let cs3 = memchr (cs2, b'b', 5); - let cs4 = memchr (cs3, b'f', 5); - printf (cf, cs, cs2, cs3, cs4); + let cf = f as *const str as *const i8; + let cs = s as *const str as *const i8; + unsafe { + let cs2 = memchr(cs, b'f', 5); + let cs3 = memchr(cs2, b'b', 5); + let cs4 = memchr(cs3, b'f', 5); + printf(cf, cs, cs2, cs3, cs4); } - 0 + 0 } diff --git a/gcc/testsuite/rust/execute/torture/trait1.rs b/gcc/testsuite/rust/execute/torture/trait1.rs index dc3cc471c33..d4f5878ef18 100644 --- a/gcc/testsuite/rust/execute/torture/trait1.rs +++ b/gcc/testsuite/rust/execute/torture/trait1.rs @@ -1,4 +1,4 @@ -/* { dg-output "S::f\nT1::f\nT2::f\n" } */ +/* { dg-output "S::f\r*\nT1::f\r*\nT2::f\r*\n" } */ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/trait10.rs b/gcc/testsuite/rust/execute/torture/trait10.rs index e581e324bbf..b0bdeab9091 100644 --- a/gcc/testsuite/rust/execute/torture/trait10.rs +++ b/gcc/testsuite/rust/execute/torture/trait10.rs @@ -1,4 +1,4 @@ -/* { dg-output "123\n" } */ +/* { dg-output "123\r*\n" } */ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/trait11.rs b/gcc/testsuite/rust/execute/torture/trait11.rs index 283c9ecd0ed..ed7b7c9d6ee 100644 --- a/gcc/testsuite/rust/execute/torture/trait11.rs +++ b/gcc/testsuite/rust/execute/torture/trait11.rs @@ -1,4 +1,4 @@ -/* { dg-output "3\n" } */ +/* { dg-output "3\r*\n" } */ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/trait12.rs b/gcc/testsuite/rust/execute/torture/trait12.rs index 68b0a4014ad..a4ba5be116e 100644 --- a/gcc/testsuite/rust/execute/torture/trait12.rs +++ b/gcc/testsuite/rust/execute/torture/trait12.rs @@ -1,4 +1,4 @@ -/* { dg-output "3\n" } */ +/* { dg-output "3\r*\n" } */ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/trait13.rs b/gcc/testsuite/rust/execute/torture/trait13.rs index 3071da27a6a..49befb8fbb1 100644 --- a/gcc/testsuite/rust/execute/torture/trait13.rs +++ b/gcc/testsuite/rust/execute/torture/trait13.rs @@ -1,4 +1,4 @@ -/* { dg-output "123\n456\n" } */ +/* { dg-output "123\r*\n456\r*\n" } */ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/trait2.rs b/gcc/testsuite/rust/execute/torture/trait2.rs index c96615fa891..9974f70da8c 100644 --- a/gcc/testsuite/rust/execute/torture/trait2.rs +++ b/gcc/testsuite/rust/execute/torture/trait2.rs @@ -1,4 +1,4 @@ -/* { dg-output "Bar::A = 456\n::A = 456\n" } */ +/* { dg-output "Bar::A = 456\r*\n::A = 456\r*\n" } */ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/trait3.rs b/gcc/testsuite/rust/execute/torture/trait3.rs index accfa9d0a36..6fe92ef70f9 100644 --- a/gcc/testsuite/rust/execute/torture/trait3.rs +++ b/gcc/testsuite/rust/execute/torture/trait3.rs @@ -1,4 +1,4 @@ -/* { dg-output "123, 777" } */ +/* { dg-output "123, 777\r*" } */ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/trait4.rs b/gcc/testsuite/rust/execute/torture/trait4.rs index 8c0d257cd7e..3b2d000780a 100644 --- a/gcc/testsuite/rust/execute/torture/trait4.rs +++ b/gcc/testsuite/rust/execute/torture/trait4.rs @@ -1,4 +1,4 @@ -/* { dg-output "123\n" }*/ +/* { dg-output "123\r*\n" }*/ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/trait5.rs b/gcc/testsuite/rust/execute/torture/trait5.rs index 49f11a6085a..f9c0dfdae74 100644 --- a/gcc/testsuite/rust/execute/torture/trait5.rs +++ b/gcc/testsuite/rust/execute/torture/trait5.rs @@ -1,4 +1,4 @@ -/* { dg-output "123\n123\n" } */ +/* { dg-output "123\r*\n123\r*\n" } */ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/trait6.rs b/gcc/testsuite/rust/execute/torture/trait6.rs index c83d6666c87..74363c2ddac 100644 --- a/gcc/testsuite/rust/execute/torture/trait6.rs +++ b/gcc/testsuite/rust/execute/torture/trait6.rs @@ -1,4 +1,4 @@ -/* { dg-output "123\n" } */ +/* { dg-output "123\r*\n" } */ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/trait7.rs b/gcc/testsuite/rust/execute/torture/trait7.rs index 064f88d5de9..fc1bbe87170 100644 --- a/gcc/testsuite/rust/execute/torture/trait7.rs +++ b/gcc/testsuite/rust/execute/torture/trait7.rs @@ -1,4 +1,4 @@ -/* { dg-output "123\n" } */ +/* { dg-output "123\r*\n" } */ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/trait8.rs b/gcc/testsuite/rust/execute/torture/trait8.rs index 14392ff0cca..c26737f58e6 100644 --- a/gcc/testsuite/rust/execute/torture/trait8.rs +++ b/gcc/testsuite/rust/execute/torture/trait8.rs @@ -1,4 +1,4 @@ -/* { dg-output "123\n" } */ +/* { dg-output "123\r*\n" } */ extern "C" { fn printf(s: *const i8, ...); } diff --git a/gcc/testsuite/rust/execute/torture/trait9.rs b/gcc/testsuite/rust/execute/torture/trait9.rs index c0e6d36f183..738d1935291 100644 --- a/gcc/testsuite/rust/execute/torture/trait9.rs +++ b/gcc/testsuite/rust/execute/torture/trait9.rs @@ -1,4 +1,4 @@ -/* { dg-output "3\n" } */ +/* { dg-output "3\r*\n" } */ extern "C" { fn printf(s: *const i8, ...); }