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
This commit is contained in:
H.J. Lu 2018-05-24 19:51:09 +00:00 committed by H.J. Lu
parent 9635923dc8
commit e935be363a
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,10 @@
2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
PR target/85900
PR target/85345
* varasm.c (assemble_alias): Check ifunc_resolver only on
FUNCTION_DECL.
2018-05-24 Uros Bizjak <ubizjak@gmail.com>
PR target/85903

View file

@ -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