[Issue 9931] New: Bus error interfacing with C function returning structs with floats

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Apr 14 09:25:07 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9931

           Summary: Bus error interfacing with C function returning
                    structs with floats
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: doob at me.com


--- Comment #0 from Jacob Carlborg <doob at me.com> 2013-04-14 09:25:06 PDT ---
This code:

http://pastebin.com/U5XdFfDq

Will result in a bus error when compiled as 32bit. Three ways the bus error
won't happen:

* If I compile as 64bit everything works fine
* If the function "foo" is moved inline in the "main" function everything works
fine
* If I store the return value of "fp" in "foo" in a temporary variable and then
return it

Mac OS X 10.8.2.

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


More information about the Digitalmars-d-bugs mailing list