public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Indu Bhagat <ibhagat@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-1132] PR testsuite/100749 - gcc.dg/pch/valid-1.c fails after r12-949 Date: Mon, 31 May 2021 16:29:50 +0000 (GMT) [thread overview] Message-ID: <20210531162950.A9591384F010@sourceware.org> (raw) https://gcc.gnu.org/g:a87efd32384ee78ee33d20703deaa65fba81cb2d commit r12-1132-ga87efd32384ee78ee33d20703deaa65fba81cb2d Author: Indu Bhagat <indu.bhagat@oracle.com> Date: Mon May 31 09:19:38 2021 -0700 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-31 Indu Bhagat <indu.bhagat@oracle.com> gcc/c-family/ PR testsuite/100749 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names. Diff: --- gcc/c-family/c-pch.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/c-family/c-pch.c b/gcc/c-family/c-pch.c index 8f0f76024a2..5da60423354 100644 --- a/gcc/c-family/c-pch.c +++ b/gcc/c-family/c-pch.c @@ -255,10 +255,13 @@ c_common_valid_pch (cpp_reader *pfile, const char *name, int fd) if (v.pch_write_symbols != write_symbols && write_symbols != NO_DEBUG) { + char *created_str = xstrdup (debug_set_names (v.pch_write_symbols)); + char *used_str = xstrdup (debug_set_names (write_symbols)); cpp_warning (pfile, CPP_W_INVALID_PCH, "%s: created with '%s' debug info, but used with '%s'", name, - debug_set_names (v.pch_write_symbols), - debug_set_names (write_symbols)); + created_str, used_str); + free (created_str); + free (used_str); return 2; }
reply other threads:[~2021-05-31 16:29 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210531162950.A9591384F010@sourceware.org \ --to=ibhagat@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).