Skip to content

Commit

Permalink
parser: Add testcases for multiline strings
Browse files Browse the repository at this point in the history
Regression checks for #1399

gcc/testsuite/ChangeLog:

	* rust/compile/multiline-string.rs: New test.
	* rust/execute/torture/multiline-string.rs: New test.
  • Loading branch information
CohenArthur committed Dec 25, 2024
1 parent d28cae5 commit a51abe3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
14 changes: 14 additions & 0 deletions gcc/testsuite/rust/compile/multiline-string.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
fn main() {
let _a = "gcc
rs";

let _b = "rust
c
gcc
rs";
}
13 changes: 13 additions & 0 deletions gcc/testsuite/rust/execute/torture/multiline-string.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// { dg-output "gcc\n\n\nrs" }

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-and-check-ubuntu-32bit

Test failure (FAIL)

-O0 execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-and-check-ubuntu-32bit

Test failure (FAIL)

-O1 execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-and-check-ubuntu-32bit

Test failure (FAIL)

-O2 execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-and-check-ubuntu-32bit

Test failure (FAIL)

-O3 -g execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-and-check-ubuntu-32bit

Test failure (FAIL)

-Os execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-and-check-ubuntu-32bit

Test failure (FAIL)

-O2 -flto -fno-use-linker-plugin -flto-partition=none execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-and-check-ubuntu-32bit

Test failure (FAIL)

-O2 -flto -fuse-linker-plugin -fno-fat-lto-objects execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-and-check-ubuntu-64bit

Test failure (FAIL)

-O0 execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-and-check-ubuntu-64bit

Test failure (FAIL)

-O1 execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-and-check-ubuntu-64bit

Test failure (FAIL)

-O2 execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-and-check-ubuntu-64bit

Test failure (FAIL)

-O3 -g execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-and-check-ubuntu-64bit

Test failure (FAIL)

-Os execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-and-check-ubuntu-64bit

Test failure (FAIL)

-O2 -flto -fno-use-linker-plugin -flto-partition=none execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-and-check-ubuntu-64bit

Test failure (FAIL)

-O2 -flto -fuse-linker-plugin -fno-fat-lto-objects execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-and-check-ubuntu-64bit-glibcxx

Test failure (FAIL)

-O0 execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-and-check-ubuntu-64bit-glibcxx

Test failure (FAIL)

-O1 execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-and-check-ubuntu-64bit-glibcxx

Test failure (FAIL)

-O2 execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-and-check-ubuntu-64bit-glibcxx

Test failure (FAIL)

-O3 -g execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-and-check-ubuntu-64bit-glibcxx

Test failure (FAIL)

-Os execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-and-check-ubuntu-64bit-glibcxx

Test failure (FAIL)

-O2 -flto -fno-use-linker-plugin -flto-partition=none execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-and-check-ubuntu-64bit-glibcxx

Test failure (FAIL)

-O2 -flto -fuse-linker-plugin -fno-fat-lto-objects execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-and-check-asan

Test failure (FAIL)

-O0 execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-and-check-asan

Test failure (FAIL)

-O1 execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-and-check-asan

Test failure (FAIL)

-O2 execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-and-check-asan

Test failure (FAIL)

-O3 -g execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-and-check-asan

Test failure (FAIL)

-Os execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-and-check-asan

Test failure (FAIL)

-O2 -flto -fno-use-linker-plugin -flto-partition=none execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-and-check-asan

Test failure (FAIL)

-O2 -flto -fuse-linker-plugin -fno-fat-lto-objects execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-alpine-32bit-and-check-alpine-32bit

Test failure (FAIL)

-O0 execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-alpine-32bit-and-check-alpine-32bit

Test failure (FAIL)

-O1 execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-alpine-32bit-and-check-alpine-32bit

Test failure (FAIL)

-O2 execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-alpine-32bit-and-check-alpine-32bit

Test failure (FAIL)

-O3 -g execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-alpine-32bit-and-check-alpine-32bit

Test failure (FAIL)

-Os execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-alpine-32bit-and-check-alpine-32bit

Test failure (FAIL)

-O2 -flto -fno-use-linker-plugin -flto-partition=none execution test

Check failure on line 1 in gcc/testsuite/rust/execute/torture/multiline-string.rs

View workflow job for this annotation

GitHub Actions / build-alpine-32bit-and-check-alpine-32bit

Test failure (FAIL)

-O2 -flto -fuse-linker-plugin -fno-fat-lto-objects execution test

extern "C" {
fn printf(fmt: *const i8, ...);
}

fn main() {
let a = "gcc
rs\0";

unsafe { printf("%s\n\0" as *const str as *const i8, a as *const str as *const i8); }
}

0 comments on commit a51abe3

Please sign in to comment.