Message ID | 20230428094825.7828C3858431@sourceware.org |
---|---|
State | New |
Headers | show |
Series | Avoid more invalid GIMPLE with register bases | expand |
diff --git a/gcc/gimplify.cc b/gcc/gimplify.cc index c38a962dd04..3740a8979af 100644 --- a/gcc/gimplify.cc +++ b/gcc/gimplify.cc @@ -3264,6 +3264,11 @@ gimplify_compound_lval (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, } need_non_reg = true; } + else if (!is_gimple_reg_type (TREE_TYPE (t))) + /* When the result of an operation, in particular a VIEW_CONVERT_EXPR + is a non-register type then require the base object to be a + non-register as well. */ + need_non_reg = true; } /* Step 2 is to gimplify the base expression. Make sure lvalue is set