public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/96139] New: Vector element extract mistypes long long int down to long int
@ 2020-07-09 19:44 munroesj at gcc dot gnu.org
  2020-07-09 20:05 ` [Bug c/96139] " munroesj at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: munroesj at gcc dot gnu.org @ 2020-07-09 19:44 UTC (permalink / raw)
  To: gcc-bugs

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.

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

end of thread, other threads:[~2020-09-16 16:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-09 19:44 [Bug c/96139] New: Vector element extract mistypes long long int down to long int munroesj at gcc dot gnu.org
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

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).