diff options
Diffstat (limited to 'gcc/lto/lto-partition.c')
-rw-r--r-- | gcc/lto/lto-partition.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/lto/lto-partition.c b/gcc/lto/lto-partition.c index 944943cf1cc..5f290353500 100644 --- a/gcc/lto/lto-partition.c +++ b/gcc/lto/lto-partition.c @@ -96,7 +96,7 @@ add_references_to_partition (ltrans_partition part, symtab_node *node) Recursively look into the initializers of the constant variable and add references, too. */ else if (is_a <varpool_node *> (ref->referred) - && ctor_for_folding (ref->referred->decl) != error_mark_node + && varpool_ctor_useable_for_folding_p (varpool (ref->referred)) && !lto_symtab_encoder_in_partition_p (part->encoder, ref->referred)) { if (!part->initializers_visited) |