This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, testsuite]: Fix PR target/48055; FAIL: gcc.c-torture/execute/builtins/memcpy-chk.c compilation, -O2 -flto
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 10 Mar 2011 13:30:01 +0100
- Subject: Re: [PATCH, testsuite]: Fix PR target/48055; FAIL: gcc.c-torture/execute/builtins/memcpy-chk.c compilation, -O2 -flto
- References: <AANLkTinAEXYRQ_zk3u1dkb7U7DB20XJVxi0hmxKzBfn2@mail.gmail.com>
On Thu, Mar 10, 2011 at 1:19 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
> Hello!
>
> Using binutils-2.21, a couple of
> gcc.c-torture/execute/builtins/__-chk.c testcases fail on
> alphaev68-pc-linux-gnu (-lto) with:
>
> /usr/lib/gcc/alpha-unknown-linux-gnu/4.4.5/../../../../alpha-unknown-linux-gnu/bin/ld:
> Warning: alignment 8 of symbol `buf5' in
> /tmp/ccgnDykf.ltrans1.ltrans.o is smaller than 16 in
> /tmp/ccc3QsSw.o.ironly
> /usr/lib/gcc/alpha-unknown-linux-gnu/4.4.5/../../../../alpha-unknown-linux-gnu/bin/ld:
> Warning: alignment 8 of symbol `buf7' in
> /tmp/ccgnDykf.ltrans1.ltrans.o is smaller than 16 in
> /tmp/ccc3QsSw.o.ironly
> /usr/lib/gcc/alpha-unknown-linux-gnu/4.4.5/../../../../alpha-unknown-linux-gnu/bin/ld:
> Warning: alignment 8 of symbol `buf1' in
> /tmp/ccgnDykf.ltrans1.ltrans.o is smaller than 16 in
> /tmp/ccc3QsSw.o.ironly
>
> Attached patch fixes these failures.
I think this needs more investigation as there are no conflicting
definitions of those vars that would warrant this kind of diagnostic from ld.
We probably bring the vars local by making them hidden and distribute
them to multiple ltrans units (with only one definiton obviously and multiple
externs).
Richard.
> 2011-03-10 ?Uros Bizjak ?<ubizjak@gmail.com>
>
> ? ? ? ?PR testsuite/48055
> ? ? ? ?* gcc.c-torture/execute/builtins/memcpy-chk.c (buf1, buf5, buf7):
> ? ? ? ?Declare as static.
> ? ? ? ?* gcc.c-torture/execute/builtins/mempcpy-chk.c (buf1, buf5, buf7):
> ? ? ? ?Ditto.
> ? ? ? ?* gcc.c-torture/execute/builtins/memmove-chk.c (buf1, buf5, buf7):
> ? ? ? ?Ditto.
>
> Tested on alphaev68-pc-linux-gnu with binutils-2.21. OK for mainline
> and release branches?
>
> Uros
>