blob: 37d1ebb11a4c5b39626d8757a6f320fe16bb7baf [file] [log] [blame]
// Check that mallopt does not return invalid values (ex. -1).
// RUN: %clangxx -O2 %s -o %t && %run %t
// Investigate why it fails with NDK 21.
// UNSUPPORTED: android
#include <assert.h>
#include <malloc.h>
int main() {
// Try a random mallopt option, possibly invalid.
int res = mallopt(-42, 0);
assert(res == 0 || res == 1);
}