Fix ICE on conditional expression between DFP and non-DFP float (PR c/71601).
commite218d07f117bcaa8a574ecc3bb754bdcbeba94a9
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 20 Jun 2016 22:58:20 +0000 (20 22:58 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 20 Jun 2016 22:58:20 +0000 (20 22:58 +0000)
tree77aba49c84485917b8be4c68189cb2c5e87af15d
parentd7f45b87956421635fe872aced86bf24e7b74af8
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237622 138bc75d-0d04-0410-961f-82ee72b054a4
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]