public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: preprocessor/2928: out of memory during macros expansion
@ 2002-03-15  3:27 neil
  0 siblings, 0 replies; 4+ messages in thread
From: neil @ 2002-03-15  3:27 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, neil, nobody, yann.droneaud

Synopsis: out of memory during macros expansion

Responsible-Changed-From-To: unassigned->neil
Responsible-Changed-By: neil
Responsible-Changed-When: Fri Mar 15 03:27:25 2002
Responsible-Changed-Why:
    FWIW CPP memory consumption was drastically reduced by later
    versions of 3.0 (>= 3.0.2 I think), and reduced further in
    3.1.  I imagine your snippet uses only a couple of a percent of the old memory in 3.1, and maybe 10% in 3.0.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=2928


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: preprocessor/2928: out of memory during macros expansion
@ 2002-05-19  5:11 neil
  0 siblings, 0 replies; 4+ messages in thread
From: neil @ 2002-05-19  5:11 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, neil, yann.droneaud

Synopsis: out of memory during macros expansion

State-Changed-From-To: feedback->closed
State-Changed-By: neil
State-Changed-When: Sun May 19 05:11:32 2002
State-Changed-Why:
    Had to change to feedback to get a message sent.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=2928


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: preprocessor/2928: out of memory during macros expansion
@ 2002-05-19  5:10 neil
  0 siblings, 0 replies; 4+ messages in thread
From: neil @ 2002-05-19  5:10 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, neil, yann.droneaud

Synopsis: out of memory during macros expansion

State-Changed-From-To: closed->feedback
State-Changed-By: neil
State-Changed-When: Sun May 19 05:10:32 2002
State-Changed-Why:
    FYI, 3.0.4 will take up less memory (probably about 20%
    of 3.0), and 3.1 a lot less again at around 2% of 3.0.  That's my guess if your original case swallowed 500MB like I seem to recall 8-)
    
    You might want to compare.
    
    Neil.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=2928


^ permalink raw reply	[flat|nested] 4+ messages in thread

* preprocessor/2928: out of memory during macros expansion
@ 2001-05-24 12:56 yann.droneaud
  0 siblings, 0 replies; 4+ messages in thread
From: yann.droneaud @ 2001-05-24 12:56 UTC (permalink / raw)
  To: gcc-gnats

>Number:         2928
>Category:       preprocessor
>Synopsis:       out of memory during macros expansion
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 24 12:56:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Yann Droneaud
>Release:        gcc >= 2.95.2
>Organization:
>Environment:
i586-pc-linux-gnu
linux-2.4.3
glibc-2.2.3
gcc-2.95.3

>Description:

compile the code with flag -O2 (so using optimized string macro from glibc in bits/string2.h)

lead to 

"cpp0: Memory exhausted." with gcc-2.95.3

with gcc-3.0 snapshot:
    Reading specs from /usr/local/bin/../lib/gcc-lib/i386-pc-linux-gnu/3.0/specs
    Configured with: ../configure --prefix=/tmp/gcc-20010524-root/usr/local --enable-shared --enable-threads --disable-checking i386-pc-linux-gnu : (reconfigured) 
    Thread model: posix
    gcc version 3.0 20010524 (prerelease)
     /usr/local/bin/../lib/gcc-lib/i386-pc-linux-gnu/3.0/cc1 -lang-c -v -iprefix /usr/local/bin/../lib/gcc-lib/i386-pc-linux-gnu/3.0/ -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__OPTIMIZE__ -D__STDC_HOSTED__=1 -W -Wall -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i386__ /usr/tmp/@6807.7.c -quiet -dumpbase @6807.7.c -O2 -W -Wall -version -o /tmp/ccbLIkCc.s
    GNU CPP version 3.0 20010524 (prerelease) (cpplib) (i386 Linux/ELF)
    GNU C version 3.0 20010524 (prerelease) (i386-pc-linux-gnu)
            compiled by GNU C version 3.0 20010524 (prerelease).
    ignoring nonexistent directory "/usr/local/i386-pc-linux-gnu/include"
    ignoring nonexistent directory "/tmp/gcc-20010524-root/usr/local/lib/gcc-lib/i386-pc-linux-gnu/3.0/include"
    ignoring nonexistent directory "/tmp/gcc-20010524-root/usr/local/lib/gcc-lib/i386-pc-linux-gnu/3.0/../../../../i386-pc-linux-gnu/include"
    #include "..." search starts here:
    #include <...> search starts here:
     /usr/local/lib/gcc-lib/i386-pc-linux-gnu/3.0/include
     /usr/local/include
     /usr/include
    End of search list.

    cc1: Cannot allocate 50331648 bytes after allocating 650952 bytes
>How-To-Repeat:
compile the source with -O2 on a glibc system
(__OPTIMIZE__ defined)
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="traite.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="traite.c"

I2luY2x1ZGUgPHN0ZGxpYi5oPgojaW5jbHVkZSA8c3RkaW8uaD4KI2luY2x1ZGUgPHN0cmluZy5o
PgoKaW50Cm1haW4gKHZvaWQpCnsKICBjaGFyICpmaWNoaWVyRW50cmVlOwogIGNoYXIgKmZpY2hp
ZXJTb3J0aWU7CiAgY2hhciB0ZW1wc1sxMDI0XTsKICBpbnQgcmVzOwogIEZJTEUgKmZwaW47CiAg
RklMRSAqZnBvdXQ7CiAgY2hhciBub21bMjU2XSA9ICIiOwogIGNoYXIgcHJlbm9tWzI1Nl0gPSAi
IjsKICBmbG9hdCBwb2lkczsKICBmbG9hdCB0YWlsbGU7CiAgY2hhciBNZXNzYWdlWzI1Nl0gPSAi
IjsKICBmbG9hdCBzb21tZXBkczsKICBmbG9hdCBuYjsKICBjaGFyIE1ldWhbMjU2XSA9ICIiOwog
IGZsb2F0IHBkczsKICBmbG9hdCBtb3lwZHM7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QkgdGVtcHMpKSwgc3RyY2F0ICh0ZW1wcywgIlx0IiksIHRlbXBzKSk7
CiAgICAgIGZwcmludGYgKGZwb3V0LCBwcmVub20pOwogICAgICBmcHJpbnRmIChmcG91dCwgbm9t
KTsKICAgICAgcGRzID0gKHRhaWxsZSAqIHRhaWxsZSk7CiAgICAgIHBkcyA9IHBvaWRzIC8gcGRz
OwogICAgICBmcHJpbnRmIChmcG91dCwgIiVnIiwgcGRzKTsKICAgICAgc29tbWVwZHMgPSBzb21t
ZXBkcyArIHBvaWRzOwogICAgICBmcHJpbnRmIChmcG91dCwgIlxuIik7CiAgICAgIHJlcyA9IGZz
Y2FuZiAoZnBpbiwgIiVzIiwgbm9tKTsKICAgICAgcmVzID0gZnNjYW5mIChmcGluLCAiJXMiLCBw
cmVub20pOwogICAgICByZXMgPSBmc2NhbmYgKGZwaW4sICIlZiIsICZwb2lkcyk7CiAgICAgIHJl
cyA9IGZzY2FuZiAoZnBpbiwgIiVmIiwgJnRhaWxsZSk7CgogICAgfQogIG1veXBkcyA9IHNvbW1l
cGRzIC8gbmI7CgogIGZjbG9zZSAoZnBpbik7CiAgZmNsb3NlIChmcG91dCk7CgogIHJldHVybiAw
Owp9Cg==


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-05-19 12:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-15  3:27 preprocessor/2928: out of memory during macros expansion neil
  -- strict thread matches above, loose matches on Subject: below --
2002-05-19  5:11 neil
2002-05-19  5:10 neil
2001-05-24 12:56 yann.droneaud

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).