Author: ycwu
Date: 2011-06-20 22:08:29 -0400 (Mon, 20 Jun 2011)
New Revision: 3658

Modified:
   trunk/osprey/be/com/data_layout.cxx
Log:
This patch will allocate stack space for unused variable in -g. It's
useful for debug-ability.

C.R Sun Chan


Modified: trunk/osprey/be/com/data_layout.cxx
===================================================================
--- trunk/osprey/be/com/data_layout.cxx 2011-06-20 21:59:30 UTC (rev 3657)
+++ trunk/osprey/be/com/data_layout.cxx 2011-06-21 02:08:29 UTC (rev 3658)
@@ -2588,6 +2588,14 @@
   Set_Error_Phase("Data Layout");
   Clear_Vararg_Symbols();
 
+  if (Debug_Level > 0) {
+      FOREACH_SYMBOL (CURRENT_SYMTAB, st, i) {
+          if (ST_class(st) == CLASS_VAR) {
+              Allocate_Object(st);
+          }
+      }
+  }
+
   For_all (Inito_Table, CURRENT_SYMTAB, finalize_inito());
 
   /* if nested pu, then may not see reference in this pu, 
@@ -3370,7 +3378,7 @@
       return;
   }
 
-  if (ST_is_not_used(st)) return;
+  if (ST_is_not_used(st)&& Debug_Level <= 0) return;
 
   if (ST_has_named_section(st)) {
     // bug fix for OSP_138


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Open64-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to