diff mc-code-ia32.c @ 156:da529eab5618

static initialization powerpc static bug
author kono
date Tue, 05 Aug 2003 14:15:33 +0900
parents cb7aa0089681
children b80e9737c3ce
line wrap: on
line diff
--- a/mc-code-ia32.c	Tue Aug 05 13:00:16 2003 +0900
+++ b/mc-code-ia32.c	Tue Aug 05 14:15:33 2003 +0900
@@ -1529,7 +1529,7 @@
     float f;
     char *name;
     name = n->nm; 
-    if(mode!=GDECL)  { 
+    if(mode!=GDECL && mode!=STADECL)  { 
 	error(-1); return;
     }
     if (chk) return;
@@ -1627,7 +1627,8 @@
 		data_mode(0);
 		init=1;
 	    }
-	    printf(".lcomm %s,%d\n",n->nm,size(n->ty));
+	    if (n->dsp!= -1) /* -1 means initialized global */
+		printf(".lcomm %s,%d\n",n->nm,size(n->ty));
 	}
     }
 }