Skip to content

x86: Asmgen.mk_sel error on valid C code #619

Open

Description

@alpaylan

With default options, ccomp rejects this strictly conforming C on x86-64:

int g(float x) { return (1 ^ (x == 0.0f)) ? 3 : 5; }
$ ccomp -c v.c
v.c: error: In function g: Asmgen.mk_sel
1 error detected.

The same error appears with -O and -Os. The program compiles with -O0, -fno-cse or -fno-if-conversion.

Tested on the v3.18 release (14d6160) and on master (2685140).

Found by differential testing with Ephyra: generated C programs, CompCert's reference interpreter (ccomp -interp) against the compiler (ccomp -c).

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