aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr25521.c
blob: 82b4cd88ec05870860358ea583c19d2f624ff582 (plain)
1
2
3
4
5
6
7
8
9
10
11
/* PR middle-end/25521 - place `const volatile' objects in read-only
   sections.

   { dg-require-effective-target elf }
   { dg-do compile }
   { dg-skip-if "" { ! const_volatile_readonly_section } } */

const volatile int foo = 30;

/* { dg-final { scan-assembler {.section C,} { target { rx-*-* } } } } */
/* { dg-final { scan-assembler-symbol-section {^_?foo$} {^\.(const|s?rodata)} { target { ! "rx-*-*" } } } } */