From 1fe75cf21288105fe5628a856f90440a77f614f0 Mon Sep 17 00:00:00 2001 From: jason Date: Fri, 8 Jan 2016 16:01:12 +0000 Subject: PR c++/68983 (BE) PR c++/67557 gcc/ * function.c (assign_temp): Guard against TREE_ADDRESSABLE types here. * expr.c (store_field): Not here. * tree-cfgcleanup.c (fixup_noreturn_call): Don't clear LHS of a call with TREE_ADDRESSABLE type. * tree-cfg.c (verify_gimple_call): Adjust. gcc/cp/ * cvt.c (convert_to_void): Don't strip a TARGET_EXPR of TREE_ADDRESSABLE type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232167 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/function.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc/function.c') diff --git a/gcc/function.c b/gcc/function.c index 603ea80e977..1ac8e26daab 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -956,6 +956,10 @@ assign_temp (tree type_or_decl, int memory_required, unsignedp = TYPE_UNSIGNED (type); #endif + /* Allocating temporaries of TREE_ADDRESSABLE type must be done in the front + end. See also create_tmp_var for the gimplification-time check. */ + gcc_assert (!TREE_ADDRESSABLE (type) && COMPLETE_TYPE_P (type)); + if (mode == BLKmode || memory_required) { HOST_WIDE_INT size = int_size_in_bytes (type); -- cgit v1.2.1