On Thu, Mar 10, 2011 at 3:44 PM, Uros Bizjak <ubiz...@gmail.com> wrote:
> On Thu, Mar 10, 2011 at 1:30 PM, Richard Guenther
> <richard.guent...@gmail.com> wrote:
>
>>> 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).
>
> Jan claims that this problem is a linker bug, so perhaps the patch is
> still suitable for the gcc testsuite. The patch doesn't alter tests in
> any way, while it avoids false positives due to linker bugs.

Are you sure?  Making the vars static enables folding the zero initialization.

I don't think we should make testsuite changes to paper over bugs
elsewhere.

Richard.

> The linker problem was filled as binutils PR 12564 [1] against ld 2.21.
>
> [1] http://sourceware.org/bugzilla/show_bug.cgi?id=12564
>
> Uros.
>

Reply via email to