Mercurial > projects > dstress
annotate run/static_18.d @ 1576:b3e16c86558e
[Issue 1398] New: GDC doesn't generate correct code
<mariusmuja@gmail.com>
2007-08-04
http://d.puremagic.com/issues/show_bug.cgi?id=1398
author | thomask |
---|---|
date | Thu, 21 Feb 2008 15:20:08 +0000 |
parents | 6e4063f99377 |
children |
rev | line source |
---|---|
140 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
122
bf7b8bf72262
Stewart Gordon <smjg_1998@yahoo.com> news://cmq61m$5rn$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D.bugs:2218
thomask
parents:
diff
changeset
|
5 // @author@ Stewart Gordon <smjg_1998@yahoo.com> |
bf7b8bf72262
Stewart Gordon <smjg_1998@yahoo.com> news://cmq61m$5rn$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D.bugs:2218
thomask
parents:
diff
changeset
|
6 // @date@ 2004-11-09 |
140 | 7 // @uri@ news:cmq61m$5rn$1@digitaldaemon.com |
1487 | 8 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=2218 |
122
bf7b8bf72262
Stewart Gordon <smjg_1998@yahoo.com> news://cmq61m$5rn$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D.bugs:2218
thomask
parents:
diff
changeset
|
9 |
bf7b8bf72262
Stewart Gordon <smjg_1998@yahoo.com> news://cmq61m$5rn$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D.bugs:2218
thomask
parents:
diff
changeset
|
10 // __DSTRESS_DFLAGS__ -d |
bf7b8bf72262
Stewart Gordon <smjg_1998@yahoo.com> news://cmq61m$5rn$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D.bugs:2218
thomask
parents:
diff
changeset
|
11 |
bf7b8bf72262
Stewart Gordon <smjg_1998@yahoo.com> news://cmq61m$5rn$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D.bugs:2218
thomask
parents:
diff
changeset
|
12 module dstress.run.static_18; |
bf7b8bf72262
Stewart Gordon <smjg_1998@yahoo.com> news://cmq61m$5rn$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D.bugs:2218
thomask
parents:
diff
changeset
|
13 |
bf7b8bf72262
Stewart Gordon <smjg_1998@yahoo.com> news://cmq61m$5rn$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D.bugs:2218
thomask
parents:
diff
changeset
|
14 class MyClass{ |
bf7b8bf72262
Stewart Gordon <smjg_1998@yahoo.com> news://cmq61m$5rn$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D.bugs:2218
thomask
parents:
diff
changeset
|
15 static{ |
bf7b8bf72262
Stewart Gordon <smjg_1998@yahoo.com> news://cmq61m$5rn$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D.bugs:2218
thomask
parents:
diff
changeset
|
16 deprecated int foo(){ |
bf7b8bf72262
Stewart Gordon <smjg_1998@yahoo.com> news://cmq61m$5rn$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D.bugs:2218
thomask
parents:
diff
changeset
|
17 return 1; |
bf7b8bf72262
Stewart Gordon <smjg_1998@yahoo.com> news://cmq61m$5rn$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D.bugs:2218
thomask
parents:
diff
changeset
|
18 } |
bf7b8bf72262
Stewart Gordon <smjg_1998@yahoo.com> news://cmq61m$5rn$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D.bugs:2218
thomask
parents:
diff
changeset
|
19 } |
bf7b8bf72262
Stewart Gordon <smjg_1998@yahoo.com> news://cmq61m$5rn$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D.bugs:2218
thomask
parents:
diff
changeset
|
20 |
bf7b8bf72262
Stewart Gordon <smjg_1998@yahoo.com> news://cmq61m$5rn$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D.bugs:2218
thomask
parents:
diff
changeset
|
21 static deprecated int bar(){ |
bf7b8bf72262
Stewart Gordon <smjg_1998@yahoo.com> news://cmq61m$5rn$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D.bugs:2218
thomask
parents:
diff
changeset
|
22 return foo()+3; |
bf7b8bf72262
Stewart Gordon <smjg_1998@yahoo.com> news://cmq61m$5rn$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D.bugs:2218
thomask
parents:
diff
changeset
|
23 } |
bf7b8bf72262
Stewart Gordon <smjg_1998@yahoo.com> news://cmq61m$5rn$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D.bugs:2218
thomask
parents:
diff
changeset
|
24 } |
bf7b8bf72262
Stewart Gordon <smjg_1998@yahoo.com> news://cmq61m$5rn$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D.bugs:2218
thomask
parents:
diff
changeset
|
25 |
bf7b8bf72262
Stewart Gordon <smjg_1998@yahoo.com> news://cmq61m$5rn$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D.bugs:2218
thomask
parents:
diff
changeset
|
26 int main(){ |
bf7b8bf72262
Stewart Gordon <smjg_1998@yahoo.com> news://cmq61m$5rn$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D.bugs:2218
thomask
parents:
diff
changeset
|
27 assert(MyClass.bar()==4); |
bf7b8bf72262
Stewart Gordon <smjg_1998@yahoo.com> news://cmq61m$5rn$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D.bugs:2218
thomask
parents:
diff
changeset
|
28 return 0; |
bf7b8bf72262
Stewart Gordon <smjg_1998@yahoo.com> news://cmq61m$5rn$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D.bugs:2218
thomask
parents:
diff
changeset
|
29 } |