summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/c-c++-common/dwarf2
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2010-02-26 15:58:57 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2010-02-26 15:58:57 +0000
commitbd564c2971e8d8d6d1a5ef0b27398ab70af80d3d (patch)
tree0688af0b1561fa59374d820b0b812f6ea4caeee9 /gcc/testsuite/c-c++-common/dwarf2
parent1ebdc03a15b7c1da6aa1361e5e4371b2d74319be (diff)
downloadppe42-gcc-bd564c2971e8d8d6d1a5ef0b27398ab70af80d3d.tar.gz
ppe42-gcc-bd564c2971e8d8d6d1a5ef0b27398ab70af80d3d.zip
PR debug/43190
* function.c (used_types_insert): Don't skip through named pointer types. Don't use TYPE_MAIN_VARIANT if the original type has a name and it is different from the main variant's type. * c-c++-common/dwarf2/pr43190.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157092 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/c-c++-common/dwarf2')
-rw-r--r--gcc/testsuite/c-c++-common/dwarf2/pr43190.c13
1 files changed, 13 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 00000000000..2cb1b7086fa
--- /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++;
+}
OpenPOWER on IntegriCloud