Issue Details (XML | Word | Printable)

Key: PCC-143
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Iain Hibbert
Votes: 0
Watchers: 0

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

-fPIC generates incorrect code for 64bit arithmetic

Created: 31/May/10 08:57 PM   Updated: 09/Jun/10 04:36 PM
Component/s: i386 target
Affects Version/s: None
Fix Version/s: None

File Attachments: 1. File local2.diff (0.6 kB)

Environment: NetBSD/i386

 Description  « Hide
The following code

long long foo(long long a)
        return a / 5;

when compiled with "pcc -fPIC -S" produces code with "call __divdi3" where it should really call __divdi3@PLT because zzzcode('O') does not handle kflag.

I'm not sure if anything else should happen or if just adding @PLT is enough, as per local2.diff attached

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson added a comment - 09/Jun/10 04:36 PM
It should be enough. Thanks, patch added.