diff mbox series

[middle-end,trivial?] Use error_operand_p in gimplify_expr

Message ID 8a954162-20ad-925b-e0cd-6a14eca3b210@oracle.com
State New
Headers show
Series [middle-end,trivial?] Use error_operand_p in gimplify_expr | expand

Commit Message

Paolo Carlini Dec. 19, 2017, 10:36 a.m. UTC
Hi,

was working on a couple of bugs and noticed what looks like a case of 
error_operand_p with a redundant check that TREE_TYPE is non-null. 
Barring objections I'm going to commit the below.

Thanks, Paolo.

///////////////////////
2017-19-12  Paolo Carlini  <paolo.carlini@oracle.com>

	* gimplify.c (gimplify_expr): Use error_operand_p.

Comments

Richard Biener Dec. 19, 2017, 10:39 a.m. UTC | #1
On Tue, 19 Dec 2017, Paolo Carlini wrote:

> Hi,
> 
> was working on a couple of bugs and noticed what looks like a case of
> error_operand_p with a redundant check that TREE_TYPE is non-null. Barring
> objections I'm going to commit the below.

LGTM.

> Thanks, Paolo.
> 
> ///////////////////////
> 
>
diff mbox series

Patch

Index: gimplify.c
===================================================================
--- gimplify.c	(revision 255811)
+++ gimplify.c	(working copy)
@@ -11334,9 +11334,7 @@  gimplify_expr (tree *expr_p, gimple_seq *pre_p, gi
       save_expr = *expr_p;
 
       /* Die, die, die, my darling.  */
-      if (save_expr == error_mark_node
-	  || (TREE_TYPE (save_expr)
-	      && TREE_TYPE (save_expr) == error_mark_node))
+      if (error_operand_p (save_expr))
 	{
 	  ret = GS_ERROR;
 	  break;