gcc/testsuite/g++.dg/torture/pr82823.C
raw| 1 | // { dg-do compile } |
| 2 | // { dg-additional-options "-fstack-clash-protection" } |
| 3 | // { dg-require-effective-target supports_stack_clash_protection } |
| 4 | |
| 5 | |
| 6 | class a |
| 7 | { |
| 8 | public: |
| 9 | ~a (); |
| 10 | int b; |
| 11 | }; |
| 12 | class c |
| 13 | { |
| 14 | public: |
| 15 | a m_fn1 (); |
| 16 | }; |
| 17 | class d |
| 18 | { |
| 19 | int e (); |
| 20 | c f; |
| 21 | }; |
| 22 | int |
| 23 | d::e () |
| 24 | { |
| 25 | return f.m_fn1 ().b; |
| 26 | } |