aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/opt/const5.C
blob: 68fe61628bc28997c5ae88fe3c74a7acdd979fdf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// We don't have a good way of determining how ".rodata" is spelled on
// all targets, so we limit this test to a few common targets where we
// do know the spelling.
// { dg-do compile { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } }
// { dg-final { scan-assembler "\\.rodata" } }

template <typename T>
struct B {
  int i;
};

// This declaration should be placed in .rodata.
const B<int> const_B __attribute__((used)) = { 3 };