* Continued: egcs-971201: testsuite results for i586-pc-linux-gnulibc1
@ 1997-12-02 9:56 Max Lawson
0 siblings, 0 replies; 5+ messages in thread
From: Max Lawson @ 1997-12-02 9:56 UTC (permalink / raw)
To: egcs
.. the typename5.C failure has left :-)
Nevertheless, programs I have that are heavily relying on templates still
make the system run out of memory depending on the optimization level. I'm
trying to narrow down the problem to a simple testcase, but :^( ..
Anyway, this is a _severe_ limitation for large programs :-(. or even
small programs... {:-((
For example, the following testcase quoted from "egcs-bugs/1997-Nov/0235.html"
still crash at compile time with the current 971201-snapshot on my box:
// --- test.cc ---
#include <iostream.h>
#include <list>
#include <algorithm>
using namespace std;
int main()
{
int daten [16] = { 1, 4, 4, 6, 1, 2, 2, 3, 6, 6, 6, 5, 7, 5, 4, 4};
list<int> menge;
copy (daten, daten+16, back_inserter(menge));
return 0;
}
// --- cc.tset ---
$g++ -Wall -O test.cc
test.cc: In function `int main()':
test.cc:10: virtual memory exhausted
This happens in the call to copy; this let's me wonder if this is not
related to non-trivial template instantiations of functions arguments.
That's my 0.00000000000000000000000000000000000000000002cts guess.
(Note that I use to (I have to) call the compiler with no warning flags
for my programs, therefore there is in my case no warning/optimization flags
combinations.)
Anyhow, thanx a lot for the job !-)
Best Regards, Max.
----------
libc.5.39 & ld.so.1.9.5 & binutils-2.8.1.0.15
./configure --enable-shared
BOOT_CFLAGS="-O6 -g"
----------
Test Run By lawson on Tue Dec 2 13:45:33 1997
Native configuration is i586-pc-linux-gnulibc1
=== gcc Summary ===
# of expected passes 4883
# of expected failures 5
# of unsupported tests 7
/tmp/egcs-971201/gcc/xgcc version egcs-2.90.20 971201 (gcc2-970802 experimental)
=== g++ tests ===
XPASS: g++.jason/destruct3.C - (test for bogus messages, line 38)
XPASS: g++.mike/dyncast1.C Execution test
XPASS: g++.mike/dyncast2.C Execution test
=== g++ Summary ===
# of expected passes 3400
# of unexpected successes 3
# of expected failures 80
# of untested testcases 6
/tmp/egcs-971201/gcc/testsuite/../xgcc version egcs-2.90.20 971201 (gcc2-970802 experimental)
=== libio Summary ===
# of expected passes 40
=== libstdc++ Summary ===
# of expected passes 30
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Continued: egcs-971201: testsuite results for i586-pc-linux-gnulibc1
1997-12-03 5:46 Max Lawson
@ 1997-12-03 12:54 ` Jason Merrill
0 siblings, 0 replies; 5+ messages in thread
From: Jason Merrill @ 1997-12-03 12:54 UTC (permalink / raw)
To: Max Lawson; +Cc: egcs, law
>>>>> Max Lawson <mlawson@drfmc.ceng.cea.fr> writes:
> I do not need to use any warning flag to obtain memory explosion. The
> -Wno-return-type flag indeed solve the posted testcase problem, but can't
> help.
> I am now aware that my problem is mentioned in the first part of the online
> faq (subject: virtual memory error). But what's called a large file ? And
> how to simplify files ? In order to use template one has to merge header and
> source files ....
You can simplify by instantiating some templates in one file, and some in
another. It's hard to answer general questions like this.
Jason
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Continued: egcs-971201: testsuite results for i586-pc-linux-gnulibc1
@ 1997-12-03 5:46 Max Lawson
1997-12-03 12:54 ` Jason Merrill
0 siblings, 1 reply; 5+ messages in thread
From: Max Lawson @ 1997-12-03 5:46 UTC (permalink / raw)
To: egcs, law, jason
> From jason@cygnus.com Wed Dec 3 03:09 MET 1997
>
> >>>>> Max Lawson <mlawson@drfmc.ceng.cea.fr> writes:
>
> > $g++ -Wall -O test.cc
> > test.cc: In function `int main()':
> > test.cc:10: virtual memory exhausted
>
> As I said before, you need to add -Wno-return-type or the old memory
> explosion bug resurfaces. This is a known bug. The problem is that
> save_for_inline_copying wastes a ridiculous amount of memory in the
> presence of recursive function definitions, which you get with templates.
> With -Wno-return-type, we don't need to use save_for_inline_copying.
I do not need to use any warning flag to obtain memory explosion. The
-Wno-return-type flag indeed solve the posted testcase problem, but can't
help.
I am now aware that my problem is mentioned in the first part of the online
faq (subject: virtual memory error). But what's called a large file ? And
how to simplify files ? In order to use template one has to merge header and
source files ....
Thanx for the answers, Max.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Continued: egcs-971201: testsuite results for i586-pc-linux-gnulibc1
[not found] <9712021644.AA20857.cygnus.egcs@drfmc.ceng.cea.fr>
@ 1997-12-02 20:32 ` Jason Merrill
1997-12-02 18:13 ` Jeffrey A Law
0 siblings, 1 reply; 5+ messages in thread
From: Jason Merrill @ 1997-12-02 20:32 UTC (permalink / raw)
To: Max Lawson, egcs, law
>>>>> Max Lawson <mlawson@drfmc.ceng.cea.fr> writes:
> $g++ -Wall -O test.cc
> test.cc: In function `int main()':
> test.cc:10: virtual memory exhausted
As I said before, you need to add -Wno-return-type or the old memory
explosion bug resurfaces. This is a known bug. The problem is that
save_for_inline_copying wastes a ridiculous amount of memory in the
presence of recursive function definitions, which you get with templates.
With -Wno-return-type, we don't need to use save_for_inline_copying.
Jeff, want to add something to the release notes to the effect that
-Wreturn-type and -pedantic cause template-heavy code to suffer from
compiler explosion?
Jason
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Continued: egcs-971201: testsuite results for i586-pc-linux-gnulibc1
1997-12-02 20:32 ` Jason Merrill
@ 1997-12-02 18:13 ` Jeffrey A Law
0 siblings, 0 replies; 5+ messages in thread
From: Jeffrey A Law @ 1997-12-02 18:13 UTC (permalink / raw)
To: Jason Merrill; +Cc: Max Lawson, egcs
In message < u9pvnfb2kr.fsf@yorick.cygnus.com >you write:
> Jeff, want to add something to the release notes to the effect that
> -Wreturn-type and -pedantic cause template-heavy code to suffer from
> compiler explosion?
It's already in the online faq under virtual memory exhaused.
Jeff
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1997-12-03 12:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-12-02 9:56 Continued: egcs-971201: testsuite results for i586-pc-linux-gnulibc1 Max Lawson
[not found] <9712021644.AA20857.cygnus.egcs@drfmc.ceng.cea.fr>
1997-12-02 20:32 ` Jason Merrill
1997-12-02 18:13 ` Jeffrey A Law
1997-12-03 5:46 Max Lawson
1997-12-03 12:54 ` Jason Merrill
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).