Author: yug
Date: 2011-11-20 03:09:09 -0500 (Sun, 20 Nov 2011)
New Revision: 3820

Modified:
   trunk/osprey/common/com/wn_simp_code.h
Log:
fix bug906, i.e, guarded type check before TY_pointed.

Code Review: Lai Jian-Xin


Modified: trunk/osprey/common/com/wn_simp_code.h
===================================================================
--- trunk/osprey/common/com/wn_simp_code.h      2011-11-20 07:59:33 UTC (rev 
3819)
+++ trunk/osprey/common/com/wn_simp_code.h      2011-11-20 08:09:09 UTC (rev 
3820)
@@ -952,8 +952,12 @@
 
           ty_is_volatile = TY_is_volatile(SIMPNODE_ty(t1)) 
               || TY_is_volatile(SIMPNODE_ty(t2));
-          lod_addr_volatile = 
TY_is_volatile(TY_pointed(SIMPNODE_load_addr_ty(t1))) 
-              || TY_is_volatile(TY_pointed(SIMPNODE_load_addr_ty(t2)));
+          /* open64.net bug906, guarded type check before TY_pointed */
+          lod_addr_volatile = 
+            (TY_kind(SIMPNODE_load_addr_ty(t1)) == KIND_POINTER 
+             && TY_is_volatile(TY_pointed(SIMPNODE_load_addr_ty(t1)))) ||
+            (TY_kind(SIMPNODE_load_addr_ty(t2)) == KIND_POINTER 
+             && TY_is_volatile(TY_pointed(SIMPNODE_load_addr_ty(t2)))) ;
           item_is_volatile = TY_is_volatile(SIMPNODE_object_ty(t1)) 
             || TY_is_volatile(SIMPNODE_object_ty(t2));
 


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to