From: Iain Buclaw Date: Wed, 21 Aug 2019 07:53:15 +0000 (+0000) Subject: d: Fix internal compiler error: in d_build_c_type_nodes, at d/d-builtins.cc:783 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7610ae806e4f611379766c1dca98e360b206665c;p=gcc.git d: Fix internal compiler error: in d_build_c_type_nodes, at d/d-builtins.cc:783 gcc/d/ChangeLog: PR d/90445 * d-builtins.cc (d_build_c_type_nodes): Test UINTMAX_TYPE for setting uintmax_type_node. Set signed_size_type_node as the signed_type_for size_type_node. From-SVN: r274766 --- diff --git a/gcc/d/ChangeLog b/gcc/d/ChangeLog index 00845df4de1..6b692f5cf35 100644 --- a/gcc/d/ChangeLog +++ b/gcc/d/ChangeLog @@ -1,3 +1,10 @@ +2019-08-20 Iain Buclaw + + PR d/90445 + * d-builtins.cc (d_build_c_type_nodes): Test UINTMAX_TYPE for setting + uintmax_type_node. Set signed_size_type_node as the signed_type_for + size_type_node. + 2019-08-20 Iain Buclaw PR d/90444 diff --git a/gcc/d/d-builtins.cc b/gcc/d/d-builtins.cc index 5619ebb1a09..2f7319c1eff 100644 --- a/gcc/d/d-builtins.cc +++ b/gcc/d/d-builtins.cc @@ -762,27 +762,25 @@ d_build_c_type_nodes (void) = build_pointer_type (build_qualified_type (char_type_node, TYPE_QUAL_CONST)); - if (strcmp (SIZE_TYPE, "unsigned int") == 0) + if (strcmp (UINTMAX_TYPE, "unsigned int") == 0) { intmax_type_node = integer_type_node; uintmax_type_node = unsigned_type_node; - signed_size_type_node = integer_type_node; } - else if (strcmp (SIZE_TYPE, "long unsigned int") == 0) + else if (strcmp (UINTMAX_TYPE, "long unsigned int") == 0) { intmax_type_node = long_integer_type_node; uintmax_type_node = long_unsigned_type_node; - signed_size_type_node = long_integer_type_node; } - else if (strcmp (SIZE_TYPE, "long long unsigned int") == 0) + else if (strcmp (UINTMAX_TYPE, "long long unsigned int") == 0) { intmax_type_node = long_long_integer_type_node; uintmax_type_node = long_long_unsigned_type_node; - signed_size_type_node = long_long_integer_type_node; } else gcc_unreachable (); + signed_size_type_node = signed_type_for (size_type_node); wint_type_node = unsigned_type_node; pid_type_node = integer_type_node; }