[Bug c/56113] out of memory when compiling a function with many goto labels (50k > )

2013-04-04 Thread aixer77 at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56113



--- Comment #32 from Kangkook  2013-04-04 18:31:19 
UTC ---

Hi, guys



I have a couple of questions regarding the case. 



i) What is the current status of the fix? is this fixed or still open? 



ii) If it is fixed, 

  - how many nodes now it can scale?

  - What version of gcc comes with the patch/fix applied?



Thanks a lot for your help!



/Kangkook


[Bug c/56113] New: out of memory when compiling a function with many goto labels (50k > )

2013-01-25 Thread aixer77 at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56113



 Bug #: 56113

   Summary: out of memory when compiling a function with many goto

labels (50k > )

Classification: Unclassified

   Product: gcc

   Version: 4.6.3

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: c

AssignedTo: unassig...@gcc.gnu.org

ReportedBy: aixe...@gmail.com





Out of memory when compiling a function with many goto labels (50k > )



gcc 4.6.3 compiler(running on top of ubuntu 12.04 32-bit) failed to output an

object for a function when it comes with extremely large number of goto

labels.



Attached is a simple script that generates the test source file. Here's how to

reproduce a failure with the script.



~$./goto_gen.py 6 t.c



~$ time cc -O1 -o t t.c



cc1: out of memory allocating 4064 bytes after a total of 2309808128 bytes



real11m44.371s

user11m42.592s

sys0m1.876s



~$ time cc -O0 -o t t.c



real22m5.106s

user22m3.539s

sys0m1.640s





As you can see from the above, -O1 option trigger the problem while -O0

doesn't.



Could you anyone tell me how to workaround this situation? Or which specific

optimization option causes the issue?



Thanks a lot for your help in advance.



Regards, Kangkook


[Bug c/56113] out of memory when compiling a function with many goto labels (50k > )

2013-01-25 Thread aixer77 at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56113



--- Comment #1 from Kangkook  2013-01-25 20:39:06 UTC 
---

Created attachment 29276

  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29276

a script to generates the code that reproduces the bug


[Bug middle-end/56113] out of memory when compiling a function with many goto labels (50k > )

2013-01-26 Thread aixer77 at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56113



--- Comment #3 from Kangkook  2013-01-26 15:40:43 UTC 
---

Hi, Richard



Thanks a lot for your advice. I will definitely try gcc 4.8 and let you know

about the result.

Btw, I also tested it from the 64-bit env. but it also crashed the compiler

after using up 8GB memories.



Thanks!