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

Tests fail due to failing compilation of int_ops.c #13819

Closed
AMDmi3 opened this issue Oct 5, 2022 · 0 comments · Fixed by #13876
Closed

Tests fail due to failing compilation of int_ops.c #13819

AMDmi3 opened this issue Oct 5, 2022 · 0 comments · Fixed by #13876
Labels
bug mypy got something wrong

Comments

@AMDmi3
Copy link

AMDmi3 commented Oct 5, 2022

Bug Report

A lot of tests fail on FreeBSD with the following output:

_________________________________ testBuiltins _________________________________
data: /work/usr/ports/devel/py-mypy/work-py39/mypy-0.981/mypyc/test-data/run-misc.test:47:
/work/usr/ports/devel/py-mypy/work-py39/mypy-0.981/mypyc/test/test_run.py:144: in run_case
    self.run_case_inner(testcase)
/work/usr/ports/devel/py-mypy/work-py39/mypy-0.981/mypyc/test/test_run.py:160: in run_case_inner
    self.run_case_step(testcase, step)
/work/usr/ports/devel/py-mypy/work-py39/mypy-0.981/mypyc/test/test_run.py:272: in run_case_step
    assert False, "Compilation failed"
E   AssertionError: Compilation failed
E   assert False
----------------------------- Captured stdout call -----------------------------
running build_ext
building 'native' extension
creating build/temp.freebsd-13.1-RELEASE-amd64-cpython-39
creating build/temp.freebsd-13.1-RELEASE-amd64-cpython-39/build
cc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -fPIC -I/work/usr/ports/devel/py-mypy/work-py39/mypy-0.981/mypyc/lib-rt -I/usr/local/include/python3.9 -c build/__native.c -o build/temp.freebsd-13.1-RELEASE-amd64-cpython-39/build/__native.o -O0 -g1 -Werror -Wno-unused-function -Wno-unused-label -Wno-unreachable-code -Wno-unused-variable -Wno-unused-command-line-argument -Wno-unknown-warning-option
----------------------------- Captured stderr call -----------------------------
In file included from build/__native.c:4:
/work/usr/ports/devel/py-mypy/work-py39/mypy-0.981/mypyc/lib-rt/int_ops.c:547:30: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
    if (y == -1 && x == -1LL << 63) {
                        ~~~~ ^
/work/usr/ports/devel/py-mypy/work-py39/mypy-0.981/mypyc/lib-rt/int_ops.c:565:30: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
    if (y == -1 && x == -1LL << 63) {
                        ~~~~ ^
/work/usr/ports/devel/py-mypy/work-py39/mypy-0.981/mypyc/lib-rt/int_ops.c:610:30: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
    if (y == -1 && x == -1LL << 31) {
                        ~~~~ ^
/work/usr/ports/devel/py-mypy/work-py39/mypy-0.981/mypyc/lib-rt/int_ops.c:628:30: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
    if (y == -1 && x == -1LL << 31) {
                        ~~~~ ^
4 errors generated.

Your Environment

  • Mypy version used: 0.981
  • Mypy command-line flags: -
  • Mypy configuration options from mypy.ini (and other config files): -
  • Python version used: 3.10.7
  • FreeBSD 13.1
  • Clang 13.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant