diff options
Diffstat (limited to 'gcc/testsuite/c-c++-common/dwarf2')
-rw-r--r-- | gcc/testsuite/c-c++-common/dwarf2/pr43190.c | 13 | ||||
-rw-r--r-- | gcc/testsuite/c-c++-common/dwarf2/vla1.c | 11 |
2 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/dwarf2/pr43190.c b/gcc/testsuite/c-c++-common/dwarf2/pr43190.c new file mode 100644 index 000000000..2cb1b7086 --- /dev/null +++ b/gcc/testsuite/c-c++-common/dwarf2/pr43190.c @@ -0,0 +1,13 @@ +/* PR debug/43190 */ +/* { dg-options "-gdwarf-2 -dA" } */ +/* { dg-final { scan-assembler "DW_TAG_structure_type\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\"S\[^\\r\\n\]*DW_AT_name" } } */ +/* { dg-final { scan-assembler "DW_TAG_typedef\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\"T\[^\\r\\n\]*DW_AT_name" } } */ + +typedef struct S { int i; } *T; +#define M(p) ((T) (p)) + +void +foo (void *p) +{ + M (p)->i++; +} diff --git a/gcc/testsuite/c-c++-common/dwarf2/vla1.c b/gcc/testsuite/c-c++-common/dwarf2/vla1.c new file mode 100644 index 000000000..e814bf568 --- /dev/null +++ b/gcc/testsuite/c-c++-common/dwarf2/vla1.c @@ -0,0 +1,11 @@ +// PR debug/42800 +// { dg-options "-gdwarf-2 -dA" } +// { dg-final { scan-assembler "DW_AT_upper_bound" } } + +int +f (int i) +{ + char a[i]; + + return a[0]; +} |