diff options
author | Olatunji Ruwase <tjruwase@google.com> | 2009-06-17 02:18:55 +0000 |
---|---|---|
committer | Diego Novillo <dnovillo@gcc.gnu.org> | 2009-06-16 22:18:55 -0400 |
commit | 8dd1bca076bba00642c88d60d24f63e604f49e23 (patch) | |
tree | 47ed037195b7f5fa3dc0189666a546e3a68d44f0 /gcc/plugin.c | |
parent | 54c4ebb7a524b52febe148e226bf5bc94d8832ae (diff) | |
download | gcc-8dd1bca076bba00642c88d60d24f63e604f49e23.tar.gz |
[multiple changes]
2009-06-16 Olatunji Ruwase <tjruwase@google.com>
* plugin.c(position_pass): Skip newly inserted pass during list
traversal to avoid repeated insertion.
2009-06-05 Olatunji Ruwase <tjruwase@google.com>
* gcc.dg/plugin/one_time_plugin.c: New test.
* gcc.dg/plugin/one_time-test-1.c: New test.
* gcc.dg/plugin/plugin.exp: Added one_time_plugin.c test.
From-SVN: r148566
Diffstat (limited to 'gcc/plugin.c')
-rw-r--r-- | gcc/plugin.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/plugin.c b/gcc/plugin.c index 0b5515e4907..93151f8a8a7 100644 --- a/gcc/plugin.c +++ b/gcc/plugin.c @@ -336,6 +336,11 @@ position_pass (struct plugin_pass *plugin_pass_info, case PASS_POS_INSERT_AFTER: new_pass->next = pass->next; pass->next = new_pass; + + /* Skip newly inserted pass to avoid repeated + insertions in the case where the new pass and the + existing one have the same name. */ + pass = new_pass; break; case PASS_POS_INSERT_BEFORE: new_pass->next = pass; |