From bf6817f2c5ab79e08392ef031a40df227fa69b02 Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Wed, 9 Mar 2011 17:59:55 +0100 Subject: [PATCH] re PR tree-optimization/47714 (verify_ssa fails with error: invalid argument to gimple call) 2011-03-09 Martin Jambor PR tree-optimization/47714 * cp/method.c (use_thunk): Clear addressable flag of thunk arguments. * testsuite/g++.dg/torture/pr47714.C: New test. From-SVN: r170822 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/method.c | 1 + gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/torture/pr47714.C | 16 ++++++++++++++++ 4 files changed, 27 insertions(+) create mode 100644 gcc/testsuite/g++.dg/torture/pr47714.C diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 68f04e15eac..b0adb8f7af6 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-09 Martin Jambor + + PR tree-optimization/47714 + * method.c (use_thunk): Clear addressable flag of thunk arguments. + 2011-03-08 Dodji Seketeli PR c++/47705 diff --git a/gcc/cp/method.c b/gcc/cp/method.c index a4c2dd1b415..d70da95ce90 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -372,6 +372,7 @@ use_thunk (tree thunk_fndecl, bool emit_p) DECL_CONTEXT (x) = thunk_fndecl; SET_DECL_RTL (x, NULL); DECL_HAS_VALUE_EXPR_P (x) = 0; + TREE_ADDRESSABLE (x) = 0; t = x; } a = nreverse (t); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 78730576e0e..ba746dab752 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-03-09 Martin Jambor + + PR tree-optimization/47714 + * g++.dg/torture/pr47714.C: New test. + 2011-03-08 Michael Meissner PR target/47755 diff --git a/gcc/testsuite/g++.dg/torture/pr47714.C b/gcc/testsuite/g++.dg/torture/pr47714.C new file mode 100644 index 00000000000..4ff2eeef0a4 --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/pr47714.C @@ -0,0 +1,16 @@ +struct A { virtual ~A () {} }; +struct B { virtual ~B () {} }; +struct C { virtual const A *foo (int) const = 0; }; +struct E : public B, public A { }; +struct F : public C +{ + virtual const E *foo (int) const; +}; +void bar (int &); + +const E * +F::foo (int x) const +{ + bar (x); + return __null; +} -- 2.30.2