Author: ycwu
Date: 2011-10-31 22:20:31 -0400 (Mon, 31 Oct 2011)
New Revision: 3782
Modified:
trunk/osprey/common/com/symtab_defs.h
trunk/osprey/ipa/common/ipc_symtab_merge.cxx
Log:
fixed bug 883. Revision 3760 add a new member "mUINT32 line" to structure ST,
it cause the function eq_const_st::operator() get wrong return value, then make
the symbol merge process in IPA not work. This patch fixed the problem in
fuction eq_const_st::operator(). I also add a common to make sure anyone who
add new member to structure ST also update function eq_const_st::operator()
Code review by Michael Lai
Modified: trunk/osprey/common/com/symtab_defs.h
===================================================================
--- trunk/osprey/common/com/symtab_defs.h 2011-10-31 23:53:11 UTC (rev
3781)
+++ trunk/osprey/common/com/symtab_defs.h 2011-11-01 02:20:31 UTC (rev
3782)
@@ -223,6 +223,8 @@
class ST
{
public:
+ // after add new member, Make sure to update function
eq_const_st::operator()
+ // in file ipc_symtab_merge.cxx
union {
STR_IDX name_idx; // index to the name string
TCON_IDX tcon; // constant value
Modified: trunk/osprey/ipa/common/ipc_symtab_merge.cxx
===================================================================
--- trunk/osprey/ipa/common/ipc_symtab_merge.cxx 2011-10-31 23:53:11 UTC
(rev 3781)
+++ trunk/osprey/ipa/common/ipc_symtab_merge.cxx 2011-11-01 02:20:31 UTC
(rev 3782)
@@ -159,7 +159,7 @@
struct eq_const_st
{
bool operator() (const ST* st1, const ST* st2) const {
- return memcmp (st1, st2, sizeof(ST) - sizeof(ST_IDX) * 2 -
sizeof(TY_IDX)) == 0;
+ return memcmp (st1, st2, sizeof(ST) - sizeof(ST_IDX) * 2 -
sizeof(TY_IDX) - sizeof(mUINT32)) == 0;
}
};
------------------------------------------------------------------------------
RSA® Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Open64-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/open64-devel