view gcc/testsuite/g++.dg/debug/dwarf2/localclass3.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

// Test that the A* pointer_type is also within the debug info for f.
// Currently GCC emits it immediately before A, which is simple to test for.
// { dg-options "-gdwarf-2 -dA" }

void f()
{
  int j = 5;
  {
    struct A { int i; } *ap;
    ap->i = 42;
  }
}

// { dg-final { scan-assembler "DW_TAG_pointer_type.\[^)\]*. DW_TAG_structure_type" } }