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/18241] [4.0 Regression] linux kernel loop gets miscompiled


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-28 01:28 -------
Confirmed,  this looks like a jump threading bug.
Before we have:
 goto <bb 9> (<L10>);

<L8>:;
  D.7815_42 = pathp_2->node;
  tag_43 = tag_27;
  idx_44 = idx_6;
  D.7819_45 = D.7815_42->tags[tag_43][idx_44];
  if (D.7819_45 != 0) goto out; else goto <L9>;

<L9>:;
  idx_46 = idx_6 + 1;

  # idx_6 = PHI <idx_39(6), idx_46(8)>;
<L10>:;
  if (idx_6 == 0) goto <L8>; else goto <L11>;


But after:
 goto <bb 8> (<L10>);

<L9>:;
  idx_46 = 1;
  goto <bb 10> (<L15>);

  # idx_57 = PHI <0(6)>;
<L10>:;
  D.7815_42 = pathp_2->node;
  tag_43 = tag_27; 
  idx_44 = 0;   <---- this is just plainly wrong.
  D.7819_45 = D.7815_42->tags[tag_27][0];
  if (D.7819_45 != 0) goto out; else goto <L9>;

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-11-28 01:28:23
               date|                            |


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


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