diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2019-08-21 07:53:44 +0000 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gcc.gnu.org> | 2019-08-21 07:53:44 +0000 |
commit | 7cc9cfd2ca8c526661da7f040e80cbd2bc597645 (patch) | |
tree | 66404cd02ad01cc2b6532b4c12fad505237f528d | |
parent | de83a4c14b4715f4ecd42d3f3024edf31ae8d714 (diff) | |
download | gcc-7cc9cfd2ca8c526661da7f040e80cbd2bc597645.zip gcc-7cc9cfd2ca8c526661da7f040e80cbd2bc597645.tar.gz gcc-7cc9cfd2ca8c526661da7f040e80cbd2bc597645.tar.bz2 |
d: Partially fix ICE: in register_moduleinfo, at d/modules.cc:40
gcc/d/ChangeLog:
PR d/88722
* modules.cc: Include diagnostic.h.
(register_moduleinfo): Use sorry instead of gcc_assert for targets
without named sections.
From-SVN: r274769
-rw-r--r-- | gcc/d/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/d/modules.cc | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/d/ChangeLog b/gcc/d/ChangeLog index 011b0d4..a7821c2 100644 --- a/gcc/d/ChangeLog +++ b/gcc/d/ChangeLog @@ -1,5 +1,12 @@ 2019-08-20 Iain Buclaw <ibuclaw@gdcproject.org> + PR d/88722 + * modules.cc: Include diagnostic.h. + (register_moduleinfo): Use sorry instead of gcc_assert for targets + without named sections. + +2019-08-20 Iain Buclaw <ibuclaw@gdcproject.org> + * d-target.cc: Include diagnostic.h. (Target::_init): Set Tsize_t and Tptrdiff_t as D ushort and short if the target pointer size is 2. Add sorry if the pointer size is not diff --git a/gcc/d/modules.cc b/gcc/d/modules.cc index 88cc5e8..a25e06a 100644 --- a/gcc/d/modules.cc +++ b/gcc/d/modules.cc @@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see #include "dmd/module.h" #include "tree.h" +#include "diagnostic.h" #include "fold-const.h" #include "tm.h" #include "function.h" @@ -404,7 +405,8 @@ build_dso_registry_var (const char * name, tree type) static void register_moduleinfo (Module *decl, tree minfo) { - gcc_assert (targetm_common.have_named_sections); + if (!targetm_common.have_named_sections) + sorry ("%<-fmoduleinfo%> is not supported on this target"); /* Build the ModuleInfo reference, this is done once for every Module. */ tree ident = mangle_internal_decl (decl, "__moduleRef", "Z"); |