This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/78559] New: [7 Regression] wrong code due to tree if-conversion?
- From: "ktkachov at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 28 Nov 2016 10:07:02 +0000
- Subject: [Bug tree-optimization/78559] New: [7 Regression] wrong code due to tree if-conversion?
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78559
Bug ID: 78559
Summary: [7 Regression] wrong code due to tree if-conversion?
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: ktkachov at gcc dot gnu.org
Target Milestone: ---
The testcase:
int g = 20;
int d = 0;
short
fn2 (int p1, int p2)
{
return p2 >= 2 || 5 >> p2 ? p1 : p1 << p2;
}
int
main ()
{
int result = 0;
lbl_2582:
if (g)
{
for (int c = -3; c; c++)
result = fn2 (1, g);
}
else
{
for (int i = 0; i < 2; i += 2)
if (d)
goto lbl_2582;
}
if (result != 1)
__builtin_abort ();
return 0;
}
used to (erroneously) abort on aarch64-none-linux-gnu with -O3 after r235808
but stopped aborting with r242550. It still passes after the fix r242689 but
I'm not sure if the bug has just gone latent.
To reproduce on aarch64 you'll have to revert r242689 and r242550.