Fix attribute in gmon-sol2.c

Eric Botcazou ebotcazou@libertysurf.fr
Sun Oct 9 12:37:00 GMT 2005


The interesting lines read

static void internal_mcount (char *, unsigned short *)
     __attribute__ ((__unused__));

/* Solaris 2 libraries use _mcount.  */
asm(".global _mcount; _mcount: mov %i7,%o1; mov %o7,%o0;b,a internal_mcount");
/* This is for compatibility with old versions of gcc which used mcount.  */
asm(".global mcount; mcount: mov %i7,%o1; mov %o7,%o0;b,a internal_mcount");


The correct attribute in this case is of course ((used)).  Tested on 
sparc-sun-solaris2.8, applied to all active branches.  This fixes:

FAIL: g++.old-deja/g++.law/profile1.C (test for excess errors)
WARNING: g++.old-deja/g++.law/profile1.C compilation failed to produce 
executable

FAIL: gcc.dg/nest.c (test for excess errors)
WARNING: gcc.dg/nest.c compilation failed to produce executable

on mainline.


2005-10-09  Eric Botcazou  <ebotcazou@libertysurf.fr>

	* config/sparc/gmon-sol2.c (internal_mcount): Mark as used.


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gmon-sol2.diff
Type: text/x-diff
Size: 649 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20051009/2d96ef44/attachment.bin>


More information about the Gcc-patches mailing list