diff options
author | matz <matz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-01-23 16:44:27 +0000 |
---|---|---|
committer | matz <matz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-01-23 16:44:27 +0000 |
commit | f4aea3f41813203dfbaa9d2b595bad14669b3046 (patch) | |
tree | 18dbb33ebeeb64f69964239a861dad4b258d8612 | |
parent | c7108d79931c6a71aaf5aed0044bc818aff6a12a (diff) | |
download | gcc-f4aea3f41813203dfbaa9d2b595bad14669b3046.tar.gz |
PR debug/34895
* dwarf2out.c (force_type_die): Use modified_type_die instead of
gen_type_die.
* g++.dg/debug/pr34895.cc: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131761 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 7 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/debug/pr34895.C | 19 |
4 files changed, 32 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c34dbd07bd8..99fe6282519 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-01-23 Michael Matz <matz@suse.de> + + PR debug/34895 + * dwarf2out.c (force_type_die): Use modified_type_die instead of + gen_type_die. + 2008-01-23 Andreas Krebbel <krebbel1@de.ibm.com> * ipa-struct-reorg.c (create_new_malloc): Use pointer type as diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 829b9ee328f..c1df45af12a 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -13736,11 +13736,8 @@ force_type_die (tree type) else context_die = comp_unit_die; - type_die = lookup_type_die (type); - if (type_die) - return type_die; - gen_type_die (type, context_die); - type_die = lookup_type_die (type); + type_die = modified_type_die (type, TYPE_READONLY (type), + TYPE_VOLATILE (type), context_die); gcc_assert (type_die); } return type_die; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2608146190f..fe9442a92b8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-01-23 Michael Matz <matz@suse.de> + + PR debug/34895 + * g++.dg/debug/pr34895.cc: New testcase. + 2008-01-23 Richard Guenther <rguenther@suse.de> PR middle-end/31529 diff --git a/gcc/testsuite/g++.dg/debug/pr34895.C b/gcc/testsuite/g++.dg/debug/pr34895.C new file mode 100644 index 00000000000..ca06336c62a --- /dev/null +++ b/gcc/testsuite/g++.dg/debug/pr34895.C @@ -0,0 +1,19 @@ +// { dg-do compile } +// { dg-options "-O2 -g" } +// +// Copyright (C) 2008 Free Software Foundation, Inc. +// Contributed by Theodore.Papadopoulo 20 Jan 2008 <Theodore.Papadopoulo@sophia.inria.fr> + +struct A { + A() { } + unsigned operator()() { return 1; } +}; +struct B: public A { + typedef const A base; + using base::operator(); + B() { } +}; +int +main() { + B b; +} |