bugTiny C Compiler - Bugs: bug #65933, Incorrect values are passed for...

 
 

bug #65933: Incorrect values are passed for `double` struct fields when following a `double` argument

Submitter:  None
Submitted:  Mon 01 Jul 2024 04:19:29 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 01 Jul 2024 04:19:29 PM UTC, original submission:  

In the attached C program, passing a double and a struct-with-two-doubles to a function causes the struct's second field to get the same value as the struct's first field. The expected behavior for the program, which works in both GCC and Clang, is to print "Starting with (123,456) we get (123,456)", but when compiled with TCC, it prints "Starting with (123,456) we get (123,123)". The issue goes away if the first argument is not a float or a double.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #56219:  tcc-double-bug.c added by None (307B - text/x-csrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follows 1 latest change.

Date Changed by Updated Field Previous Value => Replaced by
2024-07-01 None Attached File- Added tcc-double-bug.c, #56219

Back to the top

Powered by Savane 3.13-ec04.
Corresponding source code