[gcc r17-2576] a68: fix lowering of maxabschar [PR algol68/126330]

"Jose E. Marchesi via Gcc-cvs" <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:a69f9f381f229ae33cb18803d0fa916801b23570

commit r17-2576-ga69f9f381f229ae33cb18803d0fa916801b23570
Author: Jose E. Marchesi <[email protected]>
Date:   Mon Jul 20 23:13:56 2026 +0200

    a68: fix lowering of maxabschar [PR algol68/126330]
    
    Signed-off-by: Jose E. Marchesi <[email protected]>
    
    gcc/algol68/ChangeLog
    
            PR algol68/126330
            * a68-low-chars.cc (a68_char_max): abscharmax is an int, not a
            char.
    
    gcc/testsuite/ChangeLog
    
            * algol68/execute/max-abs-char-1.a68: New test.

Diff:
---
 gcc/algol68/a68-low-chars.cc                     | 2 +-
 gcc/testsuite/algol68/execute/max-abs-char-1.a68 | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/algol68/a68-low-chars.cc b/gcc/algol68/a68-low-chars.cc
index dc01db0f7df8..90aa6f547ecd 100644
--- a/gcc/algol68/a68-low-chars.cc
+++ b/gcc/algol68/a68-low-chars.cc
@@ -55,7 +55,7 @@ tree
 a68_char_max (void)
 {
   /* 0x10FFFF is the maximum valid code point in Unicode.  */
-  return build_int_cst (a68_char_type, 0x10FFFF);
+  return build_int_cst (a68_int_type, 0x10FFFF);
 }
 
 /* Given an integral value, if it denotes a char code build the corresponding
diff --git a/gcc/testsuite/algol68/execute/max-abs-char-1.a68 b/gcc/testsuite/algol68/execute/max-abs-char-1.a68
new file mode 100644
index 000000000000..d4b9789a54e0
--- /dev/null
+++ b/gcc/testsuite/algol68/execute/max-abs-char-1.a68
@@ -0,0 +1 @@
+(assert(maxabschar = ABS 16r10ffff))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.