PageRenderTime 94ms CodeModel.GetById 30ms RepoModel.GetById 0ms app.codeStats 0ms

/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
Possible License(s): GPL-2.0, LGPL-2.1, LGPL-2.0, BSD-3-Clause, CC-BY-SA-3.0
  1. /* APPLE LOCAL file 5559195 */
  2. // { dg-do run }
  3. // Verify that an empty statement list does not cause the destructor to be
  4. // marked as trivial.
  5. int N = 1;
  6. class A {
  7. public:
  8. ~A () {
  9. N = 0;
  10. {}
  11. }
  12. };
  13. class B : public A {
  14. };
  15. int
  16. main ()
  17. {
  18. { B b; }
  19. return N;
  20. }