Fix ICE on conditional expression between DFP and non-DFP float (PR c/71601).
authorJoseph Myers <joseph@codesourcery.com>
Mon, 20 Jun 2016 22:58:20 +0000 (23:58 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Mon, 20 Jun 2016 22:58:20 +0000 (23:58 +0100)
commit5a5786714dc8638bf1a757eb89c2030dbfd239f1
tree77aba49c84485917b8be4c68189cb2c5e87af15d
parent50aa64d58fd4cea25df2a9d9ddfc38e74dcdd94c
Fix ICE on conditional expression between DFP and non-DFP float (PR c/71601).

A conditional expression between DFP and non-DFP floating-point
produces an ICE.  This patch fixes this by making
build_conditional_expr return early when c_common_type produces an
error.

Bootstrapped with no regressions on x86_64-pc-linux-gnu.

PR c/71601
gcc/c:
* c-typeck.c (build_conditional_expr): Return error_mark_node if
c_common_type returns error_mark_node.

gcc/testsuite:
* gcc.dg/dfp/usual-arith-conv-bad-3.c: New test.

From-SVN: r237622
gcc/c/ChangeLog
gcc/c/c-typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/dfp/usual-arith-conv-bad-3.c [new file with mode: 0644]