[Bug c/14615] New: ICE in verify_local_live_at_start, at flow.c:568

davidm at hpl dot hp dot com gcc-bugzilla@gcc.gnu.org
Wed Mar 17 08:18:00 GMT 2004


Trying to build the Linux kernel for ia64, there is an ICE in mm/memory.c.  The
file below reproduces the bug when compiled like so:

 $ gcc -v
 Reading specs from /opt/gcc-pre3.5/lib/gcc/ia64-unknown-linux-gnu/3.5.0/specs
 Configured with: ../gcc/configure --enable-shared --with-system-zlib
--enable-nls --without-included-gettext --enable-__cxa_atexit
--enable-clocale=gnu --enable-java-gc=boehm --enable-objc-gc
--enable-languages=c --prefix=/opt/gcc-pre3.5 : (reconfigured)  : (reconfigured) 
 Thread model: posix
 gcc version 3.5.0 20040316 (experimental)

 $ gcc -O2 -frename-registers -mconstant-gp -c memory.i
 memory.i: In function `copy_page_range':
 memory.i:41: internal compiler error: in verify_local_live_at_start, at flow.c:568
 Please submit a full bug report,
 with preprocessed source if appropriate.
 See <URL:http://gcc.gnu.org/bugs.html> for instructions.

Dropping any one of these options (other than -c) makes the ICE go away.  Steve
told me there was a similar bug that was solved recently, but the GCC I'm using
is supposed to have that bug fixed already, so it sounds like this might be
something new.

---
typedef struct { unsigned long pmd; } pmd_t;
typedef struct { unsigned long pgd; } pgd_t;

extern pmd_t *__pmd_alloc (void *mm, pgd_t * pgd, unsigned long address);
extern unsigned long *pte_alloc_map (pmd_t * pmd);

static unsigned long pgd_index (unsigned long address) {
  return (address >> 61 << (14 - 6)) | address;
}

static pgd_t *pgd_offset (void *mm, unsigned long address) {
  return (pgd_t *) mm + pgd_index (address);
}

static pmd_t *pmd_alloc (void *mm, pgd_t * pgd) {
  if ((!((*pgd).pgd)))
    return __pmd_alloc (mm, pgd, 0);
  return (pmd_t *) pgd->pgd;
}

void
copy_page_range (void *dst, unsigned long vma)
{
  pmd_t *src_pmd, *dst_pmd;
  pgd_t *dst_pgd;

  dst_pgd = pgd_offset (dst, vma);

  for (;;)
    {
      src_pmd = (pmd_t *) vma;
      dst_pmd = pmd_alloc (dst, dst_pgd);
      do
        {
          unsigned long *dst_pte = pte_alloc_map (dst_pmd);
          dst_pte++;
          dst_pmd++;
        }
      while ((unsigned long) src_pmd & 1023*8);
    }
}

-- 
           Summary: ICE in verify_local_live_at_start, at flow.c:568
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: davidm at hpl dot hp dot com
                CC: gcc-bugs at gcc dot gnu dot org,sje at cup dot hp dot
                    com
 GCC build triplet: ia64-hp-linux
  GCC host triplet: ia64-hp-linux
GCC target triplet: ia64-hp-linux


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



More information about the Gcc-bugs mailing list