This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: c/2371: Hang with long long function argument.


The following reply was made to PR c/2371; it has been noted by GNATS.

From: "Dave Korn" <davek-ml@ntlworld.com>
To: <snowball3@bigfoot.com>,
	<gcc-gnats@gcc.gnu.org>
Cc:  
Subject: Re: c/2371: Hang with long long function argument.
Date: Sun, 1 Apr 2001 06:45:55 +0100

 ----- Original Message -----
 From: <snowball3@bigfoot.com>
 To: <gcc-gnats@gcc.gnu.org>
 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
 
 
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]