Missing pointer dereference in tree-affine.c
commitfab548f25821eae1e67c4fc94aa084a785c54fc2
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 9 May 2016 15:29:03 +0000 (9 15:29 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 9 May 2016 15:29:03 +0000 (9 15:29 +0000)
tree2054e2e06c427a113b32bb3fab8c101e2ea3aa4d
parent96bab53a0656cc0c7958bddb4277ecd5a6b327ae
Missing pointer dereference in tree-affine.c

wide_int_constant_multiple_p used:

          if (*mult_set && mult != 0)
            return false;

to check whether we had previously seen a nonzero multiple, but "mult" is
a pointer to the previous value rather than the previous value itself.

Noticed by inspection while working on another patch, so I don't have a
testcase.  I tried adding an assert for combinations that were wrongly
rejected before but it didn't trigger during a bootstrap and regtest.

Tested on x86_64-linux-gnu.

gcc/
* tree-affine.c (wide_int_constant_multiple_p): Add missing
pointer dereference.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236040 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/tree-affine.c