]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Add a new test for float literals
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Fri, 5 Jun 2026 14:32:57 +0000 (16:32 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Thu, 25 Jun 2026 17:21:30 +0000 (19:21 +0200)
utf8_identifiers test has been changed to narrow it's scope. This change
means the test does not cover the unsuffixed float anymore and we aim to
fix that with a new separate test.

gcc/testsuite/ChangeLog:

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

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

diff --git a/gcc/testsuite/rust/compile/float_literals.rs b/gcc/testsuite/rust/compile/float_literals.rs
new file mode 100644 (file)
index 0000000..94929f7
--- /dev/null
@@ -0,0 +1,13 @@
+#![feature(no_core)]
+#![no_core]
+
+pub fn f() {
+    let _ = 0.;
+    let _ = 159.;
+    let _ = 0.0;
+    let _ = 159.0;
+    let _ = 0.0f32;
+    let _ = 159.0f32;
+    let _ = 0_0.0f32;
+    let _ = 0_159.0f32;
+}