annotate run/bug_tocsym_285_01.d @ 1630:d0efa3ae5522 default tip

run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author David Nadlinger <code@klickverbot.at>
date Sat, 23 Apr 2011 22:57:32 +0200
parents b8c0195059d9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
406
276131b6501d templated struct and opEquals/opCmp
thomask
parents:
diff changeset
1 // $HeadURL$
276131b6501d templated struct and opEquals/opCmp
thomask
parents:
diff changeset
2 // $Date$
276131b6501d templated struct and opEquals/opCmp
thomask
parents:
diff changeset
3 // $Author$
276131b6501d templated struct and opEquals/opCmp
thomask
parents:
diff changeset
4
276131b6501d templated struct and opEquals/opCmp
thomask
parents:
diff changeset
5 // @author@ Uwe Salomon <post@uwesalomon.de>
276131b6501d templated struct and opEquals/opCmp
thomask
parents:
diff changeset
6 // @date@ 2005-04-08
1489
b8c0195059d9 changed nntp: URLs to http: URLs
thomask
parents: 408
diff changeset
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=3551
406
276131b6501d templated struct and opEquals/opCmp
thomask
parents:
diff changeset
8
276131b6501d templated struct and opEquals/opCmp
thomask
parents:
diff changeset
9 module dstress.run.bug_tocsym_285_01;
276131b6501d templated struct and opEquals/opCmp
thomask
parents:
diff changeset
10
408
2c633bfee24b removed templates
thomask
parents: 406
diff changeset
11 struct Iterator{
2c633bfee24b removed templates
thomask
parents: 406
diff changeset
12 size_t* m_ptr;
406
276131b6501d templated struct and opEquals/opCmp
thomask
parents:
diff changeset
13
276131b6501d templated struct and opEquals/opCmp
thomask
parents:
diff changeset
14 int opEquals(Iterator iter){
276131b6501d templated struct and opEquals/opCmp
thomask
parents:
diff changeset
15 return (m_ptr == iter.m_ptr);
276131b6501d templated struct and opEquals/opCmp
thomask
parents:
diff changeset
16 }
276131b6501d templated struct and opEquals/opCmp
thomask
parents:
diff changeset
17
276131b6501d templated struct and opEquals/opCmp
thomask
parents:
diff changeset
18 int opCmp(Iterator iter){
276131b6501d templated struct and opEquals/opCmp
thomask
parents:
diff changeset
19 return (m_ptr - iter.m_ptr);
276131b6501d templated struct and opEquals/opCmp
thomask
parents:
diff changeset
20 }
276131b6501d templated struct and opEquals/opCmp
thomask
parents:
diff changeset
21 }
276131b6501d templated struct and opEquals/opCmp
thomask
parents:
diff changeset
22
276131b6501d templated struct and opEquals/opCmp
thomask
parents:
diff changeset
23 int main(char[][] args){
408
2c633bfee24b removed templates
thomask
parents: 406
diff changeset
24 Iterator a;
2c633bfee24b removed templates
thomask
parents: 406
diff changeset
25 Iterator b;
406
276131b6501d templated struct and opEquals/opCmp
thomask
parents:
diff changeset
26
276131b6501d templated struct and opEquals/opCmp
thomask
parents:
diff changeset
27 assert(a==b);
408
2c633bfee24b removed templates
thomask
parents: 406
diff changeset
28 size_t i;
406
276131b6501d templated struct and opEquals/opCmp
thomask
parents:
diff changeset
29 a.m_ptr=&i;
276131b6501d templated struct and opEquals/opCmp
thomask
parents:
diff changeset
30 assert(a!=b);
276131b6501d templated struct and opEquals/opCmp
thomask
parents:
diff changeset
31
276131b6501d templated struct and opEquals/opCmp
thomask
parents:
diff changeset
32 return 0;
276131b6501d templated struct and opEquals/opCmp
thomask
parents:
diff changeset
33 }