Author: zhuqing
Date: 2010-12-10 21:02:54 -0500 (Fri, 10 Dec 2010)
New Revision: 3432
Modified:
trunk/osprey/wgen/wgen_expr.cxx
Log:
Fix bug649.
case:
1 namespace pcrecpp {
2 class Arg { public: Arg(); Arg(void*); };
3 class RE { static Arg no_arg; };
4 Arg RE::no_arg((void*)__null);
5 extern Arg no_arg __attribute__((alias("" "_ZN7pcrecpp2RE6no_argE")));
6 }
The wn for line5 is:
U8U8LDID 0 <1,52,_ZN7pcrecpp2RE6no_argE> T<54,Arg,1>
it uses the base st(_ZN7pcrecpp2RE6no_argE) instead of _ZN7pcrecpp6no_argE
the right one should be like this:
U8LDA 0 <1,54,_ZN7pcrecpp6no_argE> T<55,anon_ptr.,8>
The fix is to add checking for alias node.
Reviewed by Jianxin.
Modified: trunk/osprey/wgen/wgen_expr.cxx
===================================================================
--- trunk/osprey/wgen/wgen_expr.cxx 2010-12-11 00:25:34 UTC (rev 3431)
+++ trunk/osprey/wgen/wgen_expr.cxx 2010-12-11 02:02:54 UTC (rev 3432)
@@ -2605,6 +2605,7 @@
case GS_FUNCTION_DECL:
{
st = Get_ST (arg0);
+ ST *real_st = gs_decl_alias_target(arg0)?
Get_ST(gs_decl_alias_target(arg0)):st;
ty_idx = ST_type (st);
#ifdef KEY
// Arg0 is the virtual function table (vtable) for a class. Initialize
@@ -2632,7 +2633,7 @@
#endif
// for VLAs, use the base_st instead of st
if (code0 == GS_VAR_DECL &&
- st != ST_base(st)) {
+ real_st != ST_base(st)) {
FmtAssert (ST_ofst (st) == 0,
("Variable Length Arrays within struct not currently
implemented"));
wn = WN_Ldid (Pointer_Mtype, 0, ST_base(st), ST_type(ST_base(st)));
------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages,
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev
_______________________________________________
Open64-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/open64-devel