Skip to content

Commit 57ed2bc

Browse files
author
Daniel Kroening
committed
fix gcc_attributes10
gcc requires the vector size to be a power of two.
1 parent 2796025 commit 57ed2bc

File tree

1 file changed

+6
-4
lines changed
  • regression/ansi-c/gcc_attributes10

1 file changed

+6
-4
lines changed

regression/ansi-c/gcc_attributes10/main.c

+6-4
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22
int array##__LINE__[(condition) ? 1 : -1]
33

44
#ifdef __GNUC__
5+
#ifndef __clang__
56

6-
int x __attribute__ ((__vector_size__ (12), __may_alias__));
7+
int x __attribute__ ((__vector_size__ (16), __may_alias__));
78
int x2 __attribute__ ((__may_alias__));
8-
int x3 __attribute__ ((__may_alias__, __vector_size__ (12)));
9+
int x3 __attribute__ ((__may_alias__, __vector_size__ (16)));
910

10-
STATIC_ASSERT(sizeof(x)==12);
11+
STATIC_ASSERT(sizeof(x)==16);
1112
STATIC_ASSERT(sizeof(x2)==sizeof(int));
12-
STATIC_ASSERT(sizeof(x3)==12);
13+
STATIC_ASSERT(sizeof(x3)==16);
1314

15+
#endif
1416
#endif
1517

1618
int main(int argc, char* argv[])

0 commit comments

Comments
 (0)