gccrs: testsuite: Handle Windows carriage returns properly
authorArthur Cohen <arthur.cohen@embecosm.com>
Wed, 11 Jan 2023 10:36:11 +0000 (11:36 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Thu, 6 Apr 2023 08:47:17 +0000 (10:47 +0200)
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.

87 files changed:
gcc/testsuite/rust/execute/torture/builtin_macro_cfg.rs
gcc/testsuite/rust/execute/torture/builtin_macro_concat.rs
gcc/testsuite/rust/execute/torture/builtin_macro_env.rs
gcc/testsuite/rust/execute/torture/builtin_macro_include_bytes.rs
gcc/testsuite/rust/execute/torture/builtin_macro_include_str.rs
gcc/testsuite/rust/execute/torture/builtin_macro_line.rs
gcc/testsuite/rust/execute/torture/builtin_macros1.rs
gcc/testsuite/rust/execute/torture/builtin_macros3.rs
gcc/testsuite/rust/execute/torture/cfg1.rs
gcc/testsuite/rust/execute/torture/cfg2.rs
gcc/testsuite/rust/execute/torture/cfg3.rs
gcc/testsuite/rust/execute/torture/cfg4.rs
gcc/testsuite/rust/execute/torture/closure2.rs
gcc/testsuite/rust/execute/torture/closure3.rs
gcc/testsuite/rust/execute/torture/coercion1.rs
gcc/testsuite/rust/execute/torture/coercion2.rs
gcc/testsuite/rust/execute/torture/extern_mod4.rs
gcc/testsuite/rust/execute/torture/helloworld1.rs
gcc/testsuite/rust/execute/torture/helloworld2.rs
gcc/testsuite/rust/execute/torture/issue-1198.rs
gcc/testsuite/rust/execute/torture/issue-1231.rs
gcc/testsuite/rust/execute/torture/issue-1232.rs
gcc/testsuite/rust/execute/torture/issue-1249.rs
gcc/testsuite/rust/execute/torture/issue-1436.rs
gcc/testsuite/rust/execute/torture/issue-1496.rs
gcc/testsuite/rust/execute/torture/issue-647.rs
gcc/testsuite/rust/execute/torture/issue-845.rs
gcc/testsuite/rust/execute/torture/issue-851.rs
gcc/testsuite/rust/execute/torture/issue-858.rs
gcc/testsuite/rust/execute/torture/issue-976.rs
gcc/testsuite/rust/execute/torture/loop-condition-eval.rs
gcc/testsuite/rust/execute/torture/macros10.rs
gcc/testsuite/rust/execute/torture/macros11.rs
gcc/testsuite/rust/execute/torture/macros12.rs
gcc/testsuite/rust/execute/torture/macros13.rs
gcc/testsuite/rust/execute/torture/macros14.rs
gcc/testsuite/rust/execute/torture/macros2.rs
gcc/testsuite/rust/execute/torture/macros22.rs
gcc/testsuite/rust/execute/torture/macros29.rs
gcc/testsuite/rust/execute/torture/macros3.rs
gcc/testsuite/rust/execute/torture/macros30.rs
gcc/testsuite/rust/execute/torture/macros31.rs
gcc/testsuite/rust/execute/torture/macros7.rs
gcc/testsuite/rust/execute/torture/macros8.rs
gcc/testsuite/rust/execute/torture/macros9.rs
gcc/testsuite/rust/execute/torture/match1.rs
gcc/testsuite/rust/execute/torture/match2.rs
gcc/testsuite/rust/execute/torture/match3.rs
gcc/testsuite/rust/execute/torture/match_bool1.rs
gcc/testsuite/rust/execute/torture/match_byte1.rs
gcc/testsuite/rust/execute/torture/match_char1.rs
gcc/testsuite/rust/execute/torture/match_int1.rs
gcc/testsuite/rust/execute/torture/match_loop1.rs
gcc/testsuite/rust/execute/torture/match_range1.rs
gcc/testsuite/rust/execute/torture/match_range2.rs
gcc/testsuite/rust/execute/torture/match_tuple1.rs
gcc/testsuite/rust/execute/torture/method1.rs
gcc/testsuite/rust/execute/torture/method2.rs
gcc/testsuite/rust/execute/torture/method3.rs
gcc/testsuite/rust/execute/torture/method4.rs
gcc/testsuite/rust/execute/torture/operator_overload_1.rs
gcc/testsuite/rust/execute/torture/operator_overload_10.rs
gcc/testsuite/rust/execute/torture/operator_overload_11.rs
gcc/testsuite/rust/execute/torture/operator_overload_12.rs
gcc/testsuite/rust/execute/torture/operator_overload_2.rs
gcc/testsuite/rust/execute/torture/operator_overload_3.rs
gcc/testsuite/rust/execute/torture/operator_overload_4.rs
gcc/testsuite/rust/execute/torture/operator_overload_5.rs
gcc/testsuite/rust/execute/torture/operator_overload_6.rs
gcc/testsuite/rust/execute/torture/operator_overload_7.rs
gcc/testsuite/rust/execute/torture/operator_overload_8.rs
gcc/testsuite/rust/execute/torture/operator_overload_9.rs
gcc/testsuite/rust/execute/torture/str-layout1.rs
gcc/testsuite/rust/execute/torture/str-zero.rs
gcc/testsuite/rust/execute/torture/trait1.rs
gcc/testsuite/rust/execute/torture/trait10.rs
gcc/testsuite/rust/execute/torture/trait11.rs
gcc/testsuite/rust/execute/torture/trait12.rs
gcc/testsuite/rust/execute/torture/trait13.rs
gcc/testsuite/rust/execute/torture/trait2.rs
gcc/testsuite/rust/execute/torture/trait3.rs
gcc/testsuite/rust/execute/torture/trait4.rs
gcc/testsuite/rust/execute/torture/trait5.rs
gcc/testsuite/rust/execute/torture/trait6.rs
gcc/testsuite/rust/execute/torture/trait7.rs
gcc/testsuite/rust/execute/torture/trait8.rs
gcc/testsuite/rust/execute/torture/trait9.rs

index fad2dae..a8d6ae0 100644 (file)
@@ -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
index 9b33924..a9d68e0 100644 (file)
@@ -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 {
     () => {{}};
index a5c80b2..d64e2a0 100644 (file)
@@ -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 {
index 087f022..8be5577 100644 (file)
@@ -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 {
     () => {{}};
index 6f9871d..43d40c9 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-output "hello, include!\n" }
+// { dg-output "hello, include!\r*\n" }
 #[rustc_builtin_macro]
 macro_rules! include_str {
     () => {{}};
index 02541ed..9998de1 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-output "18\n21\n" }
+// { dg-output "18\r*\n21\r*\n" }
 extern "C" {
     fn printf(fmt: *const i8, ...);
 }
index 5976478..5bccb16 100644 (file)
@@ -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 {
     () => {{}};
index 24555cb..5a024fa 100644 (file)
@@ -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
 }
-
index d3c5629..648d1f1 100644 (file)
@@ -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, ...);
 }
index 5048bcb..7b75ac6 100644 (file)
@@ -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, ...);
 }
index 8931234..97a8fb8 100644 (file)
@@ -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, ...);
 }
index d1c2a22..97026d9 100644 (file)
@@ -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, ...);
 }
index 45b3b5c..8e1502d 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-output "3\n" }
+// { dg-output "3\r*\n" }
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index 62cf3a0..8fa9445 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-output "3\n" }
+// { dg-output "3\r*\n" }
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index 2cdb9bb..6ca2823 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-output "123\n123\n" } */
+/* { dg-output "123\r*\n123\r*\n" } */
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index 12dd68f..047fd53 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-output "123\n123\n" } */
+/* { dg-output "123\r*\n123\r*\n" } */
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index 99b6fb5..55be2b8 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-additional-options "-w" }
-// { dg-output "12" }
+// { dg-output "12\r*" }
 mod modules;
 
 extern "C" {
index d416efa..8803156 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-output "Hello World" }*/
+/* { dg-output "Hello World\r*" }*/
 extern "C" {
     fn puts(s: *const i8);
 }
index cc05f37..912301b 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-output "Hello World 123\n" }*/
+/* { dg-output "Hello World 123\r*\n" }*/
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index fce44ad..bbc58f0 100644 (file)
@@ -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, ...);
 }
index 970e86f..321df5f 100644 (file)
@@ -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, ...);
 }
index c56d5c1..9215efd 100644 (file)
@@ -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<T>(dst: *const T, offset: isize) -> *const T;
index 072204e..0691107 100644 (file)
@@ -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, ...);
index 5c079a6..96de5d6 100644 (file)
@@ -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")]
index 9f08b2a..af4201b 100644 (file)
@@ -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, ...);
 }
index 3f427cc..d76d43b 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-output "Hello World 123\n" }*/
+/* { dg-output "Hello World 123\r*\n" }*/
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index 4c689e3..f96714d 100644 (file)
@@ -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, ...);
index 3881c7a..b3b2b48 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-output "Result: 123\n" } */
+/* { dg-output "Result: 123\r*\n" } */
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index 5a43f3e..51a1561 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-output "Result: 123\n" } */
+/* { dg-output "Result: 123\r*\n" } */
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index 42cf596..cf6cfa6 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-output "hi" } */
+/* { dg-output "hi\r*" } */
 fn main() -> i32 {
     {
         extern "C" {
index 0089659..67ac00c 100644 (file)
@@ -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 {
index 155a440..4f976f0 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-output "18\n" }
+// { dg-output "18\r*\n" }
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index 5bde97d..70e5f25 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-output "2" }
+// { dg-output "2\r*" }
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index d310dff..deb424f 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-output "0\n" }
+// { dg-output "0\r*\n" }
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index afb2026..ec36a21 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-output "18\n" }
+// { dg-output "18\r*\n" }
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index 0065654..189fadd 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-output "15\n" }
+// { dg-output "15\r*\n" }
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index ba50987..aca528a 100644 (file)
@@ -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, ...);
 }
index 3f291ac..60ffae1 100644 (file)
@@ -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) => {{
index 306979b..9c2cc0e 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-output "1\n" }
+// { dg-output "1\r*\n" }
 #[rustc_builtin_macro]
 macro_rules! concat {
     () => {{}};
index 00f6d25..91936c1 100644 (file)
@@ -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, ...);
 }
index ab36f5e..7ec77d0 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-output "1\n" }
+// { dg-output "1\r*\n" }
 #[rustc_builtin_macro]
 macro_rules! concat {
     () => {{}};
index 483f897..4c6378a 100644 (file)
@@ -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 {
     () => {{}};
index ed1f922..b8af009 100644 (file)
@@ -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, ...);
 }
index a12aca4..e532237 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-output "zo1\nzo1\n" }
+// { dg-output "zo1\r*\nzo1\r*\n" }
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index 0e3fd24..81aa368 100644 (file)
@@ -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, ...);
 }
index e5af512..66a5be3 100644 (file)
@@ -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, ...);
 }
index 02cedf2..3c9fbde 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-output "123\n80\n" }
+// { dg-output "123\r*\n80\r*\n" }
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index 8cded30..3dda9a3 100644 (file)
@@ -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, ...);
 }
index 101dbb5..2fb5e02 100644 (file)
@@ -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, ...);
index 3546cfb..4261b2b 100644 (file)
@@ -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, ...);
index fa65876..1584b41 100644 (file)
@@ -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, ...);
index 209429a..a7deefb 100644 (file)
@@ -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, ...);
index bb6aee9..578712f 100644 (file)
@@ -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, ...);
index 82e9e34..3b70540 100644 (file)
@@ -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, ...);
index 8153f9e..517f2bb 100644 (file)
@@ -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, ...);
index cb61cc0..2ae3ca7 100644 (file)
@@ -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, ...);
index 6af6133..c57944b 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-output "124\n458" } */
+/* { dg-output "124\r*\n458" } */
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index f532b44..79a35eb 100644 (file)
@@ -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, ...);
 }
index 0e9e8ff..7217d35 100644 (file)
@@ -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, ...);
 }
index 5c6fdfe..ba1ffd1 100644 (file)
@@ -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, ...);
 }
index 5a28c5f..064a776 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-output "3\n" } */
+/* { dg-output "3\r*\n" } */
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index f5d45db..3fa5afd 100644 (file)
@@ -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, ...);
 }
index 1919941..94bc1cd 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-output "1\n" }
+// { dg-output "1\r*\n" }
 // { dg-additional-options "-w" }
 extern "C" {
     fn printf(s: *const i8, ...);
index 7433330..d525ec4 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-output "1\n" }
+// { dg-output "1\r*\n" }
 // { dg-additional-options "-w" }
 extern "C" {
     fn printf(s: *const i8, ...);
index a577718..fab3a83 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-output "3\n" } */
+/* { dg-output "3\r*\n" } */
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index 57f5807..2bcb1c4 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-output "3\n3\n" } */
+/* { dg-output "3\r*\n3\r*\n" } */
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index ce9887b..e1fcbac 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-output "neg\n" } */
+/* { dg-output "neg\r*\n" } */
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index a525f74..2ba8728 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-output "not\n" } */
+/* { dg-output "not\r*\n" } */
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index fbd2a8f..50463e7 100644 (file)
@@ -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, ...);
 }
index 886a701..50107bb 100644 (file)
@@ -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, ...);
 }
index 862e29a..e0338b9 100644 (file)
@@ -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, ...);
 }
index fd972e2..608ad0f 100644 (file)
@@ -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, ...);
 }
index 80bdc2a..39c1e38 100644 (file)
@@ -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")]
index e7fba0d..9042f54 100644 (file)
@@ -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
 }
index dc3cc47..d4f5878 100644 (file)
@@ -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, ...);
 }
index e581e32..b0bdeab 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-output "123\n" } */
+/* { dg-output "123\r*\n" } */
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index 283c9ec..ed7b7c9 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-output "3\n" } */
+/* { dg-output "3\r*\n" } */
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index 68b0a40..a4ba5be 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-output "3\n" } */
+/* { dg-output "3\r*\n" } */
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index 3071da2..49befb8 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-output "123\n456\n" } */
+/* { dg-output "123\r*\n456\r*\n" } */
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index c96615f..9974f70 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-output "Bar::A = 456\n<Foo as Bar>::A = 456\n" } */
+/* { dg-output "Bar::A = 456\r*\n<Foo as Bar>::A = 456\r*\n" } */
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index accfa9d..6fe92ef 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-output "123, 777" } */
+/* { dg-output "123, 777\r*" } */
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index 8c0d257..3b2d000 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-output "123\n" }*/
+/* { dg-output "123\r*\n" }*/
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index 49f11a6..f9c0dfd 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-output "123\n123\n" } */
+/* { dg-output "123\r*\n123\r*\n" } */
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index c83d666..74363c2 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-output "123\n" } */
+/* { dg-output "123\r*\n" } */
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index 064f88d..fc1bbe8 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-output "123\n" } */
+/* { dg-output "123\r*\n" } */
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index 14392ff..c26737f 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-output "123\n" } */
+/* { dg-output "123\r*\n" } */
 extern "C" {
     fn printf(s: *const i8, ...);
 }
index c0e6d36..738d193 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-output "3\n" } */
+/* { dg-output "3\r*\n" } */
 extern "C" {
     fn printf(s: *const i8, ...);
 }