Repository: opencv
Issue: `minAreaRect` error with Intel C++ compiler
Labels: incomplete

<!--
If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses.
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).

Please:

* Read the documentation to test with the latest developer build.
* Check if other person has already created the same issue to avoid duplicates. You can comment on it if there already is an issue.
* Try to be as detailed as possible in your report.
* Report only one problem per created issue.


This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
-->

##### System information (version)
<!-- Example
- OpenCV => 3.4.6
- Operating System / Platform => Ubuntu 16.04.6
- Compiler => Intel® C++ Compiler (icc & icpc)
-->

- OpenCV => 3.4.6 & 3.4.5
- Operating System / Platform => Ubuntu 16.04.6
- Compiler => Intel® C++ Compiler
Intel® System Studio 2019 (update 3) Ultimate Edition with icc & icpc version 9.0.3.206 (gcc version 5.4.0 compatibility), student license.

##### Detailed description

<!-- your description -->

I installed Intel® System Studio 2019 (update 3) Ultimate Edition on latest Ubuntu 16.04. I compiled OpenCV 3.4.6 with icc & icpc. When I run `cv::minAreaRect(std::vector<cv::Point>)`, An error report as following:
```bash
terminate called after throwing an instance of 'cv::Exception'
  what():  OpenCV(3.4.6) /home/sp/opt/opencv-3.4.6/modules/imgproc/src/rotcalipers.cpp:166: 
error: (-215:Assertion failed) orientation != 0 in function 'rotatingCalipers'

Aborted (core dumped)
```
So is OpenCV 3.4.5. When I use OpenCV Comiled with GCC 5.4.0, there is no error.

I have test on four machines. Only one of them has no error. 

- A: i7 8850U without standalone gpu: no error
- B: i7 8850U without standalone gpu: has error
- C: i5 8300H without standalone gpu: has error
- D: i7 4712HQ without standalone gpu: has error

A, B and C all begin to test after reinstalling Ubuntu 16.04. All these machines has same config files, including installing required packages.

##### Steps to reproduce

 I use following configure command to compile OpenCV 3.4.6 with its contrib files.

```bash
# in ~/.bashrc
source /opt/intel/system_studio_2019/bin/compilervars.sh
export CC='icc'
export CXX='icpc'

# install required packages
sudo apt-get install -y v4l* libv4* cutecom htop vim
sudo apt-get install -y build-essential rar cpufrequtils libusb-1.0-0 libusb-dev libhdf5-dev
sudo apt-get install -y cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install -y libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev  # [optional] 
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev libv4l-dev liblapacke-dev
sudo apt-get install -y libxvidcore-dev libx264-dev 
sudo apt-get install -y libatlas-base-dev gfortran
sudo apt-get install -y ffmpeg
sudo apt-get install -y libopenblas-dev libgflags-dev libgeotiff-dev libgtkglext1-dev libdc1394-22-dev libgphoto2-dev libavresample-dev
sudo apt-get install -y libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev
sudo apt-get install -y libeigen3-dev

# cmake command
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_PYTHON_EXAMPLES=OFF \
-D INSTALL_C_EXAMPLES=OFF \
-D OPENCV_EXTRA_MODULES_PATH=/home/sp/opt/opencv-3.4.6/opencv_contrib-3.4.6/modules \
-D WITH_OPENBLAS=ON \
-D WITH_GTK_2_X=ON \
-D WITH_TBB=ON \
-D WITH_V4L=ON \
-D WITH_LIBV4L=ON \
-D WITH_GTK=ON \
-D WITH_OPENGL=ON \
-D WITH_OPENMP=ON \
-D WITH_OPENCL=ON \
-D WITH_TBB=ON \
-D WITH_IPP=ON \
-D BUILD_DOCS=OFF \
-D BUILD_PERF_TESTS=OFF \
-D BUILD_TESTS=OFF \
-D WITH_CSTRIPES=ON \
-D BUILD_EXAMPLES=OFF ..

# compile
make -j10

# install
sudo make install -j4
```
if I compile OpenCV with GCC 5.4.0 by commenting `export CC='icc'` and `export CXX='icpc'`  in `~/.bashrc`，everthing goes well.

I have no idea what happened during the process of compiling. Hope someone can give some ideas.