public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "munroesj at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/96139] New: Vector element extract mistypes long long int down to long int
Date: Thu, 09 Jul 2020 19:44:38 +0000	[thread overview]
Message-ID: <bug-96139-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96139

            Bug ID: 96139
           Summary: Vector element extract mistypes long long int down to
                    long int
           Product: gcc
           Version: 9.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: munroesj at gcc dot gnu.org
  Target Milestone: ---

When printing vector element for example:
  printf ("%s %016llx,%016llx\n", prefix, val[1], val[0]);

where val is a vector unsigned long long int -Wall reports:

../src/printll.c: In function ‘print_v2xint64’:
../src/printll.c:20:21: warning: format ‘%llx’ expects argument of type ‘long
long unsigned int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
   printf ("%s %016llx,%016llx\n", prefix, val[1], val[0]);
                     ^

Here gcc claims that val[1] is a ‘long unsigned int’ then it is actually typed
as:

typedef __vector unsigned long long int vui64_t;

Some how the vector element extract has dropped the long long int type to long
int. This should not be an issue for PPC64 as long long int and long int are
both 64-bit but would matter for PPC32.

             reply	other threads:[~2020-07-09 19:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-09 19:44 munroesj at gcc dot gnu.org [this message]
2020-07-09 20:05 ` [Bug c/96139] " munroesj at gcc dot gnu.org
2020-07-09 22:01 ` [Bug target/96139] " wschmidt at gcc dot gnu.org
2020-07-10  0:34 ` munroesj at gcc dot gnu.org
2020-07-10  7:28 ` rguenth at gcc dot gnu.org
2020-07-16 23:03 ` willschm at gcc dot gnu.org
2020-09-03 20:11 ` cvs-commit at gcc dot gnu.org
2020-09-15 17:17 ` cvs-commit at gcc dot gnu.org
2020-09-15 20:50 ` willschm at gcc dot gnu.org
2020-09-15 21:46 ` cvs-commit at gcc dot gnu.org
2020-09-15 22:13 ` willschm at gcc dot gnu.org
2020-09-16 16:28 ` cvs-commit 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-96139-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).