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
This commit is contained in:
parent
a426543a1f
commit
c1e7c3f201
4 changed files with 18 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
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);
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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
|
||||
|
|
6
gcc/testsuite/g++.dg/cpp1y/pr84942.C
Normal file
6
gcc/testsuite/g++.dg/cpp1y/pr84942.C
Normal file
|
@ -0,0 +1,6 @@
|
|||
// 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 }
|
Loading…
Add table
Reference in a new issue