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
* ipa-icf-gimple.c (func_checker::compare_gimple_switch):
Missing checking for CASE_LOW and CASE_HIGH added.
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;
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
* gcc.dg/ipa/pr63747.c: New test.
--- /dev/null
+/* { 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" } } */