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
This commit is contained in:
H.J. Lu 2018-05-26 11:35:31 +00:00 committed by H.J. Lu
parent 4428498341
commit cf3a2c1ac3
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
PR target/85900
PR target/85345
* varasm.c (assemble_alias): Lookup ifunc attribute on error.
2018-05-25 Jim Wilson <jimw@sifive.com>
* config/riscv/riscv-protos.h (riscv_epilogue_uses): New.

View File

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