Commit 4287b4e8 by Martin Liska Committed by Martin Liska

Fix wrong condition in ipa-visibility.c (PR ipa/81520).

2017-07-25  Martin Liska  <mliska@suse.cz>

	PR ipa/81520
	* ipa-visibility.c (function_and_variable_visibility): Make the redirection
	just on target that do supporting aliasing.  Fix GNU coding style.
2017-07-25  Martin Liska  <mliska@suse.cz>

	PR ipa/81520
	* gcc.dg/ipa/pr81520.c: New test.

From-SVN: r250501
parent 99f08974
2017-07-25 Martin Liska <mliska@suse.cz>
PR ipa/81520
* ipa-visibility.c (function_and_variable_visibility): Make the redirection
just on target that do supporting aliasing. Fix GNU coding style.
2017-07-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
PR libgcc/61152
......
......@@ -615,9 +615,10 @@ function_and_variable_visibility (bool whole_program)
struct cgraph_node *node;
varpool_node *vnode;
/* All aliases should be procssed at this point. */
/* All aliases should be processed at this point. */
gcc_checking_assert (!alias_pairs || !alias_pairs->length ());
#ifdef ASM_OUTPUT_DEF
FOR_EACH_DEFINED_FUNCTION (node)
{
if (node->get_availability () != AVAIL_INTERPOSABLE
......@@ -634,20 +635,22 @@ function_and_variable_visibility (bool whole_program)
continue;
if (!alias)
{
{
alias = dyn_cast<cgraph_node *> (node->noninterposable_alias ());
gcc_assert (alias && alias != node);
}
e->redirect_callee (alias);
if (gimple_has_body_p (e->caller->decl))
{
{
push_cfun (DECL_STRUCT_FUNCTION (e->caller->decl));
e->redirect_call_stmt_to_callee ();
pop_cfun ();
pop_cfun ();
}
}
}
#endif
FOR_EACH_FUNCTION (node)
{
int flags = flags_from_decl_or_type (node->decl);
......
2017-07-25 Martin Liska <mliska@suse.cz>
PR ipa/81520
* gcc.dg/ipa/pr81520.c: New test.
2017-07-25 Marek Polacek <polacek@redhat.com>
PR c/81364
......
/* PR ipa/81520 */
/* { dg-do compile } */
/* { dg-options "-O2 -fPIC" } */
/* { dg-require-effective-target fpic } */
char
a (int b)
{
a (b);
return 0;
}
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