Commit a1a0e08d by Eric Botcazou Committed by Eric Botcazou

re PR middle-end/87574 (ICE in add_data_member_location_attribute at…

re PR middle-end/87574 (ICE in add_data_member_location_attribute at gcc/gcc/dwarf2out.c:19226 since r264943)

	PR middle-end/87574
	* cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
	the thunk when expanding to GIMPLE.

From-SVN: r265028
parent 8e9558f0
2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
PR middle-end/87574
* cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
the thunk when expanding to GIMPLE.
2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de> 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
* varasm.c (mergeable_string_section): Don't try to move zero-length * varasm.c (mergeable_string_section): Don't try to move zero-length
...@@ -1862,6 +1862,12 @@ cgraph_node::expand_thunk (bool output_asm_thunks, bool force_gimple_thunk) ...@@ -1862,6 +1862,12 @@ cgraph_node::expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)
DECL_ARGUMENTS. In this case force_gimple_thunk is true. */ DECL_ARGUMENTS. In this case force_gimple_thunk is true. */
if (in_lto_p && !force_gimple_thunk) if (in_lto_p && !force_gimple_thunk)
get_untransformed_body (); get_untransformed_body ();
/* We need to force DECL_IGNORED_P when the thunk is created
after early debug was run. */
if (force_gimple_thunk)
DECL_IGNORED_P (thunk_fndecl) = 1;
a = DECL_ARGUMENTS (thunk_fndecl); a = DECL_ARGUMENTS (thunk_fndecl);
current_function_decl = thunk_fndecl; current_function_decl = thunk_fndecl;
......
2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
* g++.dg/other/pr87574.C: New test.
2018-10-10 Marek Polacek <polacek@redhat.com> 2018-10-10 Marek Polacek <polacek@redhat.com>
PR c++/87567 - constexpr rejects call to non-constexpr function. PR c++/87567 - constexpr rejects call to non-constexpr function.
......
// PR middle-end/87574
// Testcase by David Binderman <dcb314@hotmail.com>
// { dg-do compile }
// { dg-options "-O2 -g -Wno-return-type" }
class a {
public:
virtual ~a();
};
class c {
public:
enum j {};
virtual j d() = 0;
};
class e : a, c {
j d();
};
class f;
class g {
public:
static g *h();
f *i();
};
class f {
public:
template <class b> b *l(int);
};
c::j e::d() {}
void m() {
for (int k;;)
g::h()->i()->l<c>(k)->d();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment