gcc/testsuite/g++.dg/torture/pr63237.C
raw| 1 | // { dg-do compile } |
| 2 | |
| 3 | class A { |
| 4 | int Length; |
| 5 | public: |
| 6 | A(const char *p1) { Length = __builtin_strlen(p1); } |
| 7 | }; |
| 8 | class B { |
| 9 | public: |
| 10 | void m_fn1(int, A); |
| 11 | }; |
| 12 | class C { |
| 13 | public: |
| 14 | B &m_fn2(); |
| 15 | }; |
| 16 | int a; |
| 17 | void RewriteMacrosInInput() { |
| 18 | C b; |
| 19 | B &c = b.m_fn2(); |
| 20 | c.m_fn1(0, &""[a]); |
| 21 | } |