I'm getting the following segfault on IA-64 with current 4.2 and 4.3.
This goes back at least to 20060721 - I don't have anything older to
test here at the moment.  I don't see this segfault on x86_64.

Unfortunately I don't have a working gdb on ia-64 at the moment so
I cannot supply a backtrace.

[EMAIL PROTECTED]:~$ /usr/lib/gcc-snapshot/bin/gcc -c -O1 -ftree-vectorize
/home/tbm/poc-streamer-ogg-write.c
/home/tbm/poc-streamer-ogg-write.c: In function 'ogg_fill_page_hdr':
/home/tbm/poc-streamer-ogg-write.c:14: internal compiler error: Segmentation
fault
Please submit a full bug report,
with preprocessed source if appropriate.

Testcase:


typedef struct buf_s
{
  unsigned long size;
}
buf_t;
typedef struct ogg_page_s
{
  unsigned char page_segments;
  unsigned char lacing_values[255];
  buf_t raw;
}
ogg_page_t;
ogg_fill_page_hdr (ogg_page_t *page)
{
  unsigned long size = page->page_segments;
  int i;
  for (i = 0; i < page->page_segments; i++)
    size += page->lacing_values[i];
  if (page->raw.size < size)
    for (i = 0; i < page->page_segments; i++)
        continue;
}


-- 
           Summary: [4.2/4.3 Regression] segfault with -O1 -ftree-vectorize
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tbm at cyrius dot com


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

Reply via email to