summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/avremu/test-suite/func-ptr.c
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/avremu/test-suite/func-ptr.c')
-rw-r--r--Master/texmf-dist/source/latex/avremu/test-suite/func-ptr.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/avremu/test-suite/func-ptr.c b/Master/texmf-dist/source/latex/avremu/test-suite/func-ptr.c
new file mode 100644
index 00000000000..e42f26dbf66
--- /dev/null
+++ b/Master/texmf-dist/source/latex/avremu/test-suite/func-ptr.c
@@ -0,0 +1,22 @@
+#include <avr/io.h>
+
+// Produces LPM operations
+__attribute__((noinline)) void bar() {
+ UDR='X';
+}
+void (*foo)() = bar;
+
+int main() {
+ bar();
+ foo();
+ asm volatile ("break");
+}
+
+/*
+ check-name: Function Pointers
+ check-start:
+ \avr@instr@stepn{1000000}
+
+ \avr@test@UDR{XX}
+ check-end:
+*/