This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/31150] [4.1/4.2/4.3 Regression] Not promoting an whole array to be static const
- From: "eres at il dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jun 2007 11:55:05 -0000
- Subject: [Bug middle-end/31150] [4.1/4.2/4.3 Regression] Not promoting an whole array to be static const
- References: <bug-31150-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from eres at il dot ibm dot com 2007-06-28 11:55 -------
(Form off-line discussion with Richard Guenther)
For-
char str[2][16] = {"thisis16charslo","thisis16charslo"};
On ppc64 we will get -
static char C.0[2][16] = {"thisis16charslo", "thisis16charslo"};
while on x86_64 -
str[0] = "thisis16charslo";
str[1] = "thisis16charslo";
and this patch makes this output much worse (although it should be
applied only on sparse data)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31150