diff options
author | Richard Biener <rguenther@suse.de> | 2020-09-29 14:38:06 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2020-09-29 14:39:49 +0200 |
commit | 29aef377d814bd342dd5a306f99e0d614623ce0e (patch) | |
tree | bf5ce342af760c43a9ea1617846320ac9c670b57 /gcc/tree-ssa-reassoc.c | |
parent | 6f513951972b47e3f86898ff2ce59ed8abe2dd39 (diff) | |
download | gcc-29aef377d814bd342dd5a306f99e0d614623ce0e.zip gcc-29aef377d814bd342dd5a306f99e0d614623ce0e.tar.gz gcc-29aef377d814bd342dd5a306f99e0d614623ce0e.tar.bz2 |
tree-optimization/97238 - fix typo causing ICE
This fixes a typo causing a NULL dereference.
2020-09-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/97238
* tree-ssa-reassoc.c (ovce_extract_ops): Fix typo.
* gcc.dg/pr97238.c: New testcase.
Diffstat (limited to 'gcc/tree-ssa-reassoc.c')
-rw-r--r-- | gcc/tree-ssa-reassoc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c index facc794..a2ca171 100644 --- a/gcc/tree-ssa-reassoc.c +++ b/gcc/tree-ssa-reassoc.c @@ -3910,7 +3910,7 @@ ovce_extract_ops (tree var, gassign **rets, bool *reti, tree *type, return ERROR_MARK; gassign *assign = dyn_cast<gassign *> (SSA_NAME_DEF_STMT (cond)); - if (stmt == NULL + if (assign == NULL || TREE_CODE_CLASS (gimple_assign_rhs_code (assign)) != tcc_comparison) return ERROR_MARK; |