Avoid Solaris/SPARC comparison failures with Solaris as (PR bootstrap/81926)
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Thu, 4 Jan 2018 21:47:35 +0000 (21:47 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Thu, 4 Jan 2018 21:47:35 +0000 (21:47 +0000)
PR bootstrap/81926
* cgraphunit.c (symbol_table::compile): Switch to text_section
before calling assembly_start debug hook.
* run-rtl-passes.c (run_rtl_passes): Likewise.
Include output.h.

From-SVN: r256267

gcc/ChangeLog
gcc/cgraphunit.c
gcc/run-rtl-passes.c

index b981ff42487e92f731c9a766d1dbd70405fd9ed0..0692c62a98438851695f5e94ba56083a764600dc 100644 (file)
@@ -1,3 +1,11 @@
+2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       PR bootstrap/81926
+       * cgraphunit.c (symbol_table::compile): Switch to text_section
+       before calling assembly_start debug hook.
+       * run-rtl-passes.c (run_rtl_passes): Likewise.
+       Include output.h.
+
 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
 
        * tree-vrp.c (extract_range_from_binary_expr_1): Check
index 44b931e0f99289e31f3273d4e00602e0f5018b80..e418ec041497a896d75f5e8ad8b6cbe41f989a41 100644 (file)
@@ -2579,6 +2579,7 @@ symbol_table::compile (void)
   timevar_pop (TV_CGRAPHOPT);
 
   /* Output everything.  */
+  switch_to_section (text_section);
   (*debug_hooks->assembly_start) ();
   if (!quiet_flag)
     fprintf (stderr, "Assembling functions:\n");
index 27f510e7c61af840fe04aa0d0295dc74b8474e27..7e947e9fbc65f1d1df9551f8997626be296f5158 100644 (file)
@@ -30,6 +30,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "bitmap.h"
 #include "df.h"
 #include "regs.h"
+#include "output.h"
 #include "debug.h" /* for debug_hooks.  */
 #include "insn-attr-common.h" /* for INSN_SCHEDULING.  */
 #include "insn-attr.h" /* for init_sched_attrs.  */
@@ -45,6 +46,7 @@ run_rtl_passes (char *initial_pass_name)
   max_regno = max_reg_num ();
 
   /* cgraphunit.c normally handles this.  */
+  switch_to_section (text_section);
   (*debug_hooks->assembly_start) ();
 
   /* Pass "expand" normally sets this up.  */