From: Kito Cheng <kito@0xlab.org>
To: gcc-patches@gcc.gnu.org, Jan Hubicka <hubicka@ucw.cz>,
Richard Sandiford <rsandifo@linux.vnet.ibm.com>,
Eric Botcazou <ebotcazou@adacore.com>
Subject: [PATCH] Pass correct memory attributes for build constant
Date: Wed, 25 Jun 2014 15:35:00 -0000 [thread overview]
Message-ID: <CA+yXCZCUgioKCimPVvvU10Zwc9a+TFBWBxjbU6pHLMkW8+YV3w@mail.gmail.com> (raw)
[-- 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);
next reply other threads:[~2014-06-25 15:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-25 15:35 Kito Cheng [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+yXCZCUgioKCimPVvvU10Zwc9a+TFBWBxjbU6pHLMkW8+YV3w@mail.gmail.com \
--to=kito@0xlab.org \
--cc=ebotcazou@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@ucw.cz \
--cc=rsandifo@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).