diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr82123.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr82123.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr82123.c b/gcc/testsuite/gcc.dg/pr82123.c new file mode 100644 index 00000000000..34109f1aec4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr82123.c @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -Wformat-overflow=1" } */ + +void acpi_gpiochip_request_interrupt(unsigned short s) +{ + char name[3]; + unsigned int pin = s; + + if (pin <= 255) + __builtin_sprintf(name, "%02X", pin); +} + |