diff options
author | Jason Merrill <jason@redhat.com> | 2019-05-22 18:00:14 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2019-05-22 18:00:14 -0400 |
commit | 5859a68d5f48605bda91d259c189d9d263f5589a (patch) | |
tree | 6a6716120006af5889a74f91fdc826d4d32f3632 /gcc/gimplify.c | |
parent | c652ff83124334837dc16626f9e1040e4fe41fc9 (diff) | |
download | gcc-5859a68d5f48605bda91d259c189d9d263f5589a.zip gcc-5859a68d5f48605bda91d259c189d9d263f5589a.tar.gz gcc-5859a68d5f48605bda91d259c189d9d263f5589a.tar.bz2 |
gimplify.c (gimplify_cond_expr): Don't check TREE_ADDRESSABLE.
* gimplify.c (gimplify_cond_expr): Don't check TREE_ADDRESSABLE.
The front end shouldn't produce a GENERIC COND_EXPR of TREE_ADDRESSABLE
type.
From-SVN: r271524
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 5bacb25..6905165 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -3990,10 +3990,12 @@ gimplify_cond_expr (tree *expr_p, gimple_seq *pre_p, fallback_t fallback) tree result; /* If either an rvalue is ok or we do not require an lvalue, create the - temporary. But we cannot do that if the type is addressable. */ + temporary. We cannot do that if the type is addressable, but + that should have been avoided before we got here. */ if (((fallback & fb_rvalue) || !(fallback & fb_lvalue)) - && !TREE_ADDRESSABLE (type)) + && (flag_checking || !TREE_ADDRESSABLE (type))) { + gcc_assert (!TREE_ADDRESSABLE (type)); if (gimplify_ctxp->allow_rhs_cond_expr /* If either branch has side effects or could trap, it can't be evaluated unconditionally. */ |