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;