* jump.c (rtx_renumbered_equal_p) <case LABEL_REF>: Use
next_nonnote_nondebug_insn instead of next_real_insn and
skip over CODE_LABELs too.
* gcc.dg/pr65980.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231672
138bc75d-0d04-0410-961f-
82ee72b054a4
+2015-12-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/65980
+ * jump.c (rtx_renumbered_equal_p) <case LABEL_REF>: Use
+ next_nonnote_nondebug_insn instead of next_real_insn and
+ skip over CODE_LABELs too.
+
2015-12-10 Jan Hubicka <hubicka@ucw.cz>
* symtab.c (symtab_node::fixup_same_cpp_alias_visibility):
/* Two label-refs are equivalent if they point at labels
in the same position in the instruction stream. */
- return (next_real_insn (LABEL_REF_LABEL (x))
- == next_real_insn (LABEL_REF_LABEL (y)));
+ else
+ {
+ rtx_insn *xi = next_nonnote_nondebug_insn (LABEL_REF_LABEL (x));
+ rtx_insn *yi = next_nonnote_nondebug_insn (LABEL_REF_LABEL (y));
+ while (xi && LABEL_P (xi))
+ xi = next_nonnote_nondebug_insn (xi);
+ while (yi && LABEL_P (yi))
+ yi = next_nonnote_nondebug_insn (yi);
+ return xi == yi;
+ }
case SYMBOL_REF:
return XSTR (x, 0) == XSTR (y, 0);
+2015-12-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/65980
+ * gcc.dg/pr65980.c: New test.
+
2015-12-15 Martin Sebor <msebor@redhat.com>
c++/42121
--- /dev/null
+/* PR rtl-optimization/65980 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -fcompare-debug" } */
+
+typedef struct { int b; } A;
+void (*a) (int);
+int b;
+
+int
+foo (A *v)
+{
+ asm goto ("" : : "m" (v->b) : : l);
+ return 0;
+l:
+ return 1;
+}
+
+int
+bar (void)
+{
+ if (b)
+ {
+ if (foo (0) && a)
+ a (0);
+ return 0;
+ }
+ if (foo (0) && a)
+ a (0);
+ return 0;
+}