Thread overview
[Issue 3633] New: Optimizer causes access violation
Dec 19, 2009
Janzert
Dec 24, 2009
Walter Bright
Dec 25, 2009
Leandro Lucarella
Dec 31, 2009
Walter Bright
Jan 05, 2010
Janzert
December 19, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3633

           Summary: Optimizer causes access violation
           Product: D
           Version: 1.033
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: wrong-code
          Severity: critical
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: janzert@janzert.com
                CC: janzert@janzert.com


--- Comment #0 from Janzert <janzert@janzert.com> 2009-12-18 17:09:02 PST ---
The following throws an Access Violation exception under windows when compiled with dmd -release -O

int get_value()
{
    return 1;
}

int[2] array1;
int[2] array2;

int test(ulong a1, ulong extra, ulong extra2, ulong extra3)
{
    if (!((a1 & 1) | (get_value() | array1[a1^1])))
        return 0;

    if (0 >= array2[a1^1])
        return 0;

    return 1;
}

void main(char[][] args)
{
    test(0, 0, 0, 0);
}

Tested with dmd 1.033, 1.041, 1.043, 1.053

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 24, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3633


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com


--- Comment #1 from Walter Bright <bugzilla@digitalmars.com> 2009-12-24 12:16:22 PST ---
changeset 308

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 25, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3633


Leandro Lucarella <llucax@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |llucax@gmail.com


--- Comment #2 from Leandro Lucarella <llucax@gmail.com> 2009-12-25 10:00:38 PST ---
http://www.dsource.org/projects/dmd/changeset/308

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 31, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3633


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


--- Comment #3 from Walter Bright <bugzilla@digitalmars.com> 2009-12-31 11:17:47 PST ---
Fixed dmd 1.054 and 2.038

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 05, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3633



--- Comment #4 from Janzert <janzert@janzert.com> 2010-01-05 14:14:12 PST ---
Thanks for the quick fix.

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