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: [PATCH, testsuite]: Fix PR target/48055; FAIL: gcc.c-torture/execute/builtins/memcpy-chk.c compilation, -O2 -flto


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
>


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