public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/21648] New: ICE on code with nested loops
@ 2005-05-18 18:14 jconner at apple dot com
  2005-05-18 18:14 ` [Bug middle-end/21648] " jconner at apple dot com
  2005-05-18 18:18 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: jconner at apple dot com @ 2005-05-18 18:14 UTC (permalink / raw)
  To: gcc-bugs

Compiling the following code with -O2 causes an ICE (verified on both i686-pc-cygwin and arm-none-
elf):

struct mad_bitptr {
  unsigned char const *byte;
};

struct mad_stream {
  struct mad_bitptr ptr;
};

struct channel {
  unsigned short part2_3_length;
};

struct granule {
  struct channel ch[2];
};

struct sideinfo {
  struct granule gr[2];
};

static
void III_sideinfo(struct mad_bitptr *ptr, struct sideinfo *si)
{
  unsigned int ngr, gr, ch;
  unsigned int nch;

  for (gr = 0; gr < ngr; ++gr) {
    struct granule *granule = &si->gr[gr];

    for (ch = 0; ch < nch; ++ch) {
      struct channel *channel = &granule->ch[ch];

      channel->part2_3_length = 1;
    }
  }
}

void mad_layer_III(struct mad_stream *stream)
{
  struct sideinfo si;

  III_sideinfo(&stream->ptr, &si);
}

This happens in the mainline, and appears to be the result of one of the patches applied 2005-05-17, 
as it doesn't happen in a snapshot from the previous day.

A segfault is occurring when the function is_gimple_val (from tree-gimple.c) passes a NULL value to 
is_gimple_reg_type().

-- 
           Summary: ICE on code with nested loops
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jconner at apple dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-cygwin
GCC target triplet: i686-pc-cygwin


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21648


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

* [Bug middle-end/21648] ICE on code with nested loops
  2005-05-18 18:14 [Bug middle-end/21648] New: ICE on code with nested loops jconner at apple dot com
@ 2005-05-18 18:14 ` jconner at apple dot com
  2005-05-18 18:18 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: jconner at apple dot com @ 2005-05-18 18:14 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21648


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

* [Bug middle-end/21648] ICE on code with nested loops
  2005-05-18 18:14 [Bug middle-end/21648] New: ICE on code with nested loops jconner at apple dot com
  2005-05-18 18:14 ` [Bug middle-end/21648] " jconner at apple dot com
@ 2005-05-18 18:18 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-18 18:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-18 18:18 -------
This is really PR 21638 which I am testing a fix for right now.

*** This bug has been marked as a duplicate of 21638 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21648


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

end of thread, other threads:[~2005-05-18 18:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-18 18:14 [Bug middle-end/21648] New: ICE on code with nested loops jconner at apple dot com
2005-05-18 18:14 ` [Bug middle-end/21648] " jconner at apple dot com
2005-05-18 18:18 ` pinskia at gcc dot gnu dot 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).