GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
gcc/algol68

Fix pow builtin selection in a68_real_pow for algol68

Algol68 compiler now correctly selects the pow builtin by checking operand modes, fixing a regression that incorrectly distinguished integers from reals.

This commit corrects a regression in the Algol68 compiler where a previous change incorrectly distinguished between integer and real types due to mode precision issues. The a68_real_pow function now correctly selects the pow builtin by checking the mode of the second operand, resolving a bug that affected targets with limited mode precision.

In Details

The a68_real_pow function in the Algol68 frontend was incorrectly selecting the generic pow builtin due to a regression (r17-4978-g0cb6acb4fc5a285928a191ced403e0c27776344b) that masked precision differences between int and real modes. This fix modifies the selection logic to explicitly check the mode of the second operand, ensuring the correct builtin is invoked even when modes are nearly indistinguishable.

For Context
builtin
A function or operation that is built directly into the compiler and does not require separate compilation or linking.
mode
In compiler terminology, a 'mode' refers to the data type and size of a value, such as integer, floating-point, or vector types. Different CPU architectures have different modes they support efficiently.
Filed Under: algol68compilerbugfix