This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/22230] [4.1 Regression] value range propagation error


------- Additional Comments From belyshev at depni dot sinp dot msu dot ru  2005-07-12 14:44 -------
// corrected tescase
// fails with         -O1 -ftree-vrp
// doesn't fail with  -O1
// introduced between 2005-06-15 2005-06-16

void abort (void);

int main (void)
{
  long a, i;

  for (i = 0; i < 5; i++)
    a = i * i;
  if (a != 16)
    abort ();
  return 0;
}

/*
--- 2005-06-15/bug22230-4.c.t25.vrp     2005-07-12 17:33:49.000000000 +0400
+++ 2005-06-16/bug22230-4.c.t25.vrp     2005-07-12 17:34:10.000000000 +0400
@@ -29,7 +29,7 @@
 a_4: VARYING
 i_5: [0, 4]  EQUIVALENCES: { i_1 } (1 elements)
 <retval>_6: VARYING
-a_7: [0, 16]  EQUIVALENCES: { } (0 elements)
+a_7: [0, 0]  EQUIVALENCES: { } (0 elements)
 i_8: [1, 5]  EQUIVALENCES: { } (0 elements)
 
 
@@ -47,7 +47,7 @@
   a_7 = i_5 * i_5;
   i_8 = i_5 + 1;
 
-  # a_2 = PHI <a_4(0), a_7(1)>;
+  # a_2 = PHI <a_4(0), 0(1)>;
   # i_1 = PHI <0(0), i_8(1)>;
 <L1>:;
   if (i_1 <= 4) goto <L0>; else goto <L2>;

Caused by this patch:

2005-06-15  Diego Novillo  <dnovillo@redhat.com>

	PR 22018
	* tree-vrp.c (vrp_int_const_binop): New.
	(extract_range_from_binary_expr): Call it.
	Unify handling division and multiplication.

*/


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dnovillo at gcc dot gnu dot
                   |                            |org
   Last reconfirmed|2005-06-29 14:55:46         |2005-07-12 14:45:02
               date|                            |


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]