This is the mail archive of the gcc-bugs@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]

[Bug c/14726] New: large array/struct initializer goes in wrong section


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


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