# HG changeset patch # User Shinji KONO # Date 1396514945 -32400 # Node ID ab501cdbbefde4a3dfeb08ac6696546aac596f49 # Parent 5313ed059ceef9b841653a41a3159ffe36b17660 fix wrong src/dst type in pdecl_data_field diff -r 5313ed059cee -r ab501cdbbefd mc-codegen.c --- a/mc-codegen.c Thu Apr 03 10:43:01 2014 +0900 +++ b/mc-codegen.c Thu Apr 03 17:49:05 2014 +0900 @@ -3969,7 +3969,6 @@ int v0 = car(v); NMTBL *n = ncaddr(v); - if (inmode) error(-1); #if STRUCT_ALIGN if (t!=EMPTY) offset = struct_align_offset(t,offset); diff -r 5313ed059cee -r ab501cdbbefd mc-inline.c --- a/mc-inline.c Thu Apr 03 10:43:01 2014 +0900 +++ b/mc-inline.c Thu Apr 03 17:49:05 2014 +0900 @@ -878,7 +878,7 @@ if (car(e)!=DECL_DATA) error(-1); t = caddr(e); decl_str_init=insert_ascend(decl_str_init, - glist4(offset+foffset,0,e,glist2(type1,t)),str_init_eq); + glist4(offset+foffset,0,e,glist2(t,type1)),str_init_eq); } return offset; } diff -r 5313ed059cee -r ab501cdbbefd mc-parse.c --- a/mc-parse.c Thu Apr 03 10:43:01 2014 +0900 +++ b/mc-parse.c Thu Apr 03 17:49:05 2014 +0900 @@ -1674,7 +1674,6 @@ // local var init cannot postponed because of assign_expr0/type // if initialization contains expressions, // we cannot do it in STADECL, but we can assign later in this mode - if (inmode) error(-1); if (local_nptr || mode==SFDINIT) { decl_data_field(type,v,local_struct_offset); return; @@ -1874,7 +1873,7 @@ conv->lc_(); conv->decl_data_begin_(); mode = mode_save; #if LOCAL_STRUCT_INIT_STATIC - if(mode==LDECL && !inmode) { + if(mode==LDECL && !inmode) { local_struct_offset = offset; local_struct_static(v); // change mode to STADECL