seg-v in 4 lines (DMD 0.160 Linux/XP)

Thomas Kuehne thomas-dloop at kuehne.cn
Thu Jun 29 06:35:19 PDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

BCS schrieb am 2006-06-16:
><code>
> void main()
> {
> 	switch(1)
> 	{
> //		case 0:	// compiles with this line
> 			scope(exit) *cast(int*)null = 0;
> 		default:
> 	}
> }
></code>
>
> C:\...>dmd -v seg_v_1.d
> parse     seg_v_1
> semantic  seg_v_1
> semantic2 seg_v_1
> semantic3 seg_v_1
> code      seg_v_1
> generating code for function 'main'
>
> seg-v

Added to DStress as
http://dstress.kuehne.cn/run/s/switch_22_A.d
http://dstress.kuehne.cn/run/s/switch_22_B.d
http://dstress.kuehne.cn/run/s/switch_22_C.d
http://dstress.kuehne.cn/run/s/switch_22_D.d
http://dstress.kuehne.cn/run/s/switch_22_E.d
http://dstress.kuehne.cn/run/s/switch_22_F.d
http://dstress.kuehne.cn/run/s/switch_22_G.d
http://dstress.kuehne.cn/run/s/switch_22_I.d
http://dstress.kuehne.cn/run/s/switch_22_J.d

switch_22_A is nasty:
> ==10236== Conditional jump or move depends on uninitialised value(s)
> ==10236==    at 0x804A0D3: _Dmain (run/s/switch_22_A.d:17)
> ==10236==    by 0x804B2BE: main (in ./run/s/switch_22_A.d.exe)

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFEom6x3w+/yD4P9tIRAiYNAKCckRCza4STsjInkSV0ujAL271AZgCgujaS
Tmln4AOT/jL3YVPOHb1M6UA=
=lJ7R
-----END PGP SIGNATURE-----



More information about the Digitalmars-d-bugs mailing list