]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Add a new test for float disambiguation
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Tue, 31 Oct 2023 14:43:51 +0000 (15:43 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 18:13:15 +0000 (19:13 +0100)
This new regression test highlight the behavior fixed for float
disambiguation with empty floating point.

gcc/testsuite/ChangeLog:

* rust/compile/tuple_float_index.rs: New test.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/testsuite/rust/compile/tuple_float_index.rs [new file with mode: 0644]

diff --git a/gcc/testsuite/rust/compile/tuple_float_index.rs b/gcc/testsuite/rust/compile/tuple_float_index.rs
new file mode 100644 (file)
index 0000000..87410c5
--- /dev/null
@@ -0,0 +1,6 @@
+fn main() {
+    let tuple = (((),()),);
+
+    // Do not reformat, the space after the second dot is required
+    let _ = tuple.0. 1;
+}