Skip to content

clang asserts with ffp-contract=fast-honor-pragmas #104830

Closed
@andykaylor

Description

@andykaylor

When I use "#pragma STDC FP_CONTRACT DEFAULT" and compile with "-ffp-contract=fast-honor-pragmas", clang asserts.

float f(float a, float b, float c) {
    #pragma STDC FP_CONTRACT DEFAULT
    return a * b + c;
}

See:

https://godbolt.org/z/EqE6Kn6Wf

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partycrashPrefer [crash-on-valid] or [crash-on-invalid]floating-pointFloating-point math

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions