c/2371: Hang with long long function argument.

snowball3@bigfoot.com snowball3@bigfoot.com
Fri Mar 23 19:56:00 GMT 2001


>Number:         2371
>Category:       c
>Synopsis:       Hang with long long function argument.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 23 19:56:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Mark Elbrecht
>Release:        GNU C version 2.95.2 19991024 (release) (djgpp) compiled by GNU C version 2.95.2 19991024
>Organization:
>Environment:
DJGPP (*-pc-msdosdjgpp)
>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);

  return 0;
}

int main()
{
  long long val = 5LL;
  long_long_test(val);

  return 0;
}

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list