GCC language extension __attribute__((vector_size(16))) incompatible type error
up vote
0
down vote
favorite
While using Csmith a random C program generator I tried adding a GNU C language variable extension attribute((vector_size(16))) for variable .
static uint64_t func_1(void)
{/* block id: 0 */
uint64_t l_6 __attribute__ ((vector_size (64))) = 0xCD2466E9F08664A1LL;
int32_t *l_7 /*__attribute__ ((vector_size (16)))*/ = (void*)0;
int32_t *l_8 /*__attribute__ ((vector_size (16)))*/= &g_9;
int32_t *l_10 = &g_5.f7;
int32_t **l_11[10][8][3] = {{{&l_10,&l_10,&l_10},{&l_7,&l_8,&l_8},{&l_8,&l_8,(void*)0},{&l_7,&l_8,&l_10},{&l_8,&l_7,&l_10},{&l_8$
int32_t *l_13 = &g_9;
int i, j, k;
(*l_8) |= (g_2[3] , (safe_rshift_func_int16_t_s_s(0L, (g_5 , (l_6 != g_5.f2)))));
(*l_10) |= ((g_12 = l_10) != (void*)0);
l_13 = &g_9;
return (*l_13);
}
where as there are #define's provided for int8_t(like signed char),int16_t(like short) and so on.
and safe_rshift_func_int16_t_s_s is a function internally defined.
compiling the above program with gcc gives following errors:
sam.c: In function ‘func_1’:
sam.c:53:56: error: incompatible types when initializing type ‘__vector(8) long long unsigned int’ using type ‘long long unsigned int’
uint64_t l_6 __attribute__ ((vector_size (64))) = 0xCD2466E9F08664A1LL;
^~~~~~~~~~~~~~~~~~~~
Is the attribute wrongly placed?
I tried referring to the documentation from the GCC portal linked here but unable to understand exactly the correct use of this attribute, please can anyone point them out?
Are there any restrictions so as where to use this attribute?
Thanks community. !:)
I tried searching SO and web but most of them talk about use typedef for their solutions.
c gcc compiler-errors gcc-extensions
add a comment |
up vote
0
down vote
favorite
While using Csmith a random C program generator I tried adding a GNU C language variable extension attribute((vector_size(16))) for variable .
static uint64_t func_1(void)
{/* block id: 0 */
uint64_t l_6 __attribute__ ((vector_size (64))) = 0xCD2466E9F08664A1LL;
int32_t *l_7 /*__attribute__ ((vector_size (16)))*/ = (void*)0;
int32_t *l_8 /*__attribute__ ((vector_size (16)))*/= &g_9;
int32_t *l_10 = &g_5.f7;
int32_t **l_11[10][8][3] = {{{&l_10,&l_10,&l_10},{&l_7,&l_8,&l_8},{&l_8,&l_8,(void*)0},{&l_7,&l_8,&l_10},{&l_8,&l_7,&l_10},{&l_8$
int32_t *l_13 = &g_9;
int i, j, k;
(*l_8) |= (g_2[3] , (safe_rshift_func_int16_t_s_s(0L, (g_5 , (l_6 != g_5.f2)))));
(*l_10) |= ((g_12 = l_10) != (void*)0);
l_13 = &g_9;
return (*l_13);
}
where as there are #define's provided for int8_t(like signed char),int16_t(like short) and so on.
and safe_rshift_func_int16_t_s_s is a function internally defined.
compiling the above program with gcc gives following errors:
sam.c: In function ‘func_1’:
sam.c:53:56: error: incompatible types when initializing type ‘__vector(8) long long unsigned int’ using type ‘long long unsigned int’
uint64_t l_6 __attribute__ ((vector_size (64))) = 0xCD2466E9F08664A1LL;
^~~~~~~~~~~~~~~~~~~~
Is the attribute wrongly placed?
I tried referring to the documentation from the GCC portal linked here but unable to understand exactly the correct use of this attribute, please can anyone point them out?
Are there any restrictions so as where to use this attribute?
Thanks community. !:)
I tried searching SO and web but most of them talk about use typedef for their solutions.
c gcc compiler-errors gcc-extensions
What are you trying to do? Set all elements of the vector to 0xCD2466E9F08664A1LL?
– nemequ
Nov 20 at 3:05
It's a random fuzzer of C language generation
– Sameeran Joshi
Nov 20 at 5:45
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
While using Csmith a random C program generator I tried adding a GNU C language variable extension attribute((vector_size(16))) for variable .
static uint64_t func_1(void)
{/* block id: 0 */
uint64_t l_6 __attribute__ ((vector_size (64))) = 0xCD2466E9F08664A1LL;
int32_t *l_7 /*__attribute__ ((vector_size (16)))*/ = (void*)0;
int32_t *l_8 /*__attribute__ ((vector_size (16)))*/= &g_9;
int32_t *l_10 = &g_5.f7;
int32_t **l_11[10][8][3] = {{{&l_10,&l_10,&l_10},{&l_7,&l_8,&l_8},{&l_8,&l_8,(void*)0},{&l_7,&l_8,&l_10},{&l_8,&l_7,&l_10},{&l_8$
int32_t *l_13 = &g_9;
int i, j, k;
(*l_8) |= (g_2[3] , (safe_rshift_func_int16_t_s_s(0L, (g_5 , (l_6 != g_5.f2)))));
(*l_10) |= ((g_12 = l_10) != (void*)0);
l_13 = &g_9;
return (*l_13);
}
where as there are #define's provided for int8_t(like signed char),int16_t(like short) and so on.
and safe_rshift_func_int16_t_s_s is a function internally defined.
compiling the above program with gcc gives following errors:
sam.c: In function ‘func_1’:
sam.c:53:56: error: incompatible types when initializing type ‘__vector(8) long long unsigned int’ using type ‘long long unsigned int’
uint64_t l_6 __attribute__ ((vector_size (64))) = 0xCD2466E9F08664A1LL;
^~~~~~~~~~~~~~~~~~~~
Is the attribute wrongly placed?
I tried referring to the documentation from the GCC portal linked here but unable to understand exactly the correct use of this attribute, please can anyone point them out?
Are there any restrictions so as where to use this attribute?
Thanks community. !:)
I tried searching SO and web but most of them talk about use typedef for their solutions.
c gcc compiler-errors gcc-extensions
While using Csmith a random C program generator I tried adding a GNU C language variable extension attribute((vector_size(16))) for variable .
static uint64_t func_1(void)
{/* block id: 0 */
uint64_t l_6 __attribute__ ((vector_size (64))) = 0xCD2466E9F08664A1LL;
int32_t *l_7 /*__attribute__ ((vector_size (16)))*/ = (void*)0;
int32_t *l_8 /*__attribute__ ((vector_size (16)))*/= &g_9;
int32_t *l_10 = &g_5.f7;
int32_t **l_11[10][8][3] = {{{&l_10,&l_10,&l_10},{&l_7,&l_8,&l_8},{&l_8,&l_8,(void*)0},{&l_7,&l_8,&l_10},{&l_8,&l_7,&l_10},{&l_8$
int32_t *l_13 = &g_9;
int i, j, k;
(*l_8) |= (g_2[3] , (safe_rshift_func_int16_t_s_s(0L, (g_5 , (l_6 != g_5.f2)))));
(*l_10) |= ((g_12 = l_10) != (void*)0);
l_13 = &g_9;
return (*l_13);
}
where as there are #define's provided for int8_t(like signed char),int16_t(like short) and so on.
and safe_rshift_func_int16_t_s_s is a function internally defined.
compiling the above program with gcc gives following errors:
sam.c: In function ‘func_1’:
sam.c:53:56: error: incompatible types when initializing type ‘__vector(8) long long unsigned int’ using type ‘long long unsigned int’
uint64_t l_6 __attribute__ ((vector_size (64))) = 0xCD2466E9F08664A1LL;
^~~~~~~~~~~~~~~~~~~~
Is the attribute wrongly placed?
I tried referring to the documentation from the GCC portal linked here but unable to understand exactly the correct use of this attribute, please can anyone point them out?
Are there any restrictions so as where to use this attribute?
Thanks community. !:)
I tried searching SO and web but most of them talk about use typedef for their solutions.
c gcc compiler-errors gcc-extensions
c gcc compiler-errors gcc-extensions
asked Nov 19 at 18:54
Sameeran Joshi
32
32
What are you trying to do? Set all elements of the vector to 0xCD2466E9F08664A1LL?
– nemequ
Nov 20 at 3:05
It's a random fuzzer of C language generation
– Sameeran Joshi
Nov 20 at 5:45
add a comment |
What are you trying to do? Set all elements of the vector to 0xCD2466E9F08664A1LL?
– nemequ
Nov 20 at 3:05
It's a random fuzzer of C language generation
– Sameeran Joshi
Nov 20 at 5:45
What are you trying to do? Set all elements of the vector to 0xCD2466E9F08664A1LL?
– nemequ
Nov 20 at 3:05
What are you trying to do? Set all elements of the vector to 0xCD2466E9F08664A1LL?
– nemequ
Nov 20 at 3:05
It's a random fuzzer of C language generation
– Sameeran Joshi
Nov 20 at 5:45
It's a random fuzzer of C language generation
– Sameeran Joshi
Nov 20 at 5:45
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53380964%2fgcc-language-extension-attribute-vector-size16-incompatible-type-error%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What are you trying to do? Set all elements of the vector to 0xCD2466E9F08664A1LL?
– nemequ
Nov 20 at 3:05
It's a random fuzzer of C language generation
– Sameeran Joshi
Nov 20 at 5:45