Don't call vg_assert inside sync_signalhandler_from_kernel
[valgrind.git] / memcheck / tests / manuel3.c
blob8e600777a8495a8e089b9c938f44cba5acb397e3
1 #include <stdio.h>
2 #include <stdlib.h>
3 int foo, bar;
4 #define CBAR do { __asm__ __volatile__("":::"cc","memory"); } while (0)
5 int* gcc_cant_inline_me ( int );
6 int main ()
8 int *x, y;
10 x = (int *) malloc (sizeof (int));
12 y = *x == 173;
14 if (gcc_cant_inline_me(y) == &foo) { CBAR; } else { CBAR; }
16 return 0;
19 /* must be AFTER main */
20 __attribute__((noinline)) int* gcc_cant_inline_me ( int n )
22 if (n == 1)
23 return &foo; /* foo! */
24 else
25 return &bar; /* bar! */