8000 Regression on i686: testI64Cast fails (mypy v1.0.0) · Issue #14633 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content
Regression on i686: testI64Cast fails (mypy v1.0.0) #14633
Closed
@mr-c

Description

@mr-c

Bug Report

Hello, while preparing the Debian package for mypy 1.0 (:tada: congratulations!), we are getting a testI64Cast failure on i686

To Reproduce

FROM --platform=linux/i386 debian:unstable-slim
RUN apt-get update && apt-get install -y python3-pip python3-lxml wget make
WORKDIR /tmp
RUN wget https://github.com/python/mypy/archive/refs/tags/v1.0.0.tar.gz && \
	tar xzf v*tar.gz && \
	rm *.tar.gz
WORKDIR /tmp/mypy-1.0.0
RUN python3 -m pip install -r test-requirements.txt
RUN python3 -m pytest -v -n 0 -k testI64Cast

Expected Behavior

mypyc/test/test_irbuild.py::TestGenOps::irbuild-i64.test::testI64Cast PASSED [100%]

Actual Behavior

mypyc/test/test_irbuild.py::TestGenOps::irbuild-i64.test::testI64Cast FAILED [100%]

=================================== FAILURES ===================================
_________________________________ testI64Cast __________________________________
data: /tmp/mypy-1.0.0/mypyc/test-data/irbuild-i64.test:1734:
../mypy-1.0.0/mypyc/test/test_irbuild.py:83: in run_case
    assert_test_output(testcase, actual, "Invalid source code output", expected_output)
E   AssertionError: Invalid source code output (/tmp/mypy-1.0.0/mypyc/test-data/irbuild-i64.test, line 1734)
----------------------------- Captured stderr call -----------------------------
Expected:
  ...
  def cast_int(x):
      x :: int
      r0 :: native_int
      r1 :: bit
      r2, r3 :: int64                           (diff)
      r4 :: ptr                                 (diff)
      r5 :: c_ptr                               (diff)
      r6 :: int64                               (diff)
  L0:
      r0 = x & 1
      r1 = r0 == 0
      if r1 goto L1 else goto L2 :: bool
  L1:
      r2 = x >> 1                               (diff)
      r3 = r2                                   (diff)
      goto L3                                   (diff)
  L2:                                           (diff)
      r4 = x ^ 1                                (diff)
      r5 = r4                                   (diff)
      r6 = CPyLong_AsInt64(r5)                  (diff)
      r3 = r6                                   (diff)
      keep_alive x                              (diff)
  L3:                                           (diff)
      return r3                                 (diff)
Actual:
  ...
  def cast_int(x):
      x :: int
      r0 :: native_int
      r1 :: bit
      r2, r3, r4 :: int64                       (diff)
      r5 :: ptr                                 (diff)
      r6 :: c_ptr                               (diff)
      r7 :: int64                               (diff)
  L0:
      r0 = x & 1
      r1 = r0 == 0
      if r1 goto L1 else goto L2 :: bool
  L1:
      r2 = extend signed x: builtins.int to int64 (diff)
      r3 = r2 >> 1                              (diff)
      r4 = r3                                   (diff)
      goto L3                                   (diff)
  L2:                                           (diff)
      r5 = x ^ 1                                (diff)
      r6 = r5                                   (diff)
      r7 = CPyLong_AsInt64(r6)                  (diff)
      r4 = r7                                   (diff)
      keep_alive x                              (diff)
  L3:                                           (diff)
      return r4                                 (diff)

Alignment of first line difference:
  E:     r2, r3 :: int64
  A:     r2, r3, r4 :: int64
               ^

Your Environment

  • Mypy version used: v1.0.0
  • Mypy command-line flags:
  • Mypy configuration options from mypy.ini (and other config files):
  • Python version used: 3.11.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0