Issue Details (XML | Word | Printable)

Key: PCC-248
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Dara Hazeghi
Votes: 0
Watchers: 0

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

Compile error for modulus

Created: 21/Feb/11 09:27 PM   Updated: 21/Feb/11 10:22 PM
Component/s: amd64 target
Affects Version/s: None
Fix Version/s: None

Environment: Ubuntu 10.10/x86_64 with current cvs of pcc

 Description  « Hide
dara@hummingbird:~$ cat test.c
int a (unsigned b, unsigned c)
return b % (c < 0 ? 0 : 1) ;

dara@hummingbird:~$ pcc test.c
test.c, line 3: compiler error: Cannot generate code, node 0x18c3670 op %

This code is simplified from gcc's stor-layout.c (line 269), where the bug was first encountered

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson added a comment - 21/Feb/11 10:22 PM
Fixed now. It was a cast optimization that were a little bit too optimistic.