Repository: opencv
Issue: OpenCV 4.5.1 build error on Windows 10 with ICC
Labels: bug,category: build/install,category: g-api / gapi,category: 3rdparty

##### System information (version)
- OpenCV => 4.5.1
- Operating System / Platform => Windows 64 Bit
- Compiler => Intel ICC (Visual Studio 2019)

##### Detailed description

Building OpenCV with the Intel ICC compiler fails with the following error:
```
"D:\Git\3rdParty\opencv-4.5.1\build\OpenCV.sln" (default target) (1) ->
"D:\Git\3rdParty\opencv-4.5.1\build\ALL_BUILD.vcxproj.metaproj" (default target) (2) ->
"D:\Git\3rdParty\opencv-4.5.1\build\modules\gapi\opencv_gapi.vcxproj.metaproj" (default target) (78) ->
"D:\Git\3rdParty\opencv-4.5.1\build\modules\gapi\opencv_gapi.vcxproj" (default target) (85) ->
(ClCompile target) ->
  D:\Git\3rdParty\opencv-4.5.1\src\modules\gapi\include\opencv2/gapi/garg.hpp(139): error : assertion failed at: "shared/cfe/edgcpfe/exprutil.c", line 14613 [D:\Git\3rdParty\opencv-4.5.1\build\modules\gapi\opencv_gapi.vcxproj]

    47 Warning(s)
    1 Error(s)

Time Elapsed 00:21:56.12
```

##### Steps to reproduce

Add the following 2 lines to the root CMakeLists.txt
```
set(CMAKE_GENERATOR "Visual Studio 16 2019" CACHE STRING "Generator that is used when no generator is supplied with -G." FORCE)
set(CMAKE_GENERATOR_TOOLSET "Intel C++ Compiler 19.1" CACHE STRING "Toolset that is used when no toolset is supplied with -T." FORCE)
```
Open CMake GUI
1) Click configure
2) Click generate

Open cmd
cd to build dir
`msbuild OpenCV.sln /p:Configuration=Release`

##### Issue submission checklist

 - [ X ] I report the issue, it's not a question
   <!--
   OpenCV team works with forum.opencv.org, Stack Overflow and other communities
   to discuss problems. Tickets with question without real issue statement will be
   closed.
   -->
 - [ X ] I checked the problem with documentation, FAQ, open issues,
       forum.opencv.org, Stack Overflow, etc and have not found solution
   <!--
   Places to check:
   * OpenCV documentation: https://docs.opencv.org
   * FAQ page: https://github.com/opencv/opencv/wiki/FAQ
   * OpenCV forum: https://forum.opencv.org
   * OpenCV issue tracker: https://github.com/opencv/opencv/issues?q=is%3Aissue
   * Stack Overflow branch: https://stackoverflow.com/questions/tagged/opencv
   -->
 - [ X ] I updated to latest OpenCV version and the issue is still there
   <!--
   master branch for OpenCV 4.x and 3.4 branch for OpenCV 3.x releases.
   OpenCV team supports only latest release for each branch.
   The ticket is closed, if the problem is not reproduced with modern version.
   -->
 - [ X ] There is reproducer code and related data files: videos, images, onnx, etc
   <!--
   The best reproducer -- test case for OpenCV that we can add to the library.
   Recommendations for media files and binary files:
   * Try to reproduce the issue with images and videos in opencv_extra repository
     to reduce attachment size
   * Use PNG for images, if you report some CV related bug, but not image reader
     issue
   * Attach the image as archive to the ticket, if you report some reader issue.
     Image hosting services compress images and it breaks the repro code.
   * Provide ONNX file for some public model or ONNX file with with random weights,
     if you report ONNX parsing or handling issue. Architecture details diagram
     from netron tool can be very useful too. See https://lutzroeder.github.io/netron/
   -->