aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 7b21ddc..dd817ad 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -4279,11 +4279,18 @@ verify_stmts (void)
tree t = PHI_ARG_DEF (phi, i);
tree addr;
+ if (!t)
+ {
+ error ("missing PHI def");
+ debug_generic_stmt (phi);
+ err |= true;
+ continue;
+ }
/* Addressable variables do have SSA_NAMEs but they
are not considered gimple values. */
- if (TREE_CODE (t) != SSA_NAME
- && TREE_CODE (t) != FUNCTION_DECL
- && !is_gimple_val (t))
+ else if (TREE_CODE (t) != SSA_NAME
+ && TREE_CODE (t) != FUNCTION_DECL
+ && !is_gimple_val (t))
{
error ("PHI def is not a GIMPLE value");
debug_generic_stmt (phi);