Allow SYSTEM.VAL of constant in CONST and use in Heap.Mod.

This commit is contained in:
David Brown 2016-09-03 17:47:55 +01:00
parent a730d6c96b
commit db18774de1
12 changed files with 86 additions and 64 deletions

View file

@ -1125,7 +1125,7 @@ static void OPB_Convert (OPT_Node *x, OPT_Struct typ)
if ((*x)->class == 7) {
if (f == 4) {
if (g == 4) {
if (f > g) {
if ((*x)->typ->size > typ->size) {
OPB_SetIntType(*x);
if ((*x)->typ->size > typ->size) {
OPB_err(203);
@ -2200,11 +2200,15 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno)
if ((x->class != 7 && x->typ->size < p->typ->size)) {
OPB_err(-308);
}
t = OPT_NewNode(11);
t->subcl = 29;
t->left = x;
x = t;
x->typ = p->typ;
if ((((x->class == 7 && x->typ->form == 4)) && p->typ->form == 4)) {
OPB_Convert(&x, p->typ);
} else {
t = OPT_NewNode(11);
t->subcl = 29;
t->left = x;
x = t;
x->typ = p->typ;
}
p = x;
break;
case 30:

View file

@ -40,7 +40,6 @@ typedef signed char int8;
typedef unsigned char uint8;
#define uintptr size_t
//#define uintptr int64
// The compiler uses 'import' and 'export' which translate to 'extern' and
// nothing respectively.