diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-10-03 17:21:40 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-10-03 17:21:40 +0000 |
commit | 2c3e097e166474b86d5f1020b300a2a1681f5500 (patch) | |
tree | fea276bce4881692ca7bc5a18c1dab22b21c6519 /gcc/cp/repo.c | |
parent | d7441b0dfad1f42a4343dd48dd759eee73044703 (diff) | |
download | gcc-2c3e097e166474b86d5f1020b300a2a1681f5500.tar.gz |
PR c++/17775
* repo.c: Include flags.h.
(finish_repo): Add -frandom-seed to the arguments.
PR c++/17775
* g++.dg/template/repo4.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104898 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/repo.c')
-rw-r--r-- | gcc/cp/repo.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/cp/repo.c b/gcc/cp/repo.c index b3d327d4b00..eee3b87f8d3 100644 --- a/gcc/cp/repo.c +++ b/gcc/cp/repo.c @@ -36,6 +36,7 @@ Boston, MA 02110-1301, USA. */ #include "obstack.h" #include "toplev.h" #include "diagnostic.h" +#include "flags.h" static char *extract_string (char **); static const char *get_base_filename (const char *); @@ -239,7 +240,16 @@ finish_repo (void) fprintf (repo_file, "D %s\n", dir); args = getenv ("COLLECT_GCC_OPTIONS"); if (args) - fprintf (repo_file, "A %s\n", args); + { + fprintf (repo_file, "A %s", args); + /* If -frandom-seed is not among the ARGS, then add the value + that we chose. That will ensure that the names of types from + anonymous namespaces will get the same mangling when this + file is recompiled. */ + if (!strstr (args, "'-frandom-seed=")) + fprintf (repo_file, " '-frandom-seed=%s'", flag_random_seed); + fprintf (repo_file, "\n"); + } for (t = pending_repo; t; t = TREE_CHAIN (t)) { |