Skip to content

Constant evaluation truncates 64-bit operands of && and || #621

Open

Description

@haskiindahouse
enum { enabled = (1ULL << 32) && 1 };
int main(void) { return enabled; }

On 2685140 (aarch64-macos), this program returns 0. Both operands are nonzero, so it should return 1. 0 || (1ULL << 32) also folds to 0.

Introduced by 05ae523 in Ceval.binop.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions