No, they are not equivalent, although you are certainly passing the same type of argument each time, which is why the compiler does not complain.
In one case you are passing the address of a structure already allocated on the stack.
In the other case you are passing a pointer which is pointing at some arbitrary (probably non-writeable) location in memory, because it is not initialized.
You can fix the second call with malloc
to allocate memory and point the pointer at it.
MPI_Status* status2 = malloc(sizeof(MPI_Status));
Of course, after you are done with it, you should be responsible and free()
that memory:
free(status2);