1 /* { dg-do run } */
2 /* { dg-options "-Os -fno-tree-switch-conversion -ffunction-sections -fdata-sections -mrelax -Wl,--section-start=.foo=0x10000" } */
3 
4 #ifdef __AVR_HAVE_ELPM__
5 /* Make sure jumptables work properly if placed above 64 KB and below 128 KB,
6    i.e. 3 byte flash address for loading jump table entry and 2 byte jump
7    table entry, with relaxation enabled, after removing the special section
8    placement hook. */
9 #define SECTION_NAME ".foo"
10 #else
11 /* No special jump table placement so that avrtest won't abort
12    for, e.g. ATmega64.  */
13 #define SECTION_NAME ".text.foo"
14 #endif
15 
16 #include "exit-abort.h"
17 #include "pr71151-common.h"
18 
main()19 int main()
20 {
21 	foo(5);
22 	if (y != 37)
23 		abort();
24 
25 	foo(0);
26 	if (y != 67)
27 		abort();
28 
29 	foo(7);
30 	if (y != 98)
31 		abort();
32 }
33