[gccrs,COMMIT] testsuite: Add regression test for Rust-GCC/gccrs#4116

Message ID 20260707171428.3114-1-gerris.rs@gmail.com
State New
Headers
Series [gccrs,COMMIT] testsuite: Add regression test for Rust-GCC/gccrs#4116 |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_simplebootstrap_build--master-arm-bootstrap fail Build failed
linaro-tcwg-bot/tcwg_gcc_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_simplebootstrap_build--master-aarch64-bootstrap success Build passed

Commit Message

gerris.rs@gmail.com July 7, 2026, 5:14 p.m. UTC
  From: Arthur Cohen <arthur.cohen@embecosm.com>

gcc/testsuite/ChangeLog:

	* rust/compile/issue-4116.rs: New test.
---
This change was merged into the gccrs repository and is posted here for
upstream visibility and potential drive-by review, as requested by GCC
release managers.
Each commit email contains a link to its details on github from where you can
find the Pull-Request and associated discussions.


Commit on github: https://github.com/Rust-GCC/gccrs/commit/5d0183e3b1be74428be76cf99ba2f43d21f9c191

The commit has been mentioned in the following issue(s):
 - Rust-GCC/gccrs#4116: https://github.com/Rust-GCC/gccrs/issues/4116

The commit has been mentioned in the following pull-request(s):
 - https://github.com/Rust-GCC/gccrs/pull/4691

 gcc/testsuite/rust/compile/issue-4116.rs | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 gcc/testsuite/rust/compile/issue-4116.rs


base-commit: f7a192fff40f141647752a7d5c8c0fae0c122d29
  

Patch

diff --git a/gcc/testsuite/rust/compile/issue-4116.rs b/gcc/testsuite/rust/compile/issue-4116.rs
new file mode 100644
index 000000000..2741a6871
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-4116.rs
@@ -0,0 +1,19 @@ 
+#![feature(no_core)]
+#![no_core]
+
+enum Foo {
+    Relaxed,
+    SeqCst,
+    StressedOut,
+}
+
+use Foo::{Relaxed, SeqCst, StressedOut};
+
+fn main() {
+    let a = (Relaxed, Relaxed);
+
+    match a {
+        (Relaxed, Relaxed) => {}
+        _ => {}
+    }
+}