Bug 465807 - [Regression] long long may not work correctly
[Regression] long long may not work correctly
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gcc (Show other bugs)
5.2
i386 Linux
medium Severity medium
: rc
: ---
Assigned To: Jakub Jelinek
BaseOS QE
http://gcc.gnu.org/bugzilla/show_bug....
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-06 10:53 EDT by H.J. Lu
Modified: 2009-09-02 07:43 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-02 07:43:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description H.J. Lu 2008-10-06 10:53:53 EDT
This patch

http://gcc.gnu.org/ml/gcc-patches/2005-03/msg01296.html

caused

[hjl@gnu-31 longlong-2]$ cat y.c
#include <stdio.h>

extern void abort ();

unsigned long long xh = 1ull;

int
main ()
{
  unsigned long long yh = 0xffffffffull;
  unsigned long long z = xh * yh;
  unsigned long long i = 1ull * yh;

  printf ("%llx\n", i);
  printf ("%llx\n", z);
  if (z != i)
    abort ();
}
[hjl@gnu-31 longlong-2]$ gcc -m32 -O y.c
[hjl@gnu-31 longlong-2]$ ./a.out 
ffffffff
ffffffffffffffff
Aborted
[hjl@gnu-31 longlong-2]$ 

A possible patch is at

http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00128.html
Comment 9 errata-xmlrpc 2009-09-02 07:43:39 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1376.html

Note You need to log in before you can comment on or make changes to this bug.