This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix miscompilation in output_constant_def


Maxim Kuvyrkov wrote:
<Taking this to gcc-patches@ from gcc@; Was: Invalid code generated for Coldfire target>


...


--- varasm.c.orig       2008-11-14 18:04:27.693643900 +0100
+++ varasm.c    2008-11-14 17:58:06.522748300 +0100
@@ -3245,7 +3245,7 @@
     }

   maybe_output_constant_def_contents (desc, defer);
-  return desc->rtl;
+  return copy_rtx (desc->rtl);
 }

This patch seems correct to me. It makes output_constant_def() always return a copy of the value rather than the value.


I will regtest this patch on ColdFire [where the miscompilation occurs], wound anyone volunteer to test it on x86[_64]?

Tested on coldfire, x86 and x86_64 without regressions (gcc, g++ and libstdc++ testsuites).


--
Maxim


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]