[Issue 2923] -O generates bad code for ?:

2014-04-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2923

Walter Bright  changed:

   What|Removed |Added

Version|1.043   |D1

--


[Issue 2923] -O generates bad code for ?:

2009-07-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2923


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED




--- Comment #2 from Walter Bright   2009-07-09 
02:49:09 PDT ---
Fixed dmd 1.046 and 2.031

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 2923] -O generates bad code for ?:

2009-05-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2923


Don  changed:

   What|Removed |Added

 CC||clugd...@yahoo.com.au
Summary|bug with -inline|-O generates bad code for
   ||?:
   Severity|normal  |regression




--- Comment #1 from Don   2009-05-15 08:40:41 PDT ---
Reduced test case:
dmd bug.d  //OK
dmd -O bug.d // fails.

Raising severity -- this is a VERY nasty bug. All the outer for loop does is
prevent constant folding. With -O enabled, the wrong branch of ?: gets taken.

void main() {
  for (int j=1; j<2; j++) {
int x = (j<0) ? -j : j;
int q=0;
for (int i=0; ihttp://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---