[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#362428: Segfault when compiling hdf5_1.6.5-2



forwarded 362428 http://gcc.gnu.org/PR27144
retitle 362428 Segfault when compiling hdf5_1.6.5-2 on AMD64
thanks

* Martin Michlmayr <tbm@cyrius.com> [2006-04-13 14:05]:
> Currently running delta.

segfault on AMD64; it doesn't happen on i386.


(sid)3185:tbm@em64t: ~/delta/bin] cat mini.c
typedef struct { void *p; }
hvl_t;
test_vltypes_compound_vlen_vlen (void) {
  typedef struct {
    int i;
    float f;
    hvl_t v;
  }
  s1;
  s1 wdata[128];
  unsigned i, j, k;
  hvl_t *t1, *t2;
  for (i = 0; i < 128; i++) {
      wdata[i].i = i * 10;
      wdata[i].f = (float) ((i * 20) / 3.0);
      wdata[i].v.p = malloc ((i + 16) * sizeof (hvl_t));
      for (t1 = (wdata[i].v).p, j = 0; j < (i + 16); j++, t1++) {
          for (k = 0; k < j + 8; k++)
            ((unsigned int *) t1->p)[k] = i * 100 + j * 10 + k;
        }
    }
}
test_vltypes (void) {
}
(sid)3186:tbm@em64t: ~/delta/bin] /usr/lib/gcc-snapshot/bin/gcc -O1 -c
mini.c
mini.c: In function 'test_vltypes_compound_vlen_vlen':
mini.c:16: warning: incompatible implicit declaration of built-in function 'malloc'
(sid)3187:tbm@em64t: ~/delta/bin] /usr/lib/gcc-snapshot/bin/gcc -O2
mini.c
mini.c: In function 'test_vltypes_compound_vlen_vlen':
mini.c:16: warning: incompatible implicit declaration of built-in function 'malloc'
mini.c:3: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
zsh: exit 1     /usr/lib/gcc-snapshot/bin/gcc -O2 mini.c
(sid)3188:tbm@em64t: ~/delta/bin]

-- 
Martin Michlmayr
http://www.cyrius.com/



Reply to: