]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
a68: handle TImode in a68_type_for_{mode,size}
authorMohammad-Reza Nabipoor <mnabipoor@gnu.org>
Sat, 17 Jan 2026 02:36:47 +0000 (03:36 +0100)
committerJose E. Marchesi <jemarch@gnu.org>
Sat, 17 Jan 2026 03:32:33 +0000 (04:32 +0100)
Signed-off-by: Mohammad-Reza Nabipoor <mnabipoor@gnu.org>
gcc/algol68/ChangeLog

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

gcc/algol68/a68-lang.cc

index c8e0a5767af5e53c83f071f67792a2dab8f9da09..482ae39d25c704508fb7ed1c5bc7c084412543d0 100644 (file)
@@ -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))