From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Dave Korn" To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org Subject: Re: c/2371: Hang with long long function argument. Date: Sat, 31 Mar 2001 21:56:00 -0000 Message-id: <20010401055601.14266.qmail@sourceware.cygnus.com> X-SW-Source: 2001-03/msg00391.html List-Id: The following reply was made to PR c/2371; it has been noted by GNATS. From: "Dave Korn" To: , Cc: Subject: Re: c/2371: Hang with long long function argument. Date: Sun, 1 Apr 2001 06:45:55 +0100 ----- Original Message ----- From: To: Sent: Saturday, March 24, 2001 4:53 AM Subject: c/2371: Hang with long long function argument. > >Description: > It seems that code generated for handling variables of > type 'long long' is incorrect. The sample program when > run hangs. Changing the type to 'long' allows the program > to exit normally. > >How-To-Repeat: > # 1 "longlong.c" > int long_long_test( long long x) > { > do > { > x =- 1; > } while (x); It seems that you meant to say x-=1 there. Otherwise looping forever is the expected behaviour. I've tested your code with both longs and long longs, and both with and without your bugfix. Both the bugged versions looped forever and both the fixed versions exit almost instantly. Are you sure you didn't fix the bug at the same time as you changed from long longs to plain longs? DaveK