gcc.c-torture/execute/builtins/pr23484-chk.c has on line 44: if (snprintf (buf, l1 ? sizeof (buf) : 4, "%d", l1 + 65536) != 5 || memcmp (buf, "655\0LLLL", 8))
but on a 16 bit platform like the avr, the "l1 + 65536" overflows and gives the wrong result. Changing that to: if (snprintf (buf, l1 ? sizeof (buf) : 4, "%d", l1 + 32760) != 5 || memcmp (buf, "327\0LLLL", 8)) fixes the problem. -- Summary: gcc.c-torture/execute/builtins/pr23484-chk.c fails on 16 bit integer platforms Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: testsuite AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pmarques at grupopie dot com GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: avr-*-* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34889