This is from the Wikipedia article on Automatic parallelization
Automatic parallelization by compilers or tools is very difficult due to the
following reasons[2]:
dependence analysis is hard for code using indirect addressing, pointers,
recursion, and indirect function calls;loops have an unknown number of iterations;
accesses to global resources are difficult to coordinate in terms
of memory allocation, I/O, and shared variables.
As you can see, the problem with the 1st point has mostly to do with programming language. In C/C++ you have all the problems mentioned in point 1. So my question is, do we have a language which is close to C/C++ but without these problems. I know Fortran fills the bill, but it is not even remotely like C/C++.
FORTRAN has a few unique features (probably best described as lack of features) which allow for clean, automatic parallelization; however, with all of the recent additions to FORTRAN, it isn’t clear if the modern equivalents of the language maintain such a distinction.
As far as comparison to C and C++, FORTRAN is not too far off the beaten path in terms of logic structures; however, to do sophisticated data structures, FORTRAN’s roots tended to store a structure across several associated arrays, and then use particular fields as the “next” index. This avoided pointers, but offered similar flexibility.
I’ve seen FORTRAN implementations of hash tables, trees and other structures back when I worked with the language more; but, it definately wasn’t written to easily represent such, and I’d imagine that such code is hard to parallelize.