Signed-off-by: Mohammad-Reza Nabipoor <[email protected]>

gcc/algol68/ChangeLog

        PR algol68/123007
        * a68-lang.cc (a68_type_for_mode): Handle TImode.
        (a68_type_for_size): Handle unsigned_intTI_type_node.

---

Hi.

I forgot to add Signed-off-by line!
This patch fixes that.


Regards,
Mohammad-Reza


 gcc/algol68/a68-lang.cc | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gcc/algol68/a68-lang.cc b/gcc/algol68/a68-lang.cc
index c8e0a5767af..482ae39d25c 100644
--- a/gcc/algol68/a68-lang.cc
+++ b/gcc/algol68/a68-lang.cc
@@ -263,6 +263,9 @@ a68_option_lang_mask (void)
 static tree
 a68_type_for_mode (enum machine_mode mode, int unsignedp)
 {
+  if (mode == TImode)
+    return unsignedp ? unsigned_intTI_type_node : intTI_type_node;
+
   if (mode == QImode)
     return unsignedp ? a68_short_short_bits_type :a68_short_short_int_type;
 
@@ -319,6 +322,11 @@ a68_type_for_size (unsigned int bits, int unsignedp)
 {
   if (unsignedp)
     {
+      /* Handle TImode as a special case because it is used by some backends
+        (e.g. ARM) even though it is not available for normal use.  */
+      if (bits == TYPE_PRECISION (unsigned_intTI_type_node))
+       return unsigned_intTI_type_node;
+
       if (bits <= TYPE_PRECISION (a68_short_short_bits_type))
        return a68_short_short_bits_type;
       if (bits <= TYPE_PRECISION (a68_short_bits_type))
-- 
2.52.0

Reply via email to