gm2
[Top][All Lists]
Advanced

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

Re: An ICE that does not generate a full report


From: Alice Osako
Subject: Re: An ICE that does not generate a full report
Date: Sun, 7 Apr 2024 11:53:27 -0400
User-agent: Mozilla Thunderbird

Oh, and note that the constants in CardMath.mod are not used for their own values as such, but rather (AFAICT) are used to compute the number of bits in a CARDINAL on a given platform, and the maximum number of decimal digits it can represent. The ones in Size.def are used to determine the bitwidth for the largest scalar supported by the compiler/system.

Alice Osako:
Gaius Mulley:
I'm now seeing it compile:

$ gm2 -g -c BasicFileSys.mod -I../../../../Sandpit/gm2-outside-tree-tests/build/source/m2pp/src/ -fsources
Compiling: BasicFileSys.mod
Pass 0: lexical analysis, parsing, modules and associated filenames
   Module SYSTEM               : /home/gaius/opt/lib/gcc/x86_64-pc-linux-gnu/14.0.1/m2/m2cor/SYSTEM.def [m2cor]
   Module M2RTS                : /home/gaius/opt/lib/gcc/x86_64-pc-linux-gnu/14.0.1/m2/m2pim/M2RTS.def [m2pim]
   Module RTExceptions         : /home/gaius/opt/lib/gcc/x86_64-pc-linux-gnu/14.0.1/m2/m2pim/RTExceptions.def [m2pim]
   Module BasicFileSys         : ../../../../Sandpit/gm2-outside-tree-tests/build/source/m2pp/src/BasicFileSys.def
   Module BasicFileSys         : BasicFileSys.mod
   Module COROUTINES           : /home/gaius/opt/lib/gcc/x86_64-pc-linux-gnu/14.0.1/m2/m2pim/COROUTINES.def [m2pim] (for C)
   Module Size                 : ./Size.def
   Module stat                 : ./stat.def
   Module stdio                : ./stdio.def (for C)
   Module unistd               : ./unistd.def (for C)
   Module fcntl                : ./fcntl.def (for C)
   Module stat0                : ./stat0.def (for C)
   Module SysTypes             : ./SysTypes.def
Pass 1: scopes, enumerated types, imports and exports
Pass 2: constants and types
Pass C: aggregate constants
Pass 3: quadruple generation
Pass 4: gcc tree generation
        symbols to gcc trees
        statements to gcc trees
        gcc trees given to the gcc backend

Thank you!

However, when I try to compile it, I get the following error:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gm2 -g -fiso -freport-bug -fdebug-function-line-numbers -fsources -Isrc/ -c src/imp/BasicFileSys.mod \
-o obj/BasicFileSys.o
Compiling: src/imp/BasicFileSys.mod
Pass 0: lexical analysis, parsing, modules and associated filenames
   Module SYSTEM               : /home/schol-r-lea/opt/lib/gcc/x86_64-pc-linux-gnu/14.0.1/m2/m2iso/SYSTEM.def [m2iso]
   Module M2RTS                : /home/schol-r-lea/opt/lib/gcc/x86_64-pc-linux-gnu/14.0.1/m2/m2iso/M2RTS.def [m2iso]
   Module RTExceptions         : /home/schol-r-lea/opt/lib/gcc/x86_64-pc-linux-gnu/14.0.1/m2/m2pim/RTExceptions.def [m2pim]
   Module BasicFileSys         : src/BasicFileSys.def
   Module BasicFileSys         : src/imp/BasicFileSys.mod
   Module Size                 : src/Size.def
   Module stat                 : src/stat.def
   Module stdio                : src/stdio.def (for C)
   Module unistd               : src/unistd.def (for C)
   Module fcntl                : src/fcntl.def (for C)
   Module stat0                : src/stat0.def (for C)
   Module SysTypes             : src/SysTypes.def
Pass 1: scopes, enumerated types, imports and exports
Pass 2: constants and types
Pass C: aggregate constants
Pass 3: quadruple generation
Pass 4: gcc tree generation
        symbols to gcc trees
cc1gm2: error: In definition module ‘BasicFileSys’: constant ‘BW8’ should not be reassigned
cc1gm2: error: constant ‘BW128’ should not be reassigned
cc1gm2: error: constant ‘BW120’ should not be reassigned
cc1gm2: error: constant ‘BW112’ should not be reassigned
cc1gm2: error: constant ‘BW104’ should not be reassigned
cc1gm2: error: constant ‘BW96’ should not be reassigned
cc1gm2: error: constant ‘BW88’ should not be reassigned
cc1gm2: error: constant ‘BW80’ should not be reassigned
cc1gm2: error: constant ‘BW72’ should not be reassigned
cc1gm2: error: constant ‘BW64’ should not be reassigned
cc1gm2: error: constant ‘BW56’ should not be reassigned
cc1gm2: error: constant ‘BW48’ should not be reassigned
cc1gm2: error: constant ‘BW40’ should not be reassigned
cc1gm2: error: constant ‘BW32’ should not be reassigned
cc1gm2: error: constant ‘BW24’ should not be reassigned
cc1gm2: error: constant ‘BW16’ should not be reassigned

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

The constants in question are all defined in Size.def, and are not redefined or even imported in either BasicFileSys.def or BasicFileSys.mod; however, they are defined slightly differently in CardMath.mod, which also gives the same error even though it doesn't import Size.def.

I checked that the -fiso option was not the deciding factor in this, and it wasn't. I'm not sure why it is behaving differently on my system.



reply via email to

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