possible fix for assemble_start_function?

Mumit Khan khan@xraylith.wisc.edu
Tue Oct 28 09:48:00 GMT 1997

The following change lets me build code with templates on a i386-cygwin32
target. The problem is that cygwin32 target doesn't define
ASM_WEAKEN_LABEL, and hence the functions are always given global
attribute via ASM_GLOBALIZE_LABEL in assemble_start_function, which is 
not correct for template instances with linkonce directive.

For the original problem report, please see my messages in egcs-bugs
with the following Subject: "i386-cygwin32: C++ template codegen bug".

This is probably incorrect, but might help others looking at the problem.

Tue Oct 28 11:37:26 1997  Mumit Khan <khan@brahma.xraylith.wisc.edu>

	* varasm.c (assemble_start_function): Don't globalize symbols that 
	are meant to have single instances.

--- varasm.c.~1	Tue Oct 28 10:44:25 1997
+++ varasm.c	Tue Oct 28 11:08:14 1997
@@ -1071,4 +1071,7 @@ assemble_start_function (decl, fnname)
 	BC_GLOBALIZE_LABEL (asm_out_file, fnname);
+        if (! DECL_ONE_ONLY (decl))
 	ASM_GLOBALIZE_LABEL (asm_out_file, fnname);

Mumit -- khan@xraylith.wisc.edu

More information about the Gcc-bugs mailing list