From: Jose E. Marchesi Date: Fri, 6 Feb 2026 23:43:41 +0000 (+0100) Subject: a68: fix lowering of unicode characters in denotations X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a76477daed80ca3a423c6e01822a2f98ec149bf;p=thirdparty%2Fgcc.git a68: fix lowering of unicode characters in denotations Signed-off-by: Jose E. Marchesi gcc/algol68/ChangeLog * a68-low-units.cc (a68_lower_denotation): Fix call to a68_u8_mbtouc. --- diff --git a/gcc/algol68/a68-low-units.cc b/gcc/algol68/a68-low-units.cc index 5aa0c97dad3..c5ae0d47328 100644 --- a/gcc/algol68/a68-low-units.cc +++ b/gcc/algol68/a68-low-units.cc @@ -224,9 +224,10 @@ a68_lower_denotation (NODE_T *p, LOW_CTX_T ctx) else if (moid == M_CHAR) { char *s = a68_string_process_breaks (p, NSYMBOL (p)); + int num_units = strlen (s); uint32_t ucs; - int length = a68_u8_mbtouc (&ucs, (const uint8_t *) s, 1); - gcc_assert (length == 1); + int length = a68_u8_mbtouc (&ucs, (const uint8_t *) s, num_units); + gcc_assert (length == num_units); free (s); return build_int_cst (a68_char_type, ucs); }