aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2018-05-26 11:35:31 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2018-05-26 04:35:31 -0700
commitcf3a2c1ac3f7da9efe7f46e6af764f909dc68719 (patch)
tree81e9396598acd173c142182d7f93d2d5a0be467b /gcc/varasm.c
parent442849834153349b690041dfdfa81cadae20faa6 (diff)
downloadgcc-cf3a2c1ac3f7da9efe7f46e6af764f909dc68719.zip
gcc-cf3a2c1ac3f7da9efe7f46e6af764f909dc68719.tar.gz
gcc-cf3a2c1ac3f7da9efe7f46e6af764f909dc68719.tar.bz2
Don't check ifunc_resolver on error
Since ifunc_resolver isn't set when an error is detected, we should lookup ifunc attribute in this case. PR target/85900 PR target/85345 * varasm.c (assemble_alias): Lookup ifunc attribute on error. From-SVN: r260792
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 6b9f87b..4d332f5 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -5917,8 +5917,9 @@ assemble_alias (tree decl, tree target)
# else
if (!DECL_WEAK (decl))
{
+ /* NB: ifunc_resolver isn't set when an error is detected. */
if (TREE_CODE (decl) == FUNCTION_DECL
- && cgraph_node::get (decl)->ifunc_resolver)
+ && lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)))
error_at (DECL_SOURCE_LOCATION (decl),
"ifunc is not supported in this configuration");
else