From: H.J. Lu Date: Thu, 24 May 2018 19:51:09 +0000 (+0000) Subject: Check ifunc_resolver only on FUNCTION_DECL X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e935be363a4309aaf33239b3a8dd2ec6a142dd1b;p=gcc.git Check ifunc_resolver only on FUNCTION_DECL Since ifunc_resolver is only valid on FUNCTION_DECL, check ifunc_resolver only on FUNCTION_DECL. PR target/85900 PR target/85345 * varasm.c (assemble_alias): Check ifunc_resolver only on FUNCTION_DECL. From-SVN: r260683 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4021500e8eb..1ae5e34e460 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2018-05-24 H.J. Lu + + PR target/85900 + PR target/85345 + * varasm.c (assemble_alias): Check ifunc_resolver only on + FUNCTION_DECL. + 2018-05-24 Uros Bizjak PR target/85903 diff --git a/gcc/varasm.c b/gcc/varasm.c index 3bd9cbb69f0..bff43450a91 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -5917,7 +5917,8 @@ assemble_alias (tree decl, tree target) # else if (!DECL_WEAK (decl)) { - if (cgraph_node::get (decl)->ifunc_resolver) + if (TREE_CODE (decl) == FUNCTION_DECL + && cgraph_node::get (decl)->ifunc_resolver) error_at (DECL_SOURCE_LOCATION (decl), "ifunc is not supported in this configuration"); else