/gcc/testsuite/g++.apple/empty-destructor-stmt-seq.C
https://bitbucket.org/danchr/llvm-gcc · C · 25 lines · 16 code · 5 blank · 4 comment · 0 complexity · a1f38d406a0f35d4fb208d8adf81b25d MD5 · raw file
- /* APPLE LOCAL file 5559195 */
- // { dg-do run }
- // Verify that an empty statement list does not cause the destructor to be
- // marked as trivial.
- int N = 1;
- class A {
- public:
- ~A () {
- N = 0;
- {}
- }
- };
- class B : public A {
- };
- int
- main ()
- {
- { B b; }
- return N;
- }