summaryrefslogtreecommitdiffstats
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-28 11:45:14 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-28 11:45:14 +0000
commit2357fda04d05e7b5568ced89a3052c7961c89f77 (patch)
tree0feb4042fea4a18558cbd0b1ca50e4ec4759e3c6 /gcc/expr.c
parent6788865370228cff7743b43e3a985e6c63104fe7 (diff)
downloadppe42-gcc-2357fda04d05e7b5568ced89a3052c7961c89f77.tar.gz
ppe42-gcc-2357fda04d05e7b5568ced89a3052c7961c89f77.zip
2012-06-28 Richard Guenther <rguenther@suse.de>
PR middle-end/53790 * expr.c (expand_expr_real_1): Verify if the type is complete before inspecting its size. * gcc.dg/torture/pr53790.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189045 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 0d26442b500..9a9af5b9903 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -9832,6 +9832,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
orig_op0 = op0
= expand_expr (tem,
(TREE_CODE (TREE_TYPE (tem)) == UNION_TYPE
+ && COMPLETE_TYPE_P (TREE_TYPE (tem))
&& (TREE_CODE (TYPE_SIZE (TREE_TYPE (tem)))
!= INTEGER_CST)
&& modifier != EXPAND_STACK_PARM
OpenPOWER on IntegriCloud