Date: Wed, 26 Jun 1996 13:48:29 +0200 (IST) From: Eli Zaretskii To: Allen Pouratian Cc: djgpp AT delorie DOT com Subject: Re: Leffler's TIFF Library -- DOS compilation? In-Reply-To: <4qpcli$ck1@agate.berkeley.edu> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On 25 Jun 1996, Allen Pouratian wrote: > Stubediting cc1.exe to 512KB stack doesn't prevent the Seg-fault > during the compile. Again, this program compiles flawlessly in Linux > but seg-faults during the compile of the file tif_fax3.c. Specifically, > when I include the necessary file "g3states.h" Can you find the code fragment that crashes it? Some hints: 1) Disable optimizations (remove -O switches from the compilation command). If it stops crashing, you can at least compile and use the program. 2) Add -Q to the compilation command line. Gcc will print the name of every function as it compiles it. The function that causes the crash is the last whose name was printed, or the one after that. Ifdef it out and try again; if it doesn't crash, then you have your culprit. 3) Try zeroing in on the code fragment by halving the source file or its part (e.g. if 2 above already told you which function does the problem) with #if 0....#endif, until you get a small enough fragment that crashes gcc when included in the source, but when you exclude it, gcc compiles it. After you get the code fragment that crashes gcc, post it here. And do try to stubedit cc1.exe to 1MB or even more; I've already seen a 1000-liner that needs 768KB stack to compile.