https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128891
Bug ID: 128891
Summary: ICE when attempting a conversion from REAL32 to REAL64
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:
$ gm2 floatcheck.mod
c1gm2: internal compiler error: expecting type of constant to be a whole number
0x3e971a6 internal_error(char const*, ...)
../../gcc/diagnostic-global-context.cc:787
0x11e1ff6 m2linemap_internal_error
../../gcc/m2/gm2-gcc/m2linemap.cc:257
0x12e0a7c M2Emit_InternalError
m2/gm2-compiler-boot/M2Emit.c:104
0x121fd00 M2Error_InternalError
m2/gm2-compiler-boot/M2Error.c:1036
0x120946e M2ALU_PopIntegerTree
m2/gm2-compiler-boot/M2ALU.c:4892
0x123c0ec PopKindTree
m2/gm2-compiler-boot/M2GenGCC.c:9235
0x123c3ea FoldConvert
m2/gm2-compiler-boot/M2GenGCC.c:9310
0x123fce6 M2GenGCC_ResolveConstantExpressions
m2/gm2-compiler-boot/M2GenGCC.c:10960
0x122d97a M2GCCDeclare_FoldConstants
m2/gm2-compiler-boot/M2GCCDeclare.c:8577
...
$ cat floatcheck.mod
MODULE floatcheck ;
FROM SYSTEM IMPORT
REAL32, REAL64;
VAR x: REAL64;
BEGIN
x := VAL(REAL64, MIN(REAL32))
END floatcheck.