[Bug middle-end/53239] [4.7 Regression] VRP vs named value return opt

2012-05-06 Thread proski at gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53239

--- Comment #6 from proski at gnu dot org 2012-05-07 02:50:04 UTC ---
Created attachment 27330
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=27330
Self-contained test case

Run the compile script.  The output would be:

return = 2/1
return = 1/1

It means that the output depends on whether -fno-tree-vrp is used.


[Bug middle-end/53239] [4.7 Regression] VRP vs named value return opt

2012-05-04 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53239

Andrew Pinski pinskia at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||wrong-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-05-04
  Component|c++ |middle-end
Summary|[4.7 Regression] -ftree-vrp |[4.7 Regression] VRP vs
   |breaks min()|named value return opt
 Ever Confirmed|0   |1

--- Comment #4 from Andrew Pinski pinskia at gcc dot gnu.org 2012-05-04 
22:02:59 UTC ---
Actually the following is what is being removed:
  if (D.36751_45  0)
goto bb 6;
  else
goto bb 7;

bb 6:

bb 7:
  # D.36747_44 = PHI retval_2(D)(6), D.35100(5)

So it is not VRP really as it is doing something fine.  It is just we say
retval_2 is uninitialized.


[Bug middle-end/53239] [4.7 Regression] VRP vs named value return opt

2012-05-04 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53239

--- Comment #5 from H.J. Lu hjl.tools at gmail dot com 2012-05-04 23:20:49 
UTC ---
Is there a self-contained run-time testcase?