Author: zhuqing
Date: 2011-04-14 06:28:31 -0400 (Thu, 14 Apr 2011)
New Revision: 3553
Modified:
trunk/osprey/be/com/data_layout.cxx
Log:
Fix regression caused by r3492.
Add constraint "ST_class(blk) == CLASS_VAR" before getting blk type idx, since
ty_idx for blk
is invalid if the sym_class is CLASS_FUNC or CLASS_BLOCK,CLASS_NAME.
Code Review: Sun
Modified: trunk/osprey/be/com/data_layout.cxx
===================================================================
--- trunk/osprey/be/com/data_layout.cxx 2011-04-13 17:41:30 UTC (rev 3552)
+++ trunk/osprey/be/com/data_layout.cxx 2011-04-14 10:28:31 UTC (rev 3553)
@@ -652,7 +652,10 @@
INT64 size;
INITO_IDX ino_idx;
// if blk is variable length struct, its size should be inito size.
- if (TY_kind(ST_type(blk)) == KIND_STRUCT && (ino_idx =
Find_INITO_For_Symbol(blk)) != 0 && INITV_kind(INITO_val(ino_idx)) ==
INITVKIND_BLOCK)
+ if ( ST_class(blk) == CLASS_VAR &&
+ TY_kind(ST_type(blk)) == KIND_STRUCT &&
+ (ino_idx = Find_INITO_For_Symbol(blk)) != 0 &&
+ INITV_kind(INITO_val(ino_idx)) == INITVKIND_BLOCK )
{
size = Get_INITO_Size(ino_idx);
Is_True(size >= ST_size(blk),("%s's inito size smaller than
ST_size",ST_name(blk)));
------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve
application availability and disaster protection. Learn more about boosting
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Open64-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/open64-devel