https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99810
Bug ID: 99810 Summary: Wrong const evaluation of 64-bit division Product: gcc Version: 10.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gcc at cookiesoft dot de Target Milestone: --- Host: x86_64 Target: arm The following code produces a different result on arm and x86_64: https://gcc.godbolt.org/z/PPvoscdWa ``` #include <inttypes.h> #include <stdio.h> int main() { printf("%" PRId64 "\n", -62135769600000000 / 1000000); } ``` ARM: -2006227456 (FFFF FFFF 886B 6600) X86: -62135769600 (FFFF FFF1 886B 6600) No single warning is given and I of course would like to see the x86 output, because that's the right one ;)