https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127469
Bug ID: 127469
Summary: ICE when compiling code containing aggregate record
using an array field
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:
$ cat constaggregate.mod
MODULE VT100Test ;
FROM STextIO IMPORT WriteString;
TYPE
callType = RECORD
callNick : ARRAY [0..8] OF CHAR;
callString : ARRAY [0..20] OF CHAR;
END;
CONST (* M2 Iso way *)
cls = CallType { "cls", "callstring" };
(*
CONST
rec : CallType = { "cls", "callstring" };
*)
BEGIN
(* for testing purpose *)
WriteString("hello")
END VT100Test.
$ gm2 constaggregate.mod
terminate called after throwing an instance of 'unsigned int'
cc1gm2: internal compiler error: Aborted
0x2b23ade internal_error(char const*, ...)
../../gcc/diagnostic-global-context.cc:787
0x12a1ce6 crash_signal
../../gcc/toplev.cc:325
0xadd1fb __gnu_cxx::__verbose_terminate_handler()
../../../../libstdc++-v3/libsupc++/vterminate.cc:95
0x2e1b699 __cxxabiv1::__terminate(void (*)())
../../../../libstdc++-v3/libsupc++/eh_terminate.cc:48
0xadd12a std::terminate()
../../../../libstdc++-v3/libsupc++/eh_terminate.cc:58
0x2e1b826 __cxa_throw
../../../../libstdc++-v3/libsupc++/eh_throw.cc:98
0x7d4c71 InvokeHandler
m2/gm2-libs-boot/RTExceptions.c:481
0x7d4c71 RTExceptions_Raise
m2/gm2-libs-boot/RTExceptions.c:943
0xbf36ac invalidloc
m2/gm2-libs-boot/RTExceptions.c:752
0xb95220 isTypeResolved
m2/gm2-compiler-boot/PCSymBuild.c:1350
0xb956d8 WalkConvert
m2/gm2-compiler-boot/PCSymBuild.c:1595
0xb956d8 doWalkNode
m2/gm2-compiler-boot/PCSymBuild.c:1713
0xb97144 doWalkDesExpr
m2/gm2-compiler-boot/PCSymBuild.c:1866
0xb97144 doWalkDes
m2/gm2-compiler-boot/PCSymBuild.c:1888
0xb97144 WalkDes
m2/gm2-compiler-boot/PCSymBuild.c:1952
0xb97144 WalkConsts
m2/gm2-compiler-boot/PCSymBuild.c:1973
0xb97144 PCSymBuild_ResolveConstTypes
m2/gm2-compiler-boot/PCSymBuild.c:3004
0xb3a66e DoPassC
m2/gm2-compiler-boot/M2Comp.c:1510
0xb3a66e Compile
m2/gm2-compiler-boot/M2Comp.c:469
0xb3a66e M2Comp_compile
m2/gm2-compiler-boot/M2Comp.c:1621