From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26620 invoked by alias); 23 Dec 2014 13:39:15 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 26563 invoked by uid 48); 23 Dec 2014 13:39:09 -0000 From: "mity at morous dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/64384] New: mingw-w64: stdcall function returning an aggregate is incompatible with MS ABI Date: Tue, 23 Dec 2014 13:39:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.9.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mity at morous dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-12/txt/msg02638.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64384 Bug ID: 64384 Summary: mingw-w64: stdcall function returning an aggregate is incompatible with MS ABI Product: gcc Version: 4.9.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: mity at morous dot org When using COM interface (i.e. calling stdcall function/method), aggregates are returned through an implicit parameter after the this/interface pointer, according to MS ABI. However it is not so when using gcc. This issue manifests itself when e.g. calling ID2D1RenderTarget::GetSize() from as discussed here: https://sourceforge.net/p/mingw-w64/mailman/mingw-w64-public/?style=threaded&viewmonth=201412&viewday=23 Wine team encountered the issue too, they seem to "solve" the issue on their side by ugly hacks and changing prototypes of the relevant functions for now: https://www.winehq.org/pipermail/wine-patches/2014-September/134351.html