Issue Details (XML | Word | Printable)

Key: PCC-326
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Fred J. Tydeman
Votes: 0
Watchers: 0

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

ulli < slli done wrong

Created: 19/Apr/11 08:09 PM   Updated: 26/Apr/11 06:29 PM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Environment: Intel Pentium 4; Linux Fedora Core 14 (32-bit); pcc of 2011/04/01

 Description  « Hide
Code similar to:

static signed long long int slli = 1LL;
static unsigned long long int ulli = 1uLL;
int main(void){
  int res = ulli < slli ;
  if( res ) puts("Bad");
  return 0;

gets the wrong value from the '<' compare.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Fred J. Tydeman added a comment - 20/Apr/11 05:17 PM
After more debugging, the real problem is a store into a bit-field of a struct that was just before slli was altering memory outside of the struct (slli in this case).
So, this could be closed as a dup of a previous bug.