1 /* { dg-do run } */
2 /* { dg-options "-Os -fno-tree-switch-conversion -ffunction-sections -fdata-sections -mno-relax -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    for, e.g. ATmega128.  */
11 #define SECTION_NAME ".text.foo"
12 #endif
13 
14 #include "exit-abort.h"
15 #include "pr71151-common.h"
16 
main()17 int main()
18 {
19 	foo(5);
20 	if (y != 37)
21 		abort();
22 
23 	foo(0);
24 	if (y != 67)
25 		abort();
26 
27 	foo(7);
28 	if (y != 98)
29 		abort();
30 }
31