Fix issue #1592 "LLVM code gen error when using a constant in an if"

Changes lb_build_if_stmt() to return null lbValue if condition is
  cmpAnd, cmpOr or non-const neg and check in lb_build_if_stmt()
  to avoid short circuiting if that's the case
Adds test to "tests/issues" and adds step in CI to check this dir
This commit is contained in:
gitlost
2022-03-18 13:57:22 +00:00
parent df233f72a9
commit fdbbf24271
5 changed files with 519 additions and 6 deletions
+12
View File
@@ -38,6 +38,9 @@ jobs:
cd tests/vendor
make
timeout-minutes: 10
- name: Odin issues tests
run: ./odin run tests/issues -collection:tests=tests
timeout-minutes: 10
- name: Odin check examples/all for Linux i386
run: ./odin check examples/all -vet -strict-style -target:linux_i386
timeout-minutes: 10
@@ -87,6 +90,9 @@ jobs:
cd tests/vendor
make
timeout-minutes: 10
- name: Odin issues tests
run: ./odin run tests/issues -collection:tests=tests
timeout-minutes: 10
- name: Odin check examples/all for Darwin arm64
run: ./odin check examples/all -vet -strict-style -target:darwin_arm64
timeout-minutes: 10
@@ -153,6 +159,12 @@ jobs:
cd tests\core\math\big
call build.bat
timeout-minutes: 10
- name: Odin issues tests
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
odin run tests\issues -collection:tests=tests
timeout-minutes: 10
- name: Odin check examples/all for Windows 32bits
shell: cmd
run: |