Author: zhuqing
Date: 2010-11-21 22:48:38 -0500 (Sun, 21 Nov 2010)
New Revision: 3405
Modified:
trunk/osprey/be/cg/cgemit.cxx
Log:
Fix "missing .setion bss" bug in cgemit when size is zero
Test case:
struct line { char a[0];};
static struct line line3;
static struct line line4;
static const char a[3]={0,1,2};
int main()
{
return 0;
}
Approved by Sun Chan
Modified: trunk/osprey/be/cg/cgemit.cxx
===================================================================
--- trunk/osprey/be/cg/cgemit.cxx 2010-11-19 00:44:26 UTC (rev 3404)
+++ trunk/osprey/be/cg/cgemit.cxx 2010-11-22 03:48:38 UTC (rev 3405)
@@ -8167,8 +8167,13 @@
size = TY_size(ST_type(sym));
#ifdef KEY
// C++ requires empty classes to have unique addresses.
- if (size == 0)
+ if (size == 0) {
+ if (base != cur_section) {
+ fprintf ( Asm_File, "\t%s %s\n", AS_SECTION,
ST_name(base));
+ cur_section = base;
+ }
Print_Label (Asm_File, sym, 1);
+ }
else
#endif
Print_Label (Asm_File, sym, size);
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Open64-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/open64-devel