xref: /llvm-project/compiler-rt/test/sanitizer_common/TestCases/scanf-ldbl.c (revision 95507c82bcfa5f9e5c2381d39fee3c17f4651bfb)
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   long double ld;
12   memset(&ld, 255, sizeof ld);
13   sscanf("4.0", "%Lf", &ld);
14   assert(ld == 4.0);
15   return 0;
16 }
17