]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Add regression test for float literal tuple indices
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Tue, 17 Oct 2023 11:40:47 +0000 (13:40 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 18:09:36 +0000 (19:09 +0100)
Add a new regression test in order to highlight the fix for #2659.

gcc/testsuite/ChangeLog:

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

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

diff --git a/gcc/testsuite/rust/compile/not_a_float_literal_tuple_index.rs b/gcc/testsuite/rust/compile/not_a_float_literal_tuple_index.rs
new file mode 100644 (file)
index 0000000..b67d0be
--- /dev/null
@@ -0,0 +1,3 @@
+fn main() {
+    (1, (2, 3)).1.1;
+}