[Bug 57] Comparing small structs fails

gdc-bugzilla at gdcproject.org gdc-bugzilla at gdcproject.org
Wed May 29 12:56:13 PDT 2013


http://bugzilla.gdcproject.org/show_bug.cgi?id=57

--- Comment #8 from Iain Buclaw <ibuclaw at gdcproject.org> 2013-05-29 19:56:13 UTC ---
(In reply to comment #7)
> (In reply to comment #6)
> > (In reply to comment #5)
> > > Nice work!
> > > 
> > > But I can still reproduce this with the posted test case (GCC 4.8.0) if I
> > > compile without optimization. With -O2 or higher it works fine.
> > > 
> > 
> > Drats - should have tried that test case.... 
> > 
> 
> I actually might have an idea of where that is happening (see
> convert_for_assignment) - can't test it just now as I'm travelling.  But I
> wonder what happens if you move the memset added in AssignExp::toElem into
> there - so that all struct = int (0) code is caught and handled properly...

Done!

https://github.com/D-Programming-GDC/GDC/commit/ed839f8a16e84d0eddaac3100dae4905ebcd58e9

I actually couldn't reproduce the problem in my tree... But this is a better
fix anyway as it catches all cases.

-- 
Configure bugmail: http://bugzilla.gdcproject.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the D.gnu mailing list