Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.target / avr / pr71151-3.c
bloba8fa6b63e0b2316fe47fc87a9a4948cfa130b47e
1 /* { dg-do run } */
2 /* { dg-options "-Os -fno-tree-switch-conversion -ffunction-sections -mno-relax -fdata-sections -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 table
7 entry, with relaxation disabled, 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();