As reported in Issue #41838, `clang` doesn't correctly implement `long double` on 32-bit Solaris/SPARC: the psABI requires this to be an 128-bit type. Four sanitizer tests currently `FAIL` for this reason. While there is a WIP patch to fix `clang` (D89130 <https://reviews.llvm.org/D89130>), it isn't complete yet and I've hit so many brick walls while trying to finish it that I'm unsure if I ever will. This patch therefore `XFAIL`s those tests in the meantime. Tested on `sparcv9-sun-solaris2.11`. Differential Revision: https://reviews.llvm.org/D119016
17 lines
333 B
C
17 lines
333 B
C
// RUN: %clang %s -o %t && %run %t 2>&1
|
|
|
|
// Issue #41838
|
|
// XFAIL: sparc-target-arch && solaris
|
|
|
|
#include <assert.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
int main(int argc, char **argv) {
|
|
char buf[20];
|
|
long double ld = 4.0;
|
|
snprintf(buf, sizeof buf, "%Lf %d", ld, 123);
|
|
assert(!strcmp(buf, "4.000000 123"));
|
|
return 0;
|
|
}
|