1 /* { dg-message "undeclared identifier is reported only once" "reminder for mmu_base" { target *-*-* } 0 } */
2 typedef BYTE
unsigned char; /* { dg-error "expected" } */
5 struct PENT
{ caddr_t v_addr
; };/* { dg-error "unknown type name" } */
6 typedef struct PENT prec
;
7 typedef struct PENT
*prec_t
;
9 BYTE
*mem_base
; /* { dg-error "unknown type name" } */
11 BYTE
*p_page
; /* { dg-error "unknown type name" } */
14 typedef struct PTE pte
;
17 struct *PTP p_tablep
; /* { dg-error "expected" } */
22 typedef struct PTP (u
.p_tablep
);/* { dg-error "expected" } */
27 void enlarge_hash_table ();
28 int fill_item_entry ();
30 void build_ptables ();
34 caddr_t va
; /* { dg-error "unknown type name" } */
36 BYTE
*page_addr
; /* { dg-error "unknown type name" } */
37 if (mmu_base
[Level1(va
)]->valid
==0x0) { /* { dg-error "undeclared" } */
38 l1_base
= mmu_base
[Level1(va
)]->(u
.p_tablep
) = p_alloc(); /* { dg-error "expected|undeclared" } */
39 mmu_base
[Level1(va
)]->valid
= 0x3;
40 for (idx
=0; idx
<LEVEL1_ENTRIES
; idx
++) /* { dg-error "undeclared" } */
41 l1_base
[idx
]->valid
= 0x0;
44 l1_base
= mmu_base
[Level1(va
)]->(u
.p_tablep
); /* { dg-error "expected" } */
46 if (l1_base
[Level2(va
)]->valid
==0x0) {
48 l2_base
= l1_base
[Level2(va
)]->(u
.p_tablep
) = p_alloc(); /* { dg-error "expected|undeclared" } */
49 l1_base
[Level2(va
)]->valid
= 0x3;
50 for (idx
=0; idx
<LEVEL2_ENTRIES
; idx
++) /* { dg-error "undeclared" } */
51 l2_base
[idx
]->valid
=0x0;
52 goto build_page
; /* { dg-error "used but not defined" } */
54 l2_base
= mmu_base
[Level2(va
)]->(u
.p_tablep
); /* { dg-error "expected" } */
56 page_addr
= l2_base
[Level2(va
)]->valid
;
60 a_translate(va_op
, v_addr
)
62 caddr_t v_addr
; /* { dg-error "unknown type name" } */
64 register prec_t bucket
;
65 register caddr_t p_addr
; /* { dg-error "unknown type name" } */
66 bucket
= mem_hash
+((((v_addr
)>>ITEMBITS
))&hash_mask
); /* { dg-error "undeclared" } */
68 if (bucket
->v_addr
== ((v_addr
)>>ITEMBITS
) { /* { dg-error "expected|undeclared|no member" } */
69 if(!(bucket
->perm_set
&va_op
))
71 return mem_base
+ v_addr
;
73 } while((bucket
++)->v_addr
!= ((caddr_t
)0)); /* { dg-error "expected|undeclared|no member" } */
76 p_addr
= (--bucket
)->p_addr
; /* { dg-error "no member" } */
79 case BUCKET_FULL
: /* { dg-error "undeclared" } */
80 enlarge_hash_table(mem_hash
);
81 case((caddr_t
)0): /* { dg-error "expected" } */
82 p_addr
= fill_item_entry(va_op
, v_addr
);
84 case((caddr_t
)1): /* { dg-error "expected" } */
86 ((void)(((0))?0:(__eprintf("Failed assertion`%s'at line%d of`%s'.\n",
87 "FALSE", 327, "b.c"), 0)));
92 flush_hash(hasht
, hash_size
)
96 register prec_t bucket
;
99 for(idx
=(hash_size
*3)-1; idx
>=0; idx
--) {
100 bucket
->v_addr
= ((caddr_t
)0);/* { dg-error "undeclared|expected|no member" } */
101 bucket
->p_addr
= ((caddr_t
)0);/* { dg-error "no member|expected" } */
102 bucket
->perm_set
= VA_EMPTY
; /* { dg-error "undeclared|no member" } */
106 extern void *calloc(__SIZE_TYPE__
, __SIZE_TYPE__
);
111 mem_base
= (BYTE
*) calloc(1024, (1<<13)); /* { dg-error "undeclared|expected" } */
112 ((void)((mem_base
!= (BYTE
*)0) /* { dg-error "expected" } */
114 : (__eprintf("Failed assertion`%s'at line%d of`%s'.\n",
115 "mem_base != (BYTE *)0", 366, "b.c"),
117 hash_num
= INIT_NUM_ENTRIES
* 3; /* { dg-error "undeclared" } */
118 mem_hash
= (prec_t
) calloc(hash_num
, sizeof(prec
));
119 ((void)((mem_hash
!= (prec_t
)0)
121 : (__eprintf("Failed assertion`%s'at line%d of`%s'.\n",
122 "mem_hash != (prec_t)0", 370, "b.c"),
124 flush_hash(mem_hash
, 32);
125 build_ptables(mem_base
, 1024*(1<<13)); /* { dg-bogus "integer overflow" "int smaller than 32 bits" { xfail int16 } } */
129 int tm_sec
; int tm_min
; int tm_hour
;
130 int tm_mday
;int tm_mon
; int tm_year
;
131 int tm_wday
;int tm_yday
;int tm_isdst
;
132 char*tm_zone
; long tm_gmtoff
;