public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/32544]  New: gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp
@ 2007-06-29  8:14 bero at arklinux dot org
  2007-06-29  8:16 ` [Bug tree-optimization/32544] " bero at arklinux dot org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: bero at arklinux dot org @ 2007-06-29  8:14 UTC (permalink / raw)
  To: gcc-bugs

Mesa's r300 DRI driver produces incorrect output (garbles the display) if
r300_state.c is compiled with -ftree-vrp (-O2 -fno-tree-vrp works fine; all
files except r300_state.c can be compiled with normal -O2).


-- 
           Summary: gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -
                    ftree-vrp
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bero at arklinux dot org
 GCC build triplet: i586-pc-linux-gnu
  GCC host triplet: i586-pc-linux-gnu
GCC target triplet: i586-pc-linux-gnu


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


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

* [Bug tree-optimization/32544] gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp
  2007-06-29  8:14 [Bug tree-optimization/32544] New: gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp bero at arklinux dot org
@ 2007-06-29  8:16 ` bero at arklinux dot org
  2007-06-29  8:46 ` rguenth at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: bero at arklinux dot org @ 2007-06-29  8:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from bero at arklinux dot org  2007-06-29 08:16 -------
Created an attachment (id=13804)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13804&action=view)
Preprocessed source, bzip2-ed

Attaching preprocessed source of r300_state.c


-- 


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


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

* [Bug tree-optimization/32544] gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp
  2007-06-29  8:14 [Bug tree-optimization/32544] New: gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp bero at arklinux dot org
  2007-06-29  8:16 ` [Bug tree-optimization/32544] " bero at arklinux dot org
@ 2007-06-29  8:46 ` rguenth at gcc dot gnu dot org
  2007-06-29 14:17 ` bero at arklinux dot org
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-06-29  8:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2007-06-29 08:46 -------
Can you narrow it down to a specific function?


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu dot
                   |                            |org


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


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

* [Bug tree-optimization/32544] gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp
  2007-06-29  8:14 [Bug tree-optimization/32544] New: gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp bero at arklinux dot org
  2007-06-29  8:16 ` [Bug tree-optimization/32544] " bero at arklinux dot org
  2007-06-29  8:46 ` rguenth at gcc dot gnu dot org
@ 2007-06-29 14:17 ` bero at arklinux dot org
  2007-07-04  9:49 ` rguenth at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: bero at arklinux dot org @ 2007-06-29 14:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from bero at arklinux dot org  2007-06-29 14:17 -------
r300SetupPixelShader()


-- 


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


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

* [Bug tree-optimization/32544] gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp
  2007-06-29  8:14 [Bug tree-optimization/32544] New: gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp bero at arklinux dot org
                   ` (2 preceding siblings ...)
  2007-06-29 14:17 ` bero at arklinux dot org
@ 2007-07-04  9:49 ` rguenth at gcc dot gnu dot org
  2007-08-07 22:34 ` pixel at mandriva dot com
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-07-04  9:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2007-07-04 09:49 -------
Sorry, I can't see what is wrong.  There is no effective difference in assembly
with/without -ftree-vrp.


-- 


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


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

* [Bug tree-optimization/32544] gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp
  2007-06-29  8:14 [Bug tree-optimization/32544] New: gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp bero at arklinux dot org
                   ` (3 preceding siblings ...)
  2007-07-04  9:49 ` rguenth at gcc dot gnu dot org
@ 2007-08-07 22:34 ` pixel at mandriva dot com
  2007-08-07 22:41 ` pixel at mandriva dot com
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pixel at mandriva dot com @ 2007-08-07 22:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pixel at mandriva dot com  2007-08-07 22:33 -------
Created an attachment (id=14038)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14038&action=view)
miscompiles with gcc 4.2 -O2

here is a simple test case reproducing the issue.

eg:

% gcc -O2 ivopts-issue.c && ./a.out && gcc -O2 -fno-ivopts ivopts-issue.c &&
./a.out 
0 0 1 2 
2 2 1 1 


-- 


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


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

* [Bug tree-optimization/32544] gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp
  2007-06-29  8:14 [Bug tree-optimization/32544] New: gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp bero at arklinux dot org
                   ` (4 preceding siblings ...)
  2007-08-07 22:34 ` pixel at mandriva dot com
@ 2007-08-07 22:41 ` pixel at mandriva dot com
  2007-08-07 22:45 ` pixel at mandriva dot com
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pixel at mandriva dot com @ 2007-08-07 22:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pixel at mandriva dot com  2007-08-07 22:41 -------
more info: the tree-vrp issue is raised by ivopts pass:

without ivopts:

  D.1541_13 = 3 - i_31;
  D.1542_14 = (unsigned int) D.1541_13;
  D.1543_15 = D.1542_14 * 4;
  D.1544_16 = (int *) D.1543_15;

with ivopts:

  D.1607_62 = (int *) i_31;
  D.1608_63 = D.1607_62 * -4B;
  D.1544_64 = D.1608_63 + 12B;
  D.1544_16 = D.1544_64;

  vrp finds that D.1608_63 is 0, and so replaces D.1544_64 with 12

  D.1607_62 = (int *) i_31;
  D.1608_63 = D.1607_62 * -4B;
  D.1544_64 = D.1608_63 + 12B;
  D.1544_16 = D.1544_64;


-- 


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


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

* [Bug tree-optimization/32544] gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp
  2007-06-29  8:14 [Bug tree-optimization/32544] New: gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp bero at arklinux dot org
                   ` (5 preceding siblings ...)
  2007-08-07 22:41 ` pixel at mandriva dot com
@ 2007-08-07 22:45 ` pixel at mandriva dot com
  2007-08-08  8:45 ` pixel at mandriva dot com
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pixel at mandriva dot com @ 2007-08-07 22:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pixel at mandriva dot com  2007-08-07 22:45 -------
the following patch fixes the testcase ivopts-issue.c, but breaks everything
else... someone else will find a correct patch :)

--- gcc-4.2.1/gcc/tree-ssa-loop-ivopts.c.pix    2006-10-06 21:32:04.000000000
+0200
+++ gcc-4.2.1/gcc/tree-ssa-loop-ivopts.c        2007-08-08 00:23:49.000000000
+0200
@@ -3061,7 +3061,9 @@ get_computation_aff (struct loop *loop,
       expr = fold_convert (ctype, expr);
     }

-  if (TYPE_UNSIGNED (utype))
+  if (POINTER_TYPE_P (utype))
+    uutype = ctype;
+  else if (TYPE_UNSIGNED (utype))
     uutype = utype;
   else
     {


-- 


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


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

* [Bug tree-optimization/32544] gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp
  2007-06-29  8:14 [Bug tree-optimization/32544] New: gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp bero at arklinux dot org
                   ` (6 preceding siblings ...)
  2007-08-07 22:45 ` pixel at mandriva dot com
@ 2007-08-08  8:45 ` pixel at mandriva dot com
  2007-08-08  9:07 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pixel at mandriva dot com @ 2007-08-08  8:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pixel at mandriva dot com  2007-08-08 08:45 -------
Known to work: 4.1.2 4.3.0
Known to fail: 4.2.1


-- 

pixel at mandriva dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pixel at mandriva dot com


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


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

* [Bug tree-optimization/32544] gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp
  2007-06-29  8:14 [Bug tree-optimization/32544] New: gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp bero at arklinux dot org
                   ` (7 preceding siblings ...)
  2007-08-08  8:45 ` pixel at mandriva dot com
@ 2007-08-08  9:07 ` pinskia at gcc dot gnu dot org
  2007-08-20  8:37 ` [Bug tree-optimization/32544] [4.2 Regression] " rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-08-08  9:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from pinskia at gcc dot gnu dot org  2007-08-08 09:07 -------
This should work on the trunk also via the pointer plus branch merge where we
no longer get a multiplication in a pointer type.


-- 


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


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

* [Bug tree-optimization/32544] [4.2 Regression] miscompiles Mesa's r300 DRI driver with -ftree-vrp
  2007-06-29  8:14 [Bug tree-optimization/32544] New: gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp bero at arklinux dot org
                   ` (8 preceding siblings ...)
  2007-08-08  9:07 ` pinskia at gcc dot gnu dot org
@ 2007-08-20  8:37 ` rguenth at gcc dot gnu dot org
  2007-09-05  0:55 ` mmitchel at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-08-20  8:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from rguenth at gcc dot gnu dot org  2007-08-20 08:37 -------
Confirmed.  (use -m32 on x86_64)


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |wrong-code
   Last reconfirmed|0000-00-00 00:00:00         |2007-08-20 08:37:22
               date|                            |
            Summary|gcc 4.2.1 miscompiles Mesa's|[4.2 Regression] miscompiles
                   |r300 DRI driver with -ftree-|Mesa's r300 DRI driver with
                   |vrp                         |-ftree-vrp
   Target Milestone|---                         |4.2.2


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


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

* [Bug tree-optimization/32544] [4.2 Regression] miscompiles Mesa's r300 DRI driver with -ftree-vrp
  2007-06-29  8:14 [Bug tree-optimization/32544] New: gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp bero at arklinux dot org
                   ` (9 preceding siblings ...)
  2007-08-20  8:37 ` [Bug tree-optimization/32544] [4.2 Regression] " rguenth at gcc dot gnu dot org
@ 2007-09-05  0:55 ` mmitchel at gcc dot gnu dot org
  2007-10-09 19:22 ` mmitchel at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-09-05  0:55 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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


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

* [Bug tree-optimization/32544] [4.2 Regression] miscompiles Mesa's r300 DRI driver with -ftree-vrp
  2007-06-29  8:14 [Bug tree-optimization/32544] New: gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp bero at arklinux dot org
                   ` (10 preceding siblings ...)
  2007-09-05  0:55 ` mmitchel at gcc dot gnu dot org
@ 2007-10-09 19:22 ` mmitchel at gcc dot gnu dot org
  2008-02-01 17:04 ` jsm28 at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-10-09 19:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from mmitchel at gcc dot gnu dot org  2007-10-09 19:20 -------
Change target milestone to 4.2.3, as 4.2.2 has been released.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.2.2                       |4.2.3


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


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

* [Bug tree-optimization/32544] [4.2 Regression] miscompiles Mesa's r300 DRI driver with -ftree-vrp
  2007-06-29  8:14 [Bug tree-optimization/32544] New: gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp bero at arklinux dot org
                   ` (11 preceding siblings ...)
  2007-10-09 19:22 ` mmitchel at gcc dot gnu dot org
@ 2008-02-01 17:04 ` jsm28 at gcc dot gnu dot org
  2008-05-19 20:27 ` jsm28 at gcc dot gnu dot org
  2009-03-30 22:10 ` jsm28 at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-02-01 17:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from jsm28 at gcc dot gnu dot org  2008-02-01 16:54 -------
4.2.3 is being released now, changing milestones of open bugs to 4.2.4.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.2.3                       |4.2.4


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


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

* [Bug tree-optimization/32544] [4.2 Regression] miscompiles Mesa's r300 DRI driver with -ftree-vrp
  2007-06-29  8:14 [Bug tree-optimization/32544] New: gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp bero at arklinux dot org
                   ` (12 preceding siblings ...)
  2008-02-01 17:04 ` jsm28 at gcc dot gnu dot org
@ 2008-05-19 20:27 ` jsm28 at gcc dot gnu dot org
  2009-03-30 22:10 ` jsm28 at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-05-19 20:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from jsm28 at gcc dot gnu dot org  2008-05-19 20:23 -------
4.2.4 is being released, changing milestones to 4.2.5.


-- 

jsm28 at gcc dot gnu dot org changed:

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


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


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

* [Bug tree-optimization/32544] [4.2 Regression] miscompiles Mesa's r300 DRI driver with -ftree-vrp
  2007-06-29  8:14 [Bug tree-optimization/32544] New: gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp bero at arklinux dot org
                   ` (13 preceding siblings ...)
  2008-05-19 20:27 ` jsm28 at gcc dot gnu dot org
@ 2009-03-30 22:10 ` jsm28 at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-03-30 22:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from jsm28 at gcc dot gnu dot org  2009-03-30 22:10 -------
Closing 4.2 branch, fixed in 4.3.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
      Known to fail|                            |4.2.5
      Known to work|                            |4.3.0
         Resolution|                            |FIXED
   Target Milestone|4.2.5                       |4.3.0


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


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

end of thread, other threads:[~2009-03-30 22:10 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-29  8:14 [Bug tree-optimization/32544] New: gcc 4.2.1 miscompiles Mesa's r300 DRI driver with -ftree-vrp bero at arklinux dot org
2007-06-29  8:16 ` [Bug tree-optimization/32544] " bero at arklinux dot org
2007-06-29  8:46 ` rguenth at gcc dot gnu dot org
2007-06-29 14:17 ` bero at arklinux dot org
2007-07-04  9:49 ` rguenth at gcc dot gnu dot org
2007-08-07 22:34 ` pixel at mandriva dot com
2007-08-07 22:41 ` pixel at mandriva dot com
2007-08-07 22:45 ` pixel at mandriva dot com
2007-08-08  8:45 ` pixel at mandriva dot com
2007-08-08  9:07 ` pinskia at gcc dot gnu dot org
2007-08-20  8:37 ` [Bug tree-optimization/32544] [4.2 Regression] " rguenth at gcc dot gnu dot org
2007-09-05  0:55 ` mmitchel at gcc dot gnu dot org
2007-10-09 19:22 ` mmitchel at gcc dot gnu dot org
2008-02-01 17:04 ` jsm28 at gcc dot gnu dot org
2008-05-19 20:27 ` jsm28 at gcc dot gnu dot org
2009-03-30 22:10 ` jsm28 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).