public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, i686] Fix for asan test failures with -m32 happened after EBX enabling in PIC mode
@ 2014-10-31 16:42 Zamyatin, Igor
  2014-10-31 19:08 ` Jeff Law
  0 siblings, 1 reply; 10+ messages in thread
From: Zamyatin, Igor @ 2014-10-31 16:42 UTC (permalink / raw)
  To: GCC Patches (gcc-patches@gcc.gnu.org)

Hi!

Following patch (moving initialization of pic_offset_table_rtx earlier) fixes failures for asan tests on 32 bits in PIC mode mentioned here - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63534#c48


Bootstrapped/regtested on x86_64, i686

Is it ok for trunk?

ChangeLog:

2014-10-30  Igor Zamyatin  <igor.zamyatin@intel.com>

	* function.c (assign_parms): Move init of pic_offset_table_rtx
	from here to...
	* cfgexpand.c (expand_used_vars): ...here.

diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 9bd6135..cf7d94a 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -1718,6 +1718,11 @@ expand_used_vars (void)
 
   init_vars_expansion ();
 
+  /* Initialize pic_offset_table_rtx with a pseudo register
+     if required.  */
+  if (targetm.use_pseudo_pic_reg ())
+    pic_offset_table_rtx = gen_reg_rtx (Pmode);
+
   hash_map<tree, tree> ssa_name_decls;
   for (i = 0; i < SA.map->num_partitions; i++)
     {
diff --git a/gcc/function.c b/gcc/function.c
index 1ef43c4..0bbcbbb 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -3464,11 +3464,6 @@ assign_parms (tree fndecl)
 
   fnargs.release ();
 
-  /* Initialize pic_offset_table_rtx with a pseudo register
-     if required.  */
-  if (targetm.use_pseudo_pic_reg ())
-    pic_offset_table_rtx = gen_reg_rtx (Pmode);
-
   /* Output all parameter conversion instructions (possibly including calls)
      now that all parameters have been copied out of hard registers.  */
   emit_insn (all.first_conversion_insn);

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-11-17 23:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-31 16:42 [PATCH, i686] Fix for asan test failures with -m32 happened after EBX enabling in PIC mode Zamyatin, Igor
2014-10-31 19:08 ` Jeff Law
2014-11-05 15:20   ` Zamyatin, Igor
2014-11-13 13:20     ` H.J. Lu
2014-11-14 17:01       ` Zamyatin, Igor
2014-11-14 17:08         ` H.J. Lu
2014-11-14 17:09           ` Zamyatin, Igor
2014-11-14 17:11             ` Jakub Jelinek
2014-11-14 17:31               ` Zamyatin, Igor
2014-11-18  0:15                 ` Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).