Consolidate and clean up tests/issues tests and make them work (WIP)

This commit is contained in:
bplu4t2f committed 2026-10-09 18:29:25 +02:00
1 parent edaaa27f86
commit b7f19d422b
109 files changed
+366 -263

No files matched your search

+78 -96
View File
@@ -3,105 +3,87 @@
if not exist "build\" mkdir build
pushd build
set COMMON=-define:ODIN_TEST_FANCY=false -file -vet -strict-style -ignore-unused-defineables
set COMMON=-define:ODIN_TEST_FANCY=false -vet -strict-style -ignore-unused-defineables
set ODIN=..\..\..\odin
set CC=cl
@echo on
..\..\..\odin test ..\test_issue_829.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_1592.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_1730.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_2056.odin %COMMON% || exit /b
..\..\..\odin build ..\test_issue_2113.odin %COMMON% -debug || exit /b
..\..\..\odin test ..\test_issue_2466.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_2615.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_2637.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_2666.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_2694.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_3435.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_4210.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_4364.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_4584.odin %COMMON% || exit /b
..\..\..\odin build ..\test_issue_2395.odin %COMMON% 2>&1 | find /c "Error:" | findstr /x "2" || exit /b
..\..\..\odin build ..\test_issue_5043.odin %COMMON% || exit /b
..\..\..\odin build ..\test_issue_5097.odin %COMMON% || exit /b
..\..\..\odin build ..\test_issue_5097-2.odin %COMMON% || exit /b
..\..\..\odin check ..\test_issue_5105_5569.odin %COMMON% 2>&1 | find /c "Error:" | findstr /x "4" || exit /b
..\..\..\odin build ..\test_issue_5265.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_5318.odin %COMMON% || exit /b
..\..\..\odin build ..\test_issue_5573.odin %COMMON% 2>&1 | find /c "Error:" | findstr /x "2" || exit /b
..\..\..\odin test ..\test_issue_5699.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_6068.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_6165.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_6302.odin %COMMON% || exit /b
..\..\..\odin build ..\test_issue_6240.odin %COMMON% 2>&1 | find /c "Error:" | findstr /x "3" || exit /b
..\..\..\odin build ..\test_issue_6401.odin %COMMON% 2>&1 | find /c "Error:" | findstr /x "3" || exit /b
..\..\..\odin test ..\test_issue_6419.odin %COMMON% || exit /b
..\..\..\odin test ..\test_pr_6470.odin %COMMON% || exit /b
..\..\..\odin test ..\test_pr_6470.odin -define:TEST_EXPECT_FAILURE=true %COMMON% 2>&1 | find /c "Error:" | findstr /x "1" || exit /b
..\..\..\odin check ..\test_issue_6484.odin -no-entry-point %COMMON% || exit /b
..\..\..\odin test ..\test_issue_6753.odin %COMMON% || exit /b
..\..\..\odin check ..\test_issue_6874.odin %COMMON% 2>&1 | find /c "Error:" | findstr /x "1" || exit /b
..\..\..\odin test ..\test_issue_6951_5214.odin %COMMON% || exit /b
..\..\..\odin check ..\test_issue_6979.odin -no-entry-point %COMMON% || exit /b
..\..\..\odin test ..\test_issue_7008.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_global_address_of_literal.odin %COMMON% || exit /b
..\..\..\odin check ..\test_issue_7012.odin -no-entry-point %COMMON% || exit /b
..\..\..\odin check ..\test_issue_7260.odin -no-entry-point %COMMON% || exit /b
..\..\..\odin test ..\test_issue_bool_to_be_conversion.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_bool_comparison_truthiness.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_const_array_broadcast.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_decl_order.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_distinct_constraint.odin %COMMON% || exit /b
..\..\..\odin check ..\test_issue_ambiguous_union_literal.odin %COMMON% 2>&1 | find /c "Error:" | findstr /x "1" || exit /b
..\..\..\odin test ..\test_issue_proc_constant_instantiation.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_global_when_order.odin %COMMON% || exit /b
..\..\..\odin check ..\test_issue_global_when_cycle.odin -no-entry-point %COMMON% 2>&1 | find /c "Contradictory global" | findstr /x "4" || exit /b
..\..\..\odin test ..\test_issue_global_when_cycle_accepted.odin %COMMON% || exit /b
..\..\..\odin check ..\test_issue_global_when_cycle_ambiguous.odin -no-entry-point %COMMON% 2>&1 | find /c "Ambiguous global" | findstr /x "1" || exit /b
..\..\..\odin check ..\test_issue_global_when_shadowing.odin -no-entry-point %COMMON% 2>&1 | find /c "within a global" | findstr /x "2" || exit /b
..\..\..\odin check ..\test_issue_7336.odin -no-entry-point %COMMON% || exit /b
..\..\..\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_import_attributes.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_integer_literal_exponent.odin -no-entry-point %COMMON% 2>&1 | find /c "Error:" | findstr /x "1" || exit /b
..\..\..\odin doc ..\test_issue_asm_doc_category.odin -file 2>&1 | find /c "asm templates" | findstr /x "1" || exit /b
..\..\..\odin build ..\test_issue_7037.odin %COMMON% -o:none || exit /b
..\..\..\odin test ..\test_issue_7421.odin %COMMON% || exit /b
..\..\..\odin check ..\test_issue_7421_tagged_duplicate.odin %COMMON% 2>&1 | find /c "Error: Duplicate case" | findstr /x "1" || exit /b
..\..\..\odin test ..\test_issue_7430.odin %COMMON% || exit /b
..\..\..\odin build ..\test_issue_7188.odin %COMMON% || exit /b
clang -c ..\test_issue_sysv_abi.c -o test_issue_sysv_abi_c.o || exit /b
..\..\..\odin test ..\test_issue_sysv_abi.odin %COMMON% || exit /b
..\..\..\odin build ..\test_issue_7073-1.odin %COMMON% 2>&1 | find /c "Error:" | findstr /x "2" || exit /b
..\..\..\odin test ..\test_issue_swizzle_multi_assign.odin %COMMON% || exit /b
..\..\..\odin test ..\test_lifetime_markers.odin %COMMON% -o:size -lifetime-markers || exit /b
..\..\..\odin test ..\test_lifetime_markers.odin %COMMON% -o:speed -lifetime-markers || exit /b
..\..\..\odin test ..\test_issue_7547.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_7477_7506.odin %COMMON% || exit /b
..\..\..\odin run ..\test_issue_7482.odin %COMMON% || exit /b
..\..\..\odin run ..\test_issue_7562.odin %COMMON% -no-crt -no-thread-local || exit /b
..\..\..\odin run ..\test_issue_7562.odin %COMMON% -no-crt -no-thread-local -o:speed || exit /b
..\..\..\odin test ..\test_issue_7316.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_7566.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_poly_using_subtype.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_global_proc_lits.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_packed_field_by_value.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_7708.odin %COMMON% || exit /b
..\..\..\odin check ..\test_issue_7708_mismatch.odin %COMMON% 2>&1 | find /c "Error:" | findstr /x "2" || exit /b
..\..\..\odin test ..\test_issue_7700.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_procedure_of_specialized.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_7587.odin %COMMON% || exit /b
..\..\..\odin run ..\test_issue_7596.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_split_globals -define:ODIN_TEST_FANCY=false -vet -strict-style -ignore-unused-defineables || exit /b
..\..\..\odin test ..\test_issue_split_globals -define:ODIN_TEST_FANCY=false -vet -strict-style -ignore-unused-defineables -debug || exit /b
..\..\..\odin test ..\test_issue_omitted_field_union.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_fast_isel_lowering.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_fast_isel_lowering.odin %COMMON% -o:none || exit /b
..\..\..\odin test ..\test_issue_equal_proc_dependencies.odin %COMMON% || exit /b
..\..\..\odin test ..\test_issue_equal_proc_dependencies.odin %COMMON% -build-mode:obj 2>&1 | find /i /c "missing procedure" | findstr /x "0" || exit /b
..\..\..\odin test ..\test_issue_7779.odin %COMMON% || exit /b
..\..\..\odin run ..\test_issue_7798.odin %COMMON% || exit /b
@rem Build prerequisites for the simple tests:
@rem (nothing to do here)
@rem "odin test" - All simple tests that can be tested without special arguments or error handling:
%ODIN% test "..\test_simple.odin" -file -all-packages %COMMON% || exit /b
@rem "odin check" tests:
%ODIN% check "..\test_issue_5105_5569" %COMMON% 2>&1 | find /c "Error:" | findstr /x "4" || exit /b
%ODIN% check "..\test_issue_6484" -no-entry-point %COMMON% || exit /b
%ODIN% check "..\test_issue_6874" %COMMON% 2>&1 | find /c "Error:" | findstr /x "1" || exit /b
%ODIN% check "..\test_issue_6979" -no-entry-point %COMMON% || exit /b
%ODIN% check "..\test_issue_7012" -no-entry-point %COMMON% || exit /b
%ODIN% check "..\test_issue_7260" -no-entry-point %COMMON% || exit /b
%ODIN% check "..\test_issue_ambiguous_union_literal" %COMMON% 2>&1 | find /c "Error:" | findstr /x "1" || exit /b
%ODIN% check "..\test_issue_global_when_cycle" -no-entry-point %COMMON% 2>&1 | find /c "Contradictory global" | findstr /x "4" || exit /b
%ODIN% check "..\test_issue_global_when_cycle_ambiguous" -no-entry-point %COMMON% 2>&1 | find /c "Ambiguous global" | findstr /x "1" || exit /b
%ODIN% check "..\test_issue_global_when_shadowing" -no-entry-point %COMMON% 2>&1 | find /c "within a global" | findstr /x "2" || exit /b
%ODIN% check "..\test_issue_7336" -no-entry-point %COMMON% || exit /b
%ODIN% check "..\test_issue_ellipsis_type_call" -no-entry-point %COMMON% 2>&1 | find /c "Error:" | findstr /x "10" || exit /b
%ODIN% check "..\test_issue_foreign_redeclaration" -no-entry-point %COMMON% || exit /b
%ODIN% check "..\test_issue_foreign_import_attributes" -no-entry-point %COMMON% || exit /b
%ODIN% check "..\test_issue_foreign_redeclaration_mismatch" -no-entry-point %COMMON% 2>&1 | find /c "Error:" | findstr /x "1" || exit /b
%ODIN% check "..\test_issue_integer_literal_exponent" -no-entry-point %COMMON% 2>&1 | find /c "Error:" | findstr /x "1" || exit /b
%ODIN% check "..\test_issue_7421_tagged_duplicate" %COMMON% 2>&1 | find /c "Error: Duplicate case" | findstr /x "1" || exit /b
%ODIN% check "..\test_issue_7708_mismatch" %COMMON% 2>&1 | find /c "Error:" | findstr /x "2" || exit /b
@rem "odin build" tests:
%ODIN% build "..\test_issue_2113" %COMMON% -debug || exit /b
%ODIN% build "..\test_issue_2395" %COMMON% 2>&1 | find /c "Error:" | findstr /x "2" || exit /b
%ODIN% build "..\test_issue_5043" %COMMON% || exit /b
%ODIN% build "..\test_issue_5097" %COMMON% || exit /b
%ODIN% build "..\test_issue_5097-2" %COMMON% || exit /b
%ODIN% build "..\test_issue_5265" %COMMON% || exit /b
%ODIN% build "..\test_issue_5573" %COMMON% 2>&1 | find /c "Error:" | findstr /x "2" || exit /b
%ODIN% build "..\test_issue_6240" %COMMON% 2>&1 | find /c "Error:" | findstr /x "3" || exit /b
%ODIN% build "..\test_issue_6401" %COMMON% 2>&1 | find /c "Error:" | findstr /x "3" || exit /b
%ODIN% build "..\test_issue_7037" %COMMON% -o:none || exit /b
%ODIN% build "..\test_issue_7073-1" %COMMON% 2>&1 | find /c "Error:" | findstr /x "2" || exit /b
%ODIN% build "..\test_issue_7188" %COMMON% || exit /b
@rem "odin run" tests:
%ODIN% run "..\test_issue_7482" %COMMON% || exit /b
%ODIN% run "..\test_issue_7562" %COMMON% -no-crt -no-thread-local || exit /b
%ODIN% run "..\test_issue_7562" %COMMON% -no-crt -no-thread-local -o:speed || exit /b
%ODIN% run "..\test_issue_7596" %COMMON% || exit /b
%ODIN% run "..\test_issue_7798" %COMMON% || exit /b
@rem "odin test" tests with special needs:
%CC% -c "..\test_issue_5640\test_issue_5640.c" /Fo:test_issue_5640_c.o
%ODIN% test "..\test_issue_5640" %COMMON% || exit /b
%CC% -c "..\test_issue_6809_6816\test_issue_6809_6816.c" /Fo:test_issue_6809_6816_c.o -O3
%ODIN% test "..\test_issue_6809_6816" %COMMON% || exit /b
%ODIN% test "..\test_issue_6344" %COMMON% -o:speed || exit /b
%ODIN% test "..\test_pr_6470" %COMMON% -define:TEST_EXPECT_FAILURE=true 2>&1 | find /c "Error:" | findstr /x "1" || exit /b
%CC% -c "..\test_issue_7010\test_issue_7010.c" /Fo:test_issue_7010_c.o
%ODIN% test "..\test_issue_7010" %COMMON% || exit /b
%ODIN% test "..\test_issue_split_globals" -define:ODIN_TEST_FANCY=false -vet -strict-style -ignore-unused-defineables || exit /b
%ODIN% test "..\test_issue_split_globals" -define:ODIN_TEST_FANCY=false -vet -strict-style -ignore-unused-defineables -debug || exit /b
%ODIN% test "..\test_issue_fast_isel_lowering" || exit /b
%ODIN% test "..\test_issue_fast_isel_lowering" %COMMON% -o:none || exit /b
%ODIN% test "..\test_issue_equal_proc_dependencies" %COMMON% -build-mode:obj 2>&1 | find /i /c "missing procedure" | findstr /x "0" || exit /b
%ODIN% test "..\test_lifetime_markers" %COMMON% -o:size -lifetime-markers || exit /b
%ODIN% test "..\test_lifetime_markers" %COMMON% -o:speed -lifetime-markers || exit /b
%CC% -c "..\test_issue_sysv_abi\test_issue_sysv_abi.c" /Fo:test_issue_sysv_abi_c.o || exit /b
%ODIN% test "..\test_issue_sysv_abi" %COMMON% || exit /b
@echo off
+7 -56
View File
@@ -4,34 +4,23 @@ set -eu
mkdir -p build
pushd build
ODIN=../../../odin
COMMON="-define:ODIN_TEST_FANCY=false -file -vet -strict-style -ignore-unused-defineables -microarch:native"
COMMON_CHECK="-define:ODIN_TEST_FANCY=false -file -vet -strict-style -ignore-unused-defineables"
COMMON="-define:ODIN_TEST_FANCY=false -vet -strict-style -ignore-unused-defineables -microarch:native"
COMMON_CHECK="-define:ODIN_TEST_FANCY=false -vet -strict-style -ignore-unused-defineables"
set -x
$ODIN test ../test_issue_829.odin $COMMON
$ODIN test ../test_issue_1592.odin $COMMON
$ODIN test ../test_issue_1730.odin $COMMON
$ODIN test ../test_issue_2056.odin $COMMON
# Build prerequisites for tests:
# "odin test" - All simple tests that can be tested without special arguments or error handling:
$ODIN test ../test_simple.odin -file -all-packages $COMMON
$ODIN build ../test_issue_2113.odin $COMMON -debug
$ODIN test ../test_issue_2466.odin $COMMON
$ODIN test ../test_issue_2615.odin $COMMON
$ODIN test ../test_issue_2637.odin $COMMON
$ODIN test ../test_issue_2666.odin $COMMON
$ODIN test ../test_issue_2694.odin $COMMON
$ODIN test ../test_issue_3435.odin $COMMON
$ODIN test ../test_issue_4210.odin $COMMON
$ODIN test ../test_issue_4364.odin $COMMON
$ODIN test ../test_issue_4584.odin $COMMON
if [[ $($ODIN build ../test_issue_2395.odin $COMMON 2>&1 >/dev/null | grep -c "Error:") -eq 2 ]]; then
echo "SUCCESSFUL 1/1"
else
echo "SUCCESSFUL 0/1"
exit 1
fi
$ODIN build ../test_issue_5043.odin $COMMON
$ODIN build ../test_issue_5097.odin $COMMON
$ODIN build ../test_issue_5097-2.odin $COMMON
if [[ $($ODIN check ../test_issue_5105_5569.odin $COMMON_CHECK 2>&1 >/dev/null | grep -c "Error:") -eq 4 ]]; then
echo "SUCCESSFUL 1/1"
else
@@ -39,20 +28,13 @@ else
exit 1
fi
$ODIN build ../test_issue_5265.odin $COMMON
$ODIN test ../test_issue_5318.odin $COMMON
if [[ $($ODIN build ../test_issue_5573.odin $COMMON 2>&1 >/dev/null | grep -c "Error:") -eq 2 ]]; then
echo "SUCCESSFUL 1/1"
else
echo "SUCCESSFUL 0/1"
exit 1
fi
$ODIN test ../test_issue_5699.odin $COMMON
$ODIN test ../test_issue_6068.odin $COMMON
$ODIN test ../test_issue_6165.odin $COMMON
$ODIN test ../test_issue_6302.odin $COMMON
$ODIN test ../test_issue_6344.odin $COMMON
$ODIN test ../test_issue_6344.odin $COMMON -o:speed
$ODIN test ../test_issue_6396.odin $COMMON
if [[ $($ODIN build ../test_issue_6240.odin $COMMON 2>&1 >/dev/null | grep -c "Error:") -eq 3 ]]; then
echo "SUCCESSFUL 1/1"
@@ -78,8 +60,6 @@ else
echo "SUCCESSFUL 0/1"
exit 1
fi
$ODIN test ../test_issue_6419.odin $COMMON
$ODIN test ../test_pr_6470.odin $COMMON
if [[ $($ODIN test ../test_pr_6470.odin -define:TEST_EXPECT_FAILURE=true $COMMON 2>&1 >/dev/null | grep -c "Error:") -eq 1 ]]; then
echo "SUCCESSFUL 1/1"
else
@@ -87,41 +67,27 @@ else
exit 1
fi
$ODIN check ../test_issue_6484.odin -no-entry-point $COMMON_CHECK
$ODIN test ../test_issue_6753.odin $COMMON
if [[ $($ODIN check ../test_issue_6874.odin $COMMON_CHECK 2>&1 >/dev/null | grep -c "Error:") -eq 1 ]]; then
echo "SUCCESSFUL 1/1"
else
echo "SUCCESSFUL 0/1"
exit 1
fi
$ODIN test ../test_issue_6951_5214.odin $COMMON
$ODIN check ../test_issue_6979.odin -no-entry-point $COMMON_CHECK
$ODIN test ../test_issue_7008.odin $COMMON
$ODIN test ../test_issue_global_address_of_literal.odin $COMMON
$ODIN check ../test_issue_7012.odin -no-entry-point $COMMON_CHECK
$ODIN build ../test_issue_7037.odin $COMMON -o:none
$ODIN test ../test_issue_7477_7506.odin $COMMON
$ODIN run ../test_issue_7482.odin $COMMON
$ODIN run ../test_issue_7564.odin $COMMON
$ODIN test ../test_issue_7316.odin $COMMON
$ODIN test ../test_issue_7566.odin $COMMON
$ODIN test ../test_issue_poly_using_subtype.odin $COMMON
$ODIN test ../test_issue_global_proc_lits.odin $COMMON
$ODIN test ../test_issue_packed_field_by_value.odin $COMMON
$ODIN test ../test_issue_7708.odin $COMMON
if [[ $($ODIN check ../test_issue_7708_mismatch.odin $COMMON_CHECK 2>&1 >/dev/null | grep -c "Error:") -eq 2 ]]; then
echo "SUCCESSFUL 1/1"
else
echo "SUCCESSFUL 0/1"
exit 1
fi
$ODIN test ../test_issue_7700.odin $COMMON
$ODIN test ../test_issue_procedure_of_specialized.odin $COMMON
$ODIN test ../test_issue_7587.odin $COMMON
$ODIN run ../test_issue_7596.odin $COMMON
$ODIN test ../test_issue_split_globals -define:ODIN_TEST_FANCY=false -vet -strict-style -ignore-unused-defineables
$ODIN test ../test_issue_split_globals -define:ODIN_TEST_FANCY=false -vet -strict-style -ignore-unused-defineables -debug
$ODIN test ../test_issue_omitted_field_union.odin $COMMON
$ODIN test ../test_issue_fast_isel_lowering.odin $COMMON
$ODIN test ../test_issue_fast_isel_lowering.odin $COMMON -o:none
$ODIN test ../test_issue_equal_proc_dependencies.odin $COMMON
@@ -139,33 +105,21 @@ else
exit 1
fi
$ODIN check ../test_issue_7429.odin $COMMON_CHECK
$ODIN test ../test_issue_7430.odin $COMMON
$ODIN test ../test_issue_7356.odin $COMMON
$ODIN test ../test_issue_7336.odin $COMMON
$ODIN build ../test_issue_7167.odin $COMMON
$ODIN build ../test_issue_7188.odin $COMMON
$ODIN check ../test_issue_7260.odin -no-entry-point $COMMON_CHECK
$ODIN test ../test_issue_bool_to_be_conversion.odin $COMMON
$ODIN test ../test_issue_bool_comparison_truthiness.odin $COMMON
$ODIN test ../test_issue_const_array_broadcast.odin $COMMON
$ODIN test ../test_issue_decl_order.odin $COMMON
$ODIN test ../test_issue_distinct_constraint.odin $COMMON
if [[ $($ODIN check ../test_issue_ambiguous_union_literal.odin $COMMON_CHECK 2>&1 >/dev/null | grep -c "Error:") -eq 1 ]]; then
echo "SUCCESSFUL 1/1"
else
echo "SUCCESSFUL 0/1"
exit 1
fi
$ODIN test ../test_issue_proc_constant_instantiation.odin $COMMON
$ODIN test ../test_issue_swizzle_multi_assign.odin $COMMON
$ODIN test ../test_issue_global_when_order.odin $COMMON
if [[ $($ODIN check ../test_issue_global_when_cycle.odin -no-entry-point $COMMON_CHECK 2>&1 >/dev/null | grep -c "Contradictory global 'when'") -eq 4 ]]; then
echo "SUCCESSFUL 1/1"
else
echo "SUCCESSFUL 0/1"
exit 1
fi
$ODIN test ../test_issue_global_when_cycle_accepted.odin $COMMON
if [[ $($ODIN check ../test_issue_global_when_cycle_ambiguous.odin -no-entry-point $COMMON_CHECK 2>&1 >/dev/null | grep -c "Ambiguous global 'when'") -eq 1 ]]; then
echo "SUCCESSFUL 1/1"
else
@@ -260,9 +214,6 @@ fi
$ODIN test ../test_lifetime_markers.odin $COMMON -o:size -lifetime-markers
$ODIN test ../test_lifetime_markers.odin $COMMON -o:speed -lifetime-markers
$ODIN test ../test_issue_7547.odin $COMMON
$ODIN test ../test_issue_7490.odin $COMMON
$ODIN test ../test_issue_7779.odin $COMMON
$ODIN run ../test_issue_7798.odin $COMMON
set +x
+107
View File
@@ -0,0 +1,107 @@
package tests_issues
// CONTRIBUTORS:
// If your test can be run normally with `odin test` and without extra build steps or custom compiler flags,
// you can preferably add it here.
// Otherwise, add it to `run.bat` and `run.sh`.
@(require) import "test_issue_829"
@(require) import "test_issue_1592"
@(require) import "test_issue_1730"
@(require) import "test_issue_2056"
@(require) import "test_issue_2466"
@(require) import "test_issue_2615"
@(require) import "test_issue_2637"
@(require) import "test_issue_2666"
@(require) import "test_issue_2694"
@(require) import "test_issue_3435"
@(require) import "test_issue_4210"
@(require) import "test_issue_4364"
@(require) import "test_issue_4584"
@(require) import "test_issue_5318"
@(require) import "test_issue_5699"
@(require) import "test_issue_6068"
@(require) import "test_issue_6165"
@(require) import "test_issue_6302"
@(require) import "test_issue_6419"
@(require) import "test_issue_6344"
//@(require) import "test_issue_6344.odin $COMMON -o:speed
@(require) import "test_issue_6396"
@(require) import "test_pr_6470"
//if [[ $($ODIN test ../test_pr_6470.odin -define:TEST_EXPECT_FAILURE=true $COMMON 2>&1 >/dev/null | grep -c "Error:") -eq 1 ]]; then
@(require) import "test_issue_6753"
@(require) import "test_issue_6951_5214"
@(require) import "test_issue_7008"
@(require) import "test_issue_7316"
@(require) import "test_issue_7336"
@(require) import "test_issue_7356"
@(require) import "test_issue_7421"
@(require) import "test_issue_7430"
@(require) import "test_issue_7477_7506"
@(require) import "test_issue_7490"
@(require) import "test_issue_7547"
@(require) import "test_issue_7566"
@(require) import "test_issue_7587"
@(require) import "test_issue_7598"
@(require) import "test_issue_7700"
@(require) import "test_issue_7708"
@(require) import "test_issue_7779"
@(require) import "test_issue_omitted_field_union"
@(require) import "test_issue_equal_proc_dependencies"
@(require) import "test_issue_global_address_of_literal"
@(require) import "test_issue_bool_to_be_conversion"
@(require) import "test_issue_bool_comparison_truthiness"
@(require) import "test_issue_const_array_broadcast"
@(require) import "test_issue_decl_order"
@(require) import "test_issue_distinct_constraint"
@(require) import "test_issue_proc_constant_instantiation"
@(require) import "test_issue_swizzle_multi_assign"
@(require) import "test_issue_global_when_order"
@(require) import "test_issue_global_when_cycle_accepted"
@(require) import "test_issue_poly_using_subtype"
@(require) import "test_issue_global_proc_lits"
@(require) import "test_issue_packed_field_by_value"
@(require) import "test_issue_procedure_of_specialized"
@(require) import "test_issue_sysv_abi"
//$ODIN test ../test_issue_split_globals -define:ODIN_TEST_FANCY=false -vet -strict-style -ignore-unused-defineables
//$ODIN test ../test_issue_split_globals -define:ODIN_TEST_FANCY=false -vet -strict-style -ignore-unused-defineables -debug
//@(require) import "test_issue_fast_isel_lowering.odin $COMMON
//@(require) import "test_issue_fast_isel_lowering.odin $COMMON -o:none
//@(require) import "test_issue_equal_proc_dependencies.odin $COMMON
//if [[ $($ODIN test ../test_issue_equal_proc_dependencies.odin $COMMON -build-mode:obj 2>&1 | grep -ci "missing procedure") -eq 0 ]]; then
// echo "SUCCESSFUL 1/1"
//else
// echo "SUCCESSFUL 0/1"
// exit 1
//fi
//if [[ $($ODIN check ../test_issue_7421_tagged_duplicate.odin $COMMON_CHECK 2>&1 >/dev/null | grep -c "Error: Duplicate case") -eq 1 ]]; then
// echo "SUCCESSFUL 1/1"
//else
// echo "SUCCESSFUL 0/1"
// exit 1
//fi
//clang -c ../test_issue_7010.c -o test_issue_7010_c.o
//$ODIN test ../test_issue_7010.odin $COMMON
//
//clang -c ../test_issue_sysv_abi.c -o test_issue_sysv_abi_c.o
//
//clang -c ../test_issue_6809_6816.c -o test_issue_6809_6816_c.o -O3
//$ODIN test ../test_issue_6809_6816.odin -o:speed $COMMON
//clang -c ../test_issue_5640.c -o test_issue_5640_c.o
//if [[ "$(uname)" != "NetBSD" ]]; then
// $ODIN test ../test_issue_5640.odin -o:none --sanitize:address $COMMON
//else
// $ODIN test ../test_issue_5640.odin -o:none $COMMON
//fi
//$ODIN test ../test_lifetime_markers.odin $COMMON -o:size -lifetime-markers
//$ODIN test ../test_lifetime_markers.odin $COMMON -o:speed -lifetime-markers
@@ -1,5 +1,5 @@
// Tests issue #1592 https://github.com/odin-lang/Odin/issues/1592
package test_issues
package test_issue_1592
import "core:testing"
@@ -1,4 +1,4 @@
package test_issues
package test_issue_1730
import "core:testing"
@@ -1,5 +1,5 @@
// Tests issue #2056 https://github.com/odin-lang/Odin/issues/2056
package test_issues
package test_issue_2056
import "core:testing"
@@ -1,6 +1,6 @@
// Tests issue #2113 https://github.com/odin-lang/Odin/issues/2113
// Causes a panic on compilation
package test_issues
package test_issue_2113
T :: struct {
a: int,
@@ -3,7 +3,7 @@
// Ensures that we no longer raise the faulty error for #no_nil unions when
// then are 2 variants with the polymorphic type. Also ensure that we raise
// exactly 2 errors from the invalid unions
package test_issues
package test_issue_2395
ValidUnion :: union($T: typeid) #no_nil {
T,
@@ -1,5 +1,5 @@
// Tests issue #2466 https://github.com/odin-lang/Odin/issues/2466
package test_issues
package test_issue_2466
import "core:testing"
@@ -1,6 +1,6 @@
// Tests issue https://github.com/odin-lang/Odin/issues/2615
// Cannot iterate over string literals
package test_issues
package test_issue_2615
import "core:testing"
@@ -1,5 +1,5 @@
// Tests issue #2637 https://github.com/odin-lang/Odin/issues/2637
package test_issues
package test_issue_2637
import "core:testing"
@@ -1,6 +1,6 @@
// Tests issue https://github.com/odin-lang/Odin/issues/2666
// @(disabled=<boolean>) does not work with polymorphic procs
package test_issues
package test_issue_2666
import "core:testing"
@@ -1,4 +1,4 @@
package test_issues
package test_issue_2694
import "core:fmt"
import "core:encoding/json"
@@ -1,4 +1,4 @@
package main
package test_issue_3435
import "base:runtime"
import "core:mem"
@@ -1,5 +1,5 @@
// Tests issue #4210 https://github.com/odin-lang/Odin/issues/4210
package test_issues
package test_issue_4210
import "core:testing"
import "base:intrinsics"
@@ -1,5 +1,5 @@
// Tests issue #4364 https://github.com/odin-lang/Odin/issues/4364
package test_issues
package test_issue_4364
import "core:testing"
@@ -1,5 +1,5 @@
// Tests issue #4584 https://github.com/odin-lang/Odin/issues/4584
package test_issues
package test_issue_4584
import "core:testing"
import "core:log"
@@ -1,5 +1,5 @@
// Tests issue #5043 https://github.com/odin-lang/Odin/issues/5043
package test_issues
package test_issue_5043
Table :: map [string] Type
List :: [dynamic] Type
@@ -1,5 +1,5 @@
// Tests another variation of, this should compile #5097 https://github.com/odin-lang/Odin/issues/5097
package test_issues
package test_issue_5097_2
Face :: ^FaceRec
GlyphSlot :: ^GlyphSlotRec
@@ -1,5 +1,5 @@
// Tests issue #5097 https://github.com/odin-lang/Odin/issues/5097
package test_issues
package test_issue_5097
Node_Ptr :: ^Node // the typedef...
@@ -1,6 +1,6 @@
// Tests issues #5105 https://github.com/odin-lang/Odin/issues/5105
// and #5569 https://github.com/odin-lang/Odin/issues/5569
package test_issues
package test_issue_5105_5569
import "core:sync"
@@ -1,5 +1,5 @@
// Tests issue #5265 https://github.com/odin-lang/Odin/issues/5265
package test_issues
package test_issue_5265
main :: proc() {
a: i128 = 1
@@ -1,5 +1,5 @@
// Tests issue #5318 https://github.com/odin-lang/Odin/issues/5318
package test_issues
package test_issue_5318
import "core:testing"
@@ -1,5 +1,5 @@
// Tests issue #5573 https://github.com/odin-lang/Odin/issues/5573
package test_issues
package test_issue_5573
poly :: proc(x: $T) -> string {
return "poly"
@@ -1,6 +1,6 @@
// Tests issue: https://github.com/odin-lang/Odin/issues/5640
package test_issues
package test_issue_5640
import "core:testing"
@@ -19,7 +19,7 @@ myfunc :: #force_no_inline proc( f: Foo ) -> bool {
return f.x[0] == 45 && f.x[14] == 67
}
foreign import test_lib "build/test_issue_5640_c.o"
foreign import test_lib "../build/test_issue_5640_c.o"
foreign test_lib {
test_stack_next :: proc(
@@ -1,5 +1,5 @@
// Tests issue #5699 https://github.com/odin-lang/Odin/issues/5699
package test_issues
package test_issue_5699
import "core:testing"
@@ -1,5 +1,5 @@
// Tests issue #6068 https://github.com/odin-lang/Odin/issues/6068
package test_issues
package test_issue_6068
import "core:testing"
@@ -1,5 +1,5 @@
// Tests issue #6165 https://github.com/odin-lang/Odin/issues/6165
package test_issues
package test_issue_6165
import "core:testing"
@@ -1,5 +1,5 @@
// Tests issue #6240 https://github.com/odin-lang/Odin/issues/6240
package test_issues
package test_issue_6240
// should error - N=10 does not match bit_set range 0..<5
foo :: proc($N: int, b: $B/bit_set[0 ..< N]) {}
@@ -1,5 +1,5 @@
// Tests issue #6302 https://github.com/odin-lang/Odin/issues/6302
package test_issues
package test_issue_6302
import "core:testing"
@@ -1,5 +1,5 @@
// Tests issue #6344 https://github.com/odin-lang/Odin/issues/6344
package test_issues
package test_issue_6344
import "core:testing"
@@ -1,5 +1,5 @@
// Tests issue #6396 https://github.com/odin-lang/Odin/issues/6396
package test_issues
package test_issue_6396
import "core:testing"
@@ -1,5 +1,5 @@
// Tests issue #6401 https://github.com/odin-lang/Odin/issues/6401
package test_issues
package test_issue_6401
Wrapper :: struct(T: typeid) {
value: T,
@@ -1,7 +1,7 @@
// Tests issue #6419 https://github.com/odin-lang/Odin/issues/6419
// A polymorphic procedure with default procedure literal parameters
// should not cause the compiler to hang.
package test_issues
package test_issue_6419
import "core:testing"
@@ -1,5 +1,5 @@
// Tests issue #6484 https://github.com/odin-lang/Odin/pull/6484
package test_issues
package test_issue_6484
foreign import lib "this_library_does_not_exist"
@@ -1,5 +1,5 @@
// Test issue #6594 https://github.com/odin-lang/Odin/issues/6594
package test_issues
package test_issue_6594
a := a
@@ -1,5 +1,5 @@
// Tests issue #6621 https://github.com/odin-lang/Odin/issues/6621
package test_issues
package test_issue_6621
t: struct {
next: ^type_of(t),
@@ -1,5 +1,5 @@
// test issue for #6753 https://github.com/odin-lang/odin/issues/6753
package test_issues
package test_issue_6753
import "core:testing"
import "core:fmt"
@@ -1,11 +1,11 @@
// Tests issue: https://github.com/odin-lang/Odin/issues/6809
// & https://github.com/odin-lang/Odin/issues/6816
package test_issues
package test_issue_6809_6816
import "core:testing"
foreign import test_lib "build/test_issue_6809_6816_c.o"
foreign import test_lib "../build/test_issue_6809_6816_c.o"
foreign test_lib {
test_i8 :: proc "c" (val: i8) -> bool ---
@@ -1,4 +1,4 @@
package test_issues
package test_issue_6853
import "core:testing"
@@ -1,6 +1,6 @@
// Test for issue #6874 https://github.com/odin-lang/Odin/issues/6874
package test_issues
package test_issue_6874
import "core:fmt"
@@ -1,6 +1,6 @@
// Tests issues #6951 https://github.com/odin-lang/Odin/issues/6951
// and #5214 https://github.com/odin-lang/Odin/issues/5214
package test_issues
package test_issue_6951_5214
import "core:testing"
@@ -1,5 +1,5 @@
// Tests issue https://github.com/odin-lang/Odin/issues/6979
package test_issues
package test_issue_6979
error :: proc() -> typeid {
data :: struct{type: typeid}{int}
@@ -1,5 +1,5 @@
// Tests issue #7008 https://github.com/odin-lang/Odin/issues/7008
package test_issues
package test_issue_7008
import "core:testing"
import "core:slice"
@@ -1,6 +1,6 @@
// Tests issue: https://github.com/odin-lang/Odin/issues/7010
package test_issues
package test_issue_7010
Matrix4x4 :: struct {
columns: [4]#simd[4]f32,
@@ -50,7 +50,7 @@ odin_add_matrix4x2 :: proc (a: Matrix4x2, b: Matrix4x2) -> Matrix4x2 {
return copy_mat
}
foreign import ctest "build/test_issue_7010_c.o"
foreign import ctest "../build/test_issue_7010_c.o"
foreign ctest {
c_add_vec4f32 :: proc "c" (a: #simd[4]f32, b: #simd[4]f32) -> #simd[4]f32 ---
c_add_vec2u32 :: proc "c" (a: #simd[2]u32, b: #simd[2]u32) -> #simd[2]u32 ---
@@ -1,5 +1,5 @@
// Tests issue https://github.com/odin-lang/Odin/issues/7012
package test_issues
package test_issue_7012
import "base:intrinsics"
@@ -1,6 +1,6 @@
// Tests issue #7037 https://github.com/odin-lang/Odin/issues/7037
package test_issues
package test_issue_7037
Arena :: struct {
last: ^ArenaAllocation,
@@ -1,5 +1,5 @@
// Tests issue #7073-part 1 https://github.com/odin-lang/Odin/issues/7073
package test_issues
package test_issue_7073_1
main :: proc() {
arr := [2]int{10, 20}
@@ -1,4 +1,4 @@
package test_issues
package test_issue_7089
import "core:testing"
@@ -4,7 +4,7 @@
//
// Using a label name as a value expression (e.g. `defer one` where `one` is a label)
// should produce a compile error, not an assertion failure in the backend.
package test_issues
package test_issue_7108
main :: proc() {
// Issue #5830: defer with label expression
@@ -1,5 +1,5 @@
// Tests issue #7167 https://github.com/odin-lang/Odin/issues/7167
package test_issues
package test_issue_7167
import "core:fmt"
import "core:path/filepath"
@@ -1,4 +1,4 @@
package test_issues
package test_issue_7188
main :: proc() {
val: f32 = 42.0
@@ -1,5 +1,5 @@
// Tests issue #7260 https://github.com/odin-lang/Odin/issues/7260
package test_issues
package test_issue_7260
A :: [2]int
@@ -1,4 +1,4 @@
// Tests issue #7304 https://github.com/odin-lang/Odin/issues/7304
package test_issues
package test_issue_7304
Bad_Bit_Set :: bit_set[-1 ..< 9223372036854775808]
@@ -1,6 +1,6 @@
// Tests issue #7316 https://github.com/odin-lang/Odin/issues/7316
// A polymorphic procedure in a constant compound literal is its instance, not nil
package test_issues
package test_issue_7316
import "core:testing"
@@ -1,5 +1,5 @@
// Tests issue #7336 https://github.com/odin-lang/Odin/issues/7336
package test_issues
package test_issue_7336
import "core:testing"
@@ -2,7 +2,7 @@
// The compiler used to terminate with a SIGBUS/SIGSEGV when compiling a
// recursive `#soa` slice/dynamic array contained within its own element type.
package test_issues
package test_issue_7356
import "core:testing"
@@ -1,7 +1,7 @@
// Tests issue #7421: constant conditions in a tagless switch are conditions,
// not values to compare against one another for duplicate cases.
// https://github.com/odin-lang/Odin/issues/7421
package test_issues
package test_issue_7421
import "core:testing"
@@ -1,5 +1,5 @@
// Regression guard for issue #7421: tagged switches still reject duplicate cases.
package test_issues
package test_issue_7421_tagged_duplicate
main :: proc() {
value := false
@@ -1,7 +1,7 @@
// Tests issue #7429: local distinct types in procedure literal values must have
// unique canonical names.
// https://github.com/odin-lang/Odin/issues/7429
package test_issues
package test_issue_7429
main :: proc() {
_ = proc() {
@@ -1,5 +1,5 @@
// Tests issue #7430 https://github.com/odin-lang/Odin/issues/7430
package test_issues
package test_issue_7430
import "core:testing"
@@ -1,6 +1,6 @@
// Tests issues #7477 https://github.com/odin-lang/Odin/issues/7477
// and #7506 https://github.com/odin-lang/Odin/issues/7506
package test_issues
package test_issue_7477_7506
import "core:testing"
@@ -1,7 +1,7 @@
// Tests issue #7482 and #7474: a polymorphic procedure from another package used as a
// procedure value crashed the backend with `addr.addr.value != nullptr`.
// https://github.com/odin-lang/Odin/issues/7482
package test_issues
package test_issue_7482
import "core:sort"
@@ -1,6 +1,6 @@
// Tests issue #7547 https://github.com/odin-lang/Odin/issues/7547 (win32 implementation of `os.remove_all`)
#+build windows
package test_issues
package test_issue_7547
import runtime "base:runtime"
import testing "core:testing"
@@ -1,6 +1,6 @@
// Tests issue #7564: #location in a global variable caused a backend crash when read.
// https://github.com/odin-lang/Odin/issues/7564
package test_issues
package test_issue_7564
main_symbol := #location(main)
@@ -1,6 +1,6 @@
// Tests issue #7566 https://github.com/odin-lang/Odin/issues/7566
// Polymorphic instances whose constant parameters are spelt the same but have different values
package test_issues
package test_issue_7566
import "core:testing"
@@ -1,5 +1,5 @@
// Tests issue #7587 https://github.com/odin-lang/Odin/issues/7587
package test_issues
package test_issue_7587
import "core:testing"
@@ -1,7 +1,7 @@
// Tests issue #7596 and #7511: a procedure literal converted to a union variant inside a
// compound literal crashed the backend with `value_type != nullptr`.
// https://github.com/odin-lang/Odin/issues/7596
package test_issues
package test_issue_7596
P :: proc() -> int
U :: union {P, int}
@@ -13,7 +13,7 @@
// Both sides of the count are exact, which is what made one declaration more or less compile:
// one entity fewer and the alias insert does not reach the load factor, one entity more and the
// map has already grown while collecting declarations, before the loop starts.
package test_issues
package test_issue_7598
import "core:testing"
@@ -12,7 +12,7 @@
// has already grown by the time the loop starts and it reports its own 2 errors even without the
// fix; `boundary_errors_12` holds exactly 12 entities and its map grows *inside* the loop, so
// without the fix it swallows one of its 2.
package test_issues
package test_issue_7598_all_entities_checked
boundary_errors_13 :: proc() -> int {
n :: 11
@@ -1,4 +1,4 @@
package bug_repro
package test_issue_7689
import "core:fmt"
import "core:os"
@@ -1,6 +1,6 @@
// Tests issue #7700 https://github.com/odin-lang/Odin/issues/7700
// A field of a constant `#soa` array is the array of that field of each element
package test_issues
package test_issue_7700
import "base:intrinsics"
import "core:fmt"
@@ -31,8 +31,8 @@ types_proc :: proc($t: [3]typeid) -> [3]typeid { return t }
test_issue_7700 :: proc(t: ^testing.T) {
testing.expect_value(t, fmt.tprint(typeid_of(Strings(STUFF.name))), `Strings($strings={"i", "f", "p"})`)
testing.expect_value(t, fmt.tprint(typeid_of(Types(STUFF.type))), `Types($types={i64, f64, rawptr})`)
testing.expect_value(t, intrinsics.type_canonical_name(Strings(STUFF.name)), `test_issues::Strings(strings:$${"i","f","p"})`)
testing.expect_value(t, intrinsics.type_canonical_name(Types(STUFF.type)), `test_issues::Types(types:$${i64,f64,rawptr})`)
testing.expect_value(t, intrinsics.type_canonical_name(Strings(STUFF.name)), `test_issue_7700::Strings(strings:$${"i","f","p"})`)
testing.expect_value(t, intrinsics.type_canonical_name(Types(STUFF.type)), `test_issue_7700::Types(types:$${i64,f64,rawptr})`)
testing.expect_value(t, STUFF.name, [3]string{"i", "f", "p"})
testing.expect_value(t, STUFF.type, [3]typeid{i64, f64, rawptr})
@@ -1,6 +1,6 @@
// Tests issue #7708 https://github.com/odin-lang/Odin/issues/7708
// A record's concrete constant parameters must match, e.g. `M(1, 1, $T)` does not take a `M(3, 3, f64)`
package test_issues
package test_issue_7708
import "core:testing"
@@ -1,6 +1,6 @@
// Tests issue #7708 https://github.com/odin-lang/Odin/issues/7708
// A record argument whose constant parameters differ from the parameter's must be rejected
package test_issues
package test_issue_7708_mismatch
M :: struct($R, $C: int, $T: typeid) { data: [C][R]T }
@@ -1,4 +1,4 @@
package test_issues
package test_issue_7779
import "base:runtime"
import "core:testing"
@@ -1,4 +1,4 @@
package test_issues
package test_issue_7798
@(export, link_name = "A_link_name")
@@ -1,6 +1,6 @@
// Tests issue #829 https://github.com/odin-lang/Odin/issues/829
#+feature dynamic-literals
package test_issues
package test_issue_829
import "core:testing"
@@ -1,6 +1,6 @@
// An untyped compound literal that matches two union variants is one ambiguity error. Trying the
// overloads of `append` muted the error but not its follow-up lines, which crashed the error system.
package test_issues
package test_issue_ambiguous_union_literal
A :: struct { x: int }
B :: struct { x: int }
@@ -3,7 +3,7 @@
// `src/docs.cpp`, so its slot was zero-filled: ordering `0` and a null name. `odin doc` and
// `odin check -show-unused` printed an `asm` template under an empty category header, and passed
// the null name to a `%s`.
package test_issues
package test_issue_asm_doc_category
DOC_CONST :: 1
@@ -1,4 +1,4 @@
package test_issues
package test_issue_bool_comparison_truthiness
import "core:testing"
@@ -1,4 +1,4 @@
package test_issues
package test_issue_bool_to_be_conversion
import "core:testing"
@@ -1,4 +1,4 @@
package test_issues
package test_issue_const_array_broadcast
import "core:testing"
@@ -1,6 +1,6 @@
// Global declarations whose result used to depend on which declaration was checked first.
// Each case puts the declaration that used to break first in source order.
package test_issues
package test_issue_decl_order
import "core:testing"
@@ -1,5 +1,5 @@
// A `distinct` copy of a record satisfies a `$T/Record` constraint, as it shares its base record.
package test_issues
package test_issue_distinct_constraint
import "core:testing"
@@ -1,6 +1,6 @@
// Tests that a bare `..` in a type position call is rejected rather than left as a
// null argument for the checker to walk off of.
package test_issues
package test_issue_ellipsis_type_call
Foo :: struct($T: typeid) {
x: T,
@@ -1,6 +1,6 @@
// The backend gives each comparable struct and union in the type table, and the key of each map, an equality
// procedure, so the runtime procedures it compares fields with must be dependencies however the type was reached
package test_issues
package test_issue_equal_proc_dependencies
import "base:runtime"
import "core:fmt"
@@ -1,5 +1,5 @@
// What unoptimized x86 code is lowered to before LLVM's fast instruction selector sees it
package test_issues
package test_issue_fast_isel_lowering
import "core:testing"
@@ -1,5 +1,5 @@
// 'foreign import' attributes may name constants declared after them
package test_issues
package test_issue_foreign_import_attributes
@(priority_index=PRIORITY, extra_linker_flags=FLAGS)
foreign import lib "system:foo"
@@ -1,6 +1,6 @@
// Two declarations of the same foreign symbol whose parameters reach a named struct through a
// slice or a field read the wrong member of the type union and segfaulted the compiler
package test_issues
package test_issue_foreign_redeclaration
foreign import lib "this_library_does_not_exist"
@@ -1,6 +1,6 @@
// The field comparison that guards this had been reading a type's name as its field list, so
// signatures this different were accepted whenever the two names differed in length
package test_issues
package test_issue_foreign_redeclaration_mismatch
foreign import lib "this_library_does_not_exist"
@@ -1,6 +1,6 @@
// A global initialized with the address of a compound literal used to crash the backend
// if the literal's value was not a constant.
package test_issues
package test_issue_global_address_of_literal
import "core:testing"
@@ -1,5 +1,5 @@
// Procedure literals within the initializations of globals, constant and not, nested, and called through them
package test_issues
package test_issue_global_proc_lits
import "core:testing"
@@ -1,5 +1,5 @@
// Cycles of global 'when's where no choice of branches is consistent, so each is an error
package test_issues
package test_issue_global_when_cycle
// taken, `int` becomes 4 bytes and the first condition is false; not taken, the second is true
when size_of(int) == 8 { A :: 1 }
@@ -1,5 +1,5 @@
// Cycles of global 'when's with exactly one consistent choice of branches
package test_issues
package test_issue_global_when_cycle_accepted
import "core:testing"
@@ -1,5 +1,5 @@
// A cycle of global 'when's with two consistent choices of branches, which is an error
package test_issues
package test_issue_global_when_cycle_ambiguous
when size_of(int) == 8 { uint :: u32 }
when size_of(uint) == 8 { int :: i32 }
@@ -1,5 +1,5 @@
// Global 'when's are resolved when a lookup needs a name they may declare, whatever the source order
package test_issues
package test_issue_global_when_order
import "core:testing"
@@ -1,5 +1,5 @@
// -vet-when-shadowing, enabled by -vet: a global 'when' declaring a builtin name
package test_issues
package test_issue_global_when_shadowing
when true { uint :: u32 }
when true { @(private="file") byte :: u16 }
@@ -1,4 +1,4 @@
package test_issues
package test_issue_integer_literal_exponent
// A character that is not a digit in the exponent of an integer literal used to be ignored, so `1e1f`
// was accepted as 10.
@@ -1,6 +1,6 @@
// A field omitted from a constant compound literal is the zero value of its type,
// so converting it to a union holds that variant rather than nil
package test_issues
package test_issue_omitted_field_union
import "core:testing"
@@ -1,5 +1,5 @@
// A value within a packed struct, passed to a procedure by reference, is passed by an address as aligned as its type
package test_issues
package test_issue_packed_field_by_value
import "core:testing"
Loaded 100 of 109 files, more files were not shown because too many files have changed in this diff. Show more