GCC Bugzilla – Attachment 26008 Details for
Bug 50925
[4.8 Regression][avr] ICE at spill_failure, at reload1.c:2118
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Simplified testcase
nl.c (text/x-csrc), 2.20 KB, created by
denisc
on 2011-12-06 18:42:23 UTC
(
hide
)
Description:
Simplified testcase
Filename:
MIME Type:
Creator:
denisc
Created:
2011-12-06 18:42:23 UTC
Size:
2.20 KB
patch
obsolete
> >typedef unsigned int size_t; > >typedef unsigned int __uint16_t; > >typedef signed long __int32_t; >typedef unsigned long __uint32_t; > > >typedef struct _bufhead BUFHEAD; > >struct _bufhead { > BUFHEAD *prev; > BUFHEAD *next; > BUFHEAD *ovfl; > __uint32_t addr; > char *page; > char flags; >}; > > > >typedef BUFHEAD **SEGMENT; > > >typedef struct hashhdr { > int magic; > int version; > __uint32_t lorder; > int bsize; > int bshift; > int dsize; > int ssize; > int sshift; > int ovfl_point; > > int last_freed; > int max_bucket; > int high_mask; > int low_mask; > > int ffactor; > int nkeys; > int hdrpages; > int h_charkey; > > > int spares[32]; > __uint16_t bitmaps[32]; > >} HASHHDR; > >typedef struct htab { > HASHHDR hdr; > int nsegs; > int exsegs; > > __uint32_t > (*hash)(const void *, size_t); > int flags; > int fp; > char *tmp_buf; > char *tmp_key; > BUFHEAD *cpage; > int cbucket; > int cndx; > int error; > > int new_file; > > int save_file; > > > __uint32_t *mapp[32]; > int nmaps; > int nbufs; > > BUFHEAD bufhead; > SEGMENT *dir; >} HTAB; > > > >void * calloc (size_t __nmemb, size_t __size) ; >void *hash_realloc(SEGMENT **, int, int); >__uint32_t __log2(__uint32_t); >int __split_page(HTAB *, __uint32_t, __uint32_t); > > >extern int >__expand_table(hashp) > HTAB *hashp; >{ > __uint32_t old_bucket, new_bucket; > int dirsize, new_segnum, spare_ndx; > > new_bucket = ++hashp->hdr.max_bucket; > old_bucket = (hashp->hdr.max_bucket & hashp->hdr.low_mask); > > new_segnum = new_bucket >> hashp->hdr.sshift; > > > if (new_segnum >= hashp->nsegs) { > > if (new_segnum >= hashp->hdr.dsize) { > > dirsize = hashp->hdr.dsize * sizeof(SEGMENT *); > if (!hash_realloc(&hashp->dir, dirsize, dirsize << 1)) > return (-1); > hashp->hdr.dsize = dirsize << 1; > } > if ((hashp->dir[new_segnum] = > (SEGMENT)calloc(hashp->hdr.ssize, sizeof(SEGMENT))) == ((void *)0)) > return (-1); > hashp->exsegs++; > hashp->nsegs++; > } > > spare_ndx = __log2(hashp->hdr.max_bucket + 1); > if (spare_ndx > hashp->hdr.ovfl_point) { > hashp->hdr.spares[spare_ndx] = hashp->hdr.spares[hashp->hdr.ovfl_point]; > hashp->hdr.ovfl_point = spare_ndx; > } > > if (new_bucket > hashp->hdr.high_mask) { > > hashp->hdr.low_mask = hashp->hdr.high_mask; > hashp->hdr.high_mask = new_bucket | hashp->hdr.low_mask; > } > > return (__split_page(hashp, old_bucket, new_bucket)); >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 50925
:
25667
|
25720
| 26008 |
26486
|
26765