https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128863
Bug ID: 128863
Summary: Using function in a const expression causes ICE
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: modula2
Assignee: gaius at gcc dot gnu.org
Reporter: gaius at gcc dot gnu.org
Target Milestone: ---
Forwarded from the gm2 mailing list:
> ... the second
> line in the CONST declaration seems not allowed because of the
> ln function. However, GM2 just generates an ICE instead of a
> 'normal' error message.
MODULE test1;
FROM RealMath IMPORT
ln;
CONST
some_constant= 123456;
some_constant_nr_digits = TRUNC(ln(FLOAT(some_constant)) / ln(10.0)) + 1;
BEGIN
END test1.