https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70060

            Bug ID: 70060
           Summary: array initialization adds to executable size
           Product: gcc
           Version: 5.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: stsp at users dot sourceforge.net
  Target Milestone: ---

Hello.

The following code:
---
int bigarr[1024*1024] = {1,};
int main()
{
    return 0;
}
---

produces a 4Mb executable when compiled with -Os.
Shouldn't the trivial initialization be optimized?

Reply via email to