From: dmalcolm Date: Tue, 13 Aug 2013 00:41:39 +0000 (+0000) Subject: gcc/testsuite X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6f744c31d6a9bd5eb59ed3556029a425ba598f00;p=thirdparty%2Fgcc.git gcc/testsuite 2013-08-13 David Malcolm * gcc.dg/plugin/one_time_plugin.c: (one_pass_gate): Convert to member function... (one_pass::gate): ...this. (one_pass_exec): Convert to member function... (one_pass::impl_execute): ...this. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201680 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e6a2d8b3231b..6b82931ca8f4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2013-08-13 David Malcolm + + * gcc.dg/plugin/one_time_plugin.c: (one_pass_gate): Convert + to member function... + (one_pass::gate): ...this. + (one_pass_exec): Convert to member function... + (one_pass::impl_execute): ...this. + 2013-08-12 Paolo Carlini PR c++/57416 diff --git a/gcc/testsuite/gcc.dg/plugin/one_time_plugin.c b/gcc/testsuite/gcc.dg/plugin/one_time_plugin.c index 2d996da1235f..7e93e6585007 100644 --- a/gcc/testsuite/gcc.dg/plugin/one_time_plugin.c +++ b/gcc/testsuite/gcc.dg/plugin/one_time_plugin.c @@ -12,22 +12,6 @@ int plugin_is_GPL_compatible; -static bool one_pass_gate (void) -{ - return true; -} - -static unsigned int one_pass_exec (void) -{ - static int counter = 0; - - if (counter > 0) { - printf ("Executed more than once \n"); - } - counter++; - return 0; -} - namespace { const pass_data pass_data_one_pass = @@ -53,13 +37,29 @@ public: {} /* opt_pass methods: */ - bool gate () { return one_pass_gate (); } - unsigned int execute () { return one_pass_exec (); } + bool gate (); + unsigned int execute (); }; // class one_pass } // anon namespace +bool one_pass::gate (void) +{ + return true; +} + +unsigned int one_pass::execute () +{ + static int counter = 0; + + if (counter > 0) { + printf ("Executed more than once \n"); + } + counter++; + return 0; +} + gimple_opt_pass * make_one_pass (gcc::context *ctxt) {