Issue Details (XML | Word | Printable)

Key: PCC-83
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Detlef Riekenberg
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

BAD CODE generated, when a struct is given as argument

Created: 19/Aug/09 11:35 PM   Updated: 16/Jun/10 01:20 PM
Component/s: C frontend
Affects Version/s: None
Fix Version/s: None

File Attachments: 1. File abisimple3.c (0.2 kB)
2. File abisimple4.c (0.4 kB)

Environment: i386-linux

 Description  « Hide
expected result for the testcase: 1 77 2
when compiled with pcc, the last value changes
examples: 1 77 -2069842176 / 1 77 -2074036480

compiling the output of pcc -E with gcc works.

By by ... Detlef

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Detlef Riekenberg added a comment - 19/Aug/09 11:42 PM
Another testcase with more arguments.
The last arg failed again:
1 77 -2070890752

1 77 2

by by ... Detlef

Gregory McGarry added a comment - 20/Aug/09 01:21 AM
I haven't looked deeply into the amd64 code, but it has taken many months to get the RISC targets to support structure and float function arguments. I think there are some tests in the pcc-test module.

Detlef Riekenberg added a comment - 20/Aug/09 07:25 PM
The failure is on a 32bit system.

By by ... Detlef

Anders Magnusson added a comment - 16/Jun/10 01:20 PM
Struct args on stack must be on 4-byte boundaries. This should be checked for MACH-O also.