Add missing zstd.h to coregrind Makefile.am noinst_HEADERS
[valgrind.git] / memcheck / tests / bug445235_ada_demangle.c
blob798980c5736e4adb94987c81a6dc6b1d415cf9b7
1 #include <stdio.h>
2 #include <string.h>
3 #include <stdlib.h>
4 #include "memcheck/memcheck.h"
6 // this non-text symbol is required to trigger ada demangling
7 const char* __gnat_ada_main_program_name = "some string";
9 // the functions are transcribed from symbols in an
10 // Ada hello world using a package
11 void system__file_io__write_buf(char* m)
13 if (m[4])
15 exit(-1);
19 void ada__text_io__put_line(char *m)
21 system__file_io__write_buf(m);
24 void bad_print__uninit_print(char *m)
26 ada__text_io__put_line(m);
29 void _ada_main(char* m)
31 bad_print__uninit_print(m);
34 int main(void)
36 char* HW = strdup("Hello, world!\n");
37 VALGRIND_MAKE_MEM_UNDEFINED(HW+4, 1);
39 _ada_main(HW);