URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.jason/] [dot.C] - Rev 779
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do assemble }
// PRMS Id: 4143
// Bug: Pointer is silently dereferenced in method call.
extern "C" int printf (const char *, ...);
class Test
{
char ch;
public:
Test(char c) : ch(c) {}
void Print() { printf("%c", ch); }
};
int main()
{
Test *p = new Test('x');
p.Print(); // { dg-error "" }
}
Go to most recent revision | Compare with Previous | Blame | View Log