gimple-fold.c (canonicalize_constructor_val): Make sure we have referenced vars setup before adding to them.
2011-11-08 Richard Guenther <rguenther@suse.de> * gimple-fold.c (canonicalize_constructor_val): Make sure we have referenced vars setup before adding to them. From-SVN: r181155
This commit is contained in:
parent
0a35513e4e
commit
4835617e59
|
@ -1,3 +1,8 @@
|
|||
2011-11-08 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
* gimple-fold.c (canonicalize_constructor_val): Make sure
|
||||
we have referenced vars setup before adding to them.
|
||||
|
||||
2011-11-07 Richard Henderson <rth@redhat.com>
|
||||
Aldy Hernandez <aldyh@redhat.com>
|
||||
Andrew MacLeod <amacleod@redhat.com>
|
||||
|
|
|
@ -137,7 +137,8 @@ canonicalize_constructor_val (tree cval)
|
|||
|| TREE_CODE (base) == FUNCTION_DECL)
|
||||
&& !can_refer_decl_in_current_unit_p (base))
|
||||
return NULL_TREE;
|
||||
if (cfun && base && TREE_CODE (base) == VAR_DECL)
|
||||
if (cfun && gimple_referenced_vars (cfun)
|
||||
&& base && TREE_CODE (base) == VAR_DECL)
|
||||
add_referenced_var (base);
|
||||
/* Fixup types in global initializers. */
|
||||
if (TREE_TYPE (TREE_TYPE (cval)) != TREE_TYPE (TREE_OPERAND (cval, 0)))
|
||||
|
|
Loading…
Reference in New Issue