-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzilla
Description
| Bugzilla Link | 2329 |
| Resolution | FIXED |
| Resolved on | May 25, 2008 15:56 |
| Version | unspecified |
| OS | Linux |
| CC | @nlewycky |
Extended Description
From GCC Bug 17141:
void abort (void);
struct a
{
int i;
} *a;
int f(void)
{
int *ii = &a->i;
void *l;
a->i = 1;
if (*ii)
l = &&l1;
else
l = &&l2;
goto *l;
l1:
return 0;
l2:
abort ();
}
This should fold to almost nothing, but we end up with a branch on a complicated constant expression:
br i1 icmp eq (i8* inttoptr (i32 1 to i8*), i8* inttoptr (i32 2 to i8*)), label %l2, label %l1
"icmp eq (i8* inttoptr (i32 1 to i8*), i8* inttoptr (i32 2 to i8*))" should fold to false.
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzilla