-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"
Description
| Bugzilla Link | 11406 |
| Resolution | FIXED |
| Resolved on | Nov 25, 2011 21:38 |
| Version | trunk |
| OS | FreeBSD |
| Attachments | fail.c |
| Reporter | LLVM Bugzilla Contributor |
| CC | @efriedma-quic |
Extended Description
In the default floating-point rounding mode (IEEE round-to-nearest), halfway cases are supposed to round to the nearest EVEN representable number, but in clang, apparently they don't always do that.
The attached program prints 0x1.0000000000001p+0 when compiled with clang -O, but it prints 0x1.0p+0 when compiled with gcc or clang -O0, or when 'd' is declared volatile. 0x1.0p+0 is the correct answer.
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"