aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/avr/pr71151-2.c
blob: f745841df8a66fba27cab29160770545d3d54d0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* { dg-do run } */
/* { dg-options "-Os -fno-tree-switch-conversion -ffunction-sections -fdata-sections" } */

/* Make sure jumptables work properly if placed below 64 KB i.e. 2 byte
   flash address for loading jump table entry, 2 byte entry, after
   removing the special section placement hook. */

#define SECTION_NAME ".foo"

#include "exit-abort.h"
#include "pr71151-common.h"

int main()
{
	foo(5);
	if (y != 37)
		abort();

	foo(0);
	if (y != 67)
		abort();

	foo(7);
	if (y != 98)
		abort();
}