Fix use of boolean_true/false_node (PR 83979)
commitd9730461d4a1bf9dac1a5482168299ae94dc0e56
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 24 Jan 2018 16:22:30 +0000 (24 16:22 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 24 Jan 2018 16:22:30 +0000 (24 16:22 +0000)
tree0fd1c2c6bcb52cf3e1074bed3d06770ca5e11520
parent516473e8c79826fa7854d06f72330947027180cb
Fix use of boolean_true/false_node (PR 83979)

r255913 changed some constant_boolean_node calls to boolean_true_node
and boolean_false_node, which meant that the returned tree didn't
always have the right type.

2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
PR tree-optimization/83979
* fold-const.c (fold_comparison): Use constant_boolean_node
instead of boolean_{true,false}_node.

gcc/testsuite/
PR tree-optimization/83979
* g++.dg/pr83979.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257021 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/pr83979.c [new file with mode: 0644]