public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "nemanja.i.ibm at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/106017] New: [PowerPC] No array-to-pointer conversion for MMA accumulator
Date: Fri, 17 Jun 2022 14:34:46 +0000	[thread overview]
Message-ID: <bug-106017-4@http.gcc.gnu.org/bugzilla/> (raw)

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.

             reply	other threads:[~2022-06-17 14:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-17 14:34 nemanja.i.ibm at gmail dot com [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-106017-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).