add alignment to enable store merging in strict-alignment targets
[official-gcc.git] / gcc / testsuite / g++.dg / pr90462.C
blob2585ba0dcdba69b67b60ee2c496863435ce9060d
1 /* { dg-options "-Wdeprecated-copy -fdiagnostics-format=json" } */
3 template <class> class b;
4 struct B {
5   typedef b<char> *c;
6 };
7 class d {
8 public:
9   B::c operator->();
11 template <class> struct e;
12 class f {
13   typedef int g;
15 template <class, class> class h;
16 template <class i> class b {
17 public:
18   i j;
19   i k;
20   int l;
21   void assign() {
22     int m;
23     h<i, int> n(&m);
24     n.o(&j, &k, l);
25   }
27 template <class i, class> class s : f { s &p(const i *, const i *, g); };
28 template <class i, class t> s<i, t> &s<i, t>::p(const i *, const i *, g) {
29   d q;
30   q->assign();
32 struct G {
33   G();
34   G(int);
35   G(G &);
37 template <class i, class> class h {
38 public:
39   h(int *);
40   void o(const i *, const i *, unsigned);
41   i r();
43 template <class i, class t> void h<i, t>::o(const i *, const i *, unsigned) {
44   G a;
45   a = r();
47 template s<char, e<char>> &s<char, e<char>>::p(const char *, const char *, g);
49 /* { dg-regexp ".*" } */