Thread overview
seg-v in 4 lines (DMD 0.160 Linux/XP)
Jun 16, 2006
BCS
Jun 29, 2006
Thomas Kuehne
Jun 29, 2006
BCS
Jun 29, 2006
Thomas Kuehne
Jun 29, 2006
BCS
Jun 30, 2006
Thomas Kuehne
Jun 30, 2006
BCS
June 16, 2006
<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
June 29, 2006
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


June 29, 2006
404:

Thomas Kuehne wrote:
> 
> 
> 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
> 

>
> Added to DStress as
> http://dstress.kuehne.cn/compile/m/mangelof_16_A.d
> http://dstress.kuehne.cn/compile/m/mangelof_16_B.d
> http://dstress.kuehne.cn/compile/m/mangelof_16_C.d
> http://dstress.kuehne.cn/compile/m/mangelof_16_D.d
> http://dstress.kuehne.cn/compile/m/mangelof_16_E.d
> http://dstress.kuehne.cn/compile/m/mangelof_16_F.d
> http://dstress.kuehne.cn/compile/m/mangelof_16_G.d
> http://dstress.kuehne.cn/compile/m/mangelof_16_H.d

http://dstress.kuehne.cn/.../a/asm_cvtpd2pi_01_A.d
http://dstress.kuehne.cn/.../a/asm_cvtpi2pd_01_A.d
http://dstress.kuehne.cn/.../a/asm_cvtpi2ps_01_A.d
http://dstress.kuehne.cn/.../a/asm_cvtps2pi_01_A.d
http://dstress.kuehne.cn/.../a/asm_cvttpd2pi_01_A.d
http://dstress.kuehne.cn/.../a/asm_cvttps2pi_01_A.d
http://dstress.kuehne.cn/.../c/command_line_null_source_03
http://dstress.kuehne.cn/.../l/linking_01
http://dstress.kuehne.cn/.../s/struct_24_C.d
http://dstress.kuehne.cn/.../t/typeinfo_init_01
http://dstress.kuehne.cn/.../t/typeinfo_init_02
http://dstress.kuehne.cn/.../u/unittest_09_C
June 29, 2006
BCS schrieb am 2006-06-29:
> 404:
>
> Thomas Kuehne wrote:
>> 
>> 
>> 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

fixed

> > Added to DStress as http://dstress.kuehne.cn/compile/m/mangelof_16_A.d http://dstress.kuehne.cn/compile/m/mangelof_16_B.d http://dstress.kuehne.cn/compile/m/mangelof_16_C.d http://dstress.kuehne.cn/compile/m/mangelof_16_D.d http://dstress.kuehne.cn/compile/m/mangelof_16_E.d http://dstress.kuehne.cn/compile/m/mangelof_16_F.d http://dstress.kuehne.cn/compile/m/mangelof_16_G.d http://dstress.kuehne.cn/compile/m/mangelof_16_H.d

typo:
http://dstress.kuehne.cn/compile/m/mangleof_16_A.d
http://dstress.kuehne.cn/compile/m/mangleof_16_B.d
http://dstress.kuehne.cn/compile/m/mangleof_16_C.d
http://dstress.kuehne.cn/compile/m/mangleof_16_D.d
http://dstress.kuehne.cn/compile/m/mangleof_16_E.d
http://dstress.kuehne.cn/compile/m/mangleof_16_F.d
http://dstress.kuehne.cn/compile/m/mangleof_16_G.d
http://dstress.kuehne.cn/compile/m/mangleof_16_H.d


> http://dstress.kuehne.cn/.../a/asm_cvtpd2pi_01_A.d http://dstress.kuehne.cn/.../a/asm_cvtpi2pd_01_A.d http://dstress.kuehne.cn/.../a/asm_cvtpi2ps_01_A.d http://dstress.kuehne.cn/.../a/asm_cvtps2pi_01_A.d http://dstress.kuehne.cn/.../a/asm_cvttpd2pi_01_A.d http://dstress.kuehne.cn/.../a/asm_cvttps2pi_01_A.d http://dstress.kuehne.cn/.../c/command_line_null_source_03 http://dstress.kuehne.cn/.../l/linking_01 http://dstress.kuehne.cn/.../s/struct_24_C.d http://dstress.kuehne.cn/.../t/typeinfo_init_01 http://dstress.kuehne.cn/.../t/typeinfo_init_02 http://dstress.kuehne.cn/.../u/unittest_09_C

Those listed above are results from moving/renaming/deleting and will vanish when new result pages are generated.

Thomas


June 29, 2006
Thomas Kuehne wrote:
> 
> 
> 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
> 

"It is illegal for a GotoStatement to be used to skip initializations."

How does this effect the legality of these test cases. For that matter how do I determine if a test case is considered to be legal?

I would expect that "A" would be illegal because of this. I think that the actions of the rest are not specified.
June 30, 2006
BCS schrieb am 2006-06-29:
> Thomas Kuehne wrote:
>> 
>> 
>> 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
>> 
>
> "It is illegal for a GotoStatement to be used to skip initializations."
>
> How does this effect the legality of these test cases. For that matter how do I determine if a test case is considered to be legal?

legal:
http://dstress.kuehne.cn/compile/
http://dstress.kuehne.cn/run/

illegal:
http://dstress.kuehne.cn/nocompile/
http://dstress.kuehne.cn/norun/

Those in http://dstress.kuehne.cn/complex/ are "complex" tests.

> I would expect that "A" would be illegal because of this.
Fixed.

> I think that the actions of the rest are not specified.
Replace scope with writefln("activate scope X"); and analyse again.

Thomas




June 30, 2006
Thomas Kuehne wrote:
> BCS schrieb am 2006-06-29:
>
>>I think that the actions of the rest are not specified.
> 
> Replace scope with writefln("activate scope X"); and analyse again.
> 

<code>
import std.stdio;
void main()
{
goto skip;
scope(exit) head: writef("exit\n");
skip: writef("exiting\n");
}
</code>
scope.d(6): cannot goto forward into different try block level

Yet the latter test cases allow the skipping of scope statements using a switch. OTOH the scope statements do get executed as if they weren't skipped. Both of these actions are, as far as I can tell, undocumented. I don't know what should be the defined action but this just seems odd.