To: WKIM AT vms DOT cis DOT pitt DOT edu, djgpp AT sun DOT soe DOT clarkson DOT EDU From: "Peter E. Miller" Date: 7 May 93 09:15:40 ET Subject: Re: gcc hangs: again Reply-To: miller AT hac2arpa DOT hac DOT com Wonkoo Kim writes: > I posted a problem that gcc is stucked when compiling a certain program. > In verifying the program, I found a new fact. My file contains several > functions and a function has several return() statements at the end of the > function, ... > ... > When I changed this conditional branches into if/else if/else way, then gcc > did hang. I.e. > ... > didn't hang the gcc. I took both pieces of code and made the two source files at the end of this note. I used gcc -Wall -S test#.c on both. During compilation of test1.c a spurious character appeared at the top of my screen. Compilation of test2.c doesn't do this. When I used gcc -Wall -O -S test#.c a spurious character appeared on my screen during compilation of both, at the same location. These tests are repeatable for me. I have been using DJGPP 1.09 (2.2.2) ever since it was released and never noticed a problem like this. I've used it on a 386-16 ISA and a 486-50 EISA without problems. ---- test1.c -------------------------------------------------------- #include #include double test (double x, double y) { if (y == 0.) return (23.6); if (x == 0.) return (DBL_MAX); return (10.*log10(y / x)); } ---- test2.c -------------------------------------------------------- #include #include double test (double x, double y) { double p; if (y == 0.) p = 23.6; else if (x == 0.) p = DBL_MAX; else p = 10.*log10(y/x); return(p); } ---------------------------------------------------------------------