[Bug middle-end/36817] [4.3 Regression] internal compiler error: in compare_values_warnv

2008-08-10 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org
   Severity|normal  |blocker
  Component|c   |middle-end
   Keywords||ice-on-valid-code
  Known to fail||4.2.0
  Known to work||4.4.0
Summary|internal compiler error: in |[4.3 Regression] internal
   |compare_values_warnv|compiler error: in
   ||compare_values_warnv
   Target Milestone|--- |4.3.2


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



[Bug middle-end/36817] [4.3 Regression] internal compiler error: in compare_values_warnv

2008-08-11 Thread jakub at gcc dot gnu dot org


--- Comment #1 from jakub at gcc dot gnu dot org  2008-08-11 19:28 ---
This is target independent, reproduced on x86_64-linux and ppc-linux as well.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

  GCC build triplet|i686-pc-linux-gnu   |
   GCC host triplet|i686-pc-linux-gnu   |
 GCC target triplet|arm-elf |


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



[Bug middle-end/36817] [4.3 Regression] internal compiler error: in compare_values_warnv

2008-08-13 Thread rguenth at gcc dot gnu dot org


--- Comment #2 from rguenth at gcc dot gnu dot org  2008-08-13 09:59 ---
The failure is recent, it doesn't occur with gcc-4.3 (SUSE Linux) 4.3.2
20080806 (prerelease) [gcc-4_3-branch revision 138797].


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu dot
   ||org
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2008-08-13 09:59:49
   date||


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



[Bug middle-end/36817] [4.3 Regression] internal compiler error: in compare_values_warnv

2008-08-14 Thread jakub at gcc dot gnu dot org


--- Comment #3 from jakub at gcc dot gnu dot org  2008-08-14 08:33 ---
I can reproduce it with 4.3.2 20080612 or even 4.3.1 20080428.  Perhaps you
have some tree-vrp.c patches in?


-- 


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



[Bug middle-end/36817] [4.3 Regression] internal compiler error: in compare_values_warnv

2008-08-14 Thread rguenther at suse dot de


--- Comment #4 from rguenther at suse dot de  2008-08-14 08:53 ---
Subject: Re:  [4.3 Regression] internal compiler error:
 in compare_values_warnv

On Thu, 14 Aug 2008, jakub at gcc dot gnu dot org wrote:

> --- Comment #3 from jakub at gcc dot gnu dot org  2008-08-14 08:33 ---
> I can reproduce it with 4.3.2 20080612 or even 4.3.1 20080428.  Perhaps you
> have some tree-vrp.c patches in?

Hm, I can repoduce it with plain FSF 4.3.0 and 4.3.1 as well.  No
tree-vrp.c patches here, but of course other patches may as well hide
the bug here.

Richard.


-- 


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



[Bug middle-end/36817] [4.3 Regression] internal compiler error: in compare_values_warnv

2008-08-18 Thread jsm28 at gcc dot gnu dot org


-- 

jsm28 at gcc dot gnu dot org changed:

   What|Removed |Added

   Priority|P3  |P2


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



[Bug middle-end/36817] [4.3 Regression] internal compiler error: in compare_values_warnv

2008-08-20 Thread cnstar9988 at gmail dot com


--- Comment #5 from cnstar9988 at gmail dot com  2008-08-21 01:21 ---
ping.
I can reproduce with gcc 4.3.2 RC1.
It work well on gcc 4.2.4, 4.3.0.

gcc -O2 -Wall -c bug.c
-
void xxx()
 {
  unsigned i;
  unsigned*p=0;
  for(i=0;i<4;++i)
  {
   *p++=0;
  }
  for(i=0;i<4;++i)
  {
   *p++=0;
  }
 }


-- 

cnstar9988 at gmail dot com changed:

   What|Removed |Added

 CC||joseph at codesourcery dot
   ||com


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



[Bug middle-end/36817] [4.3 Regression] internal compiler error: in compare_values_warnv

2008-08-21 Thread rguenth at gcc dot gnu dot org


--- Comment #6 from rguenth at gcc dot gnu dot org  2008-08-21 11:35 ---
Investigating.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2008-08-13 09:59:49 |2008-08-21 11:35:49
   date||


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



[Bug middle-end/36817] [4.3 Regression] internal compiler error: in compare_values_warnv

2008-08-21 Thread rguenth at gcc dot gnu dot org


--- Comment #7 from rguenth at gcc dot gnu dot org  2008-08-21 12:02 ---
I have a patch.


-- 


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



[Bug middle-end/36817] [4.3 Regression] internal compiler error: in compare_values_warnv

2008-08-21 Thread joseph at codesourcery dot com


--- Comment #8 from joseph at codesourcery dot com  2008-08-21 12:05 ---
Subject: Re:  [4.3 Regression] internal compiler error:
 in compare_values_warnv

On Thu, 21 Aug 2008, cnstar9988 at gmail dot com wrote:

> ping.
> I can reproduce with gcc 4.3.2 RC1.
> It work well on gcc 4.2.4, 4.3.0.

Thanks for the report.  We now have contradictory reports about whether 
this is a regression from previous 4.3 releases or not.  I'll await 
Richard's conclusions (and hopefully patch).


-- 


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



[Bug middle-end/36817] [4.3 Regression] internal compiler error: in compare_values_warnv

2008-08-21 Thread rguenth at gcc dot gnu dot org


--- Comment #9 from rguenth at gcc dot gnu dot org  2008-08-21 12:07 ---
Fails with all of the 4.3 series, works for earlier releases.  The problem is
still latent on the trunk.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

  Known to fail|4.2.0   |4.3.0 4.3.1
  Known to work|4.4.0   |4.2.4 4.4.0


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



[Bug middle-end/36817] [4.3 Regression] internal compiler error: in compare_values_warnv

2008-08-21 Thread cnstar9988 at gmail dot com


--- Comment #10 from cnstar9988 at gmail dot com  2008-08-21 12:53 ---
I am sorry for wrong test for 4.3.0.

=
I rebuild my gcc 4.3.0 on 2.6.9-42.7AXsmp with gmp 4.2.3 + mpfr 2.3.1.

And make a test again. It works fail.
But the following code well on gcc 4.3.2-RC1. 
=
 void xxx()
 {
  unsigned i;
  unsigned*p=2;  /* 2 is ok, but failed with 0 */
  for(i=0;i<4;++i)
  {
   *p++=0;
  }
  for(i=0;i<4;++i)
  {
   *p++=0;
  }
 }


-- 


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



[Bug middle-end/36817] [4.3 Regression] internal compiler error: in compare_values_warnv

2008-08-21 Thread rguenther at suse dot de


--- Comment #11 from rguenther at suse dot de  2008-08-21 13:48 ---
Subject: [PATCH] Fix PR36817

On Thu, 21 Aug 2008, cnstar9988 at gmail dot com wrote:

> I am sorry for wrong test for 4.3.0.
> 
> =
> I rebuild my gcc 4.3.0 on 2.6.9-42.7AXsmp with gmp 4.2.3 + mpfr 2.3.1.
> 
> And make a test again. It works fail.
> But the following code well on gcc 4.3.2-RC1. 
> =
>  void xxx()
>  {
>   unsigned i;
>   unsigned*p=2;  /* 2 is ok, but failed with 0 */
>   for(i=0;i<4;++i)
>   {
>*p++=0;
>   }
>   for(i=0;i<4;++i)
>   {
>*p++=0;
>   }
>  }

The following fix makes it obvious that _only_ pointer(!) induction
variables with zero(!) base are affected - thus I think this can
wait until after 4.3.2.

Bootstrapped and tested on x86_64-unknown-linux-gnu, I'll apply it
to the trunk in a moment where this issue is latent.

Richard.

2008-08-21  Richard Guenther  <[EMAIL PROTECTED]>

PR middle-end/36817
* tree-chrec.c (chrec_apply): Always call chrec_fold_plus which
makes sure to produce a result of the correct type.

* gcc.c-torture/compile/pr36817.c: New testcase.

Index: gcc/tree-chrec.c
===
*** gcc/tree-chrec.c(revision 139376)
--- gcc/tree-chrec.c(working copy)
*** chrec_apply (unsigned var,
*** 579,586 
/* "{a, +, b} (x)"  ->  "a + b*x".  */
x = chrec_convert_rhs (type, x, NULL_TREE);
res = chrec_fold_multiply (TREE_TYPE (x), CHREC_RIGHT (chrec), x);
!   if (!integer_zerop (CHREC_LEFT (chrec)))
!   res = chrec_fold_plus (type, CHREC_LEFT (chrec), res);
  }

else if (TREE_CODE (chrec) != POLYNOMIAL_CHREC)
--- 579,585 
/* "{a, +, b} (x)"  ->  "a + b*x".  */
x = chrec_convert_rhs (type, x, NULL_TREE);
res = chrec_fold_multiply (TREE_TYPE (x), CHREC_RIGHT (chrec), x);
!   res = chrec_fold_plus (type, CHREC_LEFT (chrec), res);
  }

else if (TREE_CODE (chrec) != POLYNOMIAL_CHREC)
Index: gcc/testsuite/gcc.c-torture/compile/pr36817.c
===
*** gcc/testsuite/gcc.c-torture/compile/pr36817.c   (revision 0)
--- gcc/testsuite/gcc.c-torture/compile/pr36817.c   (revision 0)
***
*** 0 
--- 1,10 
+ void xxx()
+ {
+   unsigned i;
+   unsigned *p=0;
+   for(i=0; i<4; ++i)
+ *p++=0;
+   for(i=0; i<4; ++i)
+ *p++=0;
+ }
+ 


-- 


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



[Bug middle-end/36817] [4.3 Regression] internal compiler error: in compare_values_warnv

2008-08-21 Thread rguenth at gcc dot gnu dot org


--- Comment #12 from rguenth at gcc dot gnu dot org  2008-08-21 13:51 
---
Subject: Bug 36817

Author: rguenth
Date: Thu Aug 21 13:50:30 2008
New Revision: 139385

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139385
Log:
2008-08-21  Richard Guenther  <[EMAIL PROTECTED]>

PR middle-end/36817
* tree-chrec.c (chrec_apply): Always call chrec_fold_plus which
makes sure to produce a result of the correct type.

* gcc.c-torture/compile/pr36817.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr36817.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-chrec.c


-- 


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



[Bug middle-end/36817] [4.3 Regression] internal compiler error: in compare_values_warnv

2008-08-27 Thread jsm28 at gcc dot gnu dot org


--- Comment #13 from jsm28 at gcc dot gnu dot org  2008-08-27 22:05 ---
4.3.2 is released, changing milestones to 4.3.3.


-- 

jsm28 at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|4.3.2   |4.3.3


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



[Bug middle-end/36817] [4.3 Regression] internal compiler error: in compare_values_warnv

2008-08-28 Thread rguenth at gcc dot gnu dot org


--- Comment #14 from rguenth at gcc dot gnu dot org  2008-08-28 14:16 
---
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Known to fail|4.3.0 4.3.1 |4.3.0 4.3.1 4.3.2
  Known to work|4.2.4 4.4.0 |4.2.4 4.3.3 4.4.0
 Resolution||FIXED


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



[Bug middle-end/36817] [4.3 Regression] internal compiler error: in compare_values_warnv

2008-08-28 Thread rguenth at gcc dot gnu dot org


--- Comment #15 from rguenth at gcc dot gnu dot org  2008-08-28 14:17 
---
Subject: Bug 36817

Author: rguenth
Date: Thu Aug 28 14:15:49 2008
New Revision: 139708

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139708
Log:
2008-08-28  Richard Guenther  <[EMAIL PROTECTED]>

PR middle-end/36817
* tree-chrec.c (chrec_apply): Always call chrec_fold_plus which
makes sure to produce a result of the correct type.

* gcc.c-torture/compile/pr36817.c: New testcase.

Added:
branches/gcc-4_3-branch/gcc/testsuite/gcc.c-torture/compile/pr36817.c
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
branches/gcc-4_3-branch/gcc/tree-chrec.c


-- 


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