[gcc/devel/rust/master] Dont return error_mark_node on bad CallExpr arguments

Thomas Schwinge tschwinge@gcc.gnu.org
Sat Aug 13 08:42:35 GMT 2022


https://gcc.gnu.org/g:9caea7bcf8026972544ef7aae26a8df1a8bf8db1

commit 9caea7bcf8026972544ef7aae26a8df1a8bf8db1
Author: Philip Herron <philip.herron@embecosm.com>
Date:   Thu Aug 11 15:50:12 2022 +0100

    Dont return error_mark_node on bad CallExpr arguments
    
    If we return error_mark_node on a bad expression argument we loss alot of
    useful debug info from the error node within the -fdump-tree-original which
    saves alot of debug printf.

Diff:
---
 gcc/rust/rust-gcc.cc | 2 --
 1 file changed, 2 deletions(-)

diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust-gcc.cc
index c8eee0f4684..c1729174b95 100644
--- a/gcc/rust/rust-gcc.cc
+++ b/gcc/rust/rust-gcc.cc
@@ -1778,8 +1778,6 @@ Gcc_backend::call_expression (tree fn, const std::vector<tree> &fn_args,
   for (size_t i = 0; i < nargs; ++i)
     {
       args[i] = fn_args.at (i);
-      if (args[i] == error_mark_node)
-	return error_mark_node;
     }
 
   tree fndecl = fn;


More information about the Gcc-cvs mailing list