@@ -789,9 +789,6 @@ global_new_decl (location *loc,
789789 type_tree);
790790
791791 TREE_PUBLIC (inner) = (kind != GCC_JIT_GLOBAL_INTERNAL);
792- if (removed)
793- TREE_ASM_WRITTEN (inner) = 1 ;
794-
795792
796793 int will_be_init = flags & (GLOBAL_VAR_FLAGS_WILL_BE_RVAL_INIT |
797794 GLOBAL_VAR_FLAGS_WILL_BE_BLOB_INIT);
@@ -854,9 +851,10 @@ set_variable_string_attribute (
854851
855852playback::lvalue *
856853playback::context::
857- global_finalize_lvalue (tree inner)
854+ global_finalize_lvalue (tree inner, bool removed )
858855{
859- m_globals.safe_push (inner);
856+ if (!removed)
857+ m_globals.safe_push (inner);
860858
861859 return new lvalue (this , inner);
862860}
@@ -878,7 +876,7 @@ new_global (location *loc,
878876 tree inner =
879877 global_new_decl (loc, kind, type, name, flags, attributes, readonly, removed);
880878
881- return global_finalize_lvalue (inner);
879+ return global_finalize_lvalue (inner, removed );
882880}
883881
884882void
@@ -1061,7 +1059,7 @@ new_global_initialized (location *loc,
10611059 /* Compare with 'store_init_value' c-typeck.cc:7555. */
10621060 DECL_INITIAL (inner) = ctor;
10631061
1064- return global_finalize_lvalue (inner);
1062+ return global_finalize_lvalue (inner, removed );
10651063}
10661064
10671065/* Implementation of the various
0 commit comments