From 60affc3a1c5cbb977ed5f2da3c9e562828ef3338 Mon Sep 17 00:00:00 2001 From: Arthur Cohen Date: Wed, 11 Jan 2023 11:36:11 +0100 Subject: [PATCH] gccrs: testsuite: Handle Windows carriage returns properly 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 +++--- .../rust/execute/torture/builtin_macro_concat.rs | 2 +- .../rust/execute/torture/builtin_macro_env.rs | 2 +- .../execute/torture/builtin_macro_include_bytes.rs | 2 +- .../execute/torture/builtin_macro_include_str.rs | 2 +- .../rust/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 +- gcc/testsuite/rust/execute/torture/closure2.rs | 2 +- gcc/testsuite/rust/execute/torture/closure3.rs | 2 +- gcc/testsuite/rust/execute/torture/coercion1.rs | 2 +- gcc/testsuite/rust/execute/torture/coercion2.rs | 2 +- gcc/testsuite/rust/execute/torture/extern_mod4.rs | 2 +- gcc/testsuite/rust/execute/torture/helloworld1.rs | 2 +- gcc/testsuite/rust/execute/torture/helloworld2.rs | 2 +- gcc/testsuite/rust/execute/torture/issue-1198.rs | 2 +- gcc/testsuite/rust/execute/torture/issue-1231.rs | 2 +- gcc/testsuite/rust/execute/torture/issue-1232.rs | 2 +- gcc/testsuite/rust/execute/torture/issue-1249.rs | 2 +- gcc/testsuite/rust/execute/torture/issue-1436.rs | 1 - gcc/testsuite/rust/execute/torture/issue-1496.rs | 2 +- gcc/testsuite/rust/execute/torture/issue-647.rs | 2 +- gcc/testsuite/rust/execute/torture/issue-845.rs | 2 +- gcc/testsuite/rust/execute/torture/issue-851.rs | 2 +- gcc/testsuite/rust/execute/torture/issue-858.rs | 2 +- gcc/testsuite/rust/execute/torture/issue-976.rs | 2 +- .../rust/execute/torture/loop-condition-eval.rs | 2 +- gcc/testsuite/rust/execute/torture/macros10.rs | 2 +- gcc/testsuite/rust/execute/torture/macros11.rs | 2 +- gcc/testsuite/rust/execute/torture/macros12.rs | 2 +- gcc/testsuite/rust/execute/torture/macros13.rs | 2 +- gcc/testsuite/rust/execute/torture/macros14.rs | 2 +- gcc/testsuite/rust/execute/torture/macros2.rs | 2 +- gcc/testsuite/rust/execute/torture/macros22.rs | 2 +- gcc/testsuite/rust/execute/torture/macros29.rs | 2 +- gcc/testsuite/rust/execute/torture/macros3.rs | 2 +- gcc/testsuite/rust/execute/torture/macros30.rs | 2 +- gcc/testsuite/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 +- gcc/testsuite/rust/execute/torture/match_bool1.rs | 2 +- gcc/testsuite/rust/execute/torture/match_byte1.rs | 2 +- gcc/testsuite/rust/execute/torture/match_char1.rs | 2 +- gcc/testsuite/rust/execute/torture/match_int1.rs | 2 +- gcc/testsuite/rust/execute/torture/match_loop1.rs | 2 +- gcc/testsuite/rust/execute/torture/match_range1.rs | 2 +- gcc/testsuite/rust/execute/torture/match_range2.rs | 2 +- gcc/testsuite/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 +- .../rust/execute/torture/operator_overload_1.rs | 2 +- .../rust/execute/torture/operator_overload_10.rs | 2 +- .../rust/execute/torture/operator_overload_11.rs | 2 +- .../rust/execute/torture/operator_overload_12.rs | 2 +- .../rust/execute/torture/operator_overload_2.rs | 2 +- .../rust/execute/torture/operator_overload_3.rs | 2 +- .../rust/execute/torture/operator_overload_4.rs | 2 +- .../rust/execute/torture/operator_overload_5.rs | 2 +- .../rust/execute/torture/operator_overload_6.rs | 2 +- .../rust/execute/torture/operator_overload_7.rs | 2 +- .../rust/execute/torture/operator_overload_8.rs | 2 +- .../rust/execute/torture/operator_overload_9.rs | 2 +- gcc/testsuite/rust/execute/torture/str-layout1.rs | 2 +- gcc/testsuite/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 fad2dae..a8d6ae0 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 9b33924..a9d68e0 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 a5c80b2..d64e2a0 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 087f022..8be5577 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 6f9871d..43d40c9 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 02541ed..9998de1 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 5976478..5bccb16 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 24555cb..5a024fa 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 d3c5629..648d1f1 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 5048bcb..7b75ac6 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 8931234..97a8fb8 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 d1c2a22..97026d9 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 45b3b5c..8e1502d 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 62cf3a0..8fa9445 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 2cdb9bb..6ca2823 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 12dd68f..047fd53 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 99b6fb5..55be2b8 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 d416efa..8803156 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 cc05f37..912301b 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 fce44ad..bbc58f0 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 970e86f..321df5f 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 c56d5c1..9215efd 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 072204e..0691107 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 5c079a6..96de5d6 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 9f08b2a..af4201b 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 3f427cc..d76d43b 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 4c689e3..f96714d 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 3881c7a..b3b2b48 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 5a43f3e..51a1561 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 42cf596..cf6cfa6 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 0089659..67ac00c 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 155a440..4f976f0 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 5bde97d..70e5f25 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 d310dff..deb424f 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 afb20264..ec36a21 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 0065654..189fadd 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 ba50987..aca528a 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 3f291ac..60ffae1 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 306979b..9c2cc0e 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 00f6d25..91936c1 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 ab36f5e..7ec77d0 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 483f897..4c6378a 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 ed1f922..b8af009 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 a12aca4..e532237 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 0e3fd24..81aa368 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 e5af512..66a5be3 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 02cedf2..3c9fbde 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 8cded30..3dda9a3 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 101dbb5..2fb5e02 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 3546cfb..4261b2b 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 fa65876a..1584b41 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 209429a..a7deefb 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 bb6aee9..578712f 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 82e9e34..3b70540 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 8153f9e..517f2bb 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 cb61cc0..2ae3ca7 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 6af6133..c57944b 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 f532b44..79a35eb 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 0e9e8ff..7217d35 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 5c6fdfe..ba1ffd1 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 5a28c5f..064a776 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 f5d45db..3fa5afd 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 1919941..94bc1cd 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 7433330..d525ec4 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 a577718..fab3a83 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 57f5807..2bcb1c4 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 ce9887b..e1fcbac 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 a525f74..2ba8728 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 fbd2a8f..50463e7 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 886a701..50107bb 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 862e29a..e0338b9 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 fd972e2..608ad0f 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 80bdc2a..39c1e38 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 e7fba0d..9042f54 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 dc3cc47..d4f5878 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 e581e32..b0bdeab 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 283c9ec..ed7b7c9 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 68b0a40..a4ba5be 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 3071da2..49befb8 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 c96615f..9974f70 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 accfa9d..6fe92ef 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 8c0d257..3b2d000 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 49f11a6..f9c0dfd 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 c83d666..74363c2 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 064f88d..fc1bbe8 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 14392ff..c26737f 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 c0e6d36..738d193 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, ...); } -- 2.7.4