public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/37544]  New: Conversion double -> unsigned long long -> unsigned -> double gives wrong results
@ 2008-09-16 16:41 jdemeyer at cage dot ugent dot be
  2008-09-16 16:42 ` [Bug c/37544] " jdemeyer at cage dot ugent dot be
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: jdemeyer at cage dot ugent dot be @ 2008-09-16 16:41 UTC (permalink / raw)
  To: gcc-bugs

Consider the following line of the attached test case, where a is double with
value 4294967296.0.

double b = (unsigned int)((unsigned long long int)a % 4294967296ULL);

Then (unsigned long long int)a % 4294967296ULL should be equal to 0ULL, and
therefore b should be 0.0.  However, when compiled with -O1 -march=pentium4, b
gets the wrong value of 4294967296.0 (the same as a).  Note that the error only
occurs with -march=pentium4.

To compile the testcase:
gcc -std=c99 -O1 -march=pentium4 convert-bug.i -o convert-bug

gcc -v:
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc/configure --enable-checking=release
--prefix=/home/jdemeyer/local CC=gcc-4.1.2
Thread model: posix
gcc version 4.4.0 20080916 (experimental) (GCC)


-- 
           Summary: Conversion double -> unsigned long long -> unsigned ->
                    double gives wrong results
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jdemeyer at cage dot ugent dot be
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug c/37544] Conversion double -> unsigned long long -> unsigned -> double gives wrong results
  2008-09-16 16:41 [Bug c/37544] New: Conversion double -> unsigned long long -> unsigned -> double gives wrong results jdemeyer at cage dot ugent dot be
@ 2008-09-16 16:42 ` jdemeyer at cage dot ugent dot be
  2008-09-16 16:54 ` [Bug target/37544] " pinskia at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jdemeyer at cage dot ugent dot be @ 2008-09-16 16:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jdemeyer at cage dot ugent dot be  2008-09-16 16:40 -------
Created an attachment (id=16339)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16339&action=view)
Testcase


-- 


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


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

* [Bug target/37544] Conversion double -> unsigned long long -> unsigned -> double gives wrong results
  2008-09-16 16:41 [Bug c/37544] New: Conversion double -> unsigned long long -> unsigned -> double gives wrong results jdemeyer at cage dot ugent dot be
  2008-09-16 16:42 ` [Bug c/37544] " jdemeyer at cage dot ugent dot be
@ 2008-09-16 16:54 ` pinskia at gcc dot gnu dot org
  2008-09-16 18:40 ` [Bug c/37544] " jdemeyer at cage dot ugent dot be
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-09-16 16:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2008-09-16 16:52 -------
This works correctly for i386-darwin.
In fact I tried -std=c99 -O1 -mfpmath=387 -march=pentium4 -mno-sse too.


-- 


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


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

* [Bug c/37544] Conversion double -> unsigned long long -> unsigned -> double gives wrong results
  2008-09-16 16:41 [Bug c/37544] New: Conversion double -> unsigned long long -> unsigned -> double gives wrong results jdemeyer at cage dot ugent dot be
  2008-09-16 16:42 ` [Bug c/37544] " jdemeyer at cage dot ugent dot be
  2008-09-16 16:54 ` [Bug target/37544] " pinskia at gcc dot gnu dot org
@ 2008-09-16 18:40 ` jdemeyer at cage dot ugent dot be
  2008-09-16 18:46 ` pinskia at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jdemeyer at cage dot ugent dot be @ 2008-09-16 18:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jdemeyer at cage dot ugent dot be  2008-09-16 18:39 -------
In fact, with -mno-sse the problem disappears for me too.
I *do* get the problem with
gcc -std=c99 -O1 -march=i386 -msse2 -mfpmath=387


-- 

jdemeyer at cage dot ugent dot be changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|target                      |c


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


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

* [Bug c/37544] Conversion double -> unsigned long long -> unsigned -> double gives wrong results
  2008-09-16 16:41 [Bug c/37544] New: Conversion double -> unsigned long long -> unsigned -> double gives wrong results jdemeyer at cage dot ugent dot be
                   ` (2 preceding siblings ...)
  2008-09-16 18:40 ` [Bug c/37544] " jdemeyer at cage dot ugent dot be
@ 2008-09-16 18:46 ` pinskia at gcc dot gnu dot org
  2008-09-16 19:18 ` [Bug target/37544] " rguenth at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-09-16 18:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2008-09-16 18:44 -------
Still works correctly on i386-darwin but that might be because PIC is turned on
by default.


-- 


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


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

* [Bug target/37544] Conversion double -> unsigned long long -> unsigned -> double gives wrong results
  2008-09-16 16:41 [Bug c/37544] New: Conversion double -> unsigned long long -> unsigned -> double gives wrong results jdemeyer at cage dot ugent dot be
                   ` (3 preceding siblings ...)
  2008-09-16 18:46 ` pinskia at gcc dot gnu dot org
@ 2008-09-16 19:18 ` rguenth at gcc dot gnu dot org
  2008-09-17  8:16 ` [Bug rtl-optimization/37544] [4.2/4.3/4.4 Regression] " ubizjak at gmail dot com
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-09-16 19:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2008-09-16 19:17 -------
Confirmed on i686-linux with -std=c99 -O -msse2 -mfpmath=387 -march=i386. 
Fails
since GCC 3.4 at least.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |wrong-code
      Known to fail|                            |3.4.6
   Last reconfirmed|0000-00-00 00:00:00         |2008-09-16 19:17:21
               date|                            |


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


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

* [Bug rtl-optimization/37544] [4.2/4.3/4.4 Regression] Conversion double -> unsigned long long -> unsigned -> double gives wrong results
  2008-09-16 16:41 [Bug c/37544] New: Conversion double -> unsigned long long -> unsigned -> double gives wrong results jdemeyer at cage dot ugent dot be
                   ` (4 preceding siblings ...)
  2008-09-16 19:18 ` [Bug target/37544] " rguenth at gcc dot gnu dot org
@ 2008-09-17  8:16 ` ubizjak at gmail dot com
  2008-09-17  8:36 ` ubizjak at gmail dot com
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ubizjak at gmail dot com @ 2008-09-17  8:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from ubizjak at gmail dot com  2008-09-17 08:14 -------
cprop_hardreg pass is propagating DImode ax register, wrongly bypassing DI-SI
conversion.

Before cprop_hardreg, we have:

(call_insn/u:HI 27 88 28 4 pr37544.c:9 (set (reg:DI 0 ax)
        (call (mem:QI (symbol_ref:SI ("__fixunsdfdi") [flags 0x41]) [0 S1 A8])
            (const_int 16 [0x10]))) 687 {*call_value_0} (expr_list:REG_UNUSED
(reg:SI 1 dx)
        (expr_list:REG_EH_REGION (const_int -1 [0xffffffff])
            (nil)))
    (expr_list:REG_DEP_TRUE (use (mem:DF (plus:SI (reg/f:SI 7 sp)
                    (scratch:SI)) [0 S8 A8]))
        (nil)))

(insn 95 28 104 4 pr37544.c:9 (set (reg:SI 21 xmm0)
        (reg:SI 0 ax [78])) 41 {*movsi_1} (expr_list:REG_DEAD (reg:SI 0 ax
[78])
        (nil)))

(insn 104 95 105 4 pr37544.c:9 (set (mem/c:DI (plus:SI (reg/f:SI 6 bp)
                (const_int -8032 [0xffffe0a0])) [0 S8 A64])
        (reg:DI 21 xmm0)) 63 {*movdi_2} (expr_list:REG_DEAD (reg:DI 21 xmm0)
        (nil)))

(insn 105 104 89 4 pr37544.c:9 (set (reg/v:DF 8 st [orig:65 b ] [65])
        (float:DF (mem/c:DI (plus:SI (reg/f:SI 6 bp)
                    (const_int -8032 [0xffffe0a0])) [0 S8 A64]))) 179
{*floatdidf2_i387} (nil))


and after cprop_hardreg:

(call_insn/u:HI 27 88 28 4 pr37544.c:9 (set (reg:DI 0 ax)
        (call (mem:QI (symbol_ref:SI ("__fixunsdfdi") [flags 0x41]) [0 S1 A8])
            (const_int 16 [0x10]))) 687 {*call_value_0} (expr_list:REG_UNUSED
(reg:SI 1 dx)
        (expr_list:REG_EH_REGION (const_int -1 [0xffffffff])
            (nil)))
    (expr_list:REG_DEP_TRUE (use (mem:DF (plus:SI (reg/f:SI 7 sp)
                    (scratch:SI)) [0 S8 A8]))
        (nil)))

(insn 95 28 104 4 pr37544.c:9 (set (reg:SI 21 xmm0)
        (reg:SI 0 ax [78])) 41 {*movsi_1} (expr_list:REG_DEAD (reg:SI 0 ax
[78])
        (nil)))

(insn 104 95 105 4 pr37544.c:9 (set (mem/c:DI (plus:SI (reg/f:SI 6 bp)
                (const_int -8032 [0xffffe0a0])) [0 S8 A64])
        (reg:DI 0 ax [21])) 63 {*movdi_2} (expr_list:REG_DEAD (reg:DI 21 xmm0)
        (nil)))

(insn 105 104 89 4 pr37544.c:9 (set (reg/v:DF 8 st [orig:65 b ] [65])
        (float:DF (mem/c:DI (plus:SI (reg/f:SI 6 bp)
                    (const_int -8032 [0xffffe0a0])) [0 S8 A64]))) 179
{*floatdidf2_i387} (nil))


Please note, how DImode ax reg propagates into (insn 104), bypassing SImode
conversion in (insn 95).


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|target                      |rtl-optimization
           Priority|P3                          |P1
            Summary|Conversion double ->        |[4.2/4.3/4.4 Regression]
                   |unsigned long long ->       |Conversion double ->
                   |unsigned -> double gives    |unsigned long long ->
                   |wrong results               |unsigned -> double gives
                   |                            |wrong results
   Target Milestone|---                         |4.2.5


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


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

* [Bug rtl-optimization/37544] [4.2/4.3/4.4 Regression] Conversion double -> unsigned long long -> unsigned -> double gives wrong results
  2008-09-16 16:41 [Bug c/37544] New: Conversion double -> unsigned long long -> unsigned -> double gives wrong results jdemeyer at cage dot ugent dot be
                   ` (5 preceding siblings ...)
  2008-09-17  8:16 ` [Bug rtl-optimization/37544] [4.2/4.3/4.4 Regression] " ubizjak at gmail dot com
@ 2008-09-17  8:36 ` ubizjak at gmail dot com
  2008-09-17 10:40 ` ubizjak at gmail dot com
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ubizjak at gmail dot com @ 2008-09-17  8:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from ubizjak at gmail dot com  2008-09-17 08:35 -------
(In reply to comment #5)
> Confirmed on i686-linux with -std=c99 -O -msse2 -mfpmath=387 -march=i386. 

Does not fail for x86_64-linux target with -m32 on x86_64-linux _and_
i686-linux hosts. 


-- 


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


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

* [Bug rtl-optimization/37544] [4.2/4.3/4.4 Regression] Conversion double -> unsigned long long -> unsigned -> double gives wrong results
  2008-09-16 16:41 [Bug c/37544] New: Conversion double -> unsigned long long -> unsigned -> double gives wrong results jdemeyer at cage dot ugent dot be
                   ` (6 preceding siblings ...)
  2008-09-17  8:36 ` ubizjak at gmail dot com
@ 2008-09-17 10:40 ` ubizjak at gmail dot com
  2008-09-17 11:50 ` [Bug rtl-optimization/37544] [4.4 " ubizjak at gmail dot com
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ubizjak at gmail dot com @ 2008-09-17 10:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from ubizjak at gmail dot com  2008-09-17 10:39 -------
The problem is in regrename.c, function maybe_mode_change. We enter the
function with:

orig_mode = DImode
copy_mode = SImode
new_mode = DImode

At the beginning of maybe_mode_change() we have:

  if (orig_mode == new_mode)
    return gen_rtx_raw_REG (new_mode, regno);

we simply discard the change to a narrower mode.


-- 


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


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

* [Bug rtl-optimization/37544] [4.4 Regression] Conversion double -> unsigned long long -> unsigned -> double gives wrong results
  2008-09-16 16:41 [Bug c/37544] New: Conversion double -> unsigned long long -> unsigned -> double gives wrong results jdemeyer at cage dot ugent dot be
                   ` (7 preceding siblings ...)
  2008-09-17 10:40 ` ubizjak at gmail dot com
@ 2008-09-17 11:50 ` ubizjak at gmail dot com
  2008-09-17 12:02 ` ubizjak at gmail dot com
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ubizjak at gmail dot com @ 2008-09-17 11:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from ubizjak at gmail dot com  2008-09-17 11:48 -------
4.2 and 4.3 work OK.


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.2.4 4.3.3
            Summary|[4.2/4.3/4.4 Regression]    |[4.4 Regression] Conversion
                   |Conversion double ->        |double -> unsigned long long
                   |unsigned long long ->       |-> unsigned -> double gives
                   |unsigned -> double gives    |wrong results
                   |wrong results               |
   Target Milestone|4.2.5                       |4.3.4


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


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

* [Bug rtl-optimization/37544] [4.4 Regression] Conversion double -> unsigned long long -> unsigned -> double gives wrong results
  2008-09-16 16:41 [Bug c/37544] New: Conversion double -> unsigned long long -> unsigned -> double gives wrong results jdemeyer at cage dot ugent dot be
                   ` (8 preceding siblings ...)
  2008-09-17 11:50 ` [Bug rtl-optimization/37544] [4.4 " ubizjak at gmail dot com
@ 2008-09-17 12:02 ` ubizjak at gmail dot com
  2008-09-17 16:14 ` ubizjak at gmail dot com
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ubizjak at gmail dot com @ 2008-09-17 12:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from ubizjak at gmail dot com  2008-09-17 12:01 -------
I'm testing following patch:

Index: regrename.c
===================================================================
--- regrename.c (revision 140409)
+++ regrename.c (working copy)
@@ -1314,6 +1314,9 @@
                   enum machine_mode new_mode, unsigned int regno,
                   unsigned int copy_regno ATTRIBUTE_UNUSED)
 {
+  if (GET_MODE_SIZE (copy_mode) < GET_MODE_SIZE (new_mode))
+    return NULL_RTX;
+
   if (orig_mode == new_mode)
     return gen_rtx_raw_REG (new_mode, regno);
   else if (mode_change_ok (orig_mode, new_mode, regno))


-- 


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


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

* [Bug rtl-optimization/37544] [4.4 Regression] Conversion double -> unsigned long long -> unsigned -> double gives wrong results
  2008-09-16 16:41 [Bug c/37544] New: Conversion double -> unsigned long long -> unsigned -> double gives wrong results jdemeyer at cage dot ugent dot be
                   ` (9 preceding siblings ...)
  2008-09-17 12:02 ` ubizjak at gmail dot com
@ 2008-09-17 16:14 ` ubizjak at gmail dot com
  2008-09-18 10:20 ` uros at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ubizjak at gmail dot com @ 2008-09-17 16:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from ubizjak at gmail dot com  2008-09-17 16:13 -------
Patch at http://gcc.gnu.org/ml/gcc-patches/2008-09/msg01221.html


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |ubizjak at gmail dot com
                   |dot org                     |
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2008-
                   |                            |09/msg01221.html
             Status|NEW                         |ASSIGNED
           Keywords|                            |patch
   Last reconfirmed|2008-09-16 19:17:21         |2008-09-17 16:13:33
               date|                            |
   Target Milestone|4.3.4                       |4.2.5


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


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

* [Bug rtl-optimization/37544] [4.4 Regression] Conversion double -> unsigned long long -> unsigned -> double gives wrong results
  2008-09-16 16:41 [Bug c/37544] New: Conversion double -> unsigned long long -> unsigned -> double gives wrong results jdemeyer at cage dot ugent dot be
                   ` (10 preceding siblings ...)
  2008-09-17 16:14 ` ubizjak at gmail dot com
@ 2008-09-18 10:20 ` uros at gcc dot gnu dot org
  2008-09-18 14:32 ` [Bug rtl-optimization/37544] " ubizjak at gmail dot com
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: uros at gcc dot gnu dot org @ 2008-09-18 10:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from uros at gcc dot gnu dot org  2008-09-18 10:19 -------
Subject: Bug 37544

Author: uros
Date: Thu Sep 18 10:17:42 2008
New Revision: 140446

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=140446
Log:
        PR rtl-optimization/37544
        * regrename.c (maybe_mode_change): Exit early when copy_mode
        is narrower than orig_mode and narrower than new_mode.

testsuite/ChangeLog:

        PR rtl-optimization/37544
        * gcc.dg/pr37544.c: New test.


Added:
    trunk/gcc/testsuite/gcc.dg/pr37544.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/regrename.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug rtl-optimization/37544] Conversion double -> unsigned long long -> unsigned -> double gives wrong results
  2008-09-16 16:41 [Bug c/37544] New: Conversion double -> unsigned long long -> unsigned -> double gives wrong results jdemeyer at cage dot ugent dot be
                   ` (11 preceding siblings ...)
  2008-09-18 10:20 ` uros at gcc dot gnu dot org
@ 2008-09-18 14:32 ` ubizjak at gmail dot com
  2008-09-19  8:03 ` uros at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: ubizjak at gmail dot com @ 2008-09-18 14:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from ubizjak at gmail dot com  2008-09-18 14:31 -------
Fixed for 4.4, latent on 4.3 and 4.2.

BTW: This problem was uncovered by the patch that fixed PR target/13958 [1].

[1] http://gcc.gnu.org/ml/gcc-patches/2008-03/msg01295.html


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.4 Regression] Conversion |Conversion double ->
                   |double -> unsigned long long|unsigned long long ->
                   |-> unsigned -> double gives |unsigned -> double gives
                   |wrong results               |wrong results


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


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

* [Bug rtl-optimization/37544] Conversion double -> unsigned long long -> unsigned -> double gives wrong results
  2008-09-16 16:41 [Bug c/37544] New: Conversion double -> unsigned long long -> unsigned -> double gives wrong results jdemeyer at cage dot ugent dot be
                   ` (12 preceding siblings ...)
  2008-09-18 14:32 ` [Bug rtl-optimization/37544] " ubizjak at gmail dot com
@ 2008-09-19  8:03 ` uros at gcc dot gnu dot org
  2008-09-19 10:07 ` uros at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: uros at gcc dot gnu dot org @ 2008-09-19  8:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from uros at gcc dot gnu dot org  2008-09-19 08:02 -------
Subject: Bug 37544

Author: uros
Date: Fri Sep 19 08:01:07 2008
New Revision: 140484

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=140484
Log:
        PR rtl-optimization/37544
        * regrename.c (maybe_mode_change): Exit early when copy_mode
        is narrower than orig_mode and narrower than new_mode.

testsuite/ChangeLog:

        PR rtl-optimization/37544
        * gcc.dg/pr37544.c: New test.


Added:
    branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/pr37544.c
Modified:
    branches/gcc-4_3-branch/gcc/ChangeLog
    branches/gcc-4_3-branch/gcc/regrename.c
    branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug rtl-optimization/37544] Conversion double -> unsigned long long -> unsigned -> double gives wrong results
  2008-09-16 16:41 [Bug c/37544] New: Conversion double -> unsigned long long -> unsigned -> double gives wrong results jdemeyer at cage dot ugent dot be
                   ` (13 preceding siblings ...)
  2008-09-19  8:03 ` uros at gcc dot gnu dot org
@ 2008-09-19 10:07 ` uros at gcc dot gnu dot org
  2008-09-19 11:13 ` [Bug rtl-optimization/37544] [4.4 Regression] " ubizjak at gmail dot com
  2009-04-29 15:18 ` pinskia at gcc dot gnu dot org
  16 siblings, 0 replies; 18+ messages in thread
From: uros at gcc dot gnu dot org @ 2008-09-19 10:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from uros at gcc dot gnu dot org  2008-09-19 10:06 -------
Subject: Bug 37544

Author: uros
Date: Fri Sep 19 10:04:46 2008
New Revision: 140487

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=140487
Log:
        PR rtl-optimization/37544
        * regrename.c (maybe_mode_change): Exit early when copy_mode
        is narrower than orig_mode and narrower than new_mode.

testsuite/ChangeLog:

        PR rtl-optimization/37544
        * gcc.dg/pr37544.c: New test.


Added:
    branches/gcc-4_2-branch/gcc/testsuite/gcc.dg/pr37544.c
      - copied, changed from r140484,
branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/pr37544.c
Modified:
    branches/gcc-4_2-branch/gcc/ChangeLog
    branches/gcc-4_2-branch/gcc/regrename.c
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug rtl-optimization/37544] [4.4 Regression] Conversion double -> unsigned long long -> unsigned -> double gives wrong results
  2008-09-16 16:41 [Bug c/37544] New: Conversion double -> unsigned long long -> unsigned -> double gives wrong results jdemeyer at cage dot ugent dot be
                   ` (14 preceding siblings ...)
  2008-09-19 10:07 ` uros at gcc dot gnu dot org
@ 2008-09-19 11:13 ` ubizjak at gmail dot com
  2009-04-29 15:18 ` pinskia at gcc dot gnu dot org
  16 siblings, 0 replies; 18+ messages in thread
From: ubizjak at gmail dot com @ 2008-09-19 11:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from ubizjak at gmail dot com  2008-09-19 11:11 -------
Fixed everywhere.


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
            Summary|Conversion double ->        |[4.4 Regression] Conversion
                   |unsigned long long ->       |double -> unsigned long long
                   |unsigned -> double gives    |-> unsigned -> double gives
                   |wrong results               |wrong results


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


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

* [Bug rtl-optimization/37544] [4.4 Regression] Conversion double -> unsigned long long -> unsigned -> double gives wrong results
  2008-09-16 16:41 [Bug c/37544] New: Conversion double -> unsigned long long -> unsigned -> double gives wrong results jdemeyer at cage dot ugent dot be
                   ` (15 preceding siblings ...)
  2008-09-19 11:13 ` [Bug rtl-optimization/37544] [4.4 Regression] " ubizjak at gmail dot com
@ 2009-04-29 15:18 ` pinskia at gcc dot gnu dot org
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-04-29 15:18 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.2.5                       |4.3.3


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


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

end of thread, other threads:[~2009-04-29 15:18 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-16 16:41 [Bug c/37544] New: Conversion double -> unsigned long long -> unsigned -> double gives wrong results jdemeyer at cage dot ugent dot be
2008-09-16 16:42 ` [Bug c/37544] " jdemeyer at cage dot ugent dot be
2008-09-16 16:54 ` [Bug target/37544] " pinskia at gcc dot gnu dot org
2008-09-16 18:40 ` [Bug c/37544] " jdemeyer at cage dot ugent dot be
2008-09-16 18:46 ` pinskia at gcc dot gnu dot org
2008-09-16 19:18 ` [Bug target/37544] " rguenth at gcc dot gnu dot org
2008-09-17  8:16 ` [Bug rtl-optimization/37544] [4.2/4.3/4.4 Regression] " ubizjak at gmail dot com
2008-09-17  8:36 ` ubizjak at gmail dot com
2008-09-17 10:40 ` ubizjak at gmail dot com
2008-09-17 11:50 ` [Bug rtl-optimization/37544] [4.4 " ubizjak at gmail dot com
2008-09-17 12:02 ` ubizjak at gmail dot com
2008-09-17 16:14 ` ubizjak at gmail dot com
2008-09-18 10:20 ` uros at gcc dot gnu dot org
2008-09-18 14:32 ` [Bug rtl-optimization/37544] " ubizjak at gmail dot com
2008-09-19  8:03 ` uros at gcc dot gnu dot org
2008-09-19 10:07 ` uros at gcc dot gnu dot org
2008-09-19 11:13 ` [Bug rtl-optimization/37544] [4.4 Regression] " ubizjak at gmail dot com
2009-04-29 15:18 ` 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).