annotate gcc/testsuite/gcc.c-torture/compile/990517-1.c @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 1830386684a0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Extracted from the sdm module in perl. */
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
2
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
3 /* { dg-require-stack-size "12*2+8+1024+8" } */
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
4
111
kono
parents:
diff changeset
5 typedef struct {
kono
parents:
diff changeset
6 char *dptr;
kono
parents:
diff changeset
7 int dsize;
kono
parents:
diff changeset
8 } datum;
kono
parents:
diff changeset
9 extern long sdbm_hash (char *, int) ;
kono
parents:
diff changeset
10 extern void sdbm__putpair (char *, datum, datum) ;
kono
parents:
diff changeset
11 void
kono
parents:
diff changeset
12 sdbm__splpage (char *pag, char *New, long int sbit)
kono
parents:
diff changeset
13 {
kono
parents:
diff changeset
14 datum key;
kono
parents:
diff changeset
15 datum val;
kono
parents:
diff changeset
16 register int n;
kono
parents:
diff changeset
17 register int off = 1024 ;
kono
parents:
diff changeset
18 char cur[1024 ];
kono
parents:
diff changeset
19 register short *ino = (short *) cur;
kono
parents:
diff changeset
20 (void) memcpy(cur, pag, 1024 );
kono
parents:
diff changeset
21 (void) ({ void *__s = ( pag ); __builtin_memset ( __s , '\0', 1024 ) ; __s; });
kono
parents:
diff changeset
22 (void) ({ void *__s = ( New ); __builtin_memset ( __s , '\0', 1024 ) ; __s; });
kono
parents:
diff changeset
23 n = ino[0];
kono
parents:
diff changeset
24 for (ino++; n > 0; ino += 2) {
kono
parents:
diff changeset
25 key.dptr = cur + ino[0];
kono
parents:
diff changeset
26 key.dsize = off - ino[0];
kono
parents:
diff changeset
27 val.dptr = cur + ino[1];
kono
parents:
diff changeset
28 val.dsize = ino[0] - ino[1];
kono
parents:
diff changeset
29 (void) sdbm__putpair ((sdbm_hash(( key ).dptr, ( key ).dsize) & sbit) ? New : pag, key, val);
kono
parents:
diff changeset
30 off = ino[1];
kono
parents:
diff changeset
31 n -= 2;
kono
parents:
diff changeset
32 }
kono
parents:
diff changeset
33 }