Debian Codegraph @

compiler-rt/test/sanitizer_common/TestCases/printf-ldbl.c

raw
1 // RUN: %clang %s -o %t && %run %t 2>&1
2
3 // Issue #41838
4 // XFAIL: sparc-target-arch && target={{.*solaris.*}}
5
6 #include <assert.h>
7 #include <stdio.h>
8 #include <string.h>
9
10 int main(int argc, char **argv) {
11 char buf[20];
12 long double ld = 4.0;
13 snprintf(buf, sizeof buf, "%Lf %d", ld, 123);
14 assert(!strcmp(buf, "4.000000 123"));
15 return 0;
16 }