annotate tests/mini/aa7.d @ 650:aa6a0b7968f7

Added test case for bug #100 Removed dubious check for not emitting static private global in other modules without access. This should be handled properly somewhere else, it's causing unresolved global errors for stuff that should work (in MiniD)
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Sun, 05 Oct 2008 17:28:15 +0200
parents f8c979770af3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
490
f8c979770af3 Fixed a critical bug in the runtime, where _d_allocmemoryT would mark
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 486
diff changeset
1 // adapted from dstress.run.a.associative_array_19_<n> to catch regressions early
486
a34078905d01 Added pragma(llvmdc, "string") for misc per-module compiler configuration, currently "string" can only be "verbose" which forces -vv for module it appears in.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
2
a34078905d01 Added pragma(llvmdc, "string") for misc per-module compiler configuration, currently "string" can only be "verbose" which forces -vv for module it appears in.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
3 module mini.aa7;
a34078905d01 Added pragma(llvmdc, "string") for misc per-module compiler configuration, currently "string" can only be "verbose" which forces -vv for module it appears in.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
4
a34078905d01 Added pragma(llvmdc, "string") for misc per-module compiler configuration, currently "string" can only be "verbose" which forces -vv for module it appears in.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
5 extern (C) int printf(char*, ...);
a34078905d01 Added pragma(llvmdc, "string") for misc per-module compiler configuration, currently "string" can only be "verbose" which forces -vv for module it appears in.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
6 extern (C) void gc_collect();
a34078905d01 Added pragma(llvmdc, "string") for misc per-module compiler configuration, currently "string" can only be "verbose" which forces -vv for module it appears in.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
7
a34078905d01 Added pragma(llvmdc, "string") for misc per-module compiler configuration, currently "string" can only be "verbose" which forces -vv for module it appears in.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
8
a34078905d01 Added pragma(llvmdc, "string") for misc per-module compiler configuration, currently "string" can only be "verbose" which forces -vv for module it appears in.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
9 int main(){
490
f8c979770af3 Fixed a critical bug in the runtime, where _d_allocmemoryT would mark
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 486
diff changeset
10 char*[char] aa;
486
a34078905d01 Added pragma(llvmdc, "string") for misc per-module compiler configuration, currently "string" can only be "verbose" which forces -vv for module it appears in.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
11
490
f8c979770af3 Fixed a critical bug in the runtime, where _d_allocmemoryT would mark
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 486
diff changeset
12 char key = 'a';
f8c979770af3 Fixed a critical bug in the runtime, where _d_allocmemoryT would mark
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 486
diff changeset
13 aa[key] = &key;
486
a34078905d01 Added pragma(llvmdc, "string") for misc per-module compiler configuration, currently "string" can only be "verbose" which forces -vv for module it appears in.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
14 gc_collect();
490
f8c979770af3 Fixed a critical bug in the runtime, where _d_allocmemoryT would mark
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 486
diff changeset
15 assert(aa[key] == &key);
f8c979770af3 Fixed a critical bug in the runtime, where _d_allocmemoryT would mark
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 486
diff changeset
16 assert(key in aa);
486
a34078905d01 Added pragma(llvmdc, "string") for misc per-module compiler configuration, currently "string" can only be "verbose" which forces -vv for module it appears in.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
17
a34078905d01 Added pragma(llvmdc, "string") for misc per-module compiler configuration, currently "string" can only be "verbose" which forces -vv for module it appears in.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
18 return 0;
a34078905d01 Added pragma(llvmdc, "string") for misc per-module compiler configuration, currently "string" can only be "verbose" which forces -vv for module it appears in.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
19 }
a34078905d01 Added pragma(llvmdc, "string") for misc per-module compiler configuration, currently "string" can only be "verbose" which forces -vv for module it appears in.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
diff changeset
20