jwezorek
jwezorek

Reputation: 9565

Visual Studio 2019 "C1001 internal compiler error" only in Release

I'm getting a C1001 error while attempting to build in Visual Studio 2019 Version 16.7.2. This is a C++ project that has previously built fine until a change set I am attempting to build today.

The exact error is as follows: (with project specific path redacted)

1>d:\work\[...](82): fatal error C1001: An internal error has occurred in the compiler.

1>(compiler file 'd:\agent\_work\3\s\src\vctools\compiler\utc\src\p2\main.c', line 187)

Notes below:

  1. The error only happens in Release. Debug builds and runs.
  2. If I turn off all optimizations in Release the error goes away.
  3. The location where the error occurs seems to be unrelated to recent changes I have made to the project i.e. VS is reporting the error in a translation unit that had been building without problem until unrelated changes in another TU were made.
  4. The location where the error occurs seems to not actually be problematic in the sense that if I comment out the implementation of the function there and just return a default value from the function so that the program is syntactically correct, the error occurs in the next the function in the same file.
  5. Turning off Whole Program Optimization and Link Time Code Generation does not fix the problem.

Upvotes: 2

Views: 6389

Answers (1)

paulsm4
paulsm4

Reputation: 121871

SUGGESTIONS

Please:

  1. Update your post with exact error text (if available)

  2. Post your question to https://developercommunity.visualstudio.com/ as well

  3. See if any of these links are applicable:

  1. One way to notify Microsoft Support like this:

    MSVS > Help > Send Feedback > Report a Problem

  2. Here is a complete list of MSVS support options: https://visualstudio.microsoft.com/vs/support/


Update:

Thank you for copying/pasting the exact error message:

1>d:\work\[...](82): fatal error C1001: An internal error has occurred in the compiler.
1>(compiler file 'd:\agent\_work\3\s\src\vctools\compiler\utc\src\p2\main.c', line 187)

This is the MSVS file causing the error C1001: vctools\compiler\utc\src\p2\main.c

This is an existing Microsoft trouble report:

https://developercommunity.visualstudio.com/content/problem/210332/c1001-internal-error-compiler-file-fddvctoolscompi.html

Hi Roger,

Thanks for reporting the bug, and including an excellently self-contained repro, so quickly. I've investigated and this seems to be the same issue as https://developercommunity.visualstudio.com/content/problem/209359/ice-with-fpfast-in-156-and-msvc-daily-1413263051-p.html.

I'm closing this as a duplicate just so that people can collect context and work-around advice in the same location, and when the other bug is marked fixed, you can assume that this one is too.

Thanks again,

Aaron Gorenstein
Software Engineer II

Searching for this error message/source module, I also found this: https://stackoverflow.com/a/63435683/421195

Please post back if either of these work for you!

Upvotes: 2

Related Questions