Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2007-09

type Ta = 1..10; var a : Ta; // a not initialized = crash

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Skybuck Flying

Hello,

The following program compiled with free pascal 1.0.8 crashes:

type
  Ta = 1..10;
  Tb = 1..5;
var
  a : Ta;
  b : Tb;
begin
//  a := 1; // uncommenting these lines leads to crash.
//  b := 2;
  a := b;
  writeln( a );
  writeln('test');
  readln;
end.

(Also tested it in Delphi 2007, does not crash there. It seems Delphi 2007 initializes these special types to zero, or maybe it was a fluke of luck ;) )

Bye,
Skybuck.

David Pethes
to Skybuck Flying
Skybuck Flying wrote
The following program compiled with free pascal 1.0.8 crashes:

The current version of freepascal is 2.2.0, please update. It won't crash any more.

Tomas Hajny
to Skybuck Flying
Skybuck Flying wrote
Oh the version I reported was for the IDE. The compiler version is 2.0.4

Still - the latest version is 2.2.0. Do you
observe the problem with that version too?

Tomas