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/23192] [4.0 Regression] Wrong code


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-02 06:22 -------
I should note the better testcase is:
typedef __SIZE_TYPE__ size_t;
typedef struct {
  size_t car;
  size_t cdr;
} cons;

int g(void);

size_t f(size_t a)
{
  size_t x;
  size_t *d;
  size_t i;
  d = &x;
  while ( (i = g()) != 0)
  {
    if (i >= 30)
      d = &((cons*)i)->car;    
  }
  *d = 1;
}


The previous passes on 20050705 because of constant prop.

-- 


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


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