annotate run/goto_07.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 4468ecf152f1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
186
c18d6e8a712e extended goto tests
thomask
parents:
diff changeset
1 // $HeadURL$
c18d6e8a712e extended goto tests
thomask
parents:
diff changeset
2 // $Date$
c18d6e8a712e extended goto tests
thomask
parents:
diff changeset
3 // $Author$
c18d6e8a712e extended goto tests
thomask
parents:
diff changeset
4
c18d6e8a712e extended goto tests
thomask
parents:
diff changeset
5 module dstress.run.goto_07;
c18d6e8a712e extended goto tests
thomask
parents:
diff changeset
6
c18d6e8a712e extended goto tests
thomask
parents:
diff changeset
7 int main(){
c18d6e8a712e extended goto tests
thomask
parents:
diff changeset
8
1059
4468ecf152f1 <daiphoenix@lycos.com>
thomask
parents: 186
diff changeset
9 int a = 1;
186
c18d6e8a712e extended goto tests
thomask
parents:
diff changeset
10 if(0){
1059
4468ecf152f1 <daiphoenix@lycos.com>
thomask
parents: 186
diff changeset
11 a:
4468ecf152f1 <daiphoenix@lycos.com>
thomask
parents: 186
diff changeset
12 int b = 2;
4468ecf152f1 <daiphoenix@lycos.com>
thomask
parents: 186
diff changeset
13 assert(b == 2);
186
c18d6e8a712e extended goto tests
thomask
parents:
diff changeset
14 }else{
1059
4468ecf152f1 <daiphoenix@lycos.com>
thomask
parents: 186
diff changeset
15 assert(a == 1);
4468ecf152f1 <daiphoenix@lycos.com>
thomask
parents: 186
diff changeset
16 goto a;
186
c18d6e8a712e extended goto tests
thomask
parents:
diff changeset
17 }
1059
4468ecf152f1 <daiphoenix@lycos.com>
thomask
parents: 186
diff changeset
18 assert(a == 1);
186
c18d6e8a712e extended goto tests
thomask
parents:
diff changeset
19 return 0;
c18d6e8a712e extended goto tests
thomask
parents:
diff changeset
20 }