From b06fa1f05ef05e91434220a3f329ad8a65fd1989 Mon Sep 17 00:00:00 2001 From: Frits van Bommel Date: Thu, 28 May 2009 02:28:30 +0200 Subject: [PATCH] I ran into another issue like the one fixed by r1318, so update all of `tests/mini/norun_debug*` to hopefully keep crashing using the same trick. --- tests/mini/norun_debug1.d | 2 +- tests/mini/norun_debug10.d | 2 +- tests/mini/norun_debug12.d | 2 +- tests/mini/norun_debug2.d | 2 +- tests/mini/norun_debug3.d | 2 +- tests/mini/norun_debug4.d | 2 +- tests/mini/norun_debug5.d | 2 +- tests/mini/norun_debug6.d | 2 +- tests/mini/norun_debug7.d | 2 +- tests/mini/norun_debug8.d | 2 +- tests/mini/norun_debug9.d | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/mini/norun_debug1.d b/tests/mini/norun_debug1.d index 637ce7d5..44267fe2 100644 --- a/tests/mini/norun_debug1.d +++ b/tests/mini/norun_debug1.d @@ -2,7 +2,7 @@ module mini.norun_debug1; void main() { - int* ptr; + int* ptr = cast(int*) 1; // all these should be inspectable int i = 1; diff --git a/tests/mini/norun_debug10.d b/tests/mini/norun_debug10.d index 8169dd6b..35cb4e97 100644 --- a/tests/mini/norun_debug10.d +++ b/tests/mini/norun_debug10.d @@ -16,6 +16,6 @@ void main() void func(Vec2 v2, ref Vec2 rv2, char[] str, out int i, ref float f) { - int* fail; + int* fail = cast(int*) 1; *fail = 0; } diff --git a/tests/mini/norun_debug12.d b/tests/mini/norun_debug12.d index b6bebf7f..0be7f655 100644 --- a/tests/mini/norun_debug12.d +++ b/tests/mini/norun_debug12.d @@ -19,6 +19,6 @@ void main() scope c = new C; I i = c; - int* fail; + int* fail = cast(int*) 1; *fail = 0; } diff --git a/tests/mini/norun_debug2.d b/tests/mini/norun_debug2.d index 49b73e2b..8491fb95 100644 --- a/tests/mini/norun_debug2.d +++ b/tests/mini/norun_debug2.d @@ -8,7 +8,7 @@ void main() while (iter < 25) { if (rand() % 20 == 10) - *cast(int*)null = 0; + *cast(int*)1 = 0; ++iter; } assert(0); diff --git a/tests/mini/norun_debug3.d b/tests/mini/norun_debug3.d index 07e5889c..236ebdd5 100644 --- a/tests/mini/norun_debug3.d +++ b/tests/mini/norun_debug3.d @@ -5,6 +5,6 @@ void main() int i = 42; int* ip = &i; - int* fail; + int* fail = cast(int*) 1; *fail = 0; } diff --git a/tests/mini/norun_debug4.d b/tests/mini/norun_debug4.d index 792236a2..850303a2 100644 --- a/tests/mini/norun_debug4.d +++ b/tests/mini/norun_debug4.d @@ -6,6 +6,6 @@ void main() wchar wc = 'w'; dchar dc = 'd'; - int* fail; + int* fail = cast(int*) 1; *fail = 32; } diff --git a/tests/mini/norun_debug5.d b/tests/mini/norun_debug5.d index 4f8f4edc..a6e44330 100644 --- a/tests/mini/norun_debug5.d +++ b/tests/mini/norun_debug5.d @@ -10,6 +10,6 @@ void main() void func(int i, real r, real* p) { - int* fail; + int* fail = cast(int*) 1; *fail = 666; } diff --git a/tests/mini/norun_debug6.d b/tests/mini/norun_debug6.d index e09cf20b..9740a651 100644 --- a/tests/mini/norun_debug6.d +++ b/tests/mini/norun_debug6.d @@ -4,6 +4,6 @@ void main() { char[] str = "hello world :)"; - int* fail; + int* fail = cast(int*) 1; *fail = 32; } diff --git a/tests/mini/norun_debug7.d b/tests/mini/norun_debug7.d index 69703cc6..8db36d6e 100644 --- a/tests/mini/norun_debug7.d +++ b/tests/mini/norun_debug7.d @@ -4,6 +4,6 @@ int gi; void main() { - int* fail; + int* fail = cast(int*) 1; *fail = 0; } diff --git a/tests/mini/norun_debug8.d b/tests/mini/norun_debug8.d index 3a0be722..c77b0b52 100644 --- a/tests/mini/norun_debug8.d +++ b/tests/mini/norun_debug8.d @@ -26,6 +26,6 @@ void main() foo.bar.y = 3.1415; foo.bar.foo = &foo; - int* fail; + int* fail = cast(int*) 1; *fail = 0; } diff --git a/tests/mini/norun_debug9.d b/tests/mini/norun_debug9.d index 3c28e91d..acc5ce0e 100644 --- a/tests/mini/norun_debug9.d +++ b/tests/mini/norun_debug9.d @@ -6,7 +6,7 @@ struct Foo void func() { - int* fail; + int* fail = cast(int*) 1; *fail = 0; } }