This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: fix gcc.dg/torture/builtin-noret-2.c for sh-elf


Zack Weinberg wrote:
> 
> Joern Rennecke <joern.rennecke@superh.com> writes:
> 
> >
> >       * gcc.dg/torture/builtin-noret-2.c (_exit): Make weak.
> 
> #pragma weak is not recognized on all targets where weak symbols are
> meaningful.  I think you can use attribute weak instead, but please
> check that that won't cause an error on a target without weak symbols.

It causes an extra warning on sh-coff:	

bash-2.05$ /swbuild/nightly/2003-05-21/sh-coff/gcc/xgcc -B/swbuild/nightly/2003-05-21/sh-coff/gcc/ /swbuild/nightly/2003-05-21/srcw/gcc/testsuite/gcc.dg/torture/builtin-noret-1.c   -O0  
-DSTACK_SIZE=16384  -I/swbuild/nightly/2003-05-21/sh-coff/sh-coff//newlib/targ-include -I/swbuild/nightly/2003-05-21/srcw/newlib/libc/include  -L/swbuild/nightly/2003-05-21/sh-coff/ld
-B/swbuild/nightly/2003-05-21/sh-coff/sh-coff//newlib/ -L/swbuild/nightly/2003-05-21/sh-coff/sh-coff//newlib  -lm   -o builtin-noret-1.exe   
/swbuild/nightly/2003-05-21/srcw/gcc/testsuite/gcc.dg/torture/builtin-noret-1.c:7: warning: weak declaration of `_exit' not supported
/swbuild/nightly/2003-05-21/sh-coff/sh-coff//newlib/libc.a(syscalls.o)(.text+0x16c): In function `__exit':
syscalls.c:103: multiple definition of `__exit'
/tmp/cc40jZDO.o(.text+0x9c):builtin-noret-1.c: first defined here
collect2: ld returned 1 exit status

As warnings trigger the 'excess error' failure mode for the test harness,
this is not a good thing.

The #pragma is just ignored by sh-coff.

-- 
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]