char buffer[BUF]; is just some memory. There's no type information attached to the bytes composing buffer. Only the compiler knows, that this memory region is supposed to hold characters. You could use any type, even double:
double buffer[BUF];
double *pd1 = new (buffer) double[N];