nim-lang / Nim

Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
https://nim-lang.org
Other
16.63k stars 1.47k forks source link

`ProveField` warning with nested `case` object #22791

Open etan-status opened 1 year ago

etan-status commented 1 year ago

Description

When case objects are nested, there is no way to access the inner fields without triggering ProveField (if enabled)

{.push warning[ProveField]:on.}

type Foo = object
  case a: bool
  of false:
    discard
  of true:
    case b: bool
    of false:
      discard
    of true:
      c: bool

const f = Foo(a: true, b: true, c: true)
case f.a
of true:
  case f.b
  of true:
    echo f.c
  else: discard
else: discard

Nim Version

Nim Compiler Version 2.0.1 [MacOSX: amd64]
Compiled at 2023-10-03
Copyright (c) 2006-2023 by Andreas Rumpf

git hash: d30565f810ba5165ea2e5bcd91ea3dee9950051f
active boot switches: -d:release

Current Output

/Users/etan/Documents/Repos/nimbus-eth2/test.nim(17, 9) Warning: cannot prove that field 'f.b' is accessible [ProveField]
    case f.b
          ^

Expected Output

No warning

Possible Solution

No response

Additional Information

No response

ringabout commented 1 year ago

!nim c --warningaserror:ProveField

{.push warning[ProveField]:on.}

type Foo = object
  case a: bool
  of false:
    discard
  of true:
    case b: bool
    of false:
      discard
    of true:
      c: bool

const f = Foo(a: true, b: true, c: true)
case f.a
of true:
  case f.b
  of true:
    echo f.c
  else: discard
else: discard
github-actions[bot] commented 1 year ago
:window: Windows bisect by @ringabout (member)
devel :+1: OK

Output

``` true ```

IR

Compiled filesize 0 bytes (0 bytes) ```cpp #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(void, echoBinSafe)(NimStringV2* args_p0, NI args_p0Len_0); N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void); static N_INLINE(void, nimFrame)(TFrame* s_p0); N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4632)(void); static N_INLINE(void, popFrame)(void); N_LIB_PRIVATE N_NIMCALL(void, atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatsstdatsexitprocsdotnim_Init000)(void); N_LIB_PRIVATE N_NIMCALL(void, atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatsstdatssynciodotnim_DatInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatsstdatssynciodotnim_Init000)(void); N_LIB_PRIVATE N_NIMCALL(void, atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000)(void); N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void); static const struct { NI cap; NIM_CHAR data[4+1]; } TM__SRd76hP9cMfCzdUO857UhQQ_3 = { 4 | NIM_STRLIT_FLAG, "true" }; static NIM_CONST tyArray__nHXaesL0DJZHyVS07ARPRA TM__SRd76hP9cMfCzdUO857UhQQ_2 = {{4, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_3}} ; extern NIM_THREADVAR TFrame* framePtr__system_u4019; static N_INLINE(void, nimFrame)(TFrame* s_p0) { { if (!(framePtr__system_u4019 == ((TFrame*) NIM_NIL))) goto LA3_; (*s_p0).calldepth = ((NI16)0); } goto LA1_; LA3_: ; { (*s_p0).calldepth = (NI16)((*framePtr__system_u4019).calldepth + ((NI16)1)); } LA1_: ; (*s_p0).prev = framePtr__system_u4019; framePtr__system_u4019 = s_p0; { if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_; callDepthLimitReached__system_u4632(); } LA8_: ; } static N_INLINE(void, popFrame)(void) { framePtr__system_u4019 = (*framePtr__system_u4019).prev; } N_LIB_PRIVATE void PreMainInner(void) { atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatsstdatsexitprocsdotnim_Init000(); atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatsstdatssynciodotnim_Init000(); } 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; atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatsstdatssynciodotnim_DatInit000(); atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000(); (*inner)(); #else atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatsstdatssynciodotnim_DatInit000(); atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_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) { { nimfr_("temp", "D:\\a\\Nim\\Nim\\temp.nim"); switch (NIM_TRUE) { case NIM_TRUE: { switch (NIM_TRUE) { case NIM_TRUE: { echoBinSafe(TM__SRd76hP9cMfCzdUO857UhQQ_2, 1); } break; default: { } break; } } break; default: { } break; } nimTestErrorFlag(); popFrame(); } } ```

Stats

  • Started 2023-10-05T09:20:20
  • Finished 2023-10-05T09:20:32
  • Duration 12 minutes
stable :+1: OK

Output

``` true ```

IR

Compiled filesize 0 bytes (0 bytes) ```cpp #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; typedef struct tySequence__Fe2YmKTLIMr06AO9bt0WIlw tySequence__Fe2YmKTLIMr06AO9bt0WIlw; typedef struct tySequence__Fe2YmKTLIMr06AO9bt0WIlw_Content tySequence__Fe2YmKTLIMr06AO9bt0WIlw_Content; typedef struct tyObject_Fun__UxsXZ9aeog4o6DSEgg32Akg tyObject_Fun__UxsXZ9aeog4o6DSEgg32Akg; struct NimStrPayload { NI cap; NIM_CHAR data[SEQ_DECL_SIZE]; }; struct NimStringV2 { NI len; NimStrPayload* p; }; typedef NimStringV2 tyArray__nHXaesL0DJZHyVS07ARPRA[1]; struct tySequence__Fe2YmKTLIMr06AO9bt0WIlw { NI len; tySequence__Fe2YmKTLIMr06AO9bt0WIlw_Content* p; }; typedef NU8 tyEnum_FunKind__4WvJRK0A3t9bpd9cXsgto78Q; typedef struct { N_NIMCALL_PTR(void, ClP_0) (void* ClE_0); void* ClE_0; } tyProc__HzVCwACFYM9cx9aV62PdjtuA; typedef N_NOCONV_PTR(void, tyProc__vhjNbzH0Mvv2fTvoe1717Q) (void); struct tyObject_Fun__UxsXZ9aeog4o6DSEgg32Akg { tyEnum_FunKind__4WvJRK0A3t9bpd9cXsgto78Q kind; union{ tyProc__HzVCwACFYM9cx9aV62PdjtuA fun1; tyProc__vhjNbzH0Mvv2fTvoe1717Q fun2; }; }; struct tySequence__Fe2YmKTLIMr06AO9bt0WIlw_Content { NI cap; tyObject_Fun__UxsXZ9aeog4o6DSEgg32Akg data[SEQ_DECL_SIZE]; }; N_LIB_PRIVATE N_NIMCALL(void, echoBinSafe)(NimStringV2* args_p0, NI args_p0Len_0); N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void); N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___stdZexitprocs_u301)(tySequence__Fe2YmKTLIMr06AO9bt0WIlw dest_p0); static N_INLINE(void, nimFrame)(TFrame* s_p0); N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4581)(void); static N_INLINE(void, popFrame)(void); N_LIB_PRIVATE N_NIMCALL(void, atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatsstdatsexitprocsdotnim_Init000)(void); N_LIB_PRIVATE N_NIMCALL(void, atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatsstdatssynciodotnim_DatInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatsstdatssynciodotnim_Init000)(void); N_LIB_PRIVATE N_NIMCALL(void, atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatssystemdotnim_Init000)(void); N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void); static const struct { NI cap; NIM_CHAR data[4+1]; } TM__SRd76hP9cMfCzdUO857UhQQ_3 = { 4 | NIM_STRLIT_FLAG, "true" }; static NIM_CONST tyArray__nHXaesL0DJZHyVS07ARPRA TM__SRd76hP9cMfCzdUO857UhQQ_2 = {{4, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_3}} ; extern tySequence__Fe2YmKTLIMr06AO9bt0WIlw gFuns__stdZexitprocs_u15; extern NIM_THREADVAR TFrame* framePtr__system_u3980; static N_INLINE(void, nimFrame)(TFrame* s_p0) { { if (!(framePtr__system_u3980 == ((TFrame*) NIM_NIL))) goto LA3_; (*s_p0).calldepth = ((NI16)0); } goto LA1_; LA3_: ; { (*s_p0).calldepth = (NI16)((*framePtr__system_u3980).calldepth + ((NI16)1)); } LA1_: ; (*s_p0).prev = framePtr__system_u3980; framePtr__system_u3980 = s_p0; { if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_; callDepthLimitReached__system_u4581(); } LA8_: ; } static N_INLINE(void, popFrame)(void) { framePtr__system_u3980 = (*framePtr__system_u3980).prev; } N_LIB_PRIVATE void PreMainInner(void) { atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatsstdatsexitprocsdotnim_Init000(); atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatsstdatssynciodotnim_Init000(); } 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; atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatsstdatssynciodotnim_DatInit000(); atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatssystemdotnim_Init000(); (*inner)(); #else atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatsstdatssynciodotnim_DatInit000(); atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatssystemdotnim_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) { { nimfr_("temp", "D:\\a\\Nim\\Nim\\temp.nim"); switch (NIM_TRUE) { case NIM_TRUE: { switch (NIM_TRUE) { case NIM_TRUE: { echoBinSafe(TM__SRd76hP9cMfCzdUO857UhQQ_2, 1); } break; default: { } break; } } break; default: { } break; } eqdestroy___stdZexitprocs_u301(gFuns__stdZexitprocs_u15); nimTestErrorFlag(); popFrame(); } } ```

Stats

  • Started 2023-10-05T09:21:10
  • Finished 2023-10-05T09:21:13
  • Duration 3 minutes
2.0.0 :+1: OK

Output

``` true ```

IR

Compiled filesize 0 bytes (0 bytes) ```cpp #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; typedef struct tySequence__Fe2YmKTLIMr06AO9bt0WIlw tySequence__Fe2YmKTLIMr06AO9bt0WIlw; typedef struct tySequence__Fe2YmKTLIMr06AO9bt0WIlw_Content tySequence__Fe2YmKTLIMr06AO9bt0WIlw_Content; typedef struct tyObject_Fun__UxsXZ9aeog4o6DSEgg32Akg tyObject_Fun__UxsXZ9aeog4o6DSEgg32Akg; struct NimStrPayload { NI cap; NIM_CHAR data[SEQ_DECL_SIZE]; }; struct NimStringV2 { NI len; NimStrPayload* p; }; typedef NimStringV2 tyArray__nHXaesL0DJZHyVS07ARPRA[1]; struct tySequence__Fe2YmKTLIMr06AO9bt0WIlw { NI len; tySequence__Fe2YmKTLIMr06AO9bt0WIlw_Content* p; }; typedef NU8 tyEnum_FunKind__4WvJRK0A3t9bpd9cXsgto78Q; typedef struct { N_NIMCALL_PTR(void, ClP_0) (void* ClE_0); void* ClE_0; } tyProc__HzVCwACFYM9cx9aV62PdjtuA; typedef N_NOCONV_PTR(void, tyProc__vhjNbzH0Mvv2fTvoe1717Q) (void); struct tyObject_Fun__UxsXZ9aeog4o6DSEgg32Akg { tyEnum_FunKind__4WvJRK0A3t9bpd9cXsgto78Q kind; union{ tyProc__HzVCwACFYM9cx9aV62PdjtuA fun1; tyProc__vhjNbzH0Mvv2fTvoe1717Q fun2; }; }; struct tySequence__Fe2YmKTLIMr06AO9bt0WIlw_Content { NI cap; tyObject_Fun__UxsXZ9aeog4o6DSEgg32Akg data[SEQ_DECL_SIZE]; }; N_LIB_PRIVATE N_NIMCALL(void, echoBinSafe)(NimStringV2* args_p0, NI args_p0Len_0); N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void); N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___stdZexitprocs_u301)(tySequence__Fe2YmKTLIMr06AO9bt0WIlw dest_p0); static N_INLINE(void, nimFrame)(TFrame* s_p0); N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4581)(void); static N_INLINE(void, popFrame)(void); N_LIB_PRIVATE N_NIMCALL(void, atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatsstdatsexitprocsdotnim_Init000)(void); N_LIB_PRIVATE N_NIMCALL(void, atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatsstdatssynciodotnim_DatInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatsstdatssynciodotnim_Init000)(void); N_LIB_PRIVATE N_NIMCALL(void, atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatssystemdotnim_Init000)(void); N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void); static const struct { NI cap; NIM_CHAR data[4+1]; } TM__SRd76hP9cMfCzdUO857UhQQ_3 = { 4 | NIM_STRLIT_FLAG, "true" }; static NIM_CONST tyArray__nHXaesL0DJZHyVS07ARPRA TM__SRd76hP9cMfCzdUO857UhQQ_2 = {{4, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_3}} ; extern tySequence__Fe2YmKTLIMr06AO9bt0WIlw gFuns__stdZexitprocs_u15; extern NIM_THREADVAR TFrame* framePtr__system_u3980; static N_INLINE(void, nimFrame)(TFrame* s_p0) { { if (!(framePtr__system_u3980 == ((TFrame*) NIM_NIL))) goto LA3_; (*s_p0).calldepth = ((NI16)0); } goto LA1_; LA3_: ; { (*s_p0).calldepth = (NI16)((*framePtr__system_u3980).calldepth + ((NI16)1)); } LA1_: ; (*s_p0).prev = framePtr__system_u3980; framePtr__system_u3980 = s_p0; { if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_; callDepthLimitReached__system_u4581(); } LA8_: ; } static N_INLINE(void, popFrame)(void) { framePtr__system_u3980 = (*framePtr__system_u3980).prev; } N_LIB_PRIVATE void PreMainInner(void) { atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatsstdatsexitprocsdotnim_Init000(); atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatsstdatssynciodotnim_Init000(); } 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; atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatsstdatssynciodotnim_DatInit000(); atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatssystemdotnim_Init000(); (*inner)(); #else atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatsstdatssynciodotnim_DatInit000(); atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminus2dot0dot0atslibatssystemdotnim_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) { { nimfr_("temp", "D:\\a\\Nim\\Nim\\temp.nim"); switch (NIM_TRUE) { case NIM_TRUE: { switch (NIM_TRUE) { case NIM_TRUE: { echoBinSafe(TM__SRd76hP9cMfCzdUO857UhQQ_2, 1); } break; default: { } break; } } break; default: { } break; } eqdestroy___stdZexitprocs_u301(gFuns__stdZexitprocs_u15); nimTestErrorFlag(); popFrame(); } } ```

Stats

  • Started 2023-10-05T09:21:13
  • Finished 2023-10-05T09:21:16
  • Duration 3 minutes
1.6.14 :+1: OK

Output

``` true ```

IR

Compiled filesize 0 bytes (0 bytes) ```cpp #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, 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]; 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_2999)(void); static N_INLINE(void, popFrame)(void); N_LIB_PRIVATE N_NIMCALL(void, atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminus1dot6dot14atslibatssystematsiodotnim_DatInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminus1dot6dot14atslibatssystematsiodotnim_Init000)(void); N_LIB_PRIVATE N_NIMCALL(void, atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminus1dot6dot14atslibatssystemdotnim_DatInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminus1dot6dot14atslibatssystemdotnim_Init000)(void); N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void); STRING_LITERAL(TM__SRd76hP9cMfCzdUO857UhQQ_3, "true", 4); static NIM_CONST tyArray__nHXaesL0DJZHyVS07ARPRA TM__SRd76hP9cMfCzdUO857UhQQ_2 = {((NimStringDesc*) &TM__SRd76hP9cMfCzdUO857UhQQ_3)} ; extern TFrame* framePtr__system_2566; extern TFrame* framePtr__system_2566; extern TFrame* framePtr__system_2566; extern TFrame* framePtr__system_2566; extern TFrame* framePtr__system_2566; extern TFrame* framePtr__system_2566; static N_INLINE(void, initStackBottomWith)(void* locals) { nimGC_setStackBottom(locals); } static N_INLINE(void, nimFrame)(TFrame* s) { { if (!(framePtr__system_2566 == ((TFrame*) NIM_NIL))) goto LA3_; (*s).calldepth = ((NI16) 0); } goto LA1_; LA3_: ; { (*s).calldepth = (NI16)((*framePtr__system_2566).calldepth + ((NI16) 1)); } LA1_: ; (*s).prev = framePtr__system_2566; framePtr__system_2566 = s; { if (!((*s).calldepth == ((NI16) 2000))) goto LA8_; callDepthLimitReached__system_2999(); } LA8_: ; } static N_INLINE(void, popFrame)(void) { framePtr__system_2566 = (*framePtr__system_2566).prev; } N_LIB_PRIVATE void PreMainInner(void) { atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminus1dot6dot14atslibatssystematsiodotnim_Init000(); } 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; atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminus1dot6dot14atslibatssystematsiodotnim_DatInit000(); atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminus1dot6dot14atslibatssystemdotnim_DatInit000(); initStackBottomWith((void *)&inner); atmCatcatsUsersatsrunneradminatsdotchoosenimatstoolchainsatsnimminus1dot6dot14atslibatssystemdotnim_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) { { nimfr_("temp", "D:\\a\\Nim\\Nim\\temp.nim"); switch (NIM_TRUE) { case NIM_TRUE: { switch (NIM_TRUE) { case NIM_TRUE: { echoBinSafe(TM__SRd76hP9cMfCzdUO857UhQQ_2, 1); } break; default: { } break; } } break; default: { } break; } popFrame(); } } ```

Stats

  • Started 2023-10-05T09:21:52
  • Finished 2023-10-05T09:21:55
  • Duration 2 minutes
1.4.8 :+1: OK

Output

``` true ```

IR

Compiled filesize 0 bytes (0 bytes) ```cpp #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, 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]; 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__mMRdr4sgmnykA9aWeM9aDZlw)(void); static N_INLINE(void, popFrame)(void); N_LIB_PRIVATE N_NIMCALL(void, stdlib_ioDatInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, stdlib_ioInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, systemDatInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, systemInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void); STRING_LITERAL(TM__SRd76hP9cMfCzdUO857UhQQ_3, "true", 4); static NIM_CONST tyArray__nHXaesL0DJZHyVS07ARPRA TM__SRd76hP9cMfCzdUO857UhQQ_2 = {((NimStringDesc*) &TM__SRd76hP9cMfCzdUO857UhQQ_3)} ; 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, initStackBottomWith)(void* locals) { nimGC_setStackBottom(locals); } 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 void PreMainInner(void) { stdlib_ioInit000(); } 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; stdlib_ioDatInit000(); 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) { { nimfr_("temp", "D:\\a\\Nim\\Nim\\temp.nim"); switch (NIM_TRUE) { case NIM_TRUE: { switch (NIM_TRUE) { case NIM_TRUE: { echoBinSafe(TM__SRd76hP9cMfCzdUO857UhQQ_2, 1); } break; default: { } break; } } break; default: { } break; } popFrame(); } } ```

Stats

  • Started 2023-10-05T09:22:18
  • Finished 2023-10-05T09:22:20
  • Duration 2 minutes
1.2.18 :-1: FAIL

Output

``` Error: Command failed: nim c --warningaserror:ProveField --run -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:D:\a\Nim\Nim --out:D:\a\Nim\Nim/temp D:\a\Nim\Nim/temp.nim command line(1, 2) Error: invalid command line option: '--warningaserror' ```

IR

Compiled filesize 0 bytes (0 bytes) ```cpp #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, 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]; 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__mMRdr4sgmnykA9aWeM9aDZlw)(void); static N_INLINE(void, popFrame)(void); N_LIB_PRIVATE N_NIMCALL(void, stdlib_ioDatInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, stdlib_ioInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, systemDatInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, systemInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void); STRING_LITERAL(TM__SRd76hP9cMfCzdUO857UhQQ_3, "true", 4); static NIM_CONST tyArray__nHXaesL0DJZHyVS07ARPRA TM__SRd76hP9cMfCzdUO857UhQQ_2 = {((NimStringDesc*) &TM__SRd76hP9cMfCzdUO857UhQQ_3)} ; 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, initStackBottomWith)(void* locals) { nimGC_setStackBottom(locals); } 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 void PreMainInner(void) { stdlib_ioInit000(); } 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; stdlib_ioDatInit000(); 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) { { nimfr_("temp", "D:\\a\\Nim\\Nim\\temp.nim"); switch (NIM_TRUE) { case NIM_TRUE: { switch (NIM_TRUE) { case NIM_TRUE: { echoBinSafe(TM__SRd76hP9cMfCzdUO857UhQQ_2, 1); } break; default: { } break; } } break; default: { } break; } popFrame(); } } ```

Stats

  • Started 2023-10-05T09:22:41
  • Finished 2023-10-05T09:22:41
  • Duration

AST

```nim nnkStmtList.newTree( nnkPragma.newTree( newIdentNode("push"), nnkExprColonExpr.newTree( nnkBracketExpr.newTree( newIdentNode("warning"), newIdentNode("ProveField") ), newIdentNode("on") ) ), nnkTypeSection.newTree( nnkTypeDef.newTree( newIdentNode("Foo"), newEmptyNode(), nnkObjectTy.newTree( newEmptyNode(), newEmptyNode(), nnkRecList.newTree( nnkRecCase.newTree( nnkIdentDefs.newTree( newIdentNode("a"), newIdentNode("bool"), newEmptyNode() ), nnkOfBranch.newTree( newIdentNode("false"), nnkRecList.newTree( newNilLit() ) ), nnkOfBranch.newTree( newIdentNode("true"), nnkRecList.newTree( nnkRecCase.newTree( nnkIdentDefs.newTree( newIdentNode("b"), newIdentNode("bool"), newEmptyNode() ), nnkOfBranch.newTree( newIdentNode("false"), nnkRecList.newTree( newNilLit() ) ), nnkOfBranch.newTree( newIdentNode("true"), nnkRecList.newTree( nnkIdentDefs.newTree( newIdentNode("c"), newIdentNode("bool"), newEmptyNode() ) ) ) ) ) ) ) ) ) ) ), nnkConstSection.newTree( nnkConstDef.newTree( newIdentNode("f"), newEmptyNode(), nnkObjConstr.newTree( newIdentNode("Foo"), nnkExprColonExpr.newTree( newIdentNode("a"), newIdentNode("true") ), nnkExprColonExpr.newTree( newIdentNode("b"), newIdentNode("true") ), nnkExprColonExpr.newTree( newIdentNode("c"), newIdentNode("true") ) ) ) ), nnkCaseStmt.newTree( nnkDotExpr.newTree( newIdentNode("f"), newIdentNode("a") ), nnkOfBranch.newTree( newIdentNode("true"), nnkStmtList.newTree( nnkCaseStmt.newTree( nnkDotExpr.newTree( newIdentNode("f"), newIdentNode("b") ), nnkOfBranch.newTree( newIdentNode("true"), nnkStmtList.newTree( nnkCommand.newTree( newIdentNode("echo"), nnkDotExpr.newTree( newIdentNode("f"), newIdentNode("c") ) ) ) ), nnkElse.newTree( nnkStmtList.newTree( nnkDiscardStmt.newTree( newEmptyNode() ) ) ) ) ) ), nnkElse.newTree( nnkStmtList.newTree( nnkDiscardStmt.newTree( newEmptyNode() ) ) ) ) ) ```
1.0.10 :-1: FAIL

Output

``` Error: Command failed: nim c --warningaserror:ProveField --run -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:D:\a\Nim\Nim --out:D:\a\Nim\Nim/temp D:\a\Nim\Nim/temp.nim command line(1, 2) Error: invalid command line option: '--warningaserror' ```

IR

Compiled filesize 0 bytes (0 bytes) ```cpp #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, 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]; 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__mMRdr4sgmnykA9aWeM9aDZlw)(void); static N_INLINE(void, popFrame)(void); N_LIB_PRIVATE N_NIMCALL(void, stdlib_ioDatInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, stdlib_ioInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, systemDatInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, systemInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void); STRING_LITERAL(TM__SRd76hP9cMfCzdUO857UhQQ_3, "true", 4); static NIM_CONST tyArray__nHXaesL0DJZHyVS07ARPRA TM__SRd76hP9cMfCzdUO857UhQQ_2 = {((NimStringDesc*) &TM__SRd76hP9cMfCzdUO857UhQQ_3)} ; 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, initStackBottomWith)(void* locals) { nimGC_setStackBottom(locals); } 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 void PreMainInner(void) { stdlib_ioInit000(); } 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; stdlib_ioDatInit000(); 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) { { nimfr_("temp", "D:\\a\\Nim\\Nim\\temp.nim"); switch (NIM_TRUE) { case NIM_TRUE: { switch (NIM_TRUE) { case NIM_TRUE: { echoBinSafe(TM__SRd76hP9cMfCzdUO857UhQQ_2, 1); } break; default: { } break; } } break; default: { } break; } popFrame(); } } ```

Stats

  • Started 2023-10-05T09:23:09
  • Finished 2023-10-05T09:23:09
  • Duration

AST

```nim nnkStmtList.newTree( nnkPragma.newTree( newIdentNode("push"), nnkExprColonExpr.newTree( nnkBracketExpr.newTree( newIdentNode("warning"), newIdentNode("ProveField") ), newIdentNode("on") ) ), nnkTypeSection.newTree( nnkTypeDef.newTree( newIdentNode("Foo"), newEmptyNode(), nnkObjectTy.newTree( newEmptyNode(), newEmptyNode(), nnkRecList.newTree( nnkRecCase.newTree( nnkIdentDefs.newTree( newIdentNode("a"), newIdentNode("bool"), newEmptyNode() ), nnkOfBranch.newTree( newIdentNode("false"), nnkRecList.newTree( newNilLit() ) ), nnkOfBranch.newTree( newIdentNode("true"), nnkRecList.newTree( nnkRecCase.newTree( nnkIdentDefs.newTree( newIdentNode("b"), newIdentNode("bool"), newEmptyNode() ), nnkOfBranch.newTree( newIdentNode("false"), nnkRecList.newTree( newNilLit() ) ), nnkOfBranch.newTree( newIdentNode("true"), nnkRecList.newTree( nnkIdentDefs.newTree( newIdentNode("c"), newIdentNode("bool"), newEmptyNode() ) ) ) ) ) ) ) ) ) ) ), nnkConstSection.newTree( nnkConstDef.newTree( newIdentNode("f"), newEmptyNode(), nnkObjConstr.newTree( newIdentNode("Foo"), nnkExprColonExpr.newTree( newIdentNode("a"), newIdentNode("true") ), nnkExprColonExpr.newTree( newIdentNode("b"), newIdentNode("true") ), nnkExprColonExpr.newTree( newIdentNode("c"), newIdentNode("true") ) ) ) ), nnkCaseStmt.newTree( nnkDotExpr.newTree( newIdentNode("f"), newIdentNode("a") ), nnkOfBranch.newTree( newIdentNode("true"), nnkStmtList.newTree( nnkCaseStmt.newTree( nnkDotExpr.newTree( newIdentNode("f"), newIdentNode("b") ), nnkOfBranch.newTree( newIdentNode("true"), nnkStmtList.newTree( nnkCommand.newTree( newIdentNode("echo"), nnkDotExpr.newTree( newIdentNode("f"), newIdentNode("c") ) ) ) ), nnkElse.newTree( nnkStmtList.newTree( nnkDiscardStmt.newTree( newEmptyNode() ) ) ) ) ) ), nnkElse.newTree( nnkStmtList.newTree( nnkDiscardStmt.newTree( newEmptyNode() ) ) ) ) ) ```
Stats
  • GCC 12.2.0
  • Clang 16.0.6
  • NodeJS 18.0
  • Created 2023-10-05T09:17:16Z
  • Comments 1
  • Commands nim c --warningaserror:ProveField --run -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:D:\a\Nim\Nim --out:D:\a\Nim\Nim/temp D:\a\Nim\Nim/temp.nim

:robot: Bug found in 59 minutes bisecting 7 commits at 0 commits per second

github-actions[bot] commented 1 year ago
:penguin: Linux bisect by @ringabout (member)
devel :+1: OK

Output

``` true ```

IR

Compiled filesize 93.24 Kb (95,480 bytes) ```cpp #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(void, echoBinSafe)(NimStringV2* args_p0, NI args_p0Len_0); N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void); static N_INLINE(void, nimFrame)(TFrame* s_p0); N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4658)(void); static N_INLINE(void, popFrame)(void); N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000)(void); N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void); static const struct { NI cap; NIM_CHAR data[4+1]; } TM__SRd76hP9cMfCzdUO857UhQQ_3 = { 4 | NIM_STRLIT_FLAG, "true" }; static NIM_CONST tyArray__nHXaesL0DJZHyVS07ARPRA TM__SRd76hP9cMfCzdUO857UhQQ_2 = {{4, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_3}} ; extern NIM_THREADVAR TFrame* framePtr__system_u4045; static N_INLINE(void, nimFrame)(TFrame* s_p0) { { if (!(framePtr__system_u4045 == ((TFrame*) NIM_NIL))) goto LA3_; (*s_p0).calldepth = ((NI16)0); } goto LA1_; LA3_: ; { (*s_p0).calldepth = (NI16)((*framePtr__system_u4045).calldepth + ((NI16)1)); } LA1_: ; (*s_p0).prev = framePtr__system_u4045; framePtr__system_u4045 = s_p0; { if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_; callDepthLimitReached__system_u4658(); } LA8_: ; } static N_INLINE(void, popFrame)(void) { framePtr__system_u4045 = (*framePtr__system_u4045).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) { { nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim"); switch (NIM_TRUE) { case NIM_TRUE: { switch (NIM_TRUE) { case NIM_TRUE: { echoBinSafe(TM__SRd76hP9cMfCzdUO857UhQQ_2, 1); } break; default: { } break; } } break; default: { } break; } nimTestErrorFlag(); popFrame(); } } ```

Stats

  • Started 2023-10-05T09:17:53
  • Finished 2023-10-05T09:17:54
  • Duration 1 minutes
stable :+1: OK

Output

``` true ```

IR

Compiled filesize 90.96 Kb (93,144 bytes) ```cpp #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(void, echoBinSafe)(NimStringV2* args_p0, NI args_p0Len_0); 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); static const struct { NI cap; NIM_CHAR data[4+1]; } TM__SRd76hP9cMfCzdUO857UhQQ_3 = { 4 | NIM_STRLIT_FLAG, "true" }; static NIM_CONST tyArray__nHXaesL0DJZHyVS07ARPRA TM__SRd76hP9cMfCzdUO857UhQQ_2 = {{4, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_3}} ; extern NIM_THREADVAR TFrame* framePtr__system_u4006; 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) { { nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim"); switch (NIM_TRUE) { case NIM_TRUE: { switch (NIM_TRUE) { case NIM_TRUE: { echoBinSafe(TM__SRd76hP9cMfCzdUO857UhQQ_2, 1); } break; default: { } break; } } break; default: { } break; } nimTestErrorFlag(); popFrame(); } } ```

Stats

  • Started 2023-10-05T09:17:55
  • Finished 2023-10-05T09:17:56
  • Duration
2.0.0 :+1: OK

Output

``` true ```

IR

Compiled filesize 90.96 Kb (93,144 bytes) ```cpp #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(void, echoBinSafe)(NimStringV2* args_p0, NI args_p0Len_0); 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); static const struct { NI cap; NIM_CHAR data[4+1]; } TM__SRd76hP9cMfCzdUO857UhQQ_3 = { 4 | NIM_STRLIT_FLAG, "true" }; static NIM_CONST tyArray__nHXaesL0DJZHyVS07ARPRA TM__SRd76hP9cMfCzdUO857UhQQ_2 = {{4, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_3}} ; extern NIM_THREADVAR TFrame* framePtr__system_u4006; 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) { { nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim"); switch (NIM_TRUE) { case NIM_TRUE: { switch (NIM_TRUE) { case NIM_TRUE: { echoBinSafe(TM__SRd76hP9cMfCzdUO857UhQQ_2, 1); } break; default: { } break; } } break; default: { } break; } nimTestErrorFlag(); popFrame(); } } ```

Stats

  • Started 2023-10-05T09:17:56
  • Finished 2023-10-05T09:17:56
  • Duration
1.6.14 :+1: OK

Output

``` true ```

IR

Compiled filesize 95.85 Kb (98,152 bytes) ```cpp #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, 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]; 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); STRING_LITERAL(TM__SRd76hP9cMfCzdUO857UhQQ_3, "true", 4); static NIM_CONST tyArray__nHXaesL0DJZHyVS07ARPRA TM__SRd76hP9cMfCzdUO857UhQQ_2 = {((NimStringDesc*) &TM__SRd76hP9cMfCzdUO857UhQQ_3)} ; 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, 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) { { nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim"); switch (NIM_TRUE) { case NIM_TRUE: { switch (NIM_TRUE) { case NIM_TRUE: { echoBinSafe(TM__SRd76hP9cMfCzdUO857UhQQ_2, 1); } break; default: { } break; } } break; default: { } break; } popFrame(); } } ```

Stats

  • Started 2023-10-05T09:17:59
  • Finished 2023-10-05T09:17:59
  • Duration
1.4.8 :+1: OK

Output

``` true ```

IR

Compiled filesize 92.13 Kb (94,344 bytes) ```cpp #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, 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]; 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__mMRdr4sgmnykA9aWeM9aDZlw)(void); static N_INLINE(void, popFrame)(void); N_LIB_PRIVATE N_NIMCALL(void, systemDatInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, systemInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void); STRING_LITERAL(TM__SRd76hP9cMfCzdUO857UhQQ_3, "true", 4); static NIM_CONST tyArray__nHXaesL0DJZHyVS07ARPRA TM__SRd76hP9cMfCzdUO857UhQQ_2 = {((NimStringDesc*) &TM__SRd76hP9cMfCzdUO857UhQQ_3)} ; 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, initStackBottomWith)(void* locals) { nimGC_setStackBottom(locals); } 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 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) { { nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim"); switch (NIM_TRUE) { case NIM_TRUE: { switch (NIM_TRUE) { case NIM_TRUE: { echoBinSafe(TM__SRd76hP9cMfCzdUO857UhQQ_2, 1); } break; default: { } break; } } break; default: { } break; } popFrame(); } } ```

Stats

  • Started 2023-10-05T09:18:02
  • Finished 2023-10-05T09:18:02
  • Duration
1.2.18 :-1: FAIL

Output

``` Error: Command failed: nim c --warningaserror:ProveField --run -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim command line(1, 2) Error: invalid command line option: '--warningaserror' ```

IR

Compiled filesize 92.13 Kb (94,344 bytes) ```cpp #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, 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]; 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__mMRdr4sgmnykA9aWeM9aDZlw)(void); static N_INLINE(void, popFrame)(void); N_LIB_PRIVATE N_NIMCALL(void, systemDatInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, systemInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void); STRING_LITERAL(TM__SRd76hP9cMfCzdUO857UhQQ_3, "true", 4); static NIM_CONST tyArray__nHXaesL0DJZHyVS07ARPRA TM__SRd76hP9cMfCzdUO857UhQQ_2 = {((NimStringDesc*) &TM__SRd76hP9cMfCzdUO857UhQQ_3)} ; 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, initStackBottomWith)(void* locals) { nimGC_setStackBottom(locals); } 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 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) { { nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim"); switch (NIM_TRUE) { case NIM_TRUE: { switch (NIM_TRUE) { case NIM_TRUE: { echoBinSafe(TM__SRd76hP9cMfCzdUO857UhQQ_2, 1); } break; default: { } break; } } break; default: { } break; } popFrame(); } } ```

Stats

  • Started 2023-10-05T09:18:04
  • Finished 2023-10-05T09:18:04
  • Duration

AST

```nim nnkStmtList.newTree( nnkPragma.newTree( newIdentNode("push"), nnkExprColonExpr.newTree( nnkBracketExpr.newTree( newIdentNode("warning"), newIdentNode("ProveField") ), newIdentNode("on") ) ), nnkTypeSection.newTree( nnkTypeDef.newTree( newIdentNode("Foo"), newEmptyNode(), nnkObjectTy.newTree( newEmptyNode(), newEmptyNode(), nnkRecList.newTree( nnkRecCase.newTree( nnkIdentDefs.newTree( newIdentNode("a"), newIdentNode("bool"), newEmptyNode() ), nnkOfBranch.newTree( newIdentNode("false"), nnkRecList.newTree( newNilLit() ) ), nnkOfBranch.newTree( newIdentNode("true"), nnkRecList.newTree( nnkRecCase.newTree( nnkIdentDefs.newTree( newIdentNode("b"), newIdentNode("bool"), newEmptyNode() ), nnkOfBranch.newTree( newIdentNode("false"), nnkRecList.newTree( newNilLit() ) ), nnkOfBranch.newTree( newIdentNode("true"), nnkRecList.newTree( nnkIdentDefs.newTree( newIdentNode("c"), newIdentNode("bool"), newEmptyNode() ) ) ) ) ) ) ) ) ) ) ), nnkConstSection.newTree( nnkConstDef.newTree( newIdentNode("f"), newEmptyNode(), nnkObjConstr.newTree( newIdentNode("Foo"), nnkExprColonExpr.newTree( newIdentNode("a"), newIdentNode("true") ), nnkExprColonExpr.newTree( newIdentNode("b"), newIdentNode("true") ), nnkExprColonExpr.newTree( newIdentNode("c"), newIdentNode("true") ) ) ) ), nnkCaseStmt.newTree( nnkDotExpr.newTree( newIdentNode("f"), newIdentNode("a") ), nnkOfBranch.newTree( newIdentNode("true"), nnkStmtList.newTree( nnkCaseStmt.newTree( nnkDotExpr.newTree( newIdentNode("f"), newIdentNode("b") ), nnkOfBranch.newTree( newIdentNode("true"), nnkStmtList.newTree( nnkCommand.newTree( newIdentNode("echo"), nnkDotExpr.newTree( newIdentNode("f"), newIdentNode("c") ) ) ) ), nnkElse.newTree( nnkStmtList.newTree( nnkDiscardStmt.newTree( newEmptyNode() ) ) ) ) ) ), nnkElse.newTree( nnkStmtList.newTree( nnkDiscardStmt.newTree( newEmptyNode() ) ) ) ) ) ```
1.0.10 :-1: FAIL

Output

``` Error: Command failed: nim c --warningaserror:ProveField --run -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim command line(1, 2) Error: invalid command line option: '--warningaserror' ```

IR

Compiled filesize 92.13 Kb (94,344 bytes) ```cpp #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, 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]; 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__mMRdr4sgmnykA9aWeM9aDZlw)(void); static N_INLINE(void, popFrame)(void); N_LIB_PRIVATE N_NIMCALL(void, systemDatInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, systemInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void); STRING_LITERAL(TM__SRd76hP9cMfCzdUO857UhQQ_3, "true", 4); static NIM_CONST tyArray__nHXaesL0DJZHyVS07ARPRA TM__SRd76hP9cMfCzdUO857UhQQ_2 = {((NimStringDesc*) &TM__SRd76hP9cMfCzdUO857UhQQ_3)} ; 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, initStackBottomWith)(void* locals) { nimGC_setStackBottom(locals); } 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 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) { { nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim"); switch (NIM_TRUE) { case NIM_TRUE: { switch (NIM_TRUE) { case NIM_TRUE: { echoBinSafe(TM__SRd76hP9cMfCzdUO857UhQQ_2, 1); } break; default: { } break; } } break; default: { } break; } popFrame(); } } ```

Stats

  • Started 2023-10-05T09:18:07
  • Finished 2023-10-05T09:18:07
  • Duration

AST

```nim nnkStmtList.newTree( nnkPragma.newTree( newIdentNode("push"), nnkExprColonExpr.newTree( nnkBracketExpr.newTree( newIdentNode("warning"), newIdentNode("ProveField") ), newIdentNode("on") ) ), nnkTypeSection.newTree( nnkTypeDef.newTree( newIdentNode("Foo"), newEmptyNode(), nnkObjectTy.newTree( newEmptyNode(), newEmptyNode(), nnkRecList.newTree( nnkRecCase.newTree( nnkIdentDefs.newTree( newIdentNode("a"), newIdentNode("bool"), newEmptyNode() ), nnkOfBranch.newTree( newIdentNode("false"), nnkRecList.newTree( newNilLit() ) ), nnkOfBranch.newTree( newIdentNode("true"), nnkRecList.newTree( nnkRecCase.newTree( nnkIdentDefs.newTree( newIdentNode("b"), newIdentNode("bool"), newEmptyNode() ), nnkOfBranch.newTree( newIdentNode("false"), nnkRecList.newTree( newNilLit() ) ), nnkOfBranch.newTree( newIdentNode("true"), nnkRecList.newTree( nnkIdentDefs.newTree( newIdentNode("c"), newIdentNode("bool"), newEmptyNode() ) ) ) ) ) ) ) ) ) ) ), nnkConstSection.newTree( nnkConstDef.newTree( newIdentNode("f"), newEmptyNode(), nnkObjConstr.newTree( newIdentNode("Foo"), nnkExprColonExpr.newTree( newIdentNode("a"), newIdentNode("true") ), nnkExprColonExpr.newTree( newIdentNode("b"), newIdentNode("true") ), nnkExprColonExpr.newTree( newIdentNode("c"), newIdentNode("true") ) ) ) ), nnkCaseStmt.newTree( nnkDotExpr.newTree( newIdentNode("f"), newIdentNode("a") ), nnkOfBranch.newTree( newIdentNode("true"), nnkStmtList.newTree( nnkCaseStmt.newTree( nnkDotExpr.newTree( newIdentNode("f"), newIdentNode("b") ), nnkOfBranch.newTree( newIdentNode("true"), nnkStmtList.newTree( nnkCommand.newTree( newIdentNode("echo"), nnkDotExpr.newTree( newIdentNode("f"), newIdentNode("c") ) ) ) ), nnkElse.newTree( nnkStmtList.newTree( nnkDiscardStmt.newTree( newEmptyNode() ) ) ) ) ) ), nnkElse.newTree( nnkStmtList.newTree( nnkDiscardStmt.newTree( newEmptyNode() ) ) ) ) ) ```
??? :arrow_right: :bug:

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 18.0
  • Created 2023-10-05T09:17:16Z
  • Comments 1
  • Commands nim c --warningaserror:ProveField --run -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim

:robot: Bug found in 38 minutes bisecting 266 commits at 7 commits per second

github-actions[bot] commented 1 year ago
:apple: macOS bisect by @ringabout (member)
devel :+1: OK

Output

``` true ```

IR

Compiled filesize 109.84 Kb (112,472 bytes) ```cpp #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(void, echoBinSafe)(NimStringV2* args_p0, NI args_p0Len_0); N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void); static N_INLINE(void, nimFrame)(TFrame* s_p0); N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4658)(void); static N_INLINE(void, popFrame)(void); N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000)(void); N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void); static const struct { NI cap; NIM_CHAR data[4+1]; } TM__SRd76hP9cMfCzdUO857UhQQ_3 = { 4 | NIM_STRLIT_FLAG, "true" }; static NIM_CONST tyArray__nHXaesL0DJZHyVS07ARPRA TM__SRd76hP9cMfCzdUO857UhQQ_2 = {{4, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_3}} ; extern NIM_THREADVAR TFrame* framePtr__system_u4045; static N_INLINE(void, nimFrame)(TFrame* s_p0) { { if (!(framePtr__system_u4045 == ((TFrame*) NIM_NIL))) goto LA3_; (*s_p0).calldepth = ((NI16)0); } goto LA1_; LA3_: ; { (*s_p0).calldepth = (NI16)((*framePtr__system_u4045).calldepth + ((NI16)1)); } LA1_: ; (*s_p0).prev = framePtr__system_u4045; framePtr__system_u4045 = s_p0; { if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_; callDepthLimitReached__system_u4658(); } LA8_: ; } static N_INLINE(void, popFrame)(void) { framePtr__system_u4045 = (*framePtr__system_u4045).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) { { nimfr_("temp", "/Users/runner/work/Nim/Nim/temp.nim"); switch (NIM_TRUE) { case NIM_TRUE: { switch (NIM_TRUE) { case NIM_TRUE: { echoBinSafe(TM__SRd76hP9cMfCzdUO857UhQQ_2, 1); } break; default: { } break; } } break; default: { } break; } nimTestErrorFlag(); popFrame(); } } ```

Stats

  • Started 2023-10-05T09:37:25
  • Finished 2023-10-05T09:37:27
  • Duration 1 minutes
stable :+1: OK

Output

``` true ```

IR

Compiled filesize 109.84 Kb (112,472 bytes) ```cpp #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(void, echoBinSafe)(NimStringV2* args_p0, NI args_p0Len_0); 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); static const struct { NI cap; NIM_CHAR data[4+1]; } TM__SRd76hP9cMfCzdUO857UhQQ_3 = { 4 | NIM_STRLIT_FLAG, "true" }; static NIM_CONST tyArray__nHXaesL0DJZHyVS07ARPRA TM__SRd76hP9cMfCzdUO857UhQQ_2 = {{4, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_3}} ; extern NIM_THREADVAR TFrame* framePtr__system_u4006; 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) { { nimfr_("temp", "/Users/runner/work/Nim/Nim/temp.nim"); switch (NIM_TRUE) { case NIM_TRUE: { switch (NIM_TRUE) { case NIM_TRUE: { echoBinSafe(TM__SRd76hP9cMfCzdUO857UhQQ_2, 1); } break; default: { } break; } } break; default: { } break; } nimTestErrorFlag(); popFrame(); } } ```

Stats

  • Started 2023-10-05T09:37:28
  • Finished 2023-10-05T09:37:29
  • Duration 1 minutes
2.0.0 :+1: OK

Output

``` true ```

IR

Compiled filesize 109.84 Kb (112,472 bytes) ```cpp #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(void, echoBinSafe)(NimStringV2* args_p0, NI args_p0Len_0); 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); static const struct { NI cap; NIM_CHAR data[4+1]; } TM__SRd76hP9cMfCzdUO857UhQQ_3 = { 4 | NIM_STRLIT_FLAG, "true" }; static NIM_CONST tyArray__nHXaesL0DJZHyVS07ARPRA TM__SRd76hP9cMfCzdUO857UhQQ_2 = {{4, (NimStrPayload*)&TM__SRd76hP9cMfCzdUO857UhQQ_3}} ; extern NIM_THREADVAR TFrame* framePtr__system_u4006; 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) { { nimfr_("temp", "/Users/runner/work/Nim/Nim/temp.nim"); switch (NIM_TRUE) { case NIM_TRUE: { switch (NIM_TRUE) { case NIM_TRUE: { echoBinSafe(TM__SRd76hP9cMfCzdUO857UhQQ_2, 1); } break; default: { } break; } } break; default: { } break; } nimTestErrorFlag(); popFrame(); } } ```

Stats

  • Started 2023-10-05T09:37:29
  • Finished 2023-10-05T09:37:29
  • Duration
1.6.14 :+1: OK

Output

``` true ```

IR

Compiled filesize 110.63 Kb (113,280 bytes) ```cpp #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, 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]; 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); STRING_LITERAL(TM__SRd76hP9cMfCzdUO857UhQQ_3, "true", 4); static NIM_CONST tyArray__nHXaesL0DJZHyVS07ARPRA TM__SRd76hP9cMfCzdUO857UhQQ_2 = {((NimStringDesc*) &TM__SRd76hP9cMfCzdUO857UhQQ_3)} ; 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, 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) { { nimfr_("temp", "/Users/runner/work/Nim/Nim/temp.nim"); switch (NIM_TRUE) { case NIM_TRUE: { switch (NIM_TRUE) { case NIM_TRUE: { echoBinSafe(TM__SRd76hP9cMfCzdUO857UhQQ_2, 1); } break; default: { } break; } } break; default: { } break; } popFrame(); } } ```

Stats

  • Started 2023-10-05T09:43:31
  • Finished 2023-10-05T09:43:32
  • Duration 1 minutes
1.4.8 :+1: OK

Output

``` true ```

IR

Compiled filesize 111.05 Kb (113,720 bytes) ```cpp #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, 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]; 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__mMRdr4sgmnykA9aWeM9aDZlw)(void); static N_INLINE(void, popFrame)(void); N_LIB_PRIVATE N_NIMCALL(void, systemDatInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, systemInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void); STRING_LITERAL(TM__SRd76hP9cMfCzdUO857UhQQ_3, "true", 4); static NIM_CONST tyArray__nHXaesL0DJZHyVS07ARPRA TM__SRd76hP9cMfCzdUO857UhQQ_2 = {((NimStringDesc*) &TM__SRd76hP9cMfCzdUO857UhQQ_3)} ; 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, initStackBottomWith)(void* locals) { nimGC_setStackBottom(locals); } 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 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) { { nimfr_("temp", "/Users/runner/work/Nim/Nim/temp.nim"); switch (NIM_TRUE) { case NIM_TRUE: { switch (NIM_TRUE) { case NIM_TRUE: { echoBinSafe(TM__SRd76hP9cMfCzdUO857UhQQ_2, 1); } break; default: { } break; } } break; default: { } break; } popFrame(); } } ```

Stats

  • Started 2023-10-05T09:47:33
  • Finished 2023-10-05T09:47:34
  • Duration
1.2.18 :-1: FAIL

Output

``` Error: Command failed: nim c --warningaserror:ProveField --run -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/Users/runner/work/Nim/Nim --out:/Users/runner/work/Nim/Nim/temp /Users/runner/work/Nim/Nim/temp.nim command line(1, 2) Error: invalid command line option: '--warningaserror' ```

IR

Compiled filesize 111.05 Kb (113,720 bytes) ```cpp #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, 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]; 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__mMRdr4sgmnykA9aWeM9aDZlw)(void); static N_INLINE(void, popFrame)(void); N_LIB_PRIVATE N_NIMCALL(void, systemDatInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, systemInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void); STRING_LITERAL(TM__SRd76hP9cMfCzdUO857UhQQ_3, "true", 4); static NIM_CONST tyArray__nHXaesL0DJZHyVS07ARPRA TM__SRd76hP9cMfCzdUO857UhQQ_2 = {((NimStringDesc*) &TM__SRd76hP9cMfCzdUO857UhQQ_3)} ; 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, initStackBottomWith)(void* locals) { nimGC_setStackBottom(locals); } 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 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) { { nimfr_("temp", "/Users/runner/work/Nim/Nim/temp.nim"); switch (NIM_TRUE) { case NIM_TRUE: { switch (NIM_TRUE) { case NIM_TRUE: { echoBinSafe(TM__SRd76hP9cMfCzdUO857UhQQ_2, 1); } break; default: { } break; } } break; default: { } break; } popFrame(); } } ```

Stats

  • Started 2023-10-05T09:51:28
  • Finished 2023-10-05T09:51:28
  • Duration

AST

```nim nnkStmtList.newTree( nnkPragma.newTree( newIdentNode("push"), nnkExprColonExpr.newTree( nnkBracketExpr.newTree( newIdentNode("warning"), newIdentNode("ProveField") ), newIdentNode("on") ) ), nnkTypeSection.newTree( nnkTypeDef.newTree( newIdentNode("Foo"), newEmptyNode(), nnkObjectTy.newTree( newEmptyNode(), newEmptyNode(), nnkRecList.newTree( nnkRecCase.newTree( nnkIdentDefs.newTree( newIdentNode("a"), newIdentNode("bool"), newEmptyNode() ), nnkOfBranch.newTree( newIdentNode("false"), nnkRecList.newTree( newNilLit() ) ), nnkOfBranch.newTree( newIdentNode("true"), nnkRecList.newTree( nnkRecCase.newTree( nnkIdentDefs.newTree( newIdentNode("b"), newIdentNode("bool"), newEmptyNode() ), nnkOfBranch.newTree( newIdentNode("false"), nnkRecList.newTree( newNilLit() ) ), nnkOfBranch.newTree( newIdentNode("true"), nnkRecList.newTree( nnkIdentDefs.newTree( newIdentNode("c"), newIdentNode("bool"), newEmptyNode() ) ) ) ) ) ) ) ) ) ) ), nnkConstSection.newTree( nnkConstDef.newTree( newIdentNode("f"), newEmptyNode(), nnkObjConstr.newTree( newIdentNode("Foo"), nnkExprColonExpr.newTree( newIdentNode("a"), newIdentNode("true") ), nnkExprColonExpr.newTree( newIdentNode("b"), newIdentNode("true") ), nnkExprColonExpr.newTree( newIdentNode("c"), newIdentNode("true") ) ) ) ), nnkCaseStmt.newTree( nnkDotExpr.newTree( newIdentNode("f"), newIdentNode("a") ), nnkOfBranch.newTree( newIdentNode("true"), nnkStmtList.newTree( nnkCaseStmt.newTree( nnkDotExpr.newTree( newIdentNode("f"), newIdentNode("b") ), nnkOfBranch.newTree( newIdentNode("true"), nnkStmtList.newTree( nnkCommand.newTree( newIdentNode("echo"), nnkDotExpr.newTree( newIdentNode("f"), newIdentNode("c") ) ) ) ), nnkElse.newTree( nnkStmtList.newTree( nnkDiscardStmt.newTree( newEmptyNode() ) ) ) ) ) ), nnkElse.newTree( nnkStmtList.newTree( nnkDiscardStmt.newTree( newEmptyNode() ) ) ) ) ) ```
1.0.10 :-1: FAIL

Output

``` Error: Command failed: nim c --warningaserror:ProveField --run -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/Users/runner/work/Nim/Nim --out:/Users/runner/work/Nim/Nim/temp /Users/runner/work/Nim/Nim/temp.nim command line(1, 2) Error: invalid command line option: '--warningaserror' ```

IR

Compiled filesize 111.05 Kb (113,720 bytes) ```cpp #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, 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]; 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__mMRdr4sgmnykA9aWeM9aDZlw)(void); static N_INLINE(void, popFrame)(void); N_LIB_PRIVATE N_NIMCALL(void, systemDatInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, systemInit000)(void); N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void); STRING_LITERAL(TM__SRd76hP9cMfCzdUO857UhQQ_3, "true", 4); static NIM_CONST tyArray__nHXaesL0DJZHyVS07ARPRA TM__SRd76hP9cMfCzdUO857UhQQ_2 = {((NimStringDesc*) &TM__SRd76hP9cMfCzdUO857UhQQ_3)} ; 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, initStackBottomWith)(void* locals) { nimGC_setStackBottom(locals); } 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 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) { { nimfr_("temp", "/Users/runner/work/Nim/Nim/temp.nim"); switch (NIM_TRUE) { case NIM_TRUE: { switch (NIM_TRUE) { case NIM_TRUE: { echoBinSafe(TM__SRd76hP9cMfCzdUO857UhQQ_2, 1); } break; default: { } break; } } break; default: { } break; } popFrame(); } } ```

Stats

  • Started 2023-10-05T09:55:18
  • Finished 2023-10-05T09:55:18
  • Duration

AST

```nim nnkStmtList.newTree( nnkPragma.newTree( newIdentNode("push"), nnkExprColonExpr.newTree( nnkBracketExpr.newTree( newIdentNode("warning"), newIdentNode("ProveField") ), newIdentNode("on") ) ), nnkTypeSection.newTree( nnkTypeDef.newTree( newIdentNode("Foo"), newEmptyNode(), nnkObjectTy.newTree( newEmptyNode(), newEmptyNode(), nnkRecList.newTree( nnkRecCase.newTree( nnkIdentDefs.newTree( newIdentNode("a"), newIdentNode("bool"), newEmptyNode() ), nnkOfBranch.newTree( newIdentNode("false"), nnkRecList.newTree( newNilLit() ) ), nnkOfBranch.newTree( newIdentNode("true"), nnkRecList.newTree( nnkRecCase.newTree( nnkIdentDefs.newTree( newIdentNode("b"), newIdentNode("bool"), newEmptyNode() ), nnkOfBranch.newTree( newIdentNode("false"), nnkRecList.newTree( newNilLit() ) ), nnkOfBranch.newTree( newIdentNode("true"), nnkRecList.newTree( nnkIdentDefs.newTree( newIdentNode("c"), newIdentNode("bool"), newEmptyNode() ) ) ) ) ) ) ) ) ) ) ), nnkConstSection.newTree( nnkConstDef.newTree( newIdentNode("f"), newEmptyNode(), nnkObjConstr.newTree( newIdentNode("Foo"), nnkExprColonExpr.newTree( newIdentNode("a"), newIdentNode("true") ), nnkExprColonExpr.newTree( newIdentNode("b"), newIdentNode("true") ), nnkExprColonExpr.newTree( newIdentNode("c"), newIdentNode("true") ) ) ) ), nnkCaseStmt.newTree( nnkDotExpr.newTree( newIdentNode("f"), newIdentNode("a") ), nnkOfBranch.newTree( newIdentNode("true"), nnkStmtList.newTree( nnkCaseStmt.newTree( nnkDotExpr.newTree( newIdentNode("f"), newIdentNode("b") ), nnkOfBranch.newTree( newIdentNode("true"), nnkStmtList.newTree( nnkCommand.newTree( newIdentNode("echo"), nnkDotExpr.newTree( newIdentNode("f"), newIdentNode("c") ) ) ) ), nnkElse.newTree( nnkStmtList.newTree( nnkDiscardStmt.newTree( newEmptyNode() ) ) ) ) ) ), nnkElse.newTree( nnkStmtList.newTree( nnkDiscardStmt.newTree( newEmptyNode() ) ) ) ) ) ```
??? :arrow_right: :bug:

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 14.0.0
  • Clang 14.0.0
  • NodeJS 18.0
  • Created 2023-10-05T09:17:16Z
  • Comments 1
  • Commands nim c --warningaserror:ProveField --run -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/Users/runner/work/Nim/Nim --out:/Users/runner/work/Nim/Nim/temp /Users/runner/work/Nim/Nim/temp.nim

:robot: Bug found in 17 minutes bisecting 266 commits at 15 commits per second