extremely large expressions fail to compile

David Whysong dwhysong@physics.ucsb.edu
Thu Oct 1 02:38:00 GMT 1998


I'm not on this mailing list, so please CC me with any replies.

I have a function that can not be compiled with gcc 2.7.2.3, egcs 1.0.3a,
or pgcc-2.90.29. The function consists of about 3000 lines of elementary
mathematics operations, mostly addition, subtraction, and multiplication
of doubles. There are only 24 statements in the function, and some of the
statements are very, very large.

Compiling the source produces a signal 11. At first I thought it must be
flaky memory, but I have reproduced this behavior on 5 different computers
which are known to have good and stable hardware. Furthermore, a compile
succeeds if I split the function into six separate source files, each with
one function of four statements. 

A quick look through K&R didn't turn up any explicit limits on expression
size. Even if there is some maximum permitted length, it would be better
to print an informative error message instead of segfaulting.

I can provide a .tgz file which demonstrates the problem (it's 30k -- not
as bad as it sounds).

Dave

David Whysong					    dwhysong@physics.ucsb.edu
Astrophysics graduate student         University of California, Santa Barbara
PGP public keys available at http://www.physics.ucsb.edu/~dwhysong/pgpkey.asc
DSS PGP Key 0x903F5BD6  :  FE78 91FE 4508 106F 7C88  1706 B792 6995 903F 5BD6
D-H PGP key 0x5DAB0F91  :  BC33 0F36 FCCD E72C 441F  663A 72ED 7FB7 5DAB 0F91






More information about the Gcc-bugs mailing list