This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: g77 fails to compile 15000+ line expression, was: tail recursion
- To: "Wilhelm B. Kloke" <wb at yorikke dot arb-phys dot uni-dortmund dot de>
- Subject: Re: g77 fails to compile 15000+ line expression, was: tail recursion
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Date: Wed, 03 Nov 1999 22:32:08 +0100
- CC: bug-gcc at gnu dot org
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <199911031536.QAA00847@yorikke.arb-phys.uni-dortmund.de>
Wilhelm B. Kloke wrote:
> I have a 2nd problem not related to this (but also coming from
> machine generated programs). I have a colleague who tries to solve
> large systems of differential equations using a package outputting
> FORTRAN. Some of the modules choke either g77 or gcc (when f2c was
> used) by just having a real long sequence of simple assignments
> to elements of matrices, sometimes even with optimization disabled.
>
> Here is an example line (FORTRAN):
> AMAT(495) = SUB(7128)*SUB(333)+SUB(7117)*SUB(354)+SUB(7129)
> &*SUB(349)+SUB(7130)*SUB(333)+SUB(7116)*SUB(354)+SUB(7131)*SUB(349)
> &+SUB(7132)*SUB(333)+SUB(7115)*SUB(354)+SUB(7133)*SUB(349)
> &+SUB(7134)*SUB(333)+SUB(7114)*SUB(354)+SUB(7135)*SUB(349)
> &+SUB(7136)*SUB(333)+SUB(7113)*SUB(354)+SUB(7137)*SUB(349)
> &+SUB(7138)*SUB(333)+SUB(7112)*SUB(354)+SUB(7139)*SUB(349)
> &+SUB(7140)*SUB(333)+SUB(7111)*SUB(354)+SUB(7141)*SUB(349)
> &+SUB(7142)*SUB(333)+SUB(7110)*SUB(354)+SUB(7143)*SUB(349)
> &+SUB(7144)*SUB(333)+SUB(7109)*SUB(354)+SUB(7145)*SUB(349)
> &+SUB(7146)*SUB(333)+SUB(7107)*SUB(354)+SUB(7147)*SUB(349)
> &+SUB(7148)*SUB(333)+SUB(7108)*SUB(354)+SUB(7149)*SUB(349)
> &+SUB(7208)
>
> There seem to be more then 15000 lines of such code.
>
> Perhaps this bug (LCC does compile the stuff, e.g.) indicates
> a general problem with memory management inside gcc.
That could be a cause. However, to investigate this, we need an example
that is a complete subprogram (i.e. a complete compilation unit), as
Richard Henderson already indicated.
You could investigate for yourself by trying to compile this generated
code with a recent snapshot of gcc (see
ftp://gcc.gnu.org/pub/gcc/snapshots/index.html), as these use a
completely different memory management paradigm.
Hope this helps,
--
Toon Moene (toon@moene.indiv.nluug.nl)
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Phone: +31 346 214290; Fax: +31 346 214286
GNU Fortran: http://gcc.gnu.org/onlinedocs/g77_news.html