This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/19650] [4.0 Regression] miscompilation of correct code
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Jan 2005 01:26:42 -0000
- Subject: [Bug middle-end/19650] [4.0 Regression] miscompilation of correct code
- References: <20050127010119.19650.dalej@apple.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-27 01:26 -------
Here is the most reduced testcase I came up with (this might be another type mismatch problem in
tree-ssa-phiopt but I could be wrong if you replace a1[0][i] by a[0][a==2] it works):
int g(void);
void h(int);
int a1[1][2]={{0,1}};
int main(void)
{
int a = g();
int i = (a==2)?1:0;
h(a1[0][i]);
return 0;
}
int g(void)
{
return 2;
}
extern "C" void abort(void);
void h(int a)
{
if (a!=1)
abort ();
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19650