xref: /llvm-project/compiler-rt/test/sanitizer_common/TestCases/printf-ldbl.c (revision 16ee7c49d9e416fe7c47175824b04fa4915daec9)
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 
main(int argc,char ** argv)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 }
17