On 5/29/2021 12:02 AM, Indu Bhagat via Gcc-patches wrote:
Hi,

This patch fixes the failing pch testcases as observed in PR testsuite/100749.
Although the PR mentions powerpc64, the issue exists on other arches but
appears to be latent.

The issue causing the failure was that the underlying char[] df_set_names is a
static var. Multiple calls to 'debug_set_names' with different write_symbols
like the in c-family/c-pch.c must entail the use of xstrdup or such to retain a
reliable copy of the debug format str containing the names.

Bootstrapped, regression tested on x86_64, powepc64 (make check-gcc).

Thanks,
Indu

----
PR testsuite/100749 - gcc.dg/pch/valid-1.c fails after r12-949

Fix failing pch testcases. Use xstrdup to retain a reliable copy of the debug
format str containing the names (df_set_names is a static string var).  

2021-05-28  Indu Bhagat    <indu.bha...@oracle.com>

gcc/c-family/ChangeLog:

        * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
OK for the trunk.  Thanks,
Jeff

Reply via email to