(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
avr/
pr71151-5.c
       1  /* { dg-do run } */
       2  /* { dg-options "-Os -fno-tree-switch-conversion -ffunction-sections -fdata-sections -mno-relax -Wl,--section-start=.foo=0x20000" } */
       3  
       4  #ifdef __AVR_3_BYTE_PC__
       5  /* Make sure jumptables work properly if placed above 128 KB, i.e. 3 byte
       6     flash address for loading jump table entry and a jump table entry
       7     that is a stub, with relaxation disabled, after removing the special
       8     section 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. ATmega128.  */
      13  #define SECTION_NAME ".text.foo"
      14  #endif
      15  
      16  #include "exit-abort.h"
      17  #include "pr71151-common.h"
      18  
      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  }