mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
7db2226d07
commit
4519d74588
|
|
@ -1,3 +1,9 @@
|
||||||
|
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.
|
||||||
|
|
||||||
2012-06-28 Andreas Schwab <schwab@linux-m68k.org>
|
2012-06-28 Andreas Schwab <schwab@linux-m68k.org>
|
||||||
|
|
||||||
* doc/include/gpl.texi: Remove.
|
* doc/include/gpl.texi: Remove.
|
||||||
|
|
|
||||||
|
|
@ -9832,6 +9832,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
|
||||||
orig_op0 = op0
|
orig_op0 = op0
|
||||||
= expand_expr (tem,
|
= expand_expr (tem,
|
||||||
(TREE_CODE (TREE_TYPE (tem)) == UNION_TYPE
|
(TREE_CODE (TREE_TYPE (tem)) == UNION_TYPE
|
||||||
|
&& COMPLETE_TYPE_P (TREE_TYPE (tem))
|
||||||
&& (TREE_CODE (TYPE_SIZE (TREE_TYPE (tem)))
|
&& (TREE_CODE (TYPE_SIZE (TREE_TYPE (tem)))
|
||||||
!= INTEGER_CST)
|
!= INTEGER_CST)
|
||||||
&& modifier != EXPAND_STACK_PARM
|
&& modifier != EXPAND_STACK_PARM
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
2012-06-28 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
|
PR middle-end/53790
|
||||||
|
* gcc.dg/torture/pr53790.c: New testcase.
|
||||||
|
|
||||||
2012-06-28 Jakub Jelinek <jakub@redhat.com>
|
2012-06-28 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
PR tree-optimization/53645
|
PR tree-optimization/53645
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
/* { dg-do compile } */
|
||||||
|
|
||||||
|
typedef struct s {
|
||||||
|
int value;
|
||||||
|
} s_t;
|
||||||
|
|
||||||
|
static inline int
|
||||||
|
read(s_t const *var)
|
||||||
|
{
|
||||||
|
return var->value;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
extern union u extern_var;
|
||||||
|
return read((s_t *)&extern_var);
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue