Fix bug while using complex type variables in Function and FunctionBlock interface
authorLaurent Bessard
Sat, 28 Jul 2012 17:38:57 +0200
changeset 411 3e21d98d0a71
parent 410 c6486bd97392
child 412 aad38592bdde
Fix bug while using complex type variables in Function and FunctionBlock interface
stage4/generate_c/generate_c_il.cc
stage4/generate_c/generate_c_st.cc
--- a/stage4/generate_c/generate_c_il.cc	Fri Jul 27 15:43:32 2012 +0200
+++ b/stage4/generate_c/generate_c_il.cc	Sat Jul 28 17:38:57 2012 +0200
@@ -661,13 +661,17 @@
       }
       break;
     case complextype_suffix_vg:
-    case assignment_vg:
-      symbol->record_variable->accept(*this);
-      if (type_is_complex) {
-        s4o.print(".");
-        symbol->field_selector->accept(*this);
-      }
-      break;
+	  symbol->record_variable->accept(*this);
+	  if (type_is_complex) {
+		s4o.print(".");
+		symbol->field_selector->accept(*this);
+	  }
+	  break;
+	case assignment_vg:
+	  symbol->record_variable->accept(*this);
+	  s4o.print(".");
+	  symbol->field_selector->accept(*this);
+	  break;
     default:
       if (this->is_variable_prefix_null()) {
     	symbol->record_variable->accept(*this);
--- a/stage4/generate_c/generate_c_st.cc	Fri Jul 27 15:43:32 2012 +0200
+++ b/stage4/generate_c/generate_c_st.cc	Sat Jul 28 17:38:57 2012 +0200
@@ -324,13 +324,17 @@
       }
       break;
     case complextype_suffix_vg:
-    case assignment_vg:
       symbol->record_variable->accept(*this);
       if (type_is_complex) {
         s4o.print(".");
         symbol->field_selector->accept(*this);
       }
       break;
+    case assignment_vg:
+      symbol->record_variable->accept(*this);
+      s4o.print(".");
+      symbol->field_selector->accept(*this);
+      break;
     default:
       if (this->is_variable_prefix_null()) {
     	symbol->record_variable->accept(*this);