Is volatile an illegal instruction in c++ on macos (related to building opencv)?

I am trying to build OpenCV 4.1.0 on Mac by following this blog:

Here is the command line for the preparatory cmake - which is successful:

cmake -DOPENCV_EXTRA_MODULES_PATH=/git/opencv_contrib-4.1.0/modules -DPYTHON_DEFAULT_EXECUTABLE=python3 -DCMAKE_CXX_COMPILER=/usr/local/gcc-9.1/bin/g++-9.1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_opencv_python2=False -DBUILD_opencv_python3=True -DPYTHON3_EXECUTABLE=python3 ../

Then the make

make -j2

That fails:

/git/opencv-4.1.0/3rdparty/openexr/Half/half.cpp:71:5: internal compiler error: Illegal instruction: 4
   71 |     volatile float f = 1e10;
      |     ^~~~~~~~

Tips from anyone who has successfully built this version of openCV on mac (and with opencv_contrib) would be especially appreciated.