From: H.J. Lu Date: Sat, 26 May 2018 11:35:31 +0000 (+0000) Subject: Don't check ifunc_resolver on error X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cf3a2c1ac3f7da9efe7f46e6af764f909dc68719;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b6836872b0b..fdfd41ac785 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-05-24 H.J. Lu + + PR target/85900 + PR target/85345 + * varasm.c (assemble_alias): Lookup ifunc attribute on error. + 2018-05-25 Jim Wilson * config/riscv/riscv-protos.h (riscv_epilogue_uses): New. diff --git a/gcc/varasm.c b/gcc/varasm.c index 6b9f87b203f..4d332f50270 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