From 1d20bbd6a6ebc7ebe464cba72b9ea6b0e3697f3c Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Fri, 8 Mar 2019 21:06:43 +0100 Subject: code qui plante --- test/monniaux/frame_pointer/Makefile | 13 +++++++++++++ test/monniaux/frame_pointer/a.c | 9 +++++++++ test/monniaux/frame_pointer/b.c | 11 +++++++++++ 3 files changed, 33 insertions(+) create mode 100644 test/monniaux/frame_pointer/Makefile create mode 100644 test/monniaux/frame_pointer/a.c create mode 100644 test/monniaux/frame_pointer/b.c diff --git a/test/monniaux/frame_pointer/Makefile b/test/monniaux/frame_pointer/Makefile new file mode 100644 index 00000000..15ca87e0 --- /dev/null +++ b/test/monniaux/frame_pointer/Makefile @@ -0,0 +1,13 @@ +whole : a.o b.o + ../../../ccomp $+ -o $@ + +a.o : a.c + k1-mbr-gcc -std=c99 -Wall -c $< + +b.o : b.c + ../../../ccomp -Wall -Wno-c11-extensions -c $< + +clean: + -rm -f a.o b.o whole + +.PHONY: clean diff --git a/test/monniaux/frame_pointer/a.c b/test/monniaux/frame_pointer/a.c new file mode 100644 index 00000000..644ccc9b --- /dev/null +++ b/test/monniaux/frame_pointer/a.c @@ -0,0 +1,9 @@ +extern unsigned get_size(void); +extern void print_array(unsigned n, const int *t); + +int main() { + unsigned n = get_size(); + int tab[n]; + for(unsigned i=0; i + +unsigned get_size(void) { + return 12; +} + +void print_array(unsigned n, const int *t) { + for(unsigned i=0; i