aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2020-03-13 13:50:01 +0100
committerMartin Liska <mliska@suse.cz>2020-03-13 13:50:01 +0100
commit98ff89d1ac5872f29020fe5b5edfdf5abce59014 (patch)
treedf56046e29ea5221aedee3252669de596a68bb7f /gcc
parent43d513af3f2026420312cc709dd729c81862de0c (diff)
downloadgcc-98ff89d1ac5872f29020fe5b5edfdf5abce59014.zip
gcc-98ff89d1ac5872f29020fe5b5edfdf5abce59014.tar.gz
gcc-98ff89d1ac5872f29020fe5b5edfdf5abce59014.tar.bz2
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/lto-wrapper.c3
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr94157_0.c6
4 files changed, 19 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 448c1e1..679296f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2020-03-13 Martin Liska <mliska@suse.cz>
+
+ PR lto/94157
+ * lto-wrapper.c (run_gcc): Use concat for appending
+ to collect_gcc_options.
+
2020-03-13 Jakub Jelinek <jakub@redhat.com>
PR target/94121
diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
index b8a35c8..46a88b2 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 4c6d7ed..6e2099b 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2020-03-13 Martin Liska <mliska@suse.cz>
+
+ PR lto/94157
+ * gcc.dg/lto/pr94157_0.c: New test.
+
2020-03-13 Kewen Lin <linkw@gcc.gnu.org>
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 0000000..3bca677
--- /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() {
+
+}