From b3e55d61fc0165f10eeeee5c980c19f4fe8ec9e2 Mon Sep 17 00:00:00 2001 From: peter Date: Sun, 31 Oct 2004 22:02:54 +0000 Subject: [PATCH] * new bug --- tests/webtbs/tw3375.pp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/webtbs/tw3375.pp diff --git a/tests/webtbs/tw3375.pp b/tests/webtbs/tw3375.pp new file mode 100644 index 0000000000..ddb19545bf --- /dev/null +++ b/tests/webtbs/tw3375.pp @@ -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. +