mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 05:43:51 +02:00
* new bug
This commit is contained in:
parent
c95a859f0a
commit
b3e55d61fc
23
tests/webtbs/tw3375.pp
Normal file
23
tests/webtbs/tw3375.pp
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{ %fail }
|
||||||
|
|
||||||
|
{ Source provided for Free Pascal Bug Report 3375 }
|
||||||
|
{ Submitted by "Vincent Snijders" on 2004-10-29 }
|
||||||
|
{ e-mail: vslist@zonnet.nl }
|
||||||
|
program typecast;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
type
|
||||||
|
T4bytes = array[0..3] of byte;
|
||||||
|
|
||||||
|
var
|
||||||
|
w: word;
|
||||||
|
p: pchar;
|
||||||
|
a: T4bytes;
|
||||||
|
|
||||||
|
begin
|
||||||
|
w := 0;
|
||||||
|
p := pchar(w); // should fail, because sizeof(w)<>sizeof(p) on this platform.
|
||||||
|
//a := T4Bytes(w); // should fail, and it does
|
||||||
|
end.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user