From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1059) id 474CF385F01D; Thu, 19 Mar 2020 12:42:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 474CF385F01D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1584621723; bh=JcBTMZ/iiWLFXxdOOaO6txp4ikCB5goQAh73oxwN9Yg=; h=From:To:Subject:Date:From; b=hGQaOqy8VnknvXi/maWGTJ9ymIiKnFK88yhT7fmhdzJwl9woTg+Q7LXPqk3wk4dDH xIpEzek3vAAqjG28+p1hoH5ZMV0AhdY9VpSmsxXUOMnmplYyrNwLAsCYx0dT/T5dKZ 4BXD1BaYYYCLpLM74JaFsUk+lWsCJz3g4hM+L9Jc= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Nathan Sidwell To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/c++-modules] Do not strcat to result of getenv. X-Act-Checkin: gcc X-Git-Author: Martin Liska X-Git-Refname: refs/heads/devel/c++-modules X-Git-Oldrev: 43d513af3f2026420312cc709dd729c81862de0c X-Git-Newrev: 98ff89d1ac5872f29020fe5b5edfdf5abce59014 Message-Id: <20200319124203.474CF385F01D@sourceware.org> Date: Thu, 19 Mar 2020 12:42:03 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Mar 2020 12:42:03 -0000 https://gcc.gnu.org/g:98ff89d1ac5872f29020fe5b5edfdf5abce59014 commit 98ff89d1ac5872f29020fe5b5edfdf5abce59014 Author: Martin Liska Date: Fri Mar 13 13:50:01 2020 +0100 Do not strcat to result of getenv. PR lto/94157 * lto-wrapper.c (run_gcc): Use concat for appending to collect_gcc_options. PR lto/94157 * gcc.dg/lto/pr94157_0.c: New test. Diff: --- gcc/ChangeLog | 6 ++++++ gcc/lto-wrapper.c | 3 ++- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/lto/pr94157_0.c | 6 ++++++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 448c1e138fa..679296ffcac 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2020-03-13 Martin Liska + + PR lto/94157 + * lto-wrapper.c (run_gcc): Use concat for appending + to collect_gcc_options. + 2020-03-13 Jakub Jelinek PR target/94121 diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c index b8a35c85714..46a88b233f6 100644 --- a/gcc/lto-wrapper.c +++ b/gcc/lto-wrapper.c @@ -1317,7 +1317,8 @@ run_gcc (unsigned argc, char *argv[]) char *xassembler_opts_string = XOBFINISH (&temporary_obstack, char *); - strcat (collect_gcc_options, xassembler_opts_string); + collect_gcc_options = concat (collect_gcc_options, xassembler_opts_string, + NULL); } get_options_from_collect_gcc_options (collect_gcc, collect_gcc_options, diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4c6d7edda7e..6e2099bec5a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-03-13 Martin Liska + + PR lto/94157 + * gcc.dg/lto/pr94157_0.c: New test. + 2020-03-13 Kewen Lin PR testsuite/93935 diff --git a/gcc/testsuite/gcc.dg/lto/pr94157_0.c b/gcc/testsuite/gcc.dg/lto/pr94157_0.c new file mode 100644 index 00000000000..3bca677c4fb --- /dev/null +++ b/gcc/testsuite/gcc.dg/lto/pr94157_0.c @@ -0,0 +1,6 @@ +/* { dg-lto-do link } */ +/* { dg-lto-options { { -O0 -fipa-vrp -flto -Wa,--noexecstack -Wa,--noexecstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack } } } */ + +int main() { + +}