[Bug c/106017] New: [PowerPC] No array-to-pointer conversion for MMA accumulator
nemanja.i.ibm at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Jun 17 14:34:46 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106017
Bug ID: 106017
Summary: [PowerPC] No array-to-pointer conversion for MMA
accumulator
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: nemanja.i.ibm at gmail dot com
Target Milestone: ---
It appears that the typical array to pointer conversion for function arguments
does not work for MMA accumulator types. The user has to explicitly convert.
Code:
$ cat aa.c
void takeacc(__vector_quad *);
void passacc() {
__vector_quad arr[4];
#ifdef _EXPLICIT
takeacc(&arr[0]);
#else
takeacc(arr);
#endif
}
Compile (success):
$ gcc -mcpu=power10 -O3 aa.c -S -D_EXPLICIT && echo Success
Success
Compile (failure):
$ gcc -mcpu=power10 -O3 aa.c -S && echo Success
aa.c: In function 'passacc':
aa.c:7:9: error: invalid conversion to type '* __vector_quad'
7 | takeacc(arr);
| ^~~~~~~
Version:
$ gcc --version
gcc (GCC) 12.1.1 20220524 [releases/gcc-12 r12-8410-gf0a0aeec44]
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
More information about the Gcc-bugs
mailing list