This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [committed] Introduce RTL function reader
- From: David Malcolm <dmalcolm at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Uros Bizjak <ubizjak at gmail dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>, Bernd Schmidt <bschmidt at redhat dot com>
- Date: Fri, 06 Jan 2017 11:43:07 -0500
- Subject: Re: [committed] Introduce RTL function reader
- Authentication-results: sourceware.org; auth=none
- References: <1483647626-35623-1-git-send-email-dmalcolm@redhat.com> <20170106162553.GS21933@tucnak>
On Fri, 2017-01-06 at 17:25 +0100, Jakub Jelinek wrote:
> On Thu, Jan 05, 2017 at 03:20:26PM -0500, David Malcolm wrote:
> > + /* Handle "reuse_rtx". */
> > + if (strcmp (code_name, "reuse_rtx") == 0)
> > + {
> > + read_name (&name);
> > + long idx = atoi (name.string);
> > + /* Look it up by ID. */
> > + gcc_assert (idx < m_reuse_rtx_by_id.length ());
> > + return_rtx = m_reuse_rtx_by_id[idx];
> > + return return_rtx;
> > + }
>
> This broke bootstrap on i686-linux (and other ILP32 hosts), because
> vec.h length () returns unsigned.
Sorry about the breakage.
I'm not able to approve the patch, but the fix looks to me like it
would be covered under the "obvious" rule.
> Is the following ok for trunk if it passes bootstrap/regtest?
>
> 2017-01-06 Jakub Jelinek <jakub@redhat.com>
>
> * read-rtl.c (rtx_reader::read_rtx_code): Avoid -Wsign-compare
> warning.
>
> --- gcc/read-rtl.c.jj 2017-01-06 16:58:43.000000000 +0100
> +++ gcc/read-rtl.c 2017-01-06 17:22:32.105744812 +0100
> @@ -1255,7 +1255,7 @@ rtx_reader::read_rtx_code (const char *c
> if (strcmp (code_name, "reuse_rtx") == 0)
> {
> read_name (&name);
> - long idx = atoi (name.string);
> + unsigned idx = atoi (name.string);
> /* Look it up by ID. */
> gcc_assert (idx < m_reuse_rtx_by_id.length ());
> return_rtx = m_reuse_rtx_by_id[idx];
>
>
> Jakub