[Bug libstdc++/54943] New: ARM - EABI - varargs floating point issue

2012-10-17 Thread selvaraj.santhosh at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54943



 Bug #: 54943

   Summary: ARM - EABI - varargs floating point issue

Classification: Unclassified

   Product: gcc

   Version: unknown

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: libstdc++

AssignedTo: unassig...@gcc.gnu.org

ReportedBy: selvaraj.santh...@gmail.com





I have a data-conversion function in our ARM9 code which uses varargs. I've

been using an arm-elf from a couple of years ago, with no problems. Recently,

we upgraded to the arm-eabi-none , and I'm finding that we now have problems

with floating point values. What I eventually discovered is that doubles are

being forced to 8-byte boundaries, and the existing varargs floating-point

handler didn't expect to find gaps in the args.



I can manually check the pointer and force it up to an eight-byte boundary (in

fact, I did that, and that fixed the issue entirely), but I'd like to know why

this has suddenly started happening.



I would appreciate any advice or insights that anyone could provide on these

issues.


[Bug target/54943] ARM - EABI - varargs floating point issue

2012-10-17 Thread selvaraj.santhosh at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54943



--- Comment #2 from Santhosh Kumar Selvaraj  2012-10-17 11:41:00 UTC ---



int main()

{

float floatValue = 100.0;

char buffer[32];



sprintf (buffer, 32, "%f", floatValue);

printf ("The string is : %s\n", buffer);

return 0;

}



Result:

The string is : 100 (arm-elf) -> GCC less than V3.0

The string is : 5.333 (arm-eabi) -> GCC 4.7.1