public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13716] New: segfaults for big functions with heaps of goto statements
@ 2004-01-17  3:56 savage at light-speed dot de
  2004-01-17  3:57 ` [Bug c++/13716] " savage at light-speed dot de
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: savage at light-speed dot de @ 2004-01-17  3:56 UTC (permalink / raw)
  To: gcc-bugs

hey :)

the following happened with 2.95.3, 2.95.4, 3.1 and 3.3

g++ segfaults when i try to compile attached file. it contains basically a
single function of around 11.000 something goto statements. after some hours and
consuming almost all the memory available, g++ throws the following at me:

  trace.cc: In function `bool invokeFunction(int, char*, RegisterFile&,
  float32_t**, float64_t**, float128_t**)':
  trace.cc:66531: internal compiler error: Segmentation Fault
  Please submit a full bug report,
  with preprocessed source if appropriate.
  See <URL:http://gcc.gnu.org/bugs.html> for instructions.
  3203.28u 10.18s 53:41.67 99.7%

i invoked g++ with the following command line

  g++ -shared -O3 -funroll-loops -mcpu=v9 -mtune=ultrasparc3 -ftracer -S -o
trace.s trace.cc

it might be worth to mention that it also fails under plain -O2 and -O1.
however, not so with -O0. here are some more invocations of g++ that might be
helpful

  g++ -shared -O0 -S -o trace.s
  g++ -shared -O0 -mcpu=v9 -mtune=ultrasparc3 -S -o trace.s trace.cc
  g++ -shared -O0 -mcpu=v9 -mtune=ultrasparc3 -ftracer -funroll-loops -S -o
trace.s trace.cc

all work.

  g++ -shared -O1 -S -o trace.s trace.cc

gives a

  cc1plus: out of memory allocating 3627007184 bytes after a total of 1583677440
bytes

the uname -a is

  SunOS ulla 5.9 Generic_112233-08 sun4u sparc SUNW,Sun-Fire-480R

hm. i can i attach the file? doesn't look like it... you can download it from

  http://savage.light-speed.de/trace.cc.bz2

hope you can fix that? (and yes, the function might look stupid, but it is
generated. don't blame me ;-))

cheers,
jens troeger

-- 
           Summary: segfaults for big functions with heaps of goto
                    statements
           Product: gcc
           Version: 3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: savage at light-speed dot de
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: sparc-sun-solaris2.9
GCC target triplet: sparc-sun-solaris2.9


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


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

end of thread, other threads:[~2004-05-02  7:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-17  3:56 [Bug c++/13716] New: segfaults for big functions with heaps of goto statements savage at light-speed dot de
2004-01-17  3:57 ` [Bug c++/13716] " savage at light-speed dot de
2004-01-17  4:08 ` [Bug optimization/13716] segfaults for big functions with heaps of computed goto pinskia at gcc dot gnu dot org
2004-01-17  4:11 ` savage at light-speed dot de
2004-01-17  7:10 ` ebotcazou at gcc dot gnu dot org
2004-01-29 18:47 ` ebotcazou at gcc dot gnu dot org
2004-02-11 21:16 ` ebotcazou at gcc dot gnu dot org
2004-04-29 19:09 ` pinskia at gcc dot gnu dot org
2004-05-02  7:58 ` ebotcazou at gcc dot gnu dot org

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).