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 middle-end/19650] [4.0 Regression] miscompilation of correct code


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-27 01:45 -------
Note here is the reduced C testcase which shows that this is not PHI-OPT bug as PHI-OPT does nothing:
int g(void);
void h(int);
int a1[2]={0,1};
int main(void)
{
  int a = g();
  _Bool i = a==2;
  h(a1[i]);
  return 0;
}
int g(void)
{
  return 2;
}
extern void abort(void);
void h(int a)
{
  if (a!=1)
    abort ();
}

-- 


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


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