GCC Newspaper
JULY 29, 2026
Date
/
Architectures
Components
Topics
News & Policy
algol68

algol68: Fix type of abscharmax when lowering characters

Corrects a type mismatch in algol68 when processing character maximums.

This commit fixes a bug in the Algol68 compiler where the abscharmax value was incorrectly treated as a char instead of an int. This type error occurred during the lowering of character-related operations, and has been corrected by redefining a68_char_max to expect an integer. A new test case is included to verify the fix.

In Details

The a68_char_max function in the Algol68 backend is responsible for determining the maximum value of a character type. This commit corrects a type error where the return value was incorrectly inferred as char instead of int. This impacts the lowering of character operations, ensuring that comparisons and assignments involving character bounds are semantically correct according to the Algol68 language specification.

For Context
algol68
An Algol-based programming language known for its rich type system and powerful features for array manipulation and parallel processing.
lowering
A compiler optimization pass that transforms higher-level intermediate representation (IR) constructs into simpler, more primitive ones closer to machine code.
Filed Under: algol68compiler bug