From 01a6a43065f273b344ad81acfeefed17f9eae7af Mon Sep 17 00:00:00 2001 From: kalsprite Date: Mon, 24 Aug 2026 17:56:10 -0700 Subject: [PATCH] remove the asm immediate error-count test --- tests/issues/run.bat | 1 - tests/issues/run.sh | 6 ----- .../test_issue_asm_immediate_constant.odin | 26 ------------------- 3 files changed, 33 deletions(-) delete mode 100644 tests/issues/test_issue_asm_immediate_constant.odin diff --git a/tests/issues/run.bat b/tests/issues/run.bat index f3050da6e..d31751a87 100644 --- a/tests/issues/run.bat +++ b/tests/issues/run.bat @@ -47,7 +47,6 @@ set COMMON=-define:ODIN_TEST_FANCY=false -file -vet -strict-style -ignore-unused ..\..\..\odin check ..\test_issue_ellipsis_type_call.odin -no-entry-point %COMMON% 2>&1 | find /c "Error:" | findstr /x "10" || exit /b ..\..\..\odin check ..\test_issue_foreign_redeclaration.odin -no-entry-point %COMMON% || exit /b ..\..\..\odin check ..\test_issue_foreign_redeclaration_mismatch.odin -no-entry-point %COMMON% 2>&1 | find /c "Error:" | findstr /x "1" || exit /b -..\..\..\odin check ..\test_issue_asm_immediate_constant.odin -no-entry-point %COMMON% 2>&1 | find /c "Error:" | findstr /x "4" || exit /b ..\..\..\odin check ..\test_issue_asm_rip_register.odin -no-entry-point %COMMON% 2>&1 | find /c "Error:" | findstr /x "6" || exit /b ..\..\..\odin check ..\test_issue_asm_template_as_value.odin -no-entry-point %COMMON% 2>&1 | find /c "Error:" | findstr /x "10" || exit /b ..\..\..\odin build ..\test_issue_7037.odin %COMMON% -o:none || exit /b diff --git a/tests/issues/run.sh b/tests/issues/run.sh index 7b1bddd54..b936a9e30 100755 --- a/tests/issues/run.sh +++ b/tests/issues/run.sh @@ -122,12 +122,6 @@ fi # `asm` templates are amd64-only, so this file is empty on every other architecture if [[ "$(uname -m)" == "x86_64" || "$(uname -m)" == "amd64" ]]; then - if [[ $($ODIN check ../test_issue_asm_immediate_constant.odin -no-entry-point $COMMON_CHECK 2>&1 >/dev/null | grep -c "Error:") -eq 4 ]]; then - echo "SUCCESSFUL 1/1" - else - echo "SUCCESSFUL 0/1" - exit 1 - fi if [[ $($ODIN check ../test_issue_asm_rip_register.odin -no-entry-point $COMMON_CHECK 2>&1 >/dev/null | grep -c "Error:") -eq 6 ]]; then echo "SUCCESSFUL 1/1" else diff --git a/tests/issues/test_issue_asm_immediate_constant.odin b/tests/issues/test_issue_asm_immediate_constant.odin deleted file mode 100644 index c72699fd3..000000000 --- a/tests/issues/test_issue_asm_immediate_constant.odin +++ /dev/null @@ -1,26 +0,0 @@ -#+build amd64 -// An `asm` template's `$` parameter is encoded as an immediate, but a runtime value passed to -// one was accepted by the checker and only died in the backend, with an unlocated LLVM error. -package test_issues - -shl_imm :: asm(a: i32, $n: i32) -> (r: i32) { mov r, a; shl r, n; } - -opaque :: proc() -> i32 { - return 5 -} - -K :: 3 - -bad :: proc(v: i32) { - x: i32 = 2 - _ = shl_imm(1, x) - _ = shl_imm(1, v) - _ = shl_imm(1, opaque()) - _ = shl_imm(1, x + 1) -} - -good :: proc(a: i32) { - _ = shl_imm(a, 2) - _ = shl_imm(a, K) - _ = shl_imm(a, 1 + 1) -}