View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000145 | GC Studio | Compiler | public | 2022-04-06 07:11 | 2022-04-10 05:19 |
Reporter | evanvennn | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 99.02.18 | ||||
Target Version | 99.02.19 | Fixed in Version | 99.02.19 | ||
Summary | 0000145: ASM error caused by incorrect assignment of variable in complex IF statement | ||||
Description | Fix: Resolves incorrect compilation of ASM when a variable is not 'used' but is defined in complex 'if' statement. [1344] ~~~~ #option explicit #chip 16F15324, 32 #define PIN PORTA.5 #define INPUT_STATE_FLAG_INITIAL_STATE_ON 1 Dim flags as word flags = 0 If PIN = flags.INPUT_STATE_FLAG_INITIAL_STATE_ON Then ' ... End If ~~~~ | ||||
Steps To Reproduce | #option explicit #chip 16F15324, 32 #define PIN PORTA.5 #define INPUT_STATE_FLAG_INITIAL_STATE_ON 1 Dim flags as word flags = 0 If PIN = flags.INPUT_STATE_FLAG_INITIAL_STATE_ON Then ' ... End If | ||||
Tags | No tags attached. | ||||
|
Resolved in CompileConditions() method. 'Add to resolve undeclared variable, as an undeclared variable causes ASM error and the memory has not be allocated FoundUserVar = HashMapGet( @(Subroutine(0)->Variables) , Left(R2,Instr(R2,",")-1) ) If FoundUserVar = 0 Then 'Create a variable but do not mark as used - this will then throw an Explict error as expected AddVar Left(R2,Instr(R2,",")-1), TypeOfValue( Left(R2,Instr(R2,",")-1) , CurrSub), 1, CurrSub, "REAL", Origin, -1 , 0 Else 'variable has been located just validate its use AddVar Left(R2,Instr(R2,",")-1), TypeOfValue( Left(R2,Instr(R2,",")-1) , CurrSub), 1, CurrSub, "REAL", Origin, -1 , -1 End If |
|
Resolved in 1105 |
|
Angel - uploaded and closed |
|
IN build 1006 |
Date Modified | Username | Field | Change |
---|---|---|---|
2022-04-06 07:11 | evanvennn | New Issue | |
2022-04-06 07:14 | evanvennn | Note Added: 0000067 | |
2022-04-06 07:15 | evanvennn | Status | new => feedback |
2022-04-06 07:15 | evanvennn | Note Added: 0000068 | |
2022-04-06 07:16 | evanvennn | Note Added: 0000069 | |
2022-04-06 14:17 | evanvennn | Status | feedback => resolved |
2022-04-06 14:17 | evanvennn | Resolution | open => fixed |
2022-04-06 14:17 | evanvennn | Status | resolved => closed |
2022-04-06 14:17 | evanvennn | Note Added: 0000073 | |
2022-04-07 00:15 | angel-spartan | Status | closed => resolved |
2022-04-07 00:15 | angel-spartan | Product Version | => 99.02.18 |
2022-04-07 00:15 | angel-spartan | Fixed in Version | => 99.02.19 |
2022-04-07 00:15 | angel-spartan | Target Version | => 99.02.19 |
2022-04-10 05:19 | angel-spartan | Status | resolved => closed |