-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
Description
| Bugzilla Link | 45709 |
| Resolution | FIXED |
| Resolved on | Jun 22, 2020 15:47 |
| Version | trunk |
| OS | FreeBSD |
| Blocks | #44654 |
| CC | @adalava,@DimitryAndric,@MaskRay,@nemanjai,@tstellar |
| Fixed by commit(s) | 793cc51 eac91d5 |
Extended Description
Reduced test case:
class a {
void b();
void m_fn2();
int c;
float d[];
};
void a ::b() {
float e;
for (int f; f <= c; f++)
if (e < d[f])
e = d[f];
if (e)
m_fn2();
}
Compile with:
c++ -ffast-math -O2 -c sms.cpp
It builds fine without -ffast-math, or when lowering optimizations to -O1, or after adding -mcpu=power7 (power8 or power9 are also ok for clang).
Result:
Illegal instruction