Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C Backend generates negation of negative integers as predecrement #968

Closed
llvmbot opened this issue Jul 14, 2005 · 1 comment
Closed

C Backend generates negation of negative integers as predecrement #968

llvmbot opened this issue Jul 14, 2005 · 1 comment
Labels
bugzilla Issues migrated from bugzilla compile-fail Use [accepts-invalid] and [rejects-valid] instead

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Jul 14, 2005

Bugzilla Link 596
Resolution FIXED
Resolved on Feb 22, 2010 12:49
Version 1.0
OS All
Attachments Testcase to reproduce the problem
Reporter LLVM Bugzilla Contributor

Extended Description

The C Backend takes the (soon to be) attached test case and miscompiles it into
invalid C code.

Specifically, in the case where a negative integer is negated, the C Backend
generates a minus for the negation and then another minus for the integer. This
"minus minus" becomes the C pre-decrement operator, which is incorrect.

i.e. we generate --65535 instead of -(-65535).

@llvmbot
Copy link
Collaborator Author

llvmbot commented Jul 15, 2005

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla compile-fail Use [accepts-invalid] and [rejects-valid] instead
Projects
None yet
Development

No branches or pull requests

1 participant