Thread overview
[Issue 5694] New: va_arg doesn't work with idouble and ifloat
Mar 04, 2011
Mathias Baumann
Mar 04, 2011
Mathias Baumann
Mar 05, 2011
Walter Bright
Mar 05, 2011
Walter Bright
March 04, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5694

           Summary: va_arg doesn't work with idouble and ifloat
           Product: D
           Version: unspecified
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody@puremagic.com
        ReportedBy: mathias.baumann@sociomantic.com


--- Comment #0 from Mathias Baumann <mathias.baumann@sociomantic.com> 2011-03-04 05:05:08 PST ---
Created an attachment (id=927)
test case showing the problem

In 64bit va_arg does not give back the correct pointer for the type idouble and ifloat. I haven't tested more types so far, but I guess cfloat and cdouble will give problems, too

see attached test case. In 32bit the outputs are the same, in 64bit not.

I only tested this on D1, but I assume it will have the same problems on D2

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 04, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5694


Mathias Baumann <mathias.baumann@sociomantic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #927 is|0                           |1
           obsolete|                            |


--- Comment #1 from Mathias Baumann <mathias.baumann@sociomantic.com> 2011-03-04 05:17:50 PST ---
Created an attachment (id=928)
testcase for ifloat, idouble, cdouble, cfloat

I extended the testcase to cfloat and cdouble.

It works with cdouble. and it gives

   Internal error: backend/cgcod.c 576

with cfloat, so I couldn't test that part.

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


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com
            Version|unspecified                 |D1 & D2


--- Comment #2 from Walter Bright <bugzilla@digitalmars.com> 2011-03-04 20:18:20 PST ---
First fix (not the internal error):

https://github.com/D-Programming-Language/druntime/commit/bd7b90f1c5dc681d05e872814379b709c1894d75

https://github.com/D-Programming-Language/phobos/commit/2830024ec775485cef643eec4d807dc7c1174d9d

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


Walter Bright <bugzilla@digitalmars.com> changed:

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


--- Comment #3 from Walter Bright <bugzilla@digitalmars.com> 2011-03-04 23:13:08 PST ---
https://github.com/D-Programming-Language/dmd/commit/1ccf5b1e25793e5178643f35e5c16bc2194b566e

https://github.com/D-Programming-Language/dmd/commit/4b1357012bc39db2d991e97ff88ede1f74ab1ede

Fix for internal error.

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