re PR ipa/63580 (ICE : error: invalid argument to gimple call)
PR ipa/63580 * cgraphunit.c (cgraph_node::create_wrapper): TREE_ADDRESSABLE is set to false for a newly created thunk. * g++.dg/ipa/pr63580.C: New test. From-SVN: r217222
This commit is contained in:
parent
6343f5d75b
commit
d862b3439d
@ -1,3 +1,9 @@
|
||||
2014-11-07 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR ipa/63580
|
||||
* cgraphunit.c (cgraph_node::create_wrapper):
|
||||
TREE_ADDRESSABLE is set to false for a newly created thunk.
|
||||
|
||||
2014-11-07 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR ipa/63747
|
||||
|
@ -2369,6 +2369,14 @@ cgraph_node::create_wrapper (cgraph_node *target)
|
||||
|
||||
cgraph_edge *e = create_edge (target, NULL, 0, CGRAPH_FREQ_BASE);
|
||||
|
||||
tree arguments = DECL_ARGUMENTS (decl);
|
||||
|
||||
while (arguments)
|
||||
{
|
||||
TREE_ADDRESSABLE (arguments) = false;
|
||||
arguments = TREE_CHAIN (arguments);
|
||||
}
|
||||
|
||||
expand_thunk (false, true);
|
||||
e->call_stmt_cannot_inline_p = true;
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2014-11-07 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR ipa/63580
|
||||
* g++.dg/ipa/pr63580.C: New test.
|
||||
|
||||
2014-11-07 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR ipa/63747
|
||||
|
26
gcc/testsuite/g++.dg/ipa/pr63580.C
Normal file
26
gcc/testsuite/g++.dg/ipa/pr63580.C
Normal file
@ -0,0 +1,26 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fdump-ipa-icf" } */
|
||||
|
||||
struct A
|
||||
{
|
||||
};
|
||||
template <class L, class R> A operator%(L, R);
|
||||
template <class A0, class A1, class A2, class A3>
|
||||
void make_tuple (A0 &, A1, A2, A3);
|
||||
A
|
||||
bar (int p1, char p2, int p3, double p4)
|
||||
{
|
||||
A a;
|
||||
make_tuple (p1, p2, p3, p4);
|
||||
return "int; char; string; double; " % a;
|
||||
}
|
||||
A
|
||||
foo (int p1, char p2, int p3, double p4)
|
||||
{
|
||||
A b;
|
||||
make_tuple (p1, p2, p3, p4);
|
||||
return "int; char; string; double; " % b;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */
|
||||
/* { dg-final { cleanup-ipa-dump "icf" } } */
|
Loading…
x
Reference in New Issue
Block a user