Unhandled access violation when 'label' and 'with' are used
Summary
An access violation occurred while compiling the minimal code below.
Please note: I am aware that the attached code is not correct and so will not compile correctly. My goal was to find bugs (in this case an access violation) as part of an assignment at the Chair of Software Engineering at the Humboldt University of Berlin (Germany/Berlin).
System Information
- Operating system: Linux (Linux Mint 20.3)
- Processor architecture: x86-64
- Compiler version: 3.0.4 (3.0.4+dfsg-23) (newest available package source)
- Device: Computer (Laptop)
Steps to reproduce
Compile the attached sample code via Command line.
Command line call used: fpc [FILE NAME].pas
Example Project
Minimized Test file:
program helloWorld;
label
1;
begin
1:with true do
end.
What is the current bug behavior?
The commandline output is as followed:
Copyright (c) 1993-2017 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling 0_foo_reduziert.pas
0_foo_reduziert.pas(5,18) Error: Expression type must be class or record type, got Boolean
Fatal: Compilation aborted
An unhandled exception occurred at $00000000004ECE6B:
EAccessViolation: Access violation
$00000000004ECE6B
What is the expected (correct) behavior?
The desired behaviour is a regular termination of the programme without the occurrence of an Access violation.