2 /* Test that we get a complaint if a thread exits with error reporting
8 #include "../include/valgrind.h"
12 __attribute__((noinline
)) void usechar ( char c
)
14 // Spook gcc into believing mysterious bad things are
15 // happening behind its back, and that 'c' is definitely
16 // used in some (unknown) way.
17 __asm__
__volatile__("" : : "r"(c
) : "memory","cc");
20 __attribute__((noinline
)) void err ( void )
30 fprintf(stderr
, "\n--------- enabled (expect 1) ---------\n\n");
34 fprintf(stderr
, "\n--------- disabled (expect 0) ---------\n\n");
35 VALGRIND_DISABLE_ERROR_REPORTING
;
39 fprintf(stderr
, "\n--------- exiting (expect complaint) ---------\n\n");