From d0b0bd9570753907d1cb3a22278f53b84631dbf1 Mon Sep 17 00:00:00 2001 From: Harald van Dijk Date: Tue, 2 Sep 2025 17:23:50 +0100 Subject: [PATCH] Fix -list option in test_spir (#2509) This handles the case where test_spir is called without arguments. --- test_conformance/spir/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test_conformance/spir/main.cpp b/test_conformance/spir/main.cpp index 322e71bc..4e7c0ec5 100644 --- a/test_conformance/spir/main.cpp +++ b/test_conformance/spir/main.cpp @@ -6782,7 +6782,8 @@ static int ParseCommandLine (int argc, const char *argv[], ListTests(); return 0; } - else if (!strcmp(argv[1], "--list") || !strcmp(argv[1], "-list")) + else if ((argc > 1) + && (!strcmp(argv[1], "--list") || !strcmp(argv[1], "-list"))) { ListTests(); return 0;