Commit adfac8df by Jakub Jelinek

re PR rtl-optimization/64536 (Undefined .L* symbol starting with jump2 on s390x)

	PR rtl-optimization/64536
	* cfgrtl.c (rtl_tidy_fallthru_edge): Handle removal of degenerate
	tablejumps.

	* gcc.dg/pr64536.c: New test.

From-SVN: r219405
parent ec37f1bc
2015-01-09 Michael Collison <michael.collison@linaro.org>
* gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h,
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* gcc-interface/decl.c: Ditto.
* gcc-interface/misc.c: Ditto.
* gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* gcc-interface/trans.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
fold-const.h, wide-int.h, inchash.h due to
flattening of tree.h.
* gcc-interface/utils.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h,
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* gcc-interface/utils2.c: Ditto.
2015-01-07 Robert Dewar <dewar@adacore.com> 2015-01-07 Robert Dewar <dewar@adacore.com>
* sem_warn.adb (Check_One_Unit): Don't give unused entities * sem_warn.adb (Check_One_Unit): Don't give unused entities
......
2015-01-09 Michael Collison <michael.collison@linaro.org>
* array-notation-common.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
* c-ada-spec.c: Ditto.
* c-cilkplus.c: Ditto.
* c-common.c: Include input.h due to flattening of tree.h.
Define macro GCC_C_COMMON_C.
* c-common.h: Flatten tree.h header files into c-common.h.
Remove include of tree-core.h.
* c-cppbuiltin.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* c-dump.c: Ditto.
* c-format.c: Flatten tree.h header files into c-common.h.
* c-cppbuiltin.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* c-dump.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* c-format.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, inchash.h and real.h due to
flattening of tree.h.
* c-gimplify.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to
flattening of tree.h.
* cilk.c: Ditto.
* c-lex.c: Ditto.
* c-omp.c: Ditto.
* c-opts.c: Ditto.
* c-pch.c: Ditto.
* c-ppoutput.c: Ditto.
* c-pragma.c: Ditto.
* c-pretty-print.c: Ditto.
* c-semantics.c: Ditto.
* c-ubsan.c: Ditto.
* stub-objc.c: Ditto.
2015-01-08 Jason Merrill <jason@redhat.com> 2015-01-08 Jason Merrill <jason@redhat.com>
* c-ubsan.c (ubsan_maybe_instrument_array_ref): Use * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
...@@ -206,11 +251,11 @@ ...@@ -206,11 +251,11 @@
2014-10-28 Andrew MacLeod <amacleod@redhat.com> 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
* c-family/c-common.c: Adjust include files. * c-common.c: Adjust include files.
* c-family/c-gimplify.c: Ditto. * c-gimplify.c: Ditto.
* c-family/cilk.c: Ditto. * cilk.c: Ditto.
* c-family/c-pragma.c: Ditto. * c-pragma.c: Ditto.
* c-family/c-ubsan.c: Ditto. * c-ubsan.c: Ditto.
2014-10-27 Andrew MacLeod <amacleod@redhat.com> 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
...@@ -311,7 +356,7 @@ ...@@ -311,7 +356,7 @@
2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net> 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
* c-family/c-cppbuiltin.c: Move __cpp_attribute_deprecated to the * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
C++11 section. C++11 section.
2014-10-03 Marc Glisse <marc.glisse@inria.fr> 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
...@@ -768,7 +813,7 @@ ...@@ -768,7 +813,7 @@
2014-06-11 Jan Hubicka <hubicka@ucw.cz> 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
* c-family/c-common.c (handle_section_attribute): Update handling for * c-common.c (handle_section_attribute): Update handling for
section names that are no longer trees. section names that are no longer trees.
2014-06-10 Jakub Jelinek <jakub@redhat.com> 2014-06-10 Jakub Jelinek <jakub@redhat.com>
...@@ -1588,8 +1633,8 @@ ...@@ -1588,8 +1633,8 @@
2013-10-26 Jeff Law <law@redhat.com> 2013-10-26 Jeff Law <law@redhat.com>
* c-family/c-common.c (c_define_builtins): Remove mudflap support. * c-common.c (c_define_builtins): Remove mudflap support.
* c-family/c.opt: Ignore and warn for mudflap options. * c.opt: Ignore and warn for mudflap options.
2013-10-24 Tobias Burnus <burnus@net-b.de> 2013-10-24 Tobias Burnus <burnus@net-b.de>
...@@ -1990,7 +2035,7 @@ ...@@ -1990,7 +2035,7 @@
2013-07-08 Graham Stott <graham.stott@btinternet.com> 2013-07-08 Graham Stott <graham.stott@btinternet.com>
* c-family/array-notation-common.c (length_mismatch_in_expr_p): Delete * array-notation-common.c (length_mismatch_in_expr_p): Delete
unused variables l_length and l_node. unused variables l_length and l_node.
2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com> 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
...@@ -3523,7 +3568,7 @@ ...@@ -3523,7 +3568,7 @@
2011-03-25 Jeff Law <law@redhat.com> 2011-03-25 Jeff Law <law@redhat.com>
* c-family/c-common.c (def_fn_type): Add missing va_end. * c-common.c (def_fn_type): Add missing va_end.
2011-03-25 Jason Merrill <jason@redhat.com> 2011-03-25 Jason Merrill <jason@redhat.com>
...@@ -4374,7 +4419,7 @@ ...@@ -4374,7 +4419,7 @@
2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org> 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
* c-family/c-common.c (IN_GCC_FRONTEND): Do not undef. * c-common.c (IN_GCC_FRONTEND): Do not undef.
Do not include expr.h Do not include expr.h
(vector_mode_valid_p): Move here. (vector_mode_valid_p): Move here.
......
2015-01-09 Michael Collison <michael.collison@linaro.org>
* c-array-notation.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
* c-aux-info.c: Ditto.
* c-convert.c: Ditto.
* c-decl.c: Ditto.
* c-errors.c: Ditto.
* c-lang.c: Dittoxs.
* c-objc-common.c: Ditto.
* c-parser.c: Ditto.
* c-typeck.c: Include hash-set.h, machmode.h,
vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
fold-const.h, wide-int.h, inchash.h, real.h and
fixed-value.h due to flattening of tree.h.
2015-01-07 Marek Polacek <polacek@redhat.com> 2015-01-07 Marek Polacek <polacek@redhat.com>
PR c/64417 PR c/64417
......
...@@ -1796,6 +1796,24 @@ rtl_tidy_fallthru_edge (edge e) ...@@ -1796,6 +1796,24 @@ rtl_tidy_fallthru_edge (edge e)
&& (any_uncondjump_p (q) && (any_uncondjump_p (q)
|| single_succ_p (b))) || single_succ_p (b)))
{ {
rtx label;
rtx_jump_table_data *table;
if (tablejump_p (q, &label, &table))
{
/* The label is likely mentioned in some instruction before
the tablejump and might not be DCEd, so turn it into
a note instead and move before the tablejump that is going to
be deleted. */
const char *name = LABEL_NAME (label);
PUT_CODE (label, NOTE);
NOTE_KIND (label) = NOTE_INSN_DELETED_LABEL;
NOTE_DELETED_LABEL_NAME (label) = name;
rtx_insn *lab = safe_as_a <rtx_insn *> (label);
reorder_insns (lab, lab, PREV_INSN (q));
delete_insn (table);
}
#ifdef HAVE_cc0 #ifdef HAVE_cc0
/* If this was a conditional jump, we need to also delete /* If this was a conditional jump, we need to also delete
the insn that set cc0. */ the insn that set cc0. */
......
2015-01-09 Michael Collison <michael.collison@linaro.org>
* call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* class.c: Ditto.
* constexpr.c: Ditto.
* cp-array-notation.c: Ditto.
* cp-gimplify.c: Ditto.
* cp-lang.c: Ditto.
* cp-objcp-common.c: Ditto.
* cvt.c: Ditto.
* decl2.c: Ditto.
* decl.c: Ditto.
* dump.c: Ditto.
* error.c: Ditto.
* except.c: Ditto.
* expr.c: Ditto.
* friend.c: Ditto.
* init.c: Ditto.
* lambda.c: Ditto.
* lex.c: Ditto.
* mangle.c: Ditto.
* name-lookup.c: Ditto.
* optimize.c: Ditto.
* parser.c: Ditto.
* pt.c: Ditto.
* ptree.c: Ditto.
* repo.c: Ditto.
* rtti.c: Ditto.
* search.c: Ditto.
* semantics.c: Ditto.
* tree.c: Ditto.
* typeck2.c: Ditto.
* typeck.c: Ditto.
2015-01-08 Jason Merrill <jason@redhat.com> 2015-01-08 Jason Merrill <jason@redhat.com>
* cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function. * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
......
2015-01-09 Michael Collison <michael.collison@linaro.org>
* convert.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* cpp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* decl.c: Ditto.
* f95.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* iresolve.c: Ditto.
* match.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* module.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* options.c: Ditto.
* target-memory.c: Include hash-set.h, vec.h,
double-int.h, input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* trans-array.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* trans.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* trans-common.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* trans-const.c: Ditto.
* trans-decl.c: Ditto.
* trans-expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* trans-intrinsic.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, inchash.h and real.h due to flattening of tree.h.
* trans-io.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* trans-openmp.c: Ditto.
* trans-stmt.c: Ditto.
* trans-types.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, inchash.h and real.h due to flattening of tree.h.
2015-01-08 Tobias Burnus <burnus@net-b.de> 2015-01-08 Tobias Burnus <burnus@net-b.de>
* trans-decl.c (gfc_build_qualified_array): Fix coarray tokens * trans-decl.c (gfc_build_qualified_array): Fix coarray tokens
......
2015-01-09 Michael Collison <michael.collison@linaro.org>
* go-gcc.cc: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* go-lang.c: Ditto.
* go-backend.c: Ditto.
2015-01-07 Chris Manghane <cmang@google.com> 2015-01-07 Chris Manghane <cmang@google.com>
PR go/61204 PR go/61204
......
2015-01-09 Michael Collison <michael.collison@linaro.org>
* boehm.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* builtins.c: Ditto.
* class.c: Ditto.
* constants.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* decl.c: Ditto.
* except.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h,inchash.h and real.h due to flattening of tree.h.
* gimplify.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* jcf-dump.c: Ditto.
* jcf-io.c: Ditto.
* jcf-parse.c: Ditto.
* jvgenmain.c: Ditto.
* lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* mangle.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* mangle_name.c: Ditto.
* resource.c: Ditto.
* typeck.c: Ditto.
* verify-glue.c: Ditto.
* verify-impl.c: Ditto.
2015-01-05 Jakub Jelinek <jakub@redhat.com> 2015-01-05 Jakub Jelinek <jakub@redhat.com>
Update copyright years. Update copyright years.
......
2015-01-09 Michael Collison <michael.collison@linaro.org>
* lto.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* lto-lang.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* lto-object.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* lto-partition.c: Ditto.
* lto-symtab.c: Ditto.
2015-01-05 Jakub Jelinek <jakub@redhat.com> 2015-01-05 Jakub Jelinek <jakub@redhat.com>
Update copyright years. Update copyright years.
......
2015-01-09 Michael Collison <michael.collison@linaro.org>
* objc-act.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* objc-encoding.c: Ditto.
* objc-gnu-runtime-abi-01.c: Ditto.
* objc-lang.c: Ditto.
* objc-map.c: Ditto.
* objc-next-runtime-abi-01.c: Ditto.
* objc-next-runtime-abi-02.c: Ditto.
* objc-runtime-shared-support.c: Ditto.
2015-01-05 Jakub Jelinek <jakub@redhat.com> 2015-01-05 Jakub Jelinek <jakub@redhat.com>
Update copyright years. Update copyright years.
......
2015-01-09 Michael Collison <michael.collison@linaro.org>
* objcp-decl.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options, fold-const.h,
wide-int.h, and inchash.h due to flattening of tree.h.
* objcp-lang.c: Ditto.
2014-12-31 Iain Sandoe <iain@codesourcery.com> 2014-12-31 Iain Sandoe <iain@codesourcery.com>
* config-lang.in (gtfiles): Update list. * config-lang.in (gtfiles): Update list.
......
2015-01-09 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/64536
* gcc.dg/pr64536.c: New test.
2015-01-09 David Malcolm <dmalcolm@redhat.com> 2015-01-09 David Malcolm <dmalcolm@redhat.com>
* jit.dg/all-non-failing-tests.h: Add test-constants.c. * jit.dg/all-non-failing-tests.h: Add test-constants.c.
......
/* PR rtl-optimization/64536 */
/* { dg-do link } */
/* { dg-options "-O2" } */
/* { dg-additional-options "-fPIC" { target fpic } } */
struct S { long q; } *h;
long a, b, g, j, k, *c, *d, *e, *f, *i;
long *baz (void)
{
asm volatile ("" : : : "memory");
return e;
}
void
bar (int x)
{
int y;
for (y = 0; y < x; y++)
{
switch (b)
{
case 0:
case 2:
a++;
break;
case 3:
a++;
break;
case 1:
a++;
}
if (d)
{
f = baz ();
g = k++;
if (&h->q)
{
j = *f;
h->q = *f;
}
else
i = (long *) (h->q = *f);
*c++ = (long) f;
e += 6;
}
else
{
f = baz ();
g = k++;
if (&h->q)
{
j = *f;
h->q = *f;
}
else
i = (long *) (h->q = *f);
*c++ = (long) f;
e += 6;
}
}
}
int
main ()
{
return 0;
}
2015-01-09 Michael Collison <michael.collison@linaro.org>
* plugin.cc: Include hash-set.h, machmode.h, vec.h, double-int.h,
input.h, alias.h, symtab.h, options.h, fold-const.h, wide-int.h and inchash.h
due to flattening of tree.h.
2014-11-21 H.J. Lu <hongjiu.lu@intel.com> 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
PR bootstrap/63784 PR bootstrap/63784
......
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