I have one application, which when I compile it for Win32, ends its compile with:

I have one application, which when I compile it for Win32, ends its compile with:
F2084 Internal Error: C2527.
This is in Delphi 10.3 Rio.

When compiling for Win64 it works fine.
On Tokyo and other previous Delphi versions it also compiles fine.
I have no idea what might cause this. It's a somewhat large application (about 1.4 Mloc), uses several hundreds of units and a few third party libraries.
I will try to narrow it down, but I expect that is going to be quite a bit of work..

Any suggestions? Can anybody tell what kind of error C2527 is?

Comments

  1. From memory, I recall that C is always a compiler thing. The number indicates a position in the compiler codebase.

    One of the problems here is that there is no public set of code pieces that should or should not compile. This combined with the lack of a language specification makes it very hard to write tests outside of Embarcadero.

    There was an attempt to do something like that, but for unit tests at https://bitbucket.org/NickHodges/delphi-unit-tests/src

    Something like that for code bits would be great, but will be a truckload of work.

    ReplyDelete
  2. Hi David,
    Does that mean you can't reproduce the problem? Hm.

    Anyway, the answer is: it appears at the last line of the unit, not at the line where the error is. The line that triggers the error is the line with the var declaration (comment it out and the error goes away).
    The compile seems to have succeeded somehow; see the (last) messages below that I've saved from the Build messages window.
    ('declared but never used' tells me that it has actually compiled the entire source file, at least until the end).

    [dcc32 Hint] Test_C2527.dpr(16): H2164 Variable 'Q' is declared but never used in 'Test_C2527'
    [dcc32 Fatal Error] Test_C2527.dpr(19): F2084 Internal Error: C2527
    Failed
    Elapsed time: 00:00:00.6

    Note also that this problem is very similar to RSP-19558.
    I've checked: Adding a string to the record helps.
    Making it a class instead of a record also helps.

    ReplyDelete
  3. Thanks Reinier Sterkenburg. We have reproduced it now.

    I appreciate the reduced code sample - that really helps a lot, it's very good of you.

    ReplyDelete

Post a Comment