r300g/compiler/tests: Fix segfault
authorTom Stellard <thomas.stellard@amd.com>
Thu, 8 Aug 2013 00:26:01 +0000 (17:26 -0700)
committerTom Stellard <thomas.stellard@amd.com>
Thu, 8 Aug 2013 00:27:23 +0000 (17:27 -0700)
CC: "9.2" <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/r300/compiler/tests/radeon_compiler_optimize_tests.c
src/gallium/drivers/r300/compiler/tests/radeon_compiler_regalloc_tests.c
src/gallium/drivers/r300/compiler/tests/radeon_compiler_util_tests.c

index 819fb6c88d522094752db96e8e138d7574fb6af0..3244d9334d7886d34bd6ee4edd0a27fbe8ff9480 100644 (file)
@@ -80,7 +80,7 @@ static void test_runner_rc_optimize(struct test_result * result)
 
 unsigned radeon_compiler_optimize_run_tests()
 {
-       struct test tests[] = {
+       static struct test tests[] = {
                {"rc_optimize() => peephole_mul_omod()", test_runner_rc_optimize},
                {NULL, NULL}
        };
index eeb6b072d20d079eaf600de1b8bb7bc949eb3943..511596ce8b573c456db13fdc0c8b647215821116 100644 (file)
@@ -91,8 +91,8 @@ static void tex_1d_swizzle(struct test_result *result)
 
 unsigned radeon_compiler_regalloc_run_tests()
 {
-       struct test tests[] = {
-               {"rc_pair_regalloc() => TEX 1D Swizzle - r300", tex_1d_swizzle},
+       static struct test tests[] = {
+               {"rc_pair_regalloc() => TEX 1D Swizzle - r300", tex_1d_swizzle },
                {NULL, NULL}
        };
        return run_tests(tests);
index 33b27fcdca4a795b42783be9519ceb6ea88ea339..3e9759409b169233cc3d39d98a7932df2845d42b 100644 (file)
@@ -96,7 +96,7 @@ static void test_runner_rc_inst_can_use_presub(struct test_result * result)
 
 unsigned radeon_compiler_util_run_tests()
 {
-       struct test tests[] = {
+       static struct test tests[] = {
                {"rc_inst_can_use_presub()", test_runner_rc_inst_can_use_presub},
                {NULL, NULL}
        };