public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan-Benedict Glaw <jbglaw@lug-owl.de>
To: Graham Markall <graham.markall@embecosm.com>
Cc: gcc-patches@gcc.gnu.org, andrew.burgess@embecosm.com,
	guybe@mellanox.com, noamca@mellanox.com
Subject: Re: [BUILDROBOT] error: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ (was: [PATCH] [ARC] Recognise add_n and sub_n in combine again)
Date: Sun, 25 Jun 2017 10:02:00 -0000	[thread overview]
Message-ID: <20170625100154.GV23846@lug-owl.de> (raw)
In-Reply-To: <20170612094039.GH23846@lug-owl.de>

[-- Attachment #1: Type: text/plain, Size: 3079 bytes --]

Hi Graham,

On Mon, 2017-06-12 11:40:39 +0200, Jan-Benedict Glaw <jbglaw@lug-owl.de> wrote:
> On Fri, 2017-05-12 20:14:23 +0100, Graham Markall <graham.markall@embecosm.com> wrote:
> > Since the combine pass canonicalises shift-add insns using plus and
> > ashift (as opposed to plus and mult which it previously used to do), it
> > no longer creates *add_n or *sub_n insns, as the patterns match plus and
> > mult only. The outcome of this is that some opportunities to generate
> > add{1,2,3} and sub{1,2,3} instructions are missed.
> 
> [...]
> > diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
> > index 91c28e7..42730d5 100644
> > --- a/gcc/config/arc/arc.c
> > +++ b/gcc/config/arc/arc.c
> > @@ -3483,6 +3483,14 @@ arc_print_operand (FILE *file, rtx x, int code)
> >  
> >        return;
> >  
> > +    case 'c':
> > +      if (GET_CODE (x) == CONST_INT)
> > +        fprintf (file, "%d", INTVAL (x) );
> > +      else
> > +        output_operand_lossage ("invalid operands to %%c code");
> > +
> > +      return;
> > +
> 
> 
> Build robot found something (see log at
> http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=704773),
> seems to be introduced with the above patch fragment:
> 
> g++ -fno-PIE -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H -I. -I. -I/home/jbglaw/repos-configlist_mk/gcc/gcc -I/home/jbglaw/repos-configlist_mk/gcc/gcc/. -I/home/jbglaw/repos-configlist_mk/gcc/gcc/../include -I/home/jbglaw/repos-configlist_mk/gcc/gcc/../libcpp/include -I/opt/cfarm/mpc/include  -I/home/jbglaw/repos-configlist_mk/gcc/gcc/../libdecnumber -I/home/jbglaw/repos-configlist_mk/gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/jbglaw/repos-configlist_mk/gcc/gcc/../libbacktrace   -o arc.o -MT arc.o -MMD -MP -MF ./.deps/arc.TPo /home/jbglaw/repos-configlist_mk/gcc/gcc/config/arc/arc.c
> /home/jbglaw/repos-configlist_mk/gcc/gcc/config/arc/arc.c: In function ‘void arc_print_operand(FILE*, rtx, int)’:
> /home/jbglaw/repos-configlist_mk/gcc/gcc/config/arc/arc.c:3503:41: error: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Werror=format=]
>          fprintf (file, "%d", INTVAL (x) );
>                                          ^
> cc1plus: all warnings being treated as errors

This still doesn't build, see the two most current builds at
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=705416
(arc-elf32, --with-cpu=arc600) and
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=705415
(arceb-linux-uclibc, --with-cpu=arc700).

MfG, JBG

-- 
      Jan-Benedict Glaw      jbglaw@lug-owl.de              +49-172-7608481
Signature of:  The course of history shows that as a government grows, liberty
the second  : decreases."  (Thomas Jefferson)

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

      reply	other threads:[~2017-06-25 10:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-12 19:37 [PATCH] [ARC] Recognise add_n and sub_n in combine again Graham Markall
2017-05-15 16:59 ` Claudiu Zissulescu
2017-05-15 17:22   ` Graham Markall
2017-05-19 19:02     ` Claudiu Zissulescu
2017-06-12  9:40 ` [BUILDROBOT] error: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ (was: [PATCH] [ARC] Recognise add_n and sub_n in combine again) Jan-Benedict Glaw
2017-06-25 10:02   ` Jan-Benedict Glaw [this message]

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=20170625100154.GV23846@lug-owl.de \
    --to=jbglaw@lug-owl.de \
    --cc=andrew.burgess@embecosm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=graham.markall@embecosm.com \
    --cc=guybe@mellanox.com \
    --cc=noamca@mellanox.com \
    /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).