# HG changeset patch
# User Mario de Sousa <msousa@fe.up.pt>
# Date 1306515714 -3600
# Node ID 0cdf1410bcd8c5a06b901e6208e6f1d5672f4dc1
# Parent  d120740a6b588d01a6e7b82db9191306f05d95e0# Parent  15bf9ecb936d0f62a2075de3e3a4926e35c69afa
Merging with Edouard's version

diff -r d120740a6b58 -r 0cdf1410bcd8 lib/iec_types_all.h
--- a/lib/iec_types_all.h	Fri May 27 18:01:01 2011 +0100
+++ b/lib/iec_types_all.h	Fri May 27 18:01:54 2011 +0100
@@ -16,6 +16,7 @@
 #define __IEC_DEBUG_FLAG 0x01
 #define __IEC_FORCE_FLAG 0x02
 #define __IEC_RETAIN_FLAG 0x04
+#define __IEC_OUTPUT_FLAG 0x08
 
 #define __DECLARE_IEC_TYPE(type)\
 typedef IEC_##type type;\
diff -r d120740a6b58 -r 0cdf1410bcd8 stage4/generate_c/generate_var_list.cc
--- a/stage4/generate_c/generate_var_list.cc	Fri May 27 18:01:01 2011 +0100
+++ b/stage4/generate_c/generate_var_list.cc	Fri May 27 18:01:54 2011 +0100
@@ -316,6 +316,8 @@
         locationtype_t location_type = search_location_type.get_location_type(symbol->location);
         if (location_type == input_lt)
           this->current_var_type_category = located_input_vtc;
+        else if (location_type == memory_lt)
+          this->current_var_type_category = located_memory_vtc;
         else if (location_type == output_lt)
           this->current_var_type_category = located_output_vtc;
 
@@ -341,6 +343,8 @@
         locationtype_t location_type = search_location_type.get_location_type(symbol->incompl_location);
         if (location_type == input_lt)
           this->current_var_type_category = located_input_vtc;
+        else if (location_type == memory_lt)
+          this->current_var_type_category = located_memory_vtc;
         else if (location_type == output_lt)
           this->current_var_type_category = located_output_vtc;