re PR c++/86240 (ice: unexpected expression absu_expr)
PR c++/86240 * constexpr.c (cxx_eval_constant_expression): Handle ABSU_EXPR. (fold_simple_1): Likewise. * error.c (dump_expr): Likewise. * g++.dg/pr86240.C: New test. From-SVN: r261809
This commit is contained in:
parent
125fe9abf3
commit
e28fadbc06
5 changed files with 27 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
2018-06-20 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR c++/86240
|
||||
* constexpr.c (cxx_eval_constant_expression): Handle ABSU_EXPR.
|
||||
(fold_simple_1): Likewise.
|
||||
* error.c (dump_expr): Likewise.
|
||||
|
||||
2018-06-20 Nathan Sidwell <nathan@acm.org>
|
||||
|
||||
PR c++/85634
|
||||
|
|
|
@ -4412,6 +4412,7 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t,
|
|||
case FLOAT_EXPR:
|
||||
case NEGATE_EXPR:
|
||||
case ABS_EXPR:
|
||||
case ABSU_EXPR:
|
||||
case BIT_NOT_EXPR:
|
||||
case TRUTH_NOT_EXPR:
|
||||
case FIXED_CONVERT_EXPR:
|
||||
|
@ -5056,6 +5057,7 @@ fold_simple_1 (tree t)
|
|||
return fold_sizeof_expr (t);
|
||||
|
||||
case ABS_EXPR:
|
||||
case ABSU_EXPR:
|
||||
case CONJ_EXPR:
|
||||
case REALPART_EXPR:
|
||||
case IMAGPART_EXPR:
|
||||
|
|
|
@ -2764,6 +2764,7 @@ dump_expr (cxx_pretty_printer *pp, tree t, int flags)
|
|||
case VEC_DELETE_EXPR:
|
||||
case MODOP_EXPR:
|
||||
case ABS_EXPR:
|
||||
case ABSU_EXPR:
|
||||
case CONJ_EXPR:
|
||||
case VECTOR_CST:
|
||||
case FIXED_CST:
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2018-06-20 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR c++/86240
|
||||
* g++.dg/pr86240.C: New test.
|
||||
|
||||
2018-06-20 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR debug/86194
|
||||
|
|
12
gcc/testsuite/g++.dg/pr86240.C
Normal file
12
gcc/testsuite/g++.dg/pr86240.C
Normal file
|
@ -0,0 +1,12 @@
|
|||
// { dg-do compile }
|
||||
|
||||
extern "C" int abs (int);
|
||||
struct a {
|
||||
short b;
|
||||
} e;
|
||||
short c;
|
||||
bool
|
||||
foo ()
|
||||
{
|
||||
return abs(c) >= e.b;
|
||||
}
|
Loading…
Add table
Reference in a new issue