1 // { dg-do assemble } 2 // PRMS Id: 9647 3 4 class castBug 5 { 6 public: 7 operator int *(); 8 operator const int *() const; 9 }; 10 11 class castBug2 12 { 13 public: 14 operator const int *() const; 15 }; 16 17 void voidfn(void *); 18 test()19void test() 20 { 21 castBug b; 22 castBug2 b2; 23 voidfn(b); // { dg-bogus "" } 24 voidfn(b2); // { dg-error "" } discarding const 25 } 26