Commit c1e7c3f2 by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/84942 (internal compiler error: in fold_convert_const_int_from_real,…

re PR c++/84942 (internal compiler error: in fold_convert_const_int_from_real, at fold-const.c:2011)

	PR c++/84942
	* pt.c (tsubst_copy_and_build) <case FIX_TRUNC_EXPR>: Replace
	cp_build_unary_op call with gcc_unreachable ().

	* g++.dg/cpp1y/pr84942.C: New test.

From-SVN: r258821
parent a426543a
2018-03-23 Jakub Jelinek <jakub@redhat.com>
PR c++/84942
* pt.c (tsubst_copy_and_build) <case FIX_TRUNC_EXPR>: Replace
cp_build_unary_op call with gcc_unreachable ().
2018-03-23 Marek Polacek <polacek@redhat.com>
PR c++/85045
......
......@@ -17514,8 +17514,7 @@ tsubst_copy_and_build (tree t,
complain|decltype_flag));
case FIX_TRUNC_EXPR:
RETURN (cp_build_unary_op (FIX_TRUNC_EXPR, RECUR (TREE_OPERAND (t, 0)),
false, complain));
gcc_unreachable ();
case ADDR_EXPR:
op1 = TREE_OPERAND (t, 0);
......
2018-03-23 Jakub Jelinek <jakub@redhat.com>
PR c++/84942
* g++.dg/cpp1y/pr84942.C: New test.
2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
PR inline-asm/85030
......
// PR c++/84942
// { dg-do compile { target c++14 } }
// { dg-options "-w" }
int a(__attribute__((b((int)__builtin_inf() * 1ULL / auto))));
// { dg-error "expected primary-expression before" "" { target *-*-* } .-1 }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment