+2015-02-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR ipa/65034
+ * stmt.c (emit_case_nodes): Use void_type_node instead of
+ NULL_TREE as LABEL_DECL type.
+
2015-02-13 John David Anglin <danglin@gcc.gnu.org>
* config/pa/constraints.md: Change "Q" and "T" constraints to memory
+2015-02-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR ipa/65034
+ * decl.c (start_preparsed_function): Use void_type_node instead
+ of NULL_TREE as LABEL_DECL type.
+
2015-02-12 Jason Merrill <jason@redhat.com>
PR c++/64898
&& targetm.cxx.cdtor_returns_this ()))
{
cdtor_label = build_decl (input_location,
- LABEL_DECL, NULL_TREE, NULL_TREE);
+ LABEL_DECL, NULL_TREE, void_type_node);
DECL_CONTEXT (cdtor_label) = current_function_decl;
}
tree test_label
= build_decl (curr_insn_location (),
- LABEL_DECL, NULL_TREE, NULL_TREE);
+ LABEL_DECL, NULL_TREE, void_type_node);
/* The default label could be reached either through the right
subtree or the left subtree. Divide the probability
Branch to a label where we will handle it later. */
test_label = build_decl (curr_insn_location (),
- LABEL_DECL, NULL_TREE, NULL_TREE);
+ LABEL_DECL, NULL_TREE, void_type_node);
probability = conditional_probability (
node->right->subtree_prob + default_prob/2,
subtree_prob + default_prob);
+2015-02-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR ipa/65034
+ * g++.dg/ipa/pr65034.C: New test.
+
2015-02-13 Ilya Enkovich <ilya.enkovich@intel.com>
PR tree-optimization/65002
--- /dev/null
+// PR ipa/65034
+// { dg-do compile }
+// { dg-options "-g -O2" }
+
+enum B { C };
+enum D { E };
+struct A { A (B, D) { } };
+struct F { unsigned g, h, i, j; } a;
+
+void
+foo (unsigned x, unsigned y)
+{
+ switch (x)
+ {
+ case 6:
+ a.i = y;
+ break;
+ case 7:
+ a.j = y;
+ break;
+ default:
+ A (C, E);
+ }
+}
+
+void
+bar (unsigned x, unsigned y)
+{
+ switch (x)
+ {
+ case 6:
+ a.i = y;
+ break;
+ case 7:
+ a.j = y;
+ break;
+ default:
+ A (C, E);
+ }
+}