Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Delphi 10.1 Berlin: Internal Compiler Error C6949 compiling graphics32



Permlink Replies: 2 - Last Post: Jun 28, 2016 6:04 AM Last Post By: Andy Kozakewycz
Andy Kozakewycz

Posts: 46
Registered: 11/9/01
Delphi 10.1 Berlin: Internal Compiler Error C6949 compiling graphics32
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 27, 2016 8:14 AM
The error message occurs compiling the Graphics32 library in source file GR32_vectorMaps.pas line 442

Doesn't seem to like this code

procedure ConvertVerticesF;
var I:Integer;
begin
for I := 0 to Length(FVectors) - 1 do
begin
//Not a mistake! Converting physical mem. directly to avoid temporary floating point buffer
//Do no change to PFloat.. the type is relative to the msh format.
PSingle(@FVectors[I].X)^ := FVectors[I].X * FixedToFloat;
PSingle(@FVectors[I].Y)^ := FVectors[I].Y * FixedToFloat;
end;
end

Error occurs in release mode, debug mode compiles OK. Works OK in both 64 bit compiler modes.

Also compiles OK using Seattle 32 and 64 bit.

Anyone else confirm this?
Andy Kozakewycz

Posts: 46
Registered: 11/9/01
Re: Delphi 10.1 Berlin: Internal Compiler Error C6949 compiling graphics32
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 28, 2016 1:55 AM   in response to: Andy Kozakewycz in response to: Andy Kozakewycz
Anybody have a solution to this other than uninstalling and going back to Seattle?
Andy Kozakewycz

Posts: 46
Registered: 11/9/01
Re: Delphi 10.1 Berlin: Internal Compiler Error C6949 compiling graphics32
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 28, 2016 6:04 AM   in response to: Andy Kozakewycz in response to: Andy Kozakewycz
OK I found a workaround.

The problem appears to be in the optimisation.

I wrapped the problematic function in {$O-}...{$O+} to turn optimisations off for this function.

The routine is block scoped inside an outer Savefile function so the whole savefile function needs the tags around.

Savefile obviously doesn't affect the speed of the main code.

Thanks for all your help guys ! rollseyes lol
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02