174989affSNico Weber // Check that mallopt does not return invalid values (ex. -1).
274989affSNico Weber // RUN: %clangxx -O2 %s -o %t && %run %t
3*f9dd0166SVitaly Buka 
4*f9dd0166SVitaly Buka // Investigate why it fails with NDK 21.
5*f9dd0166SVitaly Buka // UNSUPPORTED: android
6*f9dd0166SVitaly Buka 
774989affSNico Weber #include <assert.h>
874989affSNico Weber #include <malloc.h>
974989affSNico Weber 
main()1074989affSNico Weber int main() {
1174989affSNico Weber   // Try a random mallopt option, possibly invalid.
1274989affSNico Weber   int res = mallopt(-42, 0);
1374989affSNico Weber   assert(res == 0 || res == 1);
1474989affSNico Weber }
15