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/21694] Missed forwprop opportunity into COND_EXPR


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-21 15:01 -------
Confirmed, here is a testcase which makes sure that we don't have to worry about the one use property 
of forwprop:
enum tree_code {
  AAA,
  BBB,
  CCC
};

struct tree_common {
  enum tree_code code : 8;
};

int
foo (struct tree_common *p)
{
  enum tree_code code = p->code;
  if (code == 0)
    return 1000;
  return 123;
}

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-05-21 15:01:02
               date|                            |


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


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