annotate tangotests/fail/p.d @ 291:068cb3c60afb trunk

[svn r312] Changed assert codegen to insert an unreachable terminator after the call to the assert function, which currently calls abort(). Changed array comparison runtime support to pass the array typeinfo instead of the element typeinfo. This allows a cleaner and faster implementation.
author lindquist
date Sat, 21 Jun 2008 21:16:26 +0200
parents 68a7dd38c03c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
134
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
1 extern(C) int printf(char*, ...);
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
2
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
3 int main(char[][] args)
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
4 {
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
5 printf("getint\n");
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
6 int i = getint();
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
7 printf("assert true\n");
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
8 assert(i == 1234);
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
9 printf("assert false\n");
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
10 assert(i != 1234);
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
11 printf("return\n");
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
12 return 0;
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
13 }
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
14
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
15 int getint()
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
16 {
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
17 return 1234;
0dec7b3727ea [svn r138] forgot the latest tests
lindquist
parents:
diff changeset
18 }