diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2018-05-26 11:35:31 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2018-05-26 04:35:31 -0700 |
commit | cf3a2c1ac3f7da9efe7f46e6af764f909dc68719 (patch) | |
tree | 81e9396598acd173c142182d7f93d2d5a0be467b | |
parent | 442849834153349b690041dfdfa81cadae20faa6 (diff) | |
download | gcc-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
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/varasm.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b683687..fdfd41a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. 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 |