aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-06-28 11:45:14 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-06-28 11:45:14 +0000
commit4519d7458855f282a510a6da8f7c9e7e3d925b22 (patch)
tree0feb4042fea4a18558cbd0b1ca50e4ec4759e3c6 /gcc/expr.c
parent7db2226d074092cb701cdbc8e82ff49530a751cd (diff)
downloadgcc-4519d7458855f282a510a6da8f7c9e7e3d925b22.zip
gcc-4519d7458855f282a510a6da8f7c9e7e3d925b22.tar.gz
gcc-4519d7458855f282a510a6da8f7c9e7e3d925b22.tar.bz2
re PR middle-end/53790 (ICE on dereferencing a extern union in asm statement)
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. From-SVN: r189045
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 0d26442..9a9af5b 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