gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gm2 internal compiler error report


From: Alice Osako
Subject: Re: gm2 internal compiler error report
Date: Thu, 14 Mar 2024 11:03:08 -0400
User-agent: Mozilla Thunderbird

Gaius Mulley:
Thanks for the bug report - I believe this is fixed in the latest git
gcc repro (gcc-14):

$ gm2 -g -Idefs -fiso -c impls/UTF8.mod 
impls/UTF8.mod:47:13: error: In procedure ‘GetExtChar’: type incompatibility between ‘CARDINAL’ and ‘BYTE’
   47 |    RETURN b - {7, 6};
      |           ~~^~~~~~~~

$ gm2 --version
gm2 (GCC) 14.0.1 20240308 (experimental)

I'll back port the fix to gm2 13.2

OK, I tried the latest build of gm2, which according to the GCC git summary includes the fix you mentioned, and I continued to get an internal compiler error.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Target: x86_64-pc-linux-gnu
// Configured with: /home/schol-r-lea/Deployments/gm2/gcc/configure --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --prefix=/home/schol-r-lea/opt --bindir=/home/schol-r-lea/opt/bin --libdir=/home/schol-r-lea/opt/lib --libexecdir=/home/schol-r-lea/opt/lib --enable-threads=posix --enable-clocale=gnu --disable-multilib --disable-bootstrap --enable-checking --enable-languages=m2 : (reconfigured) /home/schol-r-lea/Deployments/gm2/gcc/configure --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --prefix=/home/schol-r-lea/opt --bindir=/home/schol-r-lea/opt/bin --libdir=/home/schol-r-lea/opt/lib --libexecdir=/home/schol-r-lea/opt/lib --enable-threads=posix --enable-clocale=gnu --disable-multilib --disable-bootstrap --enable-checking --enable-languages=m2
// Thread model: posix
// Supported LTO compression algorithms: zlib zstd
// gcc version 13.2.1 20240314 (GCC)
//
//  _M2_UTF8_init _M2_UTF8_fini
// -quiet: internal compiler error: not expecting this kind of symbol
// 0x1f081d7 internal_error(char const*, ...)
//     ???:0
// 0x8cbdc2 m2linemap_internal_error
//     ???:0
// 0x99669b M2Emit_InternalError
//     ???:0
// 0x8f60ee M2Error_InternalError
//     ???:0
// 0x9573b3 SymbolTable_IsValueSolved
//     ???:0
// 0x8e206d M2ALU_TryEvaluateValue
//     ???:0
// 0x8fb656 M2GCCDeclare_TryDeclareConstructor
//     ???:0
// 0x8fb6c2 M2GCCDeclare_TryDeclareConstant
//     ???:0
// 0x90701e M2GenGCC_ResolveConstantExpressions
//     ???:0
// 0x938c6c M2Scope_ForeachScopeBlockDo
//     ???:0
// 0x8f23c2 M2Code_CodeBlock
//     ???:0
// 0x8dfb2a Lists_ForeachItemInListDo
//     ???:0
// 0x8f2536 M2Code_CodeBlock
//     ???:0
// 0x8f28da M2Code_Code
//     ???:0
// 0x8f3751 M2Comp_compile
//     ???:0
// Please submit a full bug report, with preprocessed source.
// Please include the complete backtrace with any bug report.
// See <https://gcc.gnu.org/bugs/> for instructions.

// /home/schol-r-lea/opt/lib/gcc/x86_64-pc-linux-gnu/13.2.1/cc1gm2 -quiet -dumpbase UTF8.mod -dumpbase-ext .mod -mtune=generic -march=x86-64 -g -fiso -freport-bug -fm2-pathname=- -fm2-pathnameIdefs/ -fm2-pathnameI. -fscaffold-dynamic -flibs=m2iso,m2cor,m2pim,m2log -fm2-pathname=- -fm2-pathnameIdefs/ -fm2-pathnameI. impls/UTF8.mod -c -o - -frandom-seed=0 -fdump-noaddr


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The current version of the code is which seems to breaking is:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(* in the definition file *)
TYPE
   Octet = PACKEDSET OF CARDINAL [0 .. 0FFH];
   UTF8Buffer = ARRAY [0..3] OF Octet;

(* in the implementation file  *)
PROCEDURE GetSubChar(b: Octet): Octet;
BEGIN
   RETURN b - {6..7};
END GetSubChar;

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Again, the repo for the whole can be found at https://github.com/Schol-R-LEA/UNICODE-For-Modula-2/

Sorry to keep bothering you with this.
reply via email to

[Prev in Thread] Current Thread [Next in Thread]