Giter Club home page Giter Club logo

Comments (4)

juancarlospaco avatar juancarlospaco commented on June 2, 2024 1

!nim c

var x: int8
x = 256
echo x

from nim.

metagn avatar metagn commented on June 2, 2024 1

Maybe caused by the new type inference? (the type of 256 is changed from int literal to int8 without any checks)

Edit: changeType with check=true is called but maybe this doesn't account for int8

from nim.

beef331 avatar beef331 commented on June 2, 2024

Errors as intended in 1.6.16 but works in 1.6.18

from nim.

github-actions avatar github-actions commented on June 2, 2024
🐧 Linux bisect by @juancarlospaco (collaborator)
devel 👍 OK

Output

0

IR

Compiled filesize 93.19 Kb (95,424 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(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);
static N_INLINE(void, nimFrame)(TFrame* s_p0);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4666)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
N_LIB_PRIVATE NI8 x__temp_u1;
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4450;
extern NIM_THREADVAR TFrame* framePtr__system_u4053;
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
 NIM_BOOL* result;
 result = (&nimInErrorMode__system_u4450);
 return result;
}
static N_INLINE(void, nimFrame)(TFrame* s_p0) {
 {
  if (!(framePtr__system_u4053 == ((TFrame*) NIM_NIL))) goto LA3_;
  (*s_p0).calldepth = ((NI16)0);
 }
 goto LA1_;
LA3_: ;
 {
  (*s_p0).calldepth = (NI16)((*framePtr__system_u4053).calldepth + ((NI16)1));
 }
LA1_: ;
 (*s_p0).prev = framePtr__system_u4053;
 framePtr__system_u4053 = s_p0;
 {
  if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_;
  callDepthLimitReached__system_u4666();
 }
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
 framePtr__system_u4053 = (*framePtr__system_u4053).prev;
}
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_;
NIM_BOOL* nimErr_;
 nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
 colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
 x__temp_u1 = ((NI8)256);
 colontmpD_ = dollar___systemZdollars_u8(((NI) (x__temp_u1)));
 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

  • Started 2024-01-07T00:17:03
  • Finished 2024-01-07T00:17:04
  • Duration
stable 👍 OK

Output

0

IR

Compiled filesize 90.92 Kb (93,104 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(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);
static N_INLINE(void, nimFrame)(TFrame* s_p0);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4621)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
N_LIB_PRIVATE NI8 x__temp_u1;
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4403;
extern NIM_THREADVAR TFrame* framePtr__system_u4020;
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
 NIM_BOOL* result;
 result = (&nimInErrorMode__system_u4403);
 return result;
}
static N_INLINE(void, nimFrame)(TFrame* s_p0) {
 {
  if (!(framePtr__system_u4020 == ((TFrame*) NIM_NIL))) goto LA3_;
  (*s_p0).calldepth = ((NI16)0);
 }
 goto LA1_;
LA3_: ;
 {
  (*s_p0).calldepth = (NI16)((*framePtr__system_u4020).calldepth + ((NI16)1));
 }
LA1_: ;
 (*s_p0).prev = framePtr__system_u4020;
 framePtr__system_u4020 = s_p0;
 {
  if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_;
  callDepthLimitReached__system_u4621();
 }
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
 framePtr__system_u4020 = (*framePtr__system_u4020).prev;
}
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;
 atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000();
 (*inner)();
#else
 atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_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_;
NIM_BOOL* nimErr_;
 nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
 colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
 x__temp_u1 = ((NI8)256);
 colontmpD_ = dollar___systemZdollars_u8(((NI) (x__temp_u1)));
 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

  • Started 2024-01-07T00:17:04
  • Finished 2024-01-07T00:17:05
  • Duration
2.0.0 👍 OK

Output

0

IR

Compiled filesize 90.91 Kb (93,096 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(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);
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, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
N_LIB_PRIVATE NI8 x__temp_u1;
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4389;
extern NIM_THREADVAR TFrame* framePtr__system_u4006;
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
 NIM_BOOL* result;
 result = (NIM_BOOL*)0;
 result = (&nimInErrorMode__system_u4389);
 return result;
}
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 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_;
NIM_BOOL* nimErr_;
 nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
 colontmpD_.len = 0; colontmpD_.p = NIM_NIL;
 x__temp_u1 = ((NI8)256);
 colontmpD_ = dollar___systemZdollars_u8(((NI) (x__temp_u1)));
 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

  • Started 2024-01-07T00:17:08
  • Finished 2024-01-07T00:17:08
  • Duration
1.6.14 👍 OK

Output

0

IR

Compiled filesize 95.75 Kb (98,048 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(void, echoBinSafe)(NimStringDesc** args, NI argsLen_0);
static N_INLINE(void, initStackBottomWith)(void* locals);
N_LIB_PRIVATE N_NOINLINE(void, nimGC_setStackBottom)(void* theStackBottom);
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, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot14atslibatssystemdotnim_DatInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot14atslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
N_LIB_PRIVATE NI8 x__temp_1;
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, initStackBottomWith)(void* locals) {
 nimGC_setStackBottom(locals);
}
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 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_;
 nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
 x__temp_1 = ((NI8) 256);
 nimZeroMem((void*)T1_, sizeof(tyArray__nHXaesL0DJZHyVS07ARPRA));
 T1_[0] = dollar___systemZdollars_3(((NI) (x__temp_1)));
 echoBinSafe(T1_, 1);
 popFrame();
}
}

Stats

  • Started 2024-01-07T00:17:10
  • Finished 2024-01-07T00:17:11
  • Duration
1.4.8 👎 FAIL

Output

Error: Command failed: nim c --run  -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
/home/runner/work/Nim/Nim/temp.nim(2, 5) Error: type mismatch: got <int literal(256)> but expected 'int8'

IR

Compiled filesize 95.75 Kb (98,048 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(void, echoBinSafe)(NimStringDesc** args, NI argsLen_0);
static N_INLINE(void, initStackBottomWith)(void* locals);
N_LIB_PRIVATE N_NOINLINE(void, nimGC_setStackBottom)(void* theStackBottom);
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, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot14atslibatssystemdotnim_DatInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot14atslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
N_LIB_PRIVATE NI8 x__temp_1;
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, initStackBottomWith)(void* locals) {
 nimGC_setStackBottom(locals);
}
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 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_;
 nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
 x__temp_1 = ((NI8) 256);
 nimZeroMem((void*)T1_, sizeof(tyArray__nHXaesL0DJZHyVS07ARPRA));
 T1_[0] = dollar___systemZdollars_3(((NI) (x__temp_1)));
 echoBinSafe(T1_, 1);
 popFrame();
}
}

Stats

  • Started 2024-01-07T00:17:12
  • Finished 2024-01-07T00:17:12
  • Duration

AST

nnkStmtList.newTree(
  nnkVarSection.newTree(
    nnkIdentDefs.newTree(
      newIdentNode("x"),
      newIdentNode("int8"),
      newEmptyNode()
    )
  ),
  nnkAsgn.newTree(
    newIdentNode("x"),
    newLit(256)
  ),
  nnkCommand.newTree(
    newIdentNode("echo"),
    newIdentNode("x")
  )
)
1.2.18 👎 FAIL

Output

Error: Command failed: nim c --run  -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
/home/runner/work/Nim/Nim/temp.nim(2, 5) Error: type mismatch: got <int literal(256)> but expected 'int8'

IR

Compiled filesize 95.75 Kb (98,048 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(void, echoBinSafe)(NimStringDesc** args, NI argsLen_0);
static N_INLINE(void, initStackBottomWith)(void* locals);
N_LIB_PRIVATE N_NOINLINE(void, nimGC_setStackBottom)(void* theStackBottom);
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, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot14atslibatssystemdotnim_DatInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot14atslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
N_LIB_PRIVATE NI8 x__temp_1;
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, initStackBottomWith)(void* locals) {
 nimGC_setStackBottom(locals);
}
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 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_;
 nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
 x__temp_1 = ((NI8) 256);
 nimZeroMem((void*)T1_, sizeof(tyArray__nHXaesL0DJZHyVS07ARPRA));
 T1_[0] = dollar___systemZdollars_3(((NI) (x__temp_1)));
 echoBinSafe(T1_, 1);
 popFrame();
}
}

Stats

  • Started 2024-01-07T00:17:14
  • Finished 2024-01-07T00:17:14
  • Duration

AST

nnkStmtList.newTree(
  nnkVarSection.newTree(
    nnkIdentDefs.newTree(
      newIdentNode("x"),
      newIdentNode("int8"),
      newEmptyNode()
    )
  ),
  nnkAsgn.newTree(
    newIdentNode("x"),
    newLit(256)
  ),
  nnkCommand.newTree(
    newIdentNode("echo"),
    newIdentNode("x")
  )
)
1.0.10 👎 FAIL

Output

Error: Command failed: nim c --run  -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
/home/runner/work/Nim/Nim/temp.nim(2, 5) Error: type mismatch: got <int literal(256)> but expected 'int8'

IR

Compiled filesize 95.75 Kb (98,048 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(void, echoBinSafe)(NimStringDesc** args, NI argsLen_0);
static N_INLINE(void, initStackBottomWith)(void* locals);
N_LIB_PRIVATE N_NOINLINE(void, nimGC_setStackBottom)(void* theStackBottom);
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, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot14atslibatssystemdotnim_DatInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot14atslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
N_LIB_PRIVATE NI8 x__temp_1;
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, initStackBottomWith)(void* locals) {
 nimGC_setStackBottom(locals);
}
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 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_;
 nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
 x__temp_1 = ((NI8) 256);
 nimZeroMem((void*)T1_, sizeof(tyArray__nHXaesL0DJZHyVS07ARPRA));
 T1_[0] = dollar___systemZdollars_3(((NI) (x__temp_1)));
 echoBinSafe(T1_, 1);
 popFrame();
}
}

Stats

  • Started 2024-01-07T00:17:16
  • Finished 2024-01-07T00:17:16
  • Duration

AST

nnkStmtList.newTree(
  nnkVarSection.newTree(
    nnkIdentDefs.newTree(
      newIdentNode("x"),
      newIdentNode("int8"),
      newEmptyNode()
    )
  ),
  nnkAsgn.newTree(
    newIdentNode("x"),
    newLit(256)
  ),
  nnkCommand.newTree(
    newIdentNode("echo"),
    newIdentNode("x")
  )
)
??? ➡️ 🐛

Diagnostics

The commit that introduced the bug can not be found, but the bug is in the commits:

(Can not find the commit because Nim can not be re-built commit-by-commit to bisect).

Stats
  • GCC 11.4.0
  • Clang 14.0.0
  • NodeJS 19.0
  • Created 2024-01-07T00:16:38Z
  • Comments 2
  • Commands nim c --run -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim

🤖 Bug found in 42 minutes bisecting 326 commits at 8 commits per second

from nim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.