Skip to content
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

More gcc-14 related changes #166

Merged
merged 4 commits into from
Dec 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions aldor/aldor/src/genc.c
Original file line number Diff line number Diff line change
Expand Up @@ -6119,7 +6119,7 @@ gc0Cast(FoamTag toType, Foam foam)

cc = gccExpr(foam);

if (toType == FOAM_Rec) toType = FOAM_Word;
if (toType == FOAM_Rec) toType = FOAM_Ptr;

if (fromType != FOAM_DFlo && toType == FOAM_DFlo) {
if (fromType != FOAM_Word)
Expand Down Expand Up @@ -6191,7 +6191,7 @@ gc0TypeId(AInt t, AInt fmt)
break;
case FOAM_Rec:
if (fmt == emptyFormatSlot)
cc = ccoTypeIdOf(gcFiWord);
cc = ccoTypeIdOf(gcFiPtr);
else
cc = ccoTypedefId(gc0VarId(gcFmtType, fmt));
break;
Expand Down Expand Up @@ -6446,7 +6446,7 @@ gc0Decl(Foam decl, CCode name)
*/
/*assert(fmt && fmt != emptyFormatSlot);*/
if (!fmt || fmt == emptyFormatSlot) {
ccType = gc0TypeId(FOAM_Word, emptyFormatSlot);
ccType = gc0TypeId(FOAM_Ptr, emptyFormatSlot);
ccDecl = ccoDecl(ccType, name);
}
else {
Expand Down
2 changes: 1 addition & 1 deletion aldor/aldor/src/genfoam.c
Original file line number Diff line number Diff line change
Expand Up @@ -1783,7 +1783,7 @@ gen0ApplySyme(FoamTag type, Syme syme, SImpl impl,
}
else if (gen0IsOpenCallable(syme, impl) &&
listIsSingleton(gen0State->envFormatStack))
foam = gen0OCall(mtype, syme, argc, &args);
foam = gen0OCall(type, syme, argc, &args);
else
foam = gen0CCall(mtype, syme, argc, &args);

Expand Down
5 changes: 3 additions & 2 deletions aldor/aldor/test/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ foamdir = $(abs_top_builddir)/aldor/lib/libfoam
aptests := exquo
fmtests := rectest enumtest clos strtable1 simple apply \
nestcond silly cexp lself0 selfcond lself \
lself2 catdef2 args1a args1 args2a args2
lself2 catdef2 args1a args1 args2a args2 \
rec2
ctests := rectest enumtest multinever maptuple cimp1
otests := enumtest
otests := enumtest rec2
xtests := enumtest jimport cross seq small

out/ao/lself.ao: out/ao/lself0.ao
Expand Down
14 changes: 14 additions & 0 deletions aldor/aldor/test/rec2.as
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include "foamlib"

LRec: with {
new: () -> %;
}
== add {
Elt ==> Record(t: MachineInteger);
Rep ==> List Elt;
import from Rep, Elt, MachineInteger;

emptyRec(): Elt == [0];
new(): % == per[emptyRec()];
}