public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Pass correct memory attributes for build constant
@ 2014-06-25 15:35 Kito Cheng
  2014-06-25 21:01 ` Jeff Law
  0 siblings, 1 reply; 6+ messages in thread
From: Kito Cheng @ 2014-06-25 15:35 UTC (permalink / raw)
  To: gcc-patches, Jan Hubicka, Richard Sandiford, Eric Botcazou

[-- Attachment #1: Type: text/plain, Size: 406 bytes --]

Hi all:
  This patch is fix constant memory's symbol_ref don't have right
alignment info since `exp` don't set alignment (and should not set
alignment info for `exp`)  , use `decl` to set_mem_attributes for
right alignment info.

ChangLog
2014-06-25  Kito Cheng  <kito@0xlab.org>

        * varasm.c (build_constant_desc): Use decl to set mem
        attributes since exp don't have correct aligment info.

[-- Attachment #2: varasm.patch --]
[-- Type: text/x-patch, Size: 425 bytes --]

diff --git a/gcc/varasm.c b/gcc/varasm.c
index 7be56f1..6e7ca5a 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -3201,7 +3201,7 @@ build_constant_desc (tree exp)
   TREE_CONSTANT_POOL_ADDRESS_P (symbol) = 1;
 
   rtl = gen_const_mem (TYPE_MODE (TREE_TYPE (exp)), symbol);
-  set_mem_attributes (rtl, exp, 1);
+  set_mem_attributes (rtl, decl, 1);
   set_mem_alias_set (rtl, 0);
   set_mem_alias_set (rtl, const_alias_set);
 

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

end of thread, other threads:[~2014-06-30  6:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-25 15:35 [PATCH] Pass correct memory attributes for build constant Kito Cheng
2014-06-25 21:01 ` Jeff Law
2014-06-26  3:38   ` Kito Cheng
2014-06-27 22:35     ` Jeff Law
2014-06-28  0:14       ` Jan Hubicka
2014-06-30  6:17         ` Kito Cheng

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).