]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/84990 (Boostrap broken with --enable-checking=release and Ada)
authorJakub Jelinek <jakub@redhat.com>
Tue, 20 Mar 2018 13:00:48 +0000 (14:00 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 20 Mar 2018 13:00:48 +0000 (14:00 +0100)
PR target/84990
* dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
flag_section_anchors.
* varasm.c (use_blocks_for_decl_p): Remove hack for
dw2_force_const_mem.

From-SVN: r258681

gcc/ChangeLog
gcc/dwarf2asm.c
gcc/varasm.c

index b90871616df14f713f4ed9e86ff5693ef78a9544..3a7ebc9e19d508931ed98c5cd5bbb0baf7ba6cf4 100644 (file)
@@ -1,5 +1,11 @@
 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
 
+       PR target/84990
+       * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
+       flag_section_anchors.
+       * varasm.c (use_blocks_for_decl_p): Remove hack for
+       dw2_force_const_mem.
+
        PR target/84845
        * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
        to ...
index cdb629f21d348cac58c826a9e3bb50f5e822122c..53fc0dab0b274cd97e2216cd5297e11eb9437357 100644 (file)
@@ -973,7 +973,13 @@ dw2_output_indirect_constant_1 (const char *sym, tree id)
   unsigned int save_flag_sanitize = flag_sanitize;
   flag_sanitize &= ~(SANITIZE_ADDRESS | SANITIZE_USER_ADDRESS
                     | SANITIZE_KERNEL_ADDRESS);
+  /* And also temporarily disable -fsection-anchors.  These indirect constants
+     are never referenced from code, so it doesn't make any sense to aggregate
+     them in blocks.  */
+  int save_flag_section_anchors = flag_section_anchors;
+  flag_section_anchors = 0;
   assemble_variable (decl, 1, 1, 1);
+  flag_section_anchors = save_flag_section_anchors;
   flag_sanitize = save_flag_sanitize;
   assemble_integer (sym_ref, POINTER_SIZE_UNITS, POINTER_SIZE, 1);
 
index 2b5c70c8e570be8f1302faf7315093cdb282f5c7..d7290ae534d061cb6a74dc30f924a6269cb6d9c6 100644 (file)
@@ -1253,13 +1253,6 @@ use_blocks_for_decl_p (tree decl)
   if (!VAR_P (decl) && TREE_CODE (decl) != CONST_DECL)
     return false;
 
-  /* Detect decls created by dw2_force_const_mem.  Such decls are
-     special because DECL_INITIAL doesn't specify the decl's true value.
-     dw2_output_indirect_constants will instead call assemble_variable
-     with dont_output_data set to 1 and then print the contents itself.  */
-  if (DECL_INITIAL (decl) == decl)
-    return false;
-
   /* If this decl is an alias, then we don't want to emit a
      definition.  */
   if (VAR_P (decl)