Fix typo in tree-ssa-reassoc.c.

Message ID bb4d817f-ca51-d9cf-a947-8c2dd1c1ae6e@suse.cz
State New
Headers show
Series
  • Fix typo in tree-ssa-reassoc.c.
Related show

Commit Message

Martin Liška June 18, 2020, 12:47 p.m.
I'm pushing the following fix that caused occasional ICEs:

gcc /home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/tree-ssa/pr68714.c  -O3 -c
during GIMPLE pass: reassoc
/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/tree-ssa/pr68714.c: In function ‘f’:
/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/tree-ssa/pr68714.c:6:5: internal compiler error: Segmentation fault
     6 | vec f(vec x,vec y){
       |     ^
0xdc7f1f crash_signal
	/home/marxin/Programming/gcc/gcc/toplev.c:328
0x7ffff78b752f ???
	/usr/src/debug/glibc-2.31-5.9.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0xac63e0 gimple_bb
	/home/marxin/Programming/gcc/gcc/gimple.h:1847
0xac63e0 gsi_for_stmt(gimple*)
	/home/marxin/Programming/gcc/gcc/gimple-iterator.c:613
0xf6e96f optimize_vec_cond_expr
	/home/marxin/Programming/gcc/gcc/tree-ssa-reassoc.c:3954
0xf6e96f reassociate_bb

Martin

gcc/ChangeLog:

	* tree-ssa-reassoc.c (ovce_extract_ops): Replace *vcond with
	vcond as we check for NULL pointer.
---
  gcc/tree-ssa-reassoc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.27.0

Patch

diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c
index 2cc50f41cdd..2e67987f6c6 100644
--- a/gcc/tree-ssa-reassoc.c
+++ b/gcc/tree-ssa-reassoc.c
@@ -3840,7 +3840,7 @@  ovce_extract_ops (tree var, gassign **rets, bool *reti, tree *type,
    gassign *stmt = dyn_cast <gassign *> (SSA_NAME_DEF_STMT (var));
    if (stmt == NULL)
      return ERROR_MARK;
-  if (*vcond)
+  if (vcond)
      *vcond = stmt;
  
    /* ??? If we start creating more COND_EXPR, we could perform