public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/106017] New: [PowerPC] No array-to-pointer conversion for MMA accumulator
@ 2022-06-17 14:34 nemanja.i.ibm at gmail dot com
  2022-06-17 17:16 ` [Bug target/106017] " segher at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: nemanja.i.ibm at gmail dot com @ 2022-06-17 14:34 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-08-30  1:14 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-17 14:34 [Bug c/106017] New: [PowerPC] No array-to-pointer conversion for MMA accumulator nemanja.i.ibm at gmail dot com
2022-06-17 17:16 ` [Bug target/106017] " segher at gcc dot gnu.org
2022-06-17 17:31 ` bergner at gcc dot gnu.org
2022-06-17 17:35 ` segher at gcc dot gnu.org
2022-06-17 19:19 ` nemanja.i.ibm at gmail dot com
2022-06-17 19:51 ` segher at gcc dot gnu.org
2022-06-17 20:50 ` segher at gcc dot gnu.org
2022-06-17 22:23 ` bergner at gcc dot gnu.org
2022-08-27 17:28 ` bergner at gcc dot gnu.org
2022-08-27 17:30 ` bergner at gcc dot gnu.org
2022-08-27 18:27 ` bergner at gcc dot gnu.org
2022-08-28  0:44 ` cvs-commit at gcc dot gnu.org
2022-08-29 22:38 ` cvs-commit at gcc dot gnu.org
2022-08-30  0:22 ` cvs-commit at gcc dot gnu.org
2022-08-30  1:13 ` cvs-commit at gcc dot gnu.org
2022-08-30  1:14 ` bergner at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).