This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c/2371: Hang with long long function argument.
- To: nobody at gcc dot gnu dot org
- Subject: Re: c/2371: Hang with long long function argument.
- From: "Dave Korn" <davek-ml at ntlworld dot com>
- Date: 1 Apr 2001 05:56:01 -0000
- Cc: gcc-prs at gcc dot gnu dot org,
- Reply-To: "Dave Korn" <davek-ml at ntlworld dot com>
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