-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Simple program mixing int and floats fails to compile at the C compilation stage #22888
Comments
Probably a kind of regression; it compiles with 0.20.0 |
!nim c proc dummy*[T: SomeNumber](a: T, b: T = 2.5): T =
result = a
echo dummy(2) |
🐧 Linux bisect by @ringabout (member)devel 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
#define nimfr_(proc, file) \
TFrame FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);
#define nimfrs_(proc, file, slots, length) \
struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename;NI len;VarSlot s[slots];} FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);
#define nimln_(n) \
FR_.line = n;
#define nimlf_(n, file) \
FR_.line = n; FR_.filename = file;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
struct NimStrPayload {
NI cap;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
NI len;
NimStrPayload* p;
};
typedef NimStringV2 tyArray__nHXaesL0DJZHyVS07ARPRA[1];
N_LIB_PRIVATE N_NIMCALL(NimStringV2, dollar___systemZdollars_u8)(NI x_p0);
N_LIB_PRIVATE N_NIMCALL(NI, dummy__temp_u6)(NI a_p0, NI b_p1);
static N_INLINE(void, nimFrame)(TFrame* s_p0);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4661)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NIMCALL(void, echoBinSafe)(NimStringV2* args_p0, NI args_p0Len_0);
N_LIB_PRIVATE N_NOCONV(void, deallocShared)(void* p_p0);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
extern NIM_THREADVAR TFrame* framePtr__system_u4048;
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4445;
static N_INLINE(void, nimFrame)(TFrame* s_p0) {
{
if (!(framePtr__system_u4048 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s_p0).calldepth = ((NI16)0);
}
goto LA1_;
LA3_: ;
{
(*s_p0).calldepth = (NI16)((*framePtr__system_u4048).calldepth + ((NI16)1));
}
LA1_: ;
(*s_p0).prev = framePtr__system_u4048;
framePtr__system_u4048 = s_p0;
{
if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_;
callDepthLimitReached__system_u4661();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__system_u4048 = (*framePtr__system_u4048).prev;
}
N_LIB_PRIVATE N_NIMCALL(NI, dummy__temp_u6)(NI a_p0, NI b_p1) {
NI result;
nimfr_("dummy", "/home/runner/work/Nim/Nim/temp.nim");
result = a_p0;
popFrame();
return result;
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (&nimInErrorMode__system_u4445);
return result;
}
N_LIB_PRIVATE void PreMainInner(void) {
}
N_LIB_PRIVATE int cmdCount;
N_LIB_PRIVATE char** cmdLine;
N_LIB_PRIVATE char** gEnv;
N_LIB_PRIVATE void PreMain(void) {
#if 0
void (*volatile inner)(void);
inner = PreMainInner;
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000();
(*inner)();
#else
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000();
PreMainInner();
#endif
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
#if 0
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
(*inner)();
#else
PreMain();
NimMainInner();
#endif
}
int main(int argc, char** args, char** env) {
cmdLine = args;
cmdCount = argc;
gEnv = env;
NimMain();
return nim_program_result;
}
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) {
{
NimStringV2 colontmpD_;
tyArray__nHXaesL0DJZHyVS07ARPRA T2_;
NI T3_;
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
T3_ = (NI)0;
T3_ = dummy__temp_u6(((NI)2), );
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
colontmpD_ = dollar___systemZdollars_u8(T3_);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
T2_[0] = colontmpD_;
echoBinSafe(T2_, 1);
{
LA1_:;
}
{
if (colontmpD_.p && !(colontmpD_.p->cap & NIM_STRLIT_FLAG)) {
deallocShared(colontmpD_.p);
}
}
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
} Stats
ASTnnkStmtList.newTree(
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("dummy")
),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newIdentNode("SomeNumber"),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newIdentNode("T"),
nnkIdentDefs.newTree(
newIdentNode("a"),
newIdentNode("T"),
newEmptyNode()
),
nnkIdentDefs.newTree(
newIdentNode("b"),
newIdentNode("T"),
newLit(2.5)
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkAsgn.newTree(
newIdentNode("result"),
newIdentNode("a")
)
)
),
nnkCommand.newTree(
newIdentNode("echo"),
nnkCall.newTree(
newIdentNode("dummy"),
newLit(2)
)
)
) stable 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
#define nimfr_(proc, file) \
TFrame FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);
#define nimfrs_(proc, file, slots, length) \
struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename;NI len;VarSlot s[slots];} FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);
#define nimln_(n) \
FR_.line = n;
#define nimlf_(n, file) \
FR_.line = n; FR_.filename = file;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
struct NimStrPayload {
NI cap;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
NI len;
NimStrPayload* p;
};
typedef NimStringV2 tyArray__nHXaesL0DJZHyVS07ARPRA[1];
N_LIB_PRIVATE N_NIMCALL(NimStringV2, dollar___systemZdollars_u8)(NI x_p0);
N_LIB_PRIVATE N_NIMCALL(NI, dummy__temp_u6)(NI a_p0, NI b_p1);
static N_INLINE(void, nimFrame)(TFrame* s_p0);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4607)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NIMCALL(void, echoBinSafe)(NimStringV2* args_p0, NI args_p0Len_0);
N_LIB_PRIVATE N_NOCONV(void, deallocShared)(void* p_p0);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
extern NIM_THREADVAR TFrame* framePtr__system_u4006;
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4389;
static N_INLINE(void, nimFrame)(TFrame* s_p0) {
{
if (!(framePtr__system_u4006 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s_p0).calldepth = ((NI16)0);
}
goto LA1_;
LA3_: ;
{
(*s_p0).calldepth = (NI16)((*framePtr__system_u4006).calldepth + ((NI16)1));
}
LA1_: ;
(*s_p0).prev = framePtr__system_u4006;
framePtr__system_u4006 = s_p0;
{
if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_;
callDepthLimitReached__system_u4607();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__system_u4006 = (*framePtr__system_u4006).prev;
}
N_LIB_PRIVATE N_NIMCALL(NI, dummy__temp_u6)(NI a_p0, NI b_p1) {
NI result;
nimfr_("dummy", "/home/runner/work/Nim/Nim/temp.nim");
result = (NI)0;
result = a_p0;
popFrame();
return result;
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (NIM_BOOL*)0;
result = (&nimInErrorMode__system_u4389);
return result;
}
N_LIB_PRIVATE void PreMainInner(void) {
}
N_LIB_PRIVATE int cmdCount;
N_LIB_PRIVATE char** cmdLine;
N_LIB_PRIVATE char** gEnv;
N_LIB_PRIVATE void PreMain(void) {
#if 0
void (*volatile inner)(void);
inner = PreMainInner;
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatssystemdotnim_Init000();
(*inner)();
#else
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatssystemdotnim_Init000();
PreMainInner();
#endif
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
#if 0
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
(*inner)();
#else
PreMain();
NimMainInner();
#endif
}
int main(int argc, char** args, char** env) {
cmdLine = args;
cmdCount = argc;
gEnv = env;
NimMain();
return nim_program_result;
}
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) {
{
NimStringV2 colontmpD_;
tyArray__nHXaesL0DJZHyVS07ARPRA T2_;
NI T3_;
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
T3_ = (NI)0;
T3_ = dummy__temp_u6(((NI)2), );
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
colontmpD_ = dollar___systemZdollars_u8(T3_);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
T2_[0] = colontmpD_;
echoBinSafe(T2_, 1);
{
LA1_:;
}
{
if (colontmpD_.p && !(colontmpD_.p->cap & NIM_STRLIT_FLAG)) {
deallocShared(colontmpD_.p);
}
}
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
} Stats
ASTnnkStmtList.newTree(
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("dummy")
),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newIdentNode("SomeNumber"),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newIdentNode("T"),
nnkIdentDefs.newTree(
newIdentNode("a"),
newIdentNode("T"),
newEmptyNode()
),
nnkIdentDefs.newTree(
newIdentNode("b"),
newIdentNode("T"),
newLit(2.5)
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkAsgn.newTree(
newIdentNode("result"),
newIdentNode("a")
)
)
),
nnkCommand.newTree(
newIdentNode("echo"),
nnkCall.newTree(
newIdentNode("dummy"),
newLit(2)
)
)
) 2.0.0 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
#define nimfr_(proc, file) \
TFrame FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);
#define nimfrs_(proc, file, slots, length) \
struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename;NI len;VarSlot s[slots];} FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);
#define nimln_(n) \
FR_.line = n;
#define nimlf_(n, file) \
FR_.line = n; FR_.filename = file;
typedef struct NimStrPayload NimStrPayload;
typedef struct NimStringV2 NimStringV2;
struct NimStrPayload {
NI cap;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct NimStringV2 {
NI len;
NimStrPayload* p;
};
typedef NimStringV2 tyArray__nHXaesL0DJZHyVS07ARPRA[1];
N_LIB_PRIVATE N_NIMCALL(NimStringV2, dollar___systemZdollars_u8)(NI x_p0);
N_LIB_PRIVATE N_NIMCALL(NI, dummy__temp_u6)(NI a_p0, NI b_p1);
static N_INLINE(void, nimFrame)(TFrame* s_p0);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4607)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NIMCALL(void, echoBinSafe)(NimStringV2* args_p0, NI args_p0Len_0);
N_LIB_PRIVATE N_NOCONV(void, deallocShared)(void* p_p0);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
extern NIM_THREADVAR TFrame* framePtr__system_u4006;
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4389;
static N_INLINE(void, nimFrame)(TFrame* s_p0) {
{
if (!(framePtr__system_u4006 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s_p0).calldepth = ((NI16)0);
}
goto LA1_;
LA3_: ;
{
(*s_p0).calldepth = (NI16)((*framePtr__system_u4006).calldepth + ((NI16)1));
}
LA1_: ;
(*s_p0).prev = framePtr__system_u4006;
framePtr__system_u4006 = s_p0;
{
if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_;
callDepthLimitReached__system_u4607();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__system_u4006 = (*framePtr__system_u4006).prev;
}
N_LIB_PRIVATE N_NIMCALL(NI, dummy__temp_u6)(NI a_p0, NI b_p1) {
NI result;
nimfr_("dummy", "/home/runner/work/Nim/Nim/temp.nim");
result = (NI)0;
result = a_p0;
popFrame();
return result;
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (NIM_BOOL*)0;
result = (&nimInErrorMode__system_u4389);
return result;
}
N_LIB_PRIVATE void PreMainInner(void) {
}
N_LIB_PRIVATE int cmdCount;
N_LIB_PRIVATE char** cmdLine;
N_LIB_PRIVATE char** gEnv;
N_LIB_PRIVATE void PreMain(void) {
#if 0
void (*volatile inner)(void);
inner = PreMainInner;
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatssystemdotnim_Init000();
(*inner)();
#else
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatssystemdotnim_Init000();
PreMainInner();
#endif
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
#if 0
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
(*inner)();
#else
PreMain();
NimMainInner();
#endif
}
int main(int argc, char** args, char** env) {
cmdLine = args;
cmdCount = argc;
gEnv = env;
NimMain();
return nim_program_result;
}
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) {
{
NimStringV2 colontmpD_;
tyArray__nHXaesL0DJZHyVS07ARPRA T2_;
NI T3_;
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
T3_ = (NI)0;
T3_ = dummy__temp_u6(((NI)2), );
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
colontmpD_ = dollar___systemZdollars_u8(T3_);
if (NIM_UNLIKELY(*nimErr_)) goto LA1_;
T2_[0] = colontmpD_;
echoBinSafe(T2_, 1);
{
LA1_:;
}
{
if (colontmpD_.p && !(colontmpD_.p->cap & NIM_STRLIT_FLAG)) {
deallocShared(colontmpD_.p);
}
}
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
} Stats
ASTnnkStmtList.newTree(
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("dummy")
),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newIdentNode("SomeNumber"),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newIdentNode("T"),
nnkIdentDefs.newTree(
newIdentNode("a"),
newIdentNode("T"),
newEmptyNode()
),
nnkIdentDefs.newTree(
newIdentNode("b"),
newIdentNode("T"),
newLit(2.5)
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkAsgn.newTree(
newIdentNode("result"),
newIdentNode("a")
)
)
),
nnkCommand.newTree(
newIdentNode("echo"),
nnkCall.newTree(
newIdentNode("dummy"),
newLit(2)
)
)
) 1.6.14 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
#include <string.h>
# define nimfr_(proc, file) \
TFrame FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);
# define nimfrs_(proc, file, slots, length) \
struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename; NI len; VarSlot s[slots];} FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);
# define nimln_(n, file) \
FR_.line = n; FR_.filename = file;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
struct TGenericSeq {
NI len;
NI reserved;
};
struct NimStringDesc {
TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
typedef NimStringDesc* tyArray__nHXaesL0DJZHyVS07ARPRA[1];
static N_INLINE(void, nimZeroMem)(void* p, NI size);
static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, dollar___systemZdollars_3)(NI x);
N_LIB_PRIVATE N_NIMCALL(NI, dummy__temp_6)(NI a, NI b);
static N_INLINE(void, nimFrame)(TFrame* s);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_2997)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NIMCALL(void, echoBinSafe)(NimStringDesc** args, NI argsLen_0);
static N_INLINE(void, initStackBottomWith)(void* locals);
N_LIB_PRIVATE N_NOINLINE(void, nimGC_setStackBottom)(void* theStackBottom);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot14atslibatssystemdotnim_DatInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot14atslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
extern TFrame* framePtr__system_2564;
extern TFrame* framePtr__system_2564;
extern TFrame* framePtr__system_2564;
extern TFrame* framePtr__system_2564;
extern TFrame* framePtr__system_2564;
extern TFrame* framePtr__system_2564;
static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size) {
void* T1_;
T1_ = (void*)0;
T1_ = memset(a, v, ((size_t) (size)));
}
static N_INLINE(void, nimZeroMem)(void* p, NI size) {
nimSetMem__systemZmemory_7(p, ((int) 0), size);
}
static N_INLINE(void, nimFrame)(TFrame* s) {
{
if (!(framePtr__system_2564 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s).calldepth = ((NI16) 0);
}
goto LA1_;
LA3_: ;
{
(*s).calldepth = (NI16)((*framePtr__system_2564).calldepth + ((NI16) 1));
}
LA1_: ;
(*s).prev = framePtr__system_2564;
framePtr__system_2564 = s;
{
if (!((*s).calldepth == ((NI16) 2000))) goto LA8_;
callDepthLimitReached__system_2997();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__system_2564 = (*framePtr__system_2564).prev;
}
N_LIB_PRIVATE N_NIMCALL(NI, dummy__temp_6)(NI a, NI b) {
NI result;
nimfr_("dummy", "/home/runner/work/Nim/Nim/temp.nim");
result = (NI)0;
result = a;
popFrame();
return result;
}
static N_INLINE(void, initStackBottomWith)(void* locals) {
nimGC_setStackBottom(locals);
}
N_LIB_PRIVATE void PreMainInner(void) {
}
N_LIB_PRIVATE int cmdCount;
N_LIB_PRIVATE char** cmdLine;
N_LIB_PRIVATE char** gEnv;
N_LIB_PRIVATE void PreMain(void) {
void (*volatile inner)(void);
inner = PreMainInner;
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot14atslibatssystemdotnim_DatInit000();
initStackBottomWith((void *)&inner);
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot14atslibatssystemdotnim_Init000();
(*inner)();
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
initStackBottomWith((void *)&inner);
(*inner)();
}
int main(int argc, char** args, char** env) {
cmdLine = args;
cmdCount = argc;
gEnv = env;
NimMain();
return nim_program_result;
}
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) {
{
tyArray__nHXaesL0DJZHyVS07ARPRA T1_;
NI T2_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimZeroMem((void*)T1_, sizeof(tyArray__nHXaesL0DJZHyVS07ARPRA));
T2_ = (NI)0;
T2_ = dummy__temp_6(((NI) 2), );
T1_[0] = dollar___systemZdollars_3(T2_);
echoBinSafe(T1_, 1);
popFrame();
}
} Stats
ASTnnkStmtList.newTree(
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("dummy")
),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newIdentNode("SomeNumber"),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newIdentNode("T"),
nnkIdentDefs.newTree(
newIdentNode("a"),
newIdentNode("T"),
newEmptyNode()
),
nnkIdentDefs.newTree(
newIdentNode("b"),
newIdentNode("T"),
newLit(2.5)
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkAsgn.newTree(
newIdentNode("result"),
newIdentNode("a")
)
)
),
nnkCommand.newTree(
newIdentNode("echo"),
nnkCall.newTree(
newIdentNode("dummy"),
newLit(2)
)
)
) 1.4.8 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
#include <string.h>
# define nimfr_(proc, file) \
TFrame FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);
# define nimfrs_(proc, file, slots, length) \
struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename; NI len; VarSlot s[slots];} FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);
# define nimln_(n, file) \
FR_.line = n; FR_.filename = file;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
struct TGenericSeq {
NI len;
NI reserved;
};
struct NimStringDesc {
TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
typedef NimStringDesc* tyArray__nHXaesL0DJZHyVS07ARPRA[1];
static N_INLINE(void, nimZeroMem)(void* p, NI size);
static N_INLINE(void, nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory)(void* a, int v, NI size);
N_LIB_PRIVATE N_NIMCALL(NI, dummy__Lr6TyGXZnc1Q7cOHediD3g)(NI a, NI b);
static N_INLINE(void, nimFrame)(TFrame* s);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__mMRdr4sgmnykA9aWeM9aDZlw)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_LIB_PRIVATE N_NIMCALL(void, echoBinSafe)(NimStringDesc** args, NI argsLen_0);
static N_INLINE(void, initStackBottomWith)(void* locals);
N_LIB_PRIVATE N_NOINLINE(void, nimGC_setStackBottom)(void* theStackBottom);
N_LIB_PRIVATE N_NIMCALL(void, systemDatInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, systemInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
static N_INLINE(void, nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory)(void* a, int v, NI size) {
void* T1_;
T1_ = (void*)0;
T1_ = memset(a, v, ((size_t) (size)));
}
static N_INLINE(void, nimZeroMem)(void* p, NI size) {
nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory(p, ((int) 0), size);
}
static N_INLINE(void, nimFrame)(TFrame* s) {
{
if (!(framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw == ((TFrame*) NIM_NIL))) goto LA3_;
(*s).calldepth = ((NI16) 0);
}
goto LA1_;
LA3_: ;
{
(*s).calldepth = (NI16)((*framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw).calldepth + ((NI16) 1));
}
LA1_: ;
(*s).prev = framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw = s;
{
if (!((*s).calldepth == ((NI16) 2000))) goto LA8_;
callDepthLimitReached__mMRdr4sgmnykA9aWeM9aDZlw();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw = (*framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw).prev;
}
N_LIB_PRIVATE N_NIMCALL(NI, dummy__Lr6TyGXZnc1Q7cOHediD3g)(NI a, NI b) {
NI result;
nimfr_("dummy", "/home/runner/work/Nim/Nim/temp.nim");
result = (NI)0;
result = a;
popFrame();
return result;
}
static N_INLINE(void, initStackBottomWith)(void* locals) {
nimGC_setStackBottom(locals);
}
N_LIB_PRIVATE void PreMainInner(void) {
}
N_LIB_PRIVATE int cmdCount;
N_LIB_PRIVATE char** cmdLine;
N_LIB_PRIVATE char** gEnv;
N_LIB_PRIVATE void PreMain(void) {
void (*volatile inner)(void);
inner = PreMainInner;
systemDatInit000();
initStackBottomWith((void *)&inner);
systemInit000();
(*inner)();
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
initStackBottomWith((void *)&inner);
(*inner)();
}
int main(int argc, char** args, char** env) {
cmdLine = args;
cmdCount = argc;
gEnv = env;
NimMain();
return nim_program_result;
}
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) {
{
tyArray__nHXaesL0DJZHyVS07ARPRA T1_;
NI T2_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimZeroMem((void*)T1_, sizeof(tyArray__nHXaesL0DJZHyVS07ARPRA));
T2_ = (NI)0;
T2_ = dummy__Lr6TyGXZnc1Q7cOHediD3g(((NI) 2), );
T1_[0] = nimIntToStr(T2_);
echoBinSafe(T1_, 1);
popFrame();
}
} Stats
ASTnnkStmtList.newTree(
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("dummy")
),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newIdentNode("SomeNumber"),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newIdentNode("T"),
nnkIdentDefs.newTree(
newIdentNode("a"),
newIdentNode("T"),
newEmptyNode()
),
nnkIdentDefs.newTree(
newIdentNode("b"),
newIdentNode("T"),
newLit(2.5)
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkAsgn.newTree(
newIdentNode("result"),
newIdentNode("a")
)
)
),
nnkCommand.newTree(
newIdentNode("echo"),
nnkCall.newTree(
newIdentNode("dummy"),
newLit(2)
)
)
) 1.2.18 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
#include <string.h>
# define nimfr_(proc, file) \
TFrame FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);
# define nimfrs_(proc, file, slots, length) \
struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename; NI len; VarSlot s[slots];} FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);
# define nimln_(n, file) \
FR_.line = n; FR_.filename = file;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
struct TGenericSeq {
NI len;
NI reserved;
};
struct NimStringDesc {
TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
typedef NimStringDesc* tyArray__nHXaesL0DJZHyVS07ARPRA[1];
static N_INLINE(void, nimZeroMem)(void* p, NI size);
static N_INLINE(void, nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory)(void* a, int v, NI size);
N_LIB_PRIVATE N_NIMCALL(NI, dummy__Lr6TyGXZnc1Q7cOHediD3g)(NI a, NI b);
static N_INLINE(void, nimFrame)(TFrame* s);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__mMRdr4sgmnykA9aWeM9aDZlw)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_LIB_PRIVATE N_NIMCALL(void, echoBinSafe)(NimStringDesc** args, NI argsLen_0);
static N_INLINE(void, initStackBottomWith)(void* locals);
N_LIB_PRIVATE N_NOINLINE(void, nimGC_setStackBottom)(void* theStackBottom);
N_LIB_PRIVATE N_NIMCALL(void, systemDatInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, systemInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
static N_INLINE(void, nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory)(void* a, int v, NI size) {
void* T1_;
T1_ = (void*)0;
T1_ = memset(a, v, ((size_t) (size)));
}
static N_INLINE(void, nimZeroMem)(void* p, NI size) {
nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory(p, ((int) 0), size);
}
static N_INLINE(void, nimFrame)(TFrame* s) {
{
if (!(framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw == NIM_NIL)) goto LA3_;
(*s).calldepth = ((NI16) 0);
}
goto LA1_;
LA3_: ;
{
(*s).calldepth = (NI16)((*framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw).calldepth + ((NI16) 1));
}
LA1_: ;
(*s).prev = framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw = s;
{
if (!((*s).calldepth == ((NI16) (((NI) 2000))))) goto LA8_;
callDepthLimitReached__mMRdr4sgmnykA9aWeM9aDZlw();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw = (*framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw).prev;
}
N_LIB_PRIVATE N_NIMCALL(NI, dummy__Lr6TyGXZnc1Q7cOHediD3g)(NI a, NI b) {
NI result;
nimfr_("dummy", "/home/runner/work/Nim/Nim/temp.nim");
result = (NI)0;
result = a;
popFrame();
return result;
}
static N_INLINE(void, initStackBottomWith)(void* locals) {
nimGC_setStackBottom(locals);
}
N_LIB_PRIVATE void PreMainInner(void) {
}
N_LIB_PRIVATE int cmdCount;
N_LIB_PRIVATE char** cmdLine;
N_LIB_PRIVATE char** gEnv;
N_LIB_PRIVATE void PreMain(void) {
void (*volatile inner)(void);
inner = PreMainInner;
systemDatInit000();
initStackBottomWith((void *)&inner);
systemInit000();
(*inner)();
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
initStackBottomWith((void *)&inner);
(*inner)();
}
int main(int argc, char** args, char** env) {
cmdLine = args;
cmdCount = argc;
gEnv = env;
NimMain();
return nim_program_result;
}
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) {
{
tyArray__nHXaesL0DJZHyVS07ARPRA T1_;
NI T2_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimZeroMem((void*)T1_, sizeof(tyArray__nHXaesL0DJZHyVS07ARPRA));
T2_ = (NI)0;
T2_ = dummy__Lr6TyGXZnc1Q7cOHediD3g(((NI) 2), );
T1_[0] = nimIntToStr(T2_);
echoBinSafe(T1_, 1);
popFrame();
}
} Stats
ASTnnkStmtList.newTree(
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("dummy")
),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newIdentNode("SomeNumber"),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newIdentNode("T"),
nnkIdentDefs.newTree(
newIdentNode("a"),
newIdentNode("T"),
newEmptyNode()
),
nnkIdentDefs.newTree(
newIdentNode("b"),
newIdentNode("T"),
newLit(2.5)
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkAsgn.newTree(
newIdentNode("result"),
newIdentNode("a")
)
)
),
nnkCommand.newTree(
newIdentNode("echo"),
nnkCall.newTree(
newIdentNode("dummy"),
newLit(2)
)
)
) 1.0.10 👎 FAILOutput
IRCompiled filesize0 bytes (0 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
#include <string.h>
# define nimfr_(proc, file) \
TFrame FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);
# define nimfrs_(proc, file, slots, length) \
struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename; NI len; VarSlot s[slots];} FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);
# define nimln_(n, file) \
FR_.line = n; FR_.filename = file;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
struct TGenericSeq {
NI len;
NI reserved;
};
struct NimStringDesc {
TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
typedef NimStringDesc* tyArray__nHXaesL0DJZHyVS07ARPRA[1];
static N_INLINE(void, nimZeroMem)(void* p, NI size);
static N_INLINE(void, nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory)(void* a, int v, NI size);
N_LIB_PRIVATE N_NIMCALL(NI, dummy__Lr6TyGXZnc1Q7cOHediD3g)(NI a, NI b);
static N_INLINE(void, nimFrame)(TFrame* s);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__mMRdr4sgmnykA9aWeM9aDZlw)(void);
static N_INLINE(void, popFrame)(void);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_NIMCALL(void, echoBinSafe)(NimStringDesc** args, NI argsLen_0);
static N_INLINE(void, initStackBottomWith)(void* locals);
N_NOINLINE(void, nimGC_setStackBottom)(void* theStackBottom);
N_LIB_PRIVATE N_NIMCALL(void, systemDatInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, systemInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
static N_INLINE(void, nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory)(void* a, int v, NI size) { void* T1_;
T1_ = (void*)0;
T1_ = memset(a, v, ((size_t) (size)));
}
static N_INLINE(void, nimZeroMem)(void* p, NI size) { nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory(p, ((int) 0), size);
}
static N_INLINE(void, nimFrame)(TFrame* s) { NI T1_;
T1_ = (NI)0;
{
if (!(framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw == NIM_NIL)) goto LA4_;
T1_ = ((NI) 0);
}
goto LA2_;
LA4_: ;
{
T1_ = ((NI) ((NI16)((*framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw).calldepth + ((NI16) 1))));
}
LA2_: ;
(*s).calldepth = ((NI16) (T1_));
(*s).prev = framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw = s;
{
if (!((*s).calldepth == ((NI16) (((NI) 2000))))) goto LA9_;
callDepthLimitReached__mMRdr4sgmnykA9aWeM9aDZlw();
}
LA9_: ;
}
static N_INLINE(void, popFrame)(void) { framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw = (*framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw).prev;
}
N_LIB_PRIVATE N_NIMCALL(NI, dummy__Lr6TyGXZnc1Q7cOHediD3g)(NI a, NI b) { NI result;
nimfr_("dummy", "/home/runner/work/Nim/Nim/temp.nim");
result = (NI)0;
result = a;
popFrame();
return result;
}
static N_INLINE(void, initStackBottomWith)(void* locals) { nimGC_setStackBottom(locals);
}
void PreMainInner(void) {
}
int cmdCount;
char** cmdLine;
char** gEnv;
void PreMain(void) {
void (*volatile inner)(void);
inner = PreMainInner;
systemDatInit000();
initStackBottomWith((void *)&inner);
systemInit000();
(*inner)();
}
N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
initStackBottomWith((void *)&inner);
(*inner)();
}
int main(int argc, char** args, char** env) {
cmdLine = args;
cmdCount = argc;
gEnv = env;
NimMain();
return nim_program_result;
}
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) {
{
tyArray__nHXaesL0DJZHyVS07ARPRA T1_;
NI T2_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimZeroMem((void*)T1_, sizeof(tyArray__nHXaesL0DJZHyVS07ARPRA));
T2_ = (NI)0;
T2_ = dummy__Lr6TyGXZnc1Q7cOHediD3g(((NI) 2), );
T1_[0] = nimIntToStr(T2_);
echoBinSafe(T1_, 1);
popFrame();
}
} Stats
ASTnnkStmtList.newTree(
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("dummy")
),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newIdentNode("SomeNumber"),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newIdentNode("T"),
nnkIdentDefs.newTree(
newIdentNode("a"),
newIdentNode("T"),
newEmptyNode()
),
nnkIdentDefs.newTree(
newIdentNode("b"),
newIdentNode("T"),
newLit(2.5)
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkAsgn.newTree(
newIdentNode("result"),
newIdentNode("a")
)
)
),
nnkCommand.newTree(
newIdentNode("echo"),
nnkCall.newTree(
newIdentNode("dummy"),
newLit(2)
)
)
) Stats
🤖 Bug found in |
Gives |
metagn
added a commit
to metagn/Nim
that referenced
this issue
Dec 8, 2024
closes nim-lang#6013, closes nim-lang#7009, closes nim-lang#9190, closes nim-lang#12487, closes nim-lang#12831, closes nim-lang#13184, closes nim-lang#13252, closes nim-lang#14860, closes nim-lang#14877, closes nim-lang#14894, closes nim-lang#14917, closes nim-lang#16153, closes nim-lang#16439, closes nim-lang#17779, closes nim-lang#18074, closes nim-lang#18202, closes nim-lang#18314, closes nim-lang#18648, closes nim-lang#19063, closes nim-lang#19446, closes nim-lang#20065, closes nim-lang#20367, closes nim-lang#22126, closes nim-lang#22820, closes nim-lang#22888, closes nim-lang#23020, closes nim-lang#23287, closes nim-lang#23510
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
The following simple program fails to compile at the C compilation stage. No errors at the nim compilation stage are shown:
The compilation error is:
Mixing ints and floats in this way is of course a dummy thing to do but if this is wrong, I expected an error at the nim compilation stage.
Nim Version
Nim Compiler Version 2.0.0 [Windows: amd64]
Compiled at 2023-08-01
Copyright (c) 2006-2023 by Andreas Rumpf
active boot switches: -d:release
Current Output
Expected Output
Possible Solution
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: