]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Do not crash on empty macros expand. Fixes #1712
authorLyra <teromene@teromene.fr>
Tue, 24 Jan 2023 13:15:42 +0000 (14:15 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Thu, 6 Apr 2023 08:47:17 +0000 (10:47 +0200)
commitcb42610bfbabdbd78a1a92eff4905551ecca8932
treefa752a2694a2ae40b435371640ccb42f729f77e9
parent910e7e0a9586add4b6e1229e576e4f870c2ae030
gccrs: Do not crash on empty macros expand. Fixes #1712

This commit fixes a compiler crash when expanding an empty macro into an existing AST.

gcc/rust/ChangeLog:

* expand/rust-macro-expand.cc (transcribe_expression): Fix ICE when expanding
empty macros.

gcc/testsuite/ChangeLog:

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

Signed-off-by: Lyra Karenai <teromene@teromene.fr>
gcc/rust/expand/rust-macro-expand.cc
gcc/testsuite/rust/compile/macro45.rs [new file with mode: 0644]