From: Carl Love Date: Thu, 3 Oct 2024 01:05:08 +0000 (-0400) Subject: rs6000, fix test builtins-1-p10-runnable.c X-Git-Tag: basepoints/gcc-16~2554 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d779765b0123cc64c1e6af2656a20979ecaaf96;p=thirdparty%2Fgcc.git rs6000, fix test builtins-1-p10-runnable.c The test has two issues: 1) The test should generate execute abort() if an error is found. However, the test contains a #define 0 which actually enables the error prints not exectuting void() because the debug code is protected by an #ifdef not #if. The #define DEBUG needs to be removed to so the test will abort on an error. 2) The vec_i_expected output was tweeked to test that it would fail. The test value was not removed. By removing the #define DEBUG, the test fails and reports 1 failure. Removing the intentionally wrong expected value results in the test passing with no errors as expected. gcc/testsuite/ChangeLog: * gcc.target/powerpc/builtins-1-p10-runnable.c: Remove #define DEBUG. Replace vec_i_expected value with correct value. --- diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-1-p10-runnable.c b/gcc/testsuite/gcc.target/powerpc/builtins-1-p10-runnable.c index 222c8b3a409..3e8a1c736e3 100644 --- a/gcc/testsuite/gcc.target/powerpc/builtins-1-p10-runnable.c +++ b/gcc/testsuite/gcc.target/powerpc/builtins-1-p10-runnable.c @@ -25,8 +25,6 @@ #include #include -#define DEBUG 0 - #ifdef DEBUG #include #endif @@ -281,8 +279,7 @@ int main() /* Signed word multiply high */ i_arg1 = (vector int){ 2147483648, 2147483648, 2147483648, 2147483648 }; i_arg2 = (vector int){ 2, 3, 4, 5}; - // vec_i_expected = (vector int){-1, -2, -2, -3}; - vec_i_expected = (vector int){1, -2, -2, -3}; + vec_i_expected = (vector int){-1, -2, -2, -3}; vec_i_result = vec_mulh (i_arg1, i_arg2);