Why should the compiler be involved with the correctness of how a multiprocessor system works? That is a (typical) task of an OS!
A language and its compiler's task is to define what's in a user's processes. An OS's task is to execute user processes. The presence (or absence) of an OS is orthogonal to parallel processing.
The issues w.r.t. parallelism and languages is very broad; new ways of thinking and implementing are necessary. One well-known example is recasting your thinking in terms of map-reduce algorithms. Others are Communicating Sequential Processes (CSP) and tuple-based systems such as Linda; Lamport also had fundamental insights.
CSP maps neatly onto many different implementations, from hardware, through embedded software (single or multiprocessor), to distributed systems - in whatever language happens to be convenient.
The concept and tools are still being developed, but some concepts have stood the test of time over the decades. It is well worth understanding their key features and
why people keep returning to them.
(There is an ancillary question: if they are so good, why aren't they in ubiquitous use? Simple: Moore's "law" has dominated progress for half a century, but now that it is running out of steam people are having to confront developing parallel systems).