Author: yug
Date: 2011-12-07 03:48:20 -0500 (Wed, 07 Dec 2011)
New Revision: 3846
Modified:
trunk/osprey/be/cg/cgemit.cxx
trunk/osprey/wgen/wgen_decl.cxx
Log:
fix bug924 and the regression(20040323-1) caused by r3758
successive patch on alias attribute handling, i.e, right setup the alias
symbol storage.
Code Review: Lai Jian-Xin.
Modified: trunk/osprey/be/cg/cgemit.cxx
===================================================================
--- trunk/osprey/be/cg/cgemit.cxx 2011-12-06 13:02:06 UTC (rev 3845)
+++ trunk/osprey/be/cg/cgemit.cxx 2011-12-07 08:48:20 UTC (rev 3846)
@@ -8267,7 +8267,9 @@
ST_base_idx(sym) != ST_st_idx(sym) &&
!ST_is_equivalenced(sym) &&
ST_class(ST_base(sym)) != CLASS_BLOCK &&
- pu != NULL && ! PU_ftn_lang(*pu) /* bug 13585 */)
+ // originally bug 13585. bug 924 open64.net.
+ // no pu case should also be considered.
+ ((!pu) || !PU_ftn_lang (*pu)))
goto skip_definition;
#endif
size = TY_size(ST_type(sym));
Modified: trunk/osprey/wgen/wgen_decl.cxx
===================================================================
--- trunk/osprey/wgen/wgen_decl.cxx 2011-12-06 13:02:06 UTC (rev 3845)
+++ trunk/osprey/wgen/wgen_decl.cxx 2011-12-07 08:48:20 UTC (rev 3846)
@@ -4723,12 +4723,28 @@
else {
Set_ST_base_idx (st, ST_st_idx (base_st));
Set_ST_emit_symbol(st); // for cg
- if (ST_is_initialized (base_st))
+ if (ST_is_initialized (base_st)) {
Set_ST_is_initialized (st);
+ // bug924 open64.net. global alias symbol with base initialized
+ // should set storage class SCLASS_DGLOBAL.
+ if (ST_sclass(st) == SCLASS_COMMON || ST_sclass(st) == SCLASS_UGLOBAL)
+ Set_ST_sclass (st, SCLASS_DGLOBAL);
+ }
#ifdef KEY
- if (ST_init_value_zero (base_st))
+ if (ST_init_value_zero (base_st)) {
Set_ST_init_value_zero (st);
+ // bug924 open64.net. Those base initialized zero
+ // symbols should restore to SCLASS_UGLOBAL.
+ if (ST_sclass(st) == SCLASS_DGLOBAL)
+ Set_ST_sclass (st, SCLASS_UGLOBAL);
+ }
#endif
+ // bug924 open64.net aliased symbols in COMMON section should be
+ // set to be uninitialized. Since aliased symbols themselves
+ // should never be allocated.
+ if (ST_sclass(st) == SCLASS_COMMON) {
+ Set_ST_sclass (st, SCLASS_UGLOBAL);
+ }
}
#ifdef KEY
if (!lang_cplus)
------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of
discussion for anyone considering optimizing the pricing and packaging model
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
Open64-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/open64-devel