Debian Codegraph @

gcc/testsuite/g++.dg/init/mutable1.C

raw
1 // PR c++/54026
2 // { dg-final { scan-assembler-not "rodata" } }
3
4 void non_const(int *);
5
6 template <typename T>
7 struct Foo {
8 T x;
9 mutable int y;
10 void func() const { non_const(&y); }
11 };
12
13 struct Bar {
14 int x;
15 mutable int y;
16 void func() const { non_const(&y); }
17 };
18
19 const Foo<int> foo = { 1, 2 };
20 const Bar bar = { 3, 4 };