https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78576
Bug ID: 78576 Summary: [PPC] wrong long double to long int conversion Product: gcc Version: 6.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgcc Assignee: unassigned at gcc dot gnu.org Reporter: brenohl at br dot ibm.com Target Milestone: --- On ppc64le environment, I am facing an wrong conversion between long double and long int. This is my test case, which prints 27 instead of 26. #include<stdio.h> #include<math.h> int main (){ long double a = 3; long double b = 3; long c = powl(a,b); printf("%d\n", c); } It does not seem to be a rounding issue, since fesetround() is not affecting the result. I also changed the optimization levels, and it is not affecting the result.