This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/14726] New: large array/struct initializer goes in wrong section
- From: "mrnobo1024 at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Mar 2004 01:55:31 -0000
- Subject: [Bug c/14726] New: large array/struct initializer goes in wrong section
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
When initializing a large "auto" array or struct, eg
void f() {
int x[] = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14 };
}
the data gets put in the .data section, but it can never actually get written
to (only the local copy on the stack does) so it should be in .rodata
--
Summary: large array/struct initializer goes in wrong section
Product: gcc
Version: 3.3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mrnobo1024 at yahoo dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14726