RFA: PR 68913: Provide weak version of __fread_chk for PR61886 test

Jeff Law law@redhat.com
Mon Dec 21 19:59:00 GMT 2015


On 12/18/2015 10:07 AM, Nick Clifton wrote:
> Hi Guys,
>
>    PR 68913 notes that the test gcc.dg/lto/pr61886_0.c test fails on
>    targets whose C library does not provide a __fread_chk function.
>
>    Since the purpose of the test is to show that GCC will correctly
>    discard the invocation of __fread_chk_warn, we do not need to actually
>    link against a real __fread_chk function.  A dummy will do.
>
>    Hence I would like to apply the patch below.  This patch resolves
>    unexpected failures of the pr61886_0.c test on targets like spu-elf
>    and sparc64-elf.
>
> Cheers
>    Nick
>
> gcc/testsuite/ChangeLog
> 2015-12-18  Nick Clifton  <nickc@redhat.com>
>
> 	PR 68913
> 	* gcc.dg/lto/pr61886_0.c (__fread_chk): Provide a weak definition
> 	of this function.
?  Isn'the purpose of this test to verify the function alias resolution 
code?  In which case, does having the weak definition send us down a 
different path in that code which would cause the original bug in 61886 
not to be tested?  ie, are we *sure* this does not compromise the test. 
  Given the painful history around 61886, I loathe the idea of losing 
coverage of that issue.

I guess I'd be a lot more comfortable with this change if we first 
verified  that with the fix for 61886 reverted and this patch applied 
that linux platforms will show the failures seen in 61886.  Given the 
number of changes for this BZ that show up in the comments, that may be 
a royal PITA to test.

Alternately, we can just limit this test to Linux targets.
jeff



More information about the Gcc-patches mailing list