Fix casting non-"int" to bool.
authorDavid Malcolm <dmalcolm@redhat.com>
Fri, 19 Dec 2014 20:34:39 +0000 (20:34 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Fri, 19 Dec 2014 20:34:39 +0000 (20:34 +0000)
commite8af59bc73dc39f8932a812bf1d265281b2dd7d0
tree38f2815dfec52b775911a30f80c2bf77d568aea7
parent6db4bc6e2553169f6bf1214d7cbb95e2d0060402
Fix casting non-"int" to bool.

gcc/jit/ChangeLog:
* jit-playback.c (gcc::jit::playback::context::build_cast): In
case BOOLEAN_TYPE, don't assume that the source expression is
of type "int".

gcc/testsuite/ChangeLog:
* jit.dg/test-expressions.c (make_tests_of_casts): Add tests of
casting between "long" and "bool".
(verify_casts): Verify these new test cases.

From-SVN: r218977
gcc/jit/ChangeLog
gcc/jit/jit-playback.c
gcc/testsuite/ChangeLog
gcc/testsuite/jit.dg/test-expressions.c