public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/18118] New: bad code gen for -mcpu=G5
@ 2004-10-23  0:31 fjahanian at apple dot com
  2004-10-23  1:15 ` [Bug target/18118] " pinskia at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: fjahanian at apple dot com @ 2004-10-23  0:31 UTC (permalink / raw)
  To: gcc-bugs

Following test case, extracted from rbug.c of dejagnu fails on apple-ppc-darwin when -mcpu=G5
is specified.

double s (unsigned long long k)
{
  return (float)k;
}

extern void abort();

main ()
{
  unsigned long long int k;
  double x;

  k = 0x8234508000000001ULL;
  x = s (k);
  k = (unsigned long long) x;
  if (k != 0x8234510000000000ULL)
    abort();

  return 0;
}

-- 
           Summary: bad code gen for -mcpu=G5
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: fjahanian at apple dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: apple-ppc-darwin
  GCC host triplet: apple-ppc-darwin
GCC target triplet: apple-ppc-darwin


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18118


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/18118] bad code gen for -mcpu=G5
  2004-10-23  0:31 [Bug target/18118] New: bad code gen for -mcpu=G5 fjahanian at apple dot com
@ 2004-10-23  1:15 ` pinskia at gcc dot gnu dot org
  2004-10-28 14:27 ` [Bug target/18118] bad code gen for -mcpu=G5 and unsigned long long to double pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-23  1:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-23 01:14 -------
Hmm, this might be a case of different rounding or it might be the case were we expand unsigned long 
long to double wrong.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
           Keywords|                            |wrong-code


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18118


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/18118] bad code gen for -mcpu=G5 and unsigned long long to double
  2004-10-23  0:31 [Bug target/18118] New: bad code gen for -mcpu=G5 fjahanian at apple dot com
  2004-10-23  1:15 ` [Bug target/18118] " pinskia at gcc dot gnu dot org
@ 2004-10-28 14:27 ` pinskia at gcc dot gnu dot org
  2004-11-29 10:42 ` amodra at bigpond dot net dot au
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-28 14:27 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|bad code gen for -mcpu=G5   |bad code gen for -mcpu=G5
                   |                            |and unsigned long long to
                   |                            |double


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18118


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/18118] bad code gen for -mcpu=G5 and unsigned long long to double
  2004-10-23  0:31 [Bug target/18118] New: bad code gen for -mcpu=G5 fjahanian at apple dot com
  2004-10-23  1:15 ` [Bug target/18118] " pinskia at gcc dot gnu dot org
  2004-10-28 14:27 ` [Bug target/18118] bad code gen for -mcpu=G5 and unsigned long long to double pinskia at gcc dot gnu dot org
@ 2004-11-29 10:42 ` amodra at bigpond dot net dot au
  2004-11-29 14:19 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-11-29 10:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From amodra at bigpond dot net dot au  2004-11-29 10:41 -------
On powerpc-linux, I get
pr181180.c: In function 'main':
pr181180.c:14: internal compiler error: in int_mode_for_mode, at stor-layout.c:251

emit_group_load_1 gets in a twist over
orig_src = (const_int -9064531639303929855 [0x8234508000000001])
which of course is VOIDmode.  Easily fixed.  Patch on its way..

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18118


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/18118] bad code gen for -mcpu=G5 and unsigned long long to double
  2004-10-23  0:31 [Bug target/18118] New: bad code gen for -mcpu=G5 fjahanian at apple dot com
                   ` (2 preceding siblings ...)
  2004-11-29 10:42 ` amodra at bigpond dot net dot au
@ 2004-11-29 14:19 ` pinskia at gcc dot gnu dot org
  2004-11-29 17:15 ` fjahanian at apple dot com
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-29 14:19 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18118


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/18118] bad code gen for -mcpu=G5 and unsigned long long to double
  2004-10-23  0:31 [Bug target/18118] New: bad code gen for -mcpu=G5 fjahanian at apple dot com
                   ` (3 preceding siblings ...)
  2004-11-29 14:19 ` pinskia at gcc dot gnu dot org
@ 2004-11-29 17:15 ` fjahanian at apple dot com
  2004-11-30  5:21 ` amodra at bigpond dot net dot au
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: fjahanian at apple dot com @ 2004-11-29 17:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From fjahanian at apple dot com  2004-11-29 17:15 -------
This patch doesn't fix the problem I reported on apple-ppc-darwin.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18118


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/18118] bad code gen for -mcpu=G5 and unsigned long long to double
  2004-10-23  0:31 [Bug target/18118] New: bad code gen for -mcpu=G5 fjahanian at apple dot com
                   ` (4 preceding siblings ...)
  2004-11-29 17:15 ` fjahanian at apple dot com
@ 2004-11-30  5:21 ` amodra at bigpond dot net dot au
  2005-01-16  0:05 ` dje at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: amodra at bigpond dot net dot au @ 2004-11-30  5:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From amodra at bigpond dot net dot au  2004-11-30 05:21 -------
No, sorry if I gave the impression my patch would fix the darwin problem.  It
was aimed at fixing the powerpc-linux compiler ICE, whereas I presume the darwin
problem is a runtime one.  On powerpc-linux, we now get

$ gcc/xgcc -Bgcc/ -O2 -m32 -mpowerpc64 /src/tmp/pr181180.c
$ ./a.out
$ gcc/xgcc -Bgcc/ -O2 -m32 -mpowerpc64 /src/tmp/pr181180.c -ffast-math
$ ./a.out
Aborted


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18118


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/18118] bad code gen for -mcpu=G5 and unsigned long long to double
  2004-10-23  0:31 [Bug target/18118] New: bad code gen for -mcpu=G5 fjahanian at apple dot com
                   ` (5 preceding siblings ...)
  2004-11-30  5:21 ` amodra at bigpond dot net dot au
@ 2005-01-16  0:05 ` dje at gcc dot gnu dot org
  2005-01-16  0:44 ` dje at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dje at gcc dot gnu dot org @ 2005-01-16  0:05 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  GCC build triplet|apple-ppc-darwin            |powerpc-apple-darwin
   GCC host triplet|apple-ppc-darwin            |powerpc-apple-darwin
 GCC target triplet|apple-ppc-darwin            |powerpc-apple-darwin


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18118


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/18118] bad code gen for -mcpu=G5 and unsigned long long to double
  2004-10-23  0:31 [Bug target/18118] New: bad code gen for -mcpu=G5 fjahanian at apple dot com
                   ` (6 preceding siblings ...)
  2005-01-16  0:05 ` dje at gcc dot gnu dot org
@ 2005-01-16  0:44 ` dje at gcc dot gnu dot org
  2005-01-17 16:50 ` fjahanian at apple dot com
  2005-01-17 16:58 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: dje at gcc dot gnu dot org @ 2005-01-16  0:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dje at gcc dot gnu dot org  2005-01-16 00:44 -------
The testcase works on Mac OS X 10.3.7 for me with -mcpu=G5 and all levels of
optimization.  It does not work with -ffast-math, but that is expected.  The
original bug report does not state what options are used other than -mcpu=G5, so
I cannot tell if this is fixed or what the PR really is reporting as wrong.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18118


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/18118] bad code gen for -mcpu=G5 and unsigned long long to double
  2004-10-23  0:31 [Bug target/18118] New: bad code gen for -mcpu=G5 fjahanian at apple dot com
                   ` (7 preceding siblings ...)
  2005-01-16  0:44 ` dje at gcc dot gnu dot org
@ 2005-01-17 16:50 ` fjahanian at apple dot com
  2005-01-17 16:58 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: fjahanian at apple dot com @ 2005-01-17 16:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From fjahanian at apple dot com  2005-01-17 16:49 -------
on apple-ppc-branch -mcpu=G5 is all you need to reproduce the problem. But I noticed that
this bug is no longer reproducible with the FSF mainline. So, this bug has been fixed as far as
I am concerned. Just need to investigate which patch fixed this in mainline.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18118


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/18118] bad code gen for -mcpu=G5 and unsigned long long to double
  2004-10-23  0:31 [Bug target/18118] New: bad code gen for -mcpu=G5 fjahanian at apple dot com
                   ` (8 preceding siblings ...)
  2005-01-17 16:50 ` fjahanian at apple dot com
@ 2005-01-17 16:58 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-17 16:58 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-17 16:57 -------
So lets close this as fixed then.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18118


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-01-17 16:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-23  0:31 [Bug target/18118] New: bad code gen for -mcpu=G5 fjahanian at apple dot com
2004-10-23  1:15 ` [Bug target/18118] " pinskia at gcc dot gnu dot org
2004-10-28 14:27 ` [Bug target/18118] bad code gen for -mcpu=G5 and unsigned long long to double pinskia at gcc dot gnu dot org
2004-11-29 10:42 ` amodra at bigpond dot net dot au
2004-11-29 14:19 ` pinskia at gcc dot gnu dot org
2004-11-29 17:15 ` fjahanian at apple dot com
2004-11-30  5:21 ` amodra at bigpond dot net dot au
2005-01-16  0:05 ` dje at gcc dot gnu dot org
2005-01-16  0:44 ` dje at gcc dot gnu dot org
2005-01-17 16:50 ` fjahanian at apple dot com
2005-01-17 16:58 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).