Sign in Join

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

Mailing lists / fpc-devel / 2008-01

ICE when compiling a 3-line program

5 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

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

Miguel Ojeda

Hi!

When I was practicing my Pascal's skills yesterday before an exam, I managed to ICE fpc. I thought it was a bug in the fpc of my Debian distribution. However, I tried to compile the program in a server of my faculty and also fpc crashed there.

I don't know if someone has reported this before or has been already fixed (I don't follow this ML); if so, excuse me.

I have been reduced the bug into a minimal program:

program ice;
type t = set of 1..5;
begin 1 in t end.

The following happens when trying to compile it:

~ $ cat ice.pas
program ice;
type t = set of 1..5;
begin 1 in t end.
~ $ fpc ice.pas
Free Pascal Compiler version 2.2.0 [2007/11/05] for i386 Copyright (c) 1993-2007 by Florian Klaempfl
Target OS: Linux for i386
Compiling ice.pas
Fatal: Compilation aborted
An unhandled exception occurred at $080DD26C :
EAccessViolation : Access violation
$080DD26C
$080EC816
$0813EC78
$08116363
$08118218
$080FBCAB
$080618D8
$08048276

Error: /usr/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled)
~ $

Thank you for developing fpc!

Reply by email

Joost van der Sluis
to Miguel Ojeda

Op maandag 28-01-2008 om 15:51 uur [tijdzone +0100], schreef Miguel Ojeda:

When I was practicing my Pascal's skills yesterday before an exam, I managed to ICE fpc.

Nice to hear that there are still ppl having exams for pascal.

I thought it was a bug in the fpc of my Debian distribution. However, I tried to compile the program in a server of my faculty and also fpc crashed there.

I've compiled your program and it gives a nice error-message about a missing 'begin'.

I also used fpc version 2.2.0, and that also works. (i386-linux and x86_64-linux)

So was there also something else?

Joost.

Reply by email

Sergei Gorelkin
to Joost van der Sluis
Joost van der Sluis wrote 8 lines
I've compiled your program and it gives a nice error-message about a missing 'begin'. I also used fpc version 2.2.0, and that also works. (i386-linux and x86_64-linux) So was there also something else?

Looks like there wasn't. At my site, with trunk version of FPC, the fault was reproducible in Windows, here is the callstack:

Target OS: Win32 for i386
Compiling ice.pas
Fatal: Compilation aborted
An unhandled exception occurred at $00464D53 :
EAccessViolation : Access violation
$00464D53 TINNODE__PASS_TYPECHECK, line 272 of nset.pas $00437E95 TYPECHECKPASS, line 75 of pass_1.pas
$004E04CA STATEMENT, line 1030 of pstatmnt.pas
$004E071E STATEMENT_BLOCK, line 1122 of pstatmnt.pas $004B66E0 BLOCK, line 238 of psub.pas
$004B86C4 TCGPROCINFO__PARSE_BODY, line 1277 of psub.pas $0042C8C5 COMPILE, line 387 of parser.pas
$004111A0 COMPILE, line 244 of compiler.pas
$00401756 main, line 207 of pp.pas

Sergei

Reply by email

Miguel Ojeda
to Sergei Gorelkin
Sergei Gorelkin wrote 11 lines
Joost van der Sluis wrote: > I've compiled your program and it gives a nice error-message about a > missing 'begin'. > > I also used fpc version 2.2.0, and that also works. (i386-linux and > x86_64-linux) > > So was there also something else? > Looks like there wasn't. At my site, with trunk version of FPC, the fault was reproducible in Windows, here is the callstack:

Maybe some configuration's flag makes the bug appear so Joost couldn't reproduce it?

Reply by email

Peter Vreman
Show quoted text 15 lines
On Jan 28, 2008 6:00 PM, Sergei Gorelkin wrote: > Joost van der Sluis wrote: > > I've compiled your program and it gives a nice error-message about a > > missing 'begin'. > > > > I also used fpc version 2.2.0, and that also works. (i386-linux and > > x86_64-linux) > > > > So was there also something else? > > > Looks like there wasn't. At my site, with trunk version of FPC, the > fault was reproducible in Windows, here is the callstack: Maybe some configuration's flag makes the bug appear so Joost couldn't reproduce it?

Fixed in trunk in r10081.

Reply by email