Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.target / avr / pr71151-4.c
blob659aff07510425a387b534c082222e4862be8b22
1 /* { dg-do run } */
2 /* { dg-options "-Os -fno-tree-switch-conversion -ffunction-sections -fdata-sections -mrelax -Wl,--section-start=.foo=0x10000" } */
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
16 #include "exit-abort.h"
17 #include "pr71151-common.h"
19 int main()
21 foo(5);
22 if (y != 37)
23 abort();
25 foo(0);
26 if (y != 67)
27 abort();
29 foo(7);
30 if (y != 98)
31 abort();