]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
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)
committerP-E-P <32375388+P-E-P@users.noreply.github.com>
Wed, 15 Nov 2023 14:32:30 +0000 (14:32 +0000)
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;
+}