diff options
author | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-17 02:18:55 +0000 |
---|---|---|
committer | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-17 02:18:55 +0000 |
commit | d5fa151513fab51edd09e0c23053c1d7fad1886a (patch) | |
tree | 47ed037195b7f5fa3dc0189666a546e3a68d44f0 /gcc/plugin.c | |
parent | 5e81298e5a4d3a6d5f5b2bd410553bfc2e0e60b9 (diff) | |
download | gcc-d5fa151513fab51edd09e0c23053c1d7fad1886a.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148566 138bc75d-0d04-0410-961f-82ee72b054a4
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; |