------- Comment #3 from janis at gcc dot gnu dot org  2006-08-08 19:55 -------
A regression hunt on powerpc-linux identified this patch where a testcase based
on the submitter's test (see below) starts failing:

    http://gcc.gnu.org/viewcvs?view=rev&rev=95356

    r95356 | paolo | 2005-02-21 23:12:27 +0000 (Mon, 21 Feb 2005)

Paolo checked in the patch, but it's from Douglas Gregor.

Here's the test I used, compiled with -O2:

-------------------
extern "C" void abort (void);

int barcnt = 0;

class Foo {
  public:
    template<typename T>
    void operator()(const T& fcn) {
      fcn();
    }
};

void bar() {
  barcnt++;
}

int main() {
  Foo myFoo;
  myFoo(bar);
  myFoo(&bar);
  if (barcnt != 2)
    abort ();
  return 0;
}
-------------------


-- 

janis at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |paolo at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28385

Reply via email to