This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: fix gcc.dg/torture/builtin-noret-2.c for sh-elf
- From: Joern Rennecke <joern dot rennecke at superh dot com>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Joseph Myers <jsm28 at cam dot ac dot uk>
- Date: Thu, 22 May 2003 20:26:49 +0100
- Subject: Re: RFA: fix gcc.dg/torture/builtin-noret-2.c for sh-elf
- Organization: SuperH UK Ltd.
- References: <3ECBC4D0.42249EB4@superh.com> <878yt0i18t.fsf@egil.codesourcery.com>
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