File tree 2 files changed +14
-5
lines changed
regression/cbmc/gcc_vector3
2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ typedef union {
9
9
} vector_u ;
10
10
#endif
11
11
12
- int main ()
12
+ void test_shuffle ()
13
13
{
14
14
#if defined(__GNUC__ ) && !defined(__clang__ )
15
15
// https://gcc.gnu.org/onlinedocs/gcc/Vector-Extensions.html
@@ -31,7 +31,12 @@ int main()
31
31
assert (res .members [1 ] == 5 );
32
32
assert (res .members [2 ] == 3 );
33
33
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 )
35
40
v4si a = {1 , 2 , 3 , 4 };
36
41
v4si b = {5 , 6 , 7 , 8 };
37
42
@@ -50,3 +55,9 @@ int main()
50
55
assert (res .members [3 ] == 6 );
51
56
#endif
52
57
}
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(
2133
2133
2134
2134
return ;
2135
2135
}
2136
- else if (
2137
- identifier == " __builtin_shufflevector" &&
2138
- config.ansi_c .mode == configt::ansi_ct::flavourt::CLANG)
2136
+ else if (identifier == " __builtin_shufflevector" )
2139
2137
{
2140
2138
exprt result = typecheck_shuffle_vector (expr);
2141
2139
expr.swap (result);
You can’t perform that action at this time.
0 commit comments