| 1 |
/* Test __regio_symbol diagnostics for unsupported declarations. */ |
| 2 |
|
| 3 |
/* { dg-do compile } */ |
| 4 |
/* { dg-options "-O1" } */ |
| 5 |
|
| 6 |
#include <stdint.h> |
| 7 |
|
| 8 |
volatile __regio_symbol |
| 9 |
uint32_t __R30; /* { dg-error "variables in '__regio_symbol' address space must be declared 'extern'" } */ |
| 10 |
|
| 11 |
extern __regio_symbol |
| 12 |
uint32_t __R31; /* { dg-error "variables in '__regio_symbol' address space must be declared 'volatile'" } */ |
| 13 |
|
| 14 |
extern volatile |
| 15 |
__regio_symbol uint32_t __R32; /* { dg-error "register name '__R32' not recognized in '__regio_symbol' address space" } */ |