@@ -776,7 +776,8 @@ global_new_decl (location *loc,
776
776
enum global_var_flags flags,
777
777
const std::vector<std::pair<gcc_jit_variable_attribute,
778
778
std::string>> &attributes,
779
- bool readonly)
779
+ bool readonly,
780
+ bool removed)
780
781
{
781
782
gcc_assert (type);
782
783
gcc_assert (name);
@@ -788,6 +789,8 @@ global_new_decl (location *loc,
788
789
type_tree);
789
790
790
791
TREE_PUBLIC (inner) = (kind != GCC_JIT_GLOBAL_INTERNAL);
792
+ if (removed)
793
+ TREE_ASM_WRITTEN (inner) = 1 ;
791
794
792
795
793
796
int will_be_init = flags & (GLOBAL_VAR_FLAGS_WILL_BE_RVAL_INIT |
@@ -869,10 +872,11 @@ new_global (location *loc,
869
872
enum global_var_flags flags,
870
873
const std::vector<std::pair<gcc_jit_variable_attribute,
871
874
std::string>> &attributes,
872
- bool readonly)
875
+ bool readonly,
876
+ bool removed)
873
877
{
874
878
tree inner =
875
- global_new_decl (loc, kind, type, name, flags, attributes, readonly);
879
+ global_new_decl (loc, kind, type, name, flags, attributes, readonly, removed );
876
880
877
881
return global_finalize_lvalue (inner);
878
882
}
@@ -1020,9 +1024,10 @@ new_global_initialized (location *loc,
1020
1024
enum global_var_flags flags,
1021
1025
const std::vector<std::pair<gcc_jit_variable_attribute,
1022
1026
std::string>> &attributes,
1023
- bool readonly)
1027
+ bool readonly,
1028
+ bool removed)
1024
1029
{
1025
- tree inner = global_new_decl (loc, kind, type, name, flags, attributes, readonly);
1030
+ tree inner = global_new_decl (loc, kind, type, name, flags, attributes, readonly, removed );
1026
1031
1027
1032
vec<constructor_elt, va_gc> *constructor_elements = NULL ;
1028
1033
0 commit comments