File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed
regression/cbmc/gcc_vector3 Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ typedef union {
99} vector_u ;
1010#endif
1111
12- int main ()
12+ void test_shuffle ()
1313{
1414#if defined(__GNUC__ ) && !defined(__clang__ )
1515 // https://gcc.gnu.org/onlinedocs/gcc/Vector-Extensions.html
@@ -31,7 +31,12 @@ int main()
3131 assert (res .members [1 ] == 5 );
3232 assert (res .members [2 ] == 3 );
3333 assert (res .members [3 ] == 6 );
34- #elif defined(__clang__ )
34+ #endif
35+ }
36+
37+ void test_shufflevector (void )
38+ {
39+ #if defined(__clang__ ) || (defined(__GNUC__ ) && __GNUC__ >= 12 )
3540 v4si a = {1 , 2 , 3 , 4 };
3641 v4si b = {5 , 6 , 7 , 8 };
3742
@@ -50,3 +55,9 @@ int main()
5055 assert (res .members [3 ] == 6 );
5156#endif
5257}
58+
59+ int main ()
60+ {
61+ test_shuffle ();
62+ test_shufflevector ();
63+ }
Original file line number Diff line number Diff line change @@ -2133,9 +2133,7 @@ void c_typecheck_baset::typecheck_side_effect_function_call(
21332133
21342134 return ;
21352135 }
2136- else if (
2137- identifier == " __builtin_shufflevector" &&
2138- config.ansi_c .mode == configt::ansi_ct::flavourt::CLANG)
2136+ else if (identifier == " __builtin_shufflevector" )
21392137 {
21402138 exprt result = typecheck_shuffle_vector (expr);
21412139 expr.swap (result);
You can’t perform that action at this time.
0 commit comments