From: Martin Liska Date: Wed, 3 Jan 2018 09:24:40 +0000 (+0100) Subject: Handle noipa attribute in IPA visibility (PR ipa/83594). X-Git-Tag: basepoints/gcc-9~2292 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=995046865885827b79226597586736fd0846cf71;p=thirdparty%2Fgcc.git Handle noipa attribute in IPA visibility (PR ipa/83594). 2018-01-03 Martin Liska PR ipa/83594 * ipa-visibility.c (function_and_variable_visibility): Skip functions with noipa attribure. 2018-01-03 Martin Liska PR ipa/83594 * gcc.dg/ipa/pr83594.c: New test. From-SVN: r256167 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5e86e97b7558..6ca0368a26a5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-01-03 Martin Liska + + PR ipa/83594 + * ipa-visibility.c (function_and_variable_visibility): Skip + functions with noipa attribure. + 2018-01-03 Jakub Jelinek * gcc.c (process_command): Update copyright notice dates. diff --git a/gcc/ipa-visibility.c b/gcc/ipa-visibility.c index b6bc870b11de..9f136d9069cc 100644 --- a/gcc/ipa-visibility.c +++ b/gcc/ipa-visibility.c @@ -623,7 +623,8 @@ function_and_variable_visibility (bool whole_program) { if (node->get_availability () != AVAIL_INTERPOSABLE || DECL_EXTERNAL (node->decl) - || node->has_aliases_p ()) + || node->has_aliases_p () + || lookup_attribute ("noipa", DECL_ATTRIBUTES (node->decl))) continue; cgraph_node *alias = 0; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a61567618cce..f4fdd0da7a7f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-01-03 Martin Liska + + PR ipa/83594 + * gcc.dg/ipa/pr83594.c: New test. + 2018-01-03 Richard Sandiford Alan Hayward David Sherwood diff --git a/gcc/testsuite/gcc.dg/ipa/pr83594.c b/gcc/testsuite/gcc.dg/ipa/pr83594.c new file mode 100644 index 000000000000..1927c636ec0e --- /dev/null +++ b/gcc/testsuite/gcc.dg/ipa/pr83594.c @@ -0,0 +1,5 @@ +__attribute__((noipa)) +void foo () +{ + foo (); +}