1  /* Test __regio_symbol diagnostics for unsupported access.  */
       2  
       3  /* { dg-do compile } */
       4  /* { dg-options "-O1" } */
       5  
       6  #include <stdint.h>
       7  
       8  extern volatile uint32_t __regio_symbol *__R30;
       9  uint32_t test_r(void)
      10  {
      11    return *__R30; /* { dg-error "invalid access to '__regio_symbol' address space" } */
      12  }
      13  
      14  void test_w(uint32_t a)
      15  {
      16    *__R30 = a; /* { dg-error "invalid access to '__regio_symbol' address space" } */
      17  }