Skip to content

shift count is negative in int_to_fp_impl for arm64-apple-ios11.0-simulator #69779

@itf

Description

@itf

After this commit: 6dfea56,

I see the error:

/int_to_fp_impl.inc:60:29: error: shift count is negative [-Werror,-Wshift-count-negative]
   60 |   const int dstExpBias = (1 << (dstExpBits - 1)) - 1;
      |                             ^  ~~~~~~~~~~~~~~~~
1 error generated.

to reproduce:

clang -nostdlibinc compiler-rt/lib/builtins/floatuntitf.c -fsyntax-only -target arm64-apple-ios11.0-simulator

the error seems to be caused by wrongly assuming the size of a long double

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions