Debian Codegraph @

gcc/testsuite/gcc.target/avr/pr71151-8.c

raw
1 /* { dg-do run } */
2 /* { dg-options "-Os -fno-tree-switch-conversion -ffunction-sections -fdata-sections -mrelax -Wl,--section-start=.foo=0x1fffa" } */
3
4 #ifdef __AVR_3_BYTE_PC__
5 /* Make sure jumptables work properly if placed straddling 128 KB i.e
6 some entries below 128 KB and some above it, with relaxation disabled. */
7 #define SECTION_NAME ".foo"
8 #else
9 /* No special jump table placement so that avrtest won't abort. */
10 #define SECTION_NAME ".text.foo"
11 #endif
12
13 #include "exit-abort.h"
14 #include "pr71151-common.h"
15
16 int main()
17 {
18 foo(5);
19 if (y != 37)
20 abort();
21
22 foo(0);
23 if (y != 67)
24 abort();
25
26 foo(7);
27 if (y != 98)
28 abort();
29 }