Skip to content

BUG: [LLVM backend] Tuple as function args #1348

Closed
@Smit-create

Description

@Smit-create
def foo(x: tuple[i32, i32], y: tuple[i32, i32]) -> bool:
    return x[0] == y[0]

def f():
    a11: tuple[i32, i32]
    b11: tuple[i32, i32]
    a11 = (1, 2)
    b11 = (1, 2)
    print(foo(a11, b11))

f()

Error:

code generation error: asr_to_llvm: module failed verification. Error:
Stored value type does not match pointer operand type!
  store i32 1, i32** %0, align 4
 i32*Stored value type does not match pointer operand type!
  store i32 2, i32** %1, align 4
 i32*Stored value type does not match pointer operand type!
  store i32 1, i32** %8, align 4
 i32*Stored value type does not match pointer operand type!
  store i32 2, i32** %9, align 4
 i32*

Metadata

Metadata

Assignees

No one assigned

    Labels

    llvmLLVM related changes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions