(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
avr/
torture/
builtins-2-flash.c
       1  /* { dg-options "-std=gnu99 -Tavr51-flash1.x" } */
       2  /* { dg-do run { target { ! avr_tiny } } } */
       3  
       4  #include <stdlib.h>
       5  
       6  const __flash char c0 = 1;
       7  const __flash1 char c1 = 1;
       8  
       9  int main (void)
      10  {
      11    const __memx void *p;
      12  
      13    p = &c0;
      14    if (__builtin_avr_flash_segment (p) != 0)
      15      abort();
      16  
      17    p = &c1;
      18    if (__builtin_avr_flash_segment (p) != 1)
      19      abort();
      20  
      21    if (__builtin_avr_flash_segment ("p") != -1)
      22      abort();
      23  
      24    exit (0);
      25    return 0; 
      26  }