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

c++/984: GCC cannot efficently initialize a big array



>Number:         984
>Category:       c++
>Synopsis:       GCC cannot efficently initialize a big array
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 04 15:56:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Wayne Scott
>Release:        GCC 2.95.2
>Organization:
>Environment:
Linux Debian Woody
>Description:
Use the attached perl script to create a very size C file that
defines a static array and in initializer:

static const int tab[][256] = {
{
// 19000 rows deleted
};

This code is very simple, but it is big.  I would expect GCC 
to be able to compile this code using a limited ammount of memory.
On my machine GCC takes about 300 Megs to compile this file.

Is this intended behavior?
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/x-perl; name="bigarry.pl"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="bigarry.pl"

cHJpbnQgInN0YXRpYyBjb25zdCBpbnQgdGFiW11bMjU2XSA9IHtcbiI7CmZvciAoJGkgPSAwOyAk
aSA8IDE5MDAwOyAkaSsrKSB7CiAgICBwcmludCAie1xuIjsKICAgIGZvcmVhY2ggJGogKDAuLjMx
KSB7Cglmb3JlYWNoICRoICgwLi43KSB7CgkgICAgcHJpbnQgIjB4MDAwMDAwMDAsICI7Cgl9Cglw
cmludCAiXG4iOwogICAgfQogICAgcHJpbnQgIn0sICI7Cn0KcHJpbnQgIlxufTtcbiI7Cg==

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