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.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O -Wno-psabi -w" } */
+
+typedef int __attribute__ ((__vector_size__ (8))) V;
+int b, c, e;
+V d;
+
+V
+foo (void)
+{
+ return (b || e) | c > d | ((b || e) | c > d);
+}
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;