/gcc/testsuite/g++.apple/empty-destructor-stmt-seq.C
C | 25 lines | 16 code | 5 blank | 4 comment | 0 complexity | a1f38d406a0f35d4fb208d8adf81b25d MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, LGPL-2.0, BSD-3-Clause, CC-BY-SA-3.0
- /* 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;
- }