[gcc r14-7929] gccrs: Add a regression test for decimal lexing

Arthur Cohen cohenarthur@gcc.gnu.org
Tue Jan 16 18:08:11 GMT 2024


https://gcc.gnu.org/g:6899eaa70f4fb95ef5b07ae5c073189593f0aa2a

commit r14-7929-g6899eaa70f4fb95ef5b07ae5c073189593f0aa2a
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date:   Thu Aug 3 15:52:51 2023 +0200

    gccrs: Add a regression test for decimal lexing
    
    Issue #2514 fixed by the previous commit highlight a behavior we want to
    avoid in the future, hence this regression test.
    
    gcc/testsuite/ChangeLog:
    
            * rust/compile/issue-2514.rs: New test.
    
    Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>

Diff:
---
 gcc/testsuite/rust/compile/issue-2514.rs | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/gcc/testsuite/rust/compile/issue-2514.rs b/gcc/testsuite/rust/compile/issue-2514.rs
new file mode 100644
index 00000000000..05e106c96c9
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-2514.rs
@@ -0,0 +1,14 @@
+struct First {
+    i: usize,
+}
+
+impl First {
+    pub fn e_function(mut self) {
+        self.i += 1;
+    }
+}
+
+pub fn main() {
+    let a = (First { i: 10 }, 2);
+    a.0.e_function();
+}


More information about the Gcc-cvs mailing list