-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Making Unit Tests Work! #28
Comments
Latest version of
|
Result MSYS2:
|
I just pushed two commits to the master branch that update Scanner, AST, Sema and CodeGen to use fixed-width integers (i.e., |
I added the following to
This fixes the problem. |
Since I currently don't have access to my Windows virtual machine, due to Easter travel, I was wondering if you could try the following. If you build the compiler in For example, if I run MODULE ConstLongInt(*Scope:0*);
IMPORT Out;
CONST longintmax(*Scope:1*) = 9223372036854775807(*L*)(*Type:LONGINT*);
longintmin(*Scope:1*) = -9223372036854775808(*L*)(*Type:LONGINT*);
PROCEDURE Test(*Scope:1*)();
BEGIN
Out.Long(9223372036854775807(*L*), 0(*S*));
Out.Ln();
Out.Long(-9223372036854775808(*L*), 0(*S*));
Out.Ln()
END Test;
BEGIN
Test()
END ConstLongInt. The first thing to make sure is that all constant literals are annotated by the correct type ( As the compiler can do more and more, I am currently trying to implement more parts of |
No problem. Output MSYS2:
The Scanner is then OK. Sidenote on VM images: The NativeOberon image is available at. This |
On my Windows machine (VMware, Windows 11, x86_64), I have a strange problem that obfuscates a clear view of the status of the unit tests. The issue is related to some modules failing in JIT mode due to unresolved symbols. Using the MSYS/Clang64 toolchain the missing symbol is I checked the assembly generated by I'm now trying to figure out if and how I can load the libraries into the JIT session that contain these symbols or whether it makes sense to run the optimization pass that removes these calls also in JIT mode. |
I found this problem also and did not find any easy option to turn this off. It seems that on un-optimized Windows build stack protection functions are added by default. In order to solve this I always linked in this libraries on the Windows platform found in these commits 1 and 2. An other option could be just to define some dummy functions covering this and add to JIT symbol table. I understand from reading some LLVM mailing lists that the long-term solution being worked on is a separate |
Interesting! Do you have a link to the mailing list discussion? |
Confirm the fix for the stack protection issue is working for me.
|
Interesting! These results are very different from what I see on the platforms available to me (including MSYS2/Clang64). Have you rebuilt |
Sorry. Stale version of Result is:
|
This issue is intended to track the current state of the unit tests. Below is a summary of all tests that need work. They fall into the Unsupported, Failed, and Unexpectedly Passed categories. For every test, there is a brief summary of the problem or a description of the feature that is missing.
Unsupported
loop_1.mod
:LOOP
andEXIT
statement missing → infinite loopmodule_unterminated.mod
: no terminating dot at end of module → infinite loopprocedure_missing_return.mod
: no error on missing/unreachableRETURN
Failed
arithmetic_12.mod
: data typeBYTE
missingarray_5.mod
: data typePROCEDURE
missingcase_1.mod
:CASE
statement missingloop_2.mod
:LOOP
statement missingsystem_6.mod
: problem inOut.Real
(NaN
instead ofINF
/-INF
)system_7.mod
: problem with signedness of 64-bit hexadecimal valuesfail_on_extra_semicolon.mod
: expected failUnexpectedly Passed
arithmetic_3.mod
: should trigger integer overflow traparithmetic_5.mod
: divisor cannot be negative (cf. O07.8.2.2)arithmetic_6.mod
: divisor cannot be negative (cf. O07.8.2.2)arithmetic_9.mod
: should trigger integer overflow traparithmetic_10.mod
: should trigger division by zero traparithmetic_11.mod
: Oberon has no implicit type conversions, should be disabled by defaultarithmetic_15.mod
: should trigger division by zero traparray_6.mod
: should trigger out-of-bounds trapprocedure_4.mod
: Oberon-07 scoping rules not enforced: intermediate declarations cannot be accessed in nested proceduresif_with_trailing_end.mod
: parser does not complain about superfluousEND
inIF
-ELSIF
-ELSE
statementOverall State
The text was updated successfully, but these errors were encountered: