aboutsummaryrefslogtreecommitdiff
path: root/gcc/d/modules.cc
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2023-10-29 00:27:49 +0200
committerIain Buclaw <ibuclaw@gdcproject.org>2023-10-29 00:36:30 +0200
commit10f1489dcb3bd9adccc88898bc12f53398fa3583 (patch)
tree34a837c0418846d2fd1ec9562c0bd067cd515122 /gcc/d/modules.cc
parent5d2a360f0a541646abb11efdbabc33c6a04de7ee (diff)
downloadgcc-10f1489dcb3bd9adccc88898bc12f53398fa3583.zip
gcc-10f1489dcb3bd9adccc88898bc12f53398fa3583.tar.gz
gcc-10f1489dcb3bd9adccc88898bc12f53398fa3583.tar.bz2
d: Fix ICE: in verify_gimple_in_seq on powerpc-darwin9 [PR112270]
This ICE was seen during stage2 on powerpc-darwin9 only. There were still some uses of GCC's boolean_type_node in the D front-end, which caused a type mismatch to trigger as D bool size is fixed to 1 byte on all targets. So two new nodes have been introduced - d_bool_false_node and d_bool_true_node - which have replaced all remaining uses of boolean_false_node and boolean_true_node respectively. PR d/112270 gcc/d/ChangeLog: * d-builtins.cc (d_build_d_type_nodes): Initialize d_bool_false_node, d_bool_true_node. * d-codegen.cc (build_array_struct_comparison): Use d_bool_false_node instead of boolean_false_node. * d-convert.cc (d_truthvalue_conversion): Use d_bool_false_node and d_bool_true_node instead of boolean_false_node and boolean_true_node. * d-tree.h (enum d_tree_index): Add DTI_BOOL_FALSE and DTI_BOOL_TRUE. (d_bool_false_node): New macro. (d_bool_true_node): New macro. * modules.cc (build_dso_cdtor_fn): Use d_bool_false_node and d_bool_true_node instead of boolean_false_node and boolean_true_node. (register_moduleinfo): Use d_bool_type instead of boolean_type_node. gcc/testsuite/ChangeLog: * gdc.dg/pr112270.d: New test.
Diffstat (limited to 'gcc/d/modules.cc')
-rw-r--r--gcc/d/modules.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/d/modules.cc b/gcc/d/modules.cc
index 8d6c8f0..e3c1ef9 100644
--- a/gcc/d/modules.cc
+++ b/gcc/d/modules.cc
@@ -330,7 +330,7 @@ static tree
build_dso_cdtor_fn (bool ctor_p)
{
const char *name = ctor_p ? GDC_PREFIX ("dso_ctor") : GDC_PREFIX ("dso_dtor");
- tree condition = ctor_p ? boolean_true_node : boolean_false_node;
+ tree condition = ctor_p ? d_bool_true_node : d_bool_false_node;
/* Declaration of dso_ctor/dso_dtor is:
@@ -453,7 +453,7 @@ register_moduleinfo (Module *decl, tree minfo)
d_finish_decl (dso_slot_node);
dso_initialized_node = build_dso_registry_var (GDC_PREFIX ("dso_initialized"),
- boolean_type_node);
+ d_bool_type);
d_finish_decl (dso_initialized_node);
/* Declare dso_ctor() and dso_dtor(). */