tree.c (cp_copy_res_decl_for_inlining): Adjust DECL_ABSTRACT_ORIGIN for the return variable.
* tree.c (cp_copy_res_decl_for_inlining): Adjust DECL_ABSTRACT_ORIGIN for the return variable. * g++.dg/other/debug1.C: New test. From-SVN: r46702
This commit is contained in:
parent
2643b009f9
commit
199898121e
4 changed files with 59 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2001-11-01 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* tree.c (cp_copy_res_decl_for_inlining): Adjust
|
||||
DECL_ABSTRACT_ORIGIN for the return variable.
|
||||
|
||||
2001-10-31 Zack Weinberg <zack@codesourcery.com>
|
||||
|
||||
* Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
|
||||
|
|
|
@ -2250,6 +2250,7 @@ cp_copy_res_decl_for_inlining (result, fn, caller, decl_map_,
|
|||
DECL_NAME (var) = DECL_NAME (nrv);
|
||||
DECL_SOURCE_FILE (var) = DECL_SOURCE_FILE (nrv);
|
||||
DECL_SOURCE_LINE (var) = DECL_SOURCE_LINE (nrv);
|
||||
DECL_ABSTRACT_ORIGIN (var) = DECL_ORIGIN (nrv);
|
||||
splay_tree_insert (decl_map,
|
||||
(splay_tree_key) nrv,
|
||||
(splay_tree_value) var);
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2001-11-01 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* g++.dg/other/debug1.C: New test.
|
||||
|
||||
2001-11-01 Stephane Carrez <Stephane.Carrez@worldnet.fr>
|
||||
|
||||
* gcc.c-torture/compile/20010327-1.c: Use __SIZE_TYPE__ instead
|
||||
|
|
49
gcc/testsuite/g++.dg/other/debug1.C
Normal file
49
gcc/testsuite/g++.dg/other/debug1.C
Normal file
|
@ -0,0 +1,49 @@
|
|||
// Test whether dwarf2 debug info works with named return value optimization
|
||||
// { dg-do compile { i?86-*-linux* }
|
||||
// { dg-options "-O2 -gdwarf-2" }
|
||||
|
||||
struct S
|
||||
{
|
||||
virtual ~S();
|
||||
S (const char *str);
|
||||
S& operator= (const char *str);
|
||||
operator const char *() const;
|
||||
S& operator+= (const char *str);
|
||||
};
|
||||
inline S operator+ (const char *s1, const S &s2)
|
||||
{
|
||||
S x (s1);
|
||||
x += s2;
|
||||
return x;
|
||||
}
|
||||
struct U
|
||||
{
|
||||
U ();
|
||||
U& operator= (const char *);
|
||||
const char *foo() const;
|
||||
operator const char *() const { return foo(); }
|
||||
};
|
||||
template <class T> struct V
|
||||
{
|
||||
T v;
|
||||
};
|
||||
template <class T> struct W
|
||||
{
|
||||
V<T> *w;
|
||||
W() : w (0) {}
|
||||
const T& operator* () const { return w->v; }
|
||||
T& operator* () { return w->v; }
|
||||
};
|
||||
struct X {
|
||||
X();
|
||||
};
|
||||
struct Y {
|
||||
Y (const U &u);
|
||||
};
|
||||
X::X()
|
||||
{
|
||||
W<U> a;
|
||||
U b;
|
||||
b = (*a) + "xx";
|
||||
Y c (b);
|
||||
}
|
Loading…
Add table
Reference in a new issue