public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* RFC: Bogus gimplification type mismatch error ?
@ 2007-08-20 10:11 Nick Clifton
  2007-08-20 10:17 ` Andrew Pinski
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Clifton @ 2007-08-20 10:11 UTC (permalink / raw)
  To: gcc-bugs; +Cc: binutils

Hi Guys,

  I tried bootstrapping the mainline gcc sources over the weekend,
  using the current mainline binutils sources in an integrated source
  tree.  The bootstrap failed with a problem in bfd/elflink.c which I
  have already reported and worked around.  The build then failed
  later on with this error message:

    opcodes/i386-dis.c:4213: error: type mismatch in pointer plus expression
    struct dis386 *
    struct dis386[8] *
    unsigned int 
    dp = &float_reg + D.7721

  I tracked this down to this line in i386-dis.c:

    dp = &float_reg[floatop - 0xd8][modrm.reg];

  where the variables involved are typed as:

    const struct dis386 *dp;
    static const struct dis386 float_reg[][8] = { ....

  To me this looks wrong.  Gcc appears to have converted multiple
  deferences of a multidimensional array into a single dereference of
  the multidimensional array.

  I found a workaround by explicitly performing the two dereferences
  one after another like this:

    {
      typedef struct dis386 eight_dis386 [8];
      const eight_dis386 *dp8;

      dp8 = float_reg + (floatop - 0xd8);
      dp = dp8[modrm.reg];
    }

  But before I check such a patch in I would like to know if the gcc
  error message is really correct, or if I have run across a
  gimplification bug.

Cheers
  Nick


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

* Re: RFC: Bogus gimplification type mismatch error ?
  2007-08-20 10:11 RFC: Bogus gimplification type mismatch error ? Nick Clifton
@ 2007-08-20 10:17 ` Andrew Pinski
  2007-08-20 13:49   ` Nick Clifton
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Pinski @ 2007-08-20 10:17 UTC (permalink / raw)
  To: Nick Clifton; +Cc: gcc-bugs, binutils

On 8/20/07, Nick Clifton <nickc@redhat.com> wrote:
>   But before I check such a patch in I would like to know if the gcc
>   error message is really correct, or if I have run across a
>   gimplification bug.

As mentioned before this error message is really an internal error, we
really should be fixing GCC and not changing binutils. And I already
mentioned this is most likely PR 22371 and that you should be filing
bug reports about these two errors/ICEs.

Thanks,
Andrew Pinski


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

* Re: RFC: Bogus gimplification type mismatch error ?
  2007-08-20 10:17 ` Andrew Pinski
@ 2007-08-20 13:49   ` Nick Clifton
  0 siblings, 0 replies; 3+ messages in thread
From: Nick Clifton @ 2007-08-20 13:49 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: gcc-bugs, binutils

Hi Andrew,

> As mentioned before this error message is really an internal error, we
> really should be fixing GCC and not changing binutils. And I already
> mentioned this is most likely PR 22371 and that you should be filing
> bug reports about these two errors/ICEs.

I have filed PR 33122 to cover this problem and added a comment to PR 22371 
mentioning that 33122 might be a duplicate.

Cheers
   Nick


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

end of thread, other threads:[~2007-08-20 13:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-20 10:11 RFC: Bogus gimplification type mismatch error ? Nick Clifton
2007-08-20 10:17 ` Andrew Pinski
2007-08-20 13:49   ` Nick Clifton

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