[Mlir-commits] [mlir] [mlir] Fix assertion crash (#159673) (PR #173020)

Jelle Schühmacher llvmlistbot at llvm.org
Fri Dec 19 07:35:31 PST 2025


jschuhmacher wrote:

The original bug report shows the following reproducer:
```
"builtin.module"() ({
  "irdl.dialect"() <{sym_name = "testd"}> ({
    "irdl.type"() <{sym_name = "self_referencing"}> ({
      %8 = "irdl.any"() : () -> !irdl.attribute
      %9 = "irdl.parametric"(%8) <{base_type = @testd::@self_referencing}> : (!irdl.attribute) -> !irdl.attribute
      "irdl.parameters"(%9) <{names = ["foo"]}> : (!irdl.attribute) -> ()
    }) : () -> ()
  }) : () -> ()
  "func.func"() <{function_type = () -> (), sym_name = "test"}> ({
    "func.return"() : () -> ()
  }) : () -> ()
  "func.func"() <{function_type = () -> (), sym_name = "test"}> ({
    "func.return"() : () -> ()
  }) : () -> ()
}) : () -> ()
```
with command
```
mlir-opt test.mlir
```

This now produces
```
test.mlir:12:3: error: redefinition of symbol named 'test'
  "func.func"() <{function_type = () -> (), sym_name = "test"}> ({
  ^
test.mlir:12:3: note: see current operation:
"func.func"() <{function_type = () -> (), sym_name = "test"}> ({
  "func.return"() : () -> ()
}) : () -> ()
test.mlir:9:3: note: see existing symbol definition here
  "func.func"() <{function_type = () -> (), sym_name = "test"}> ({
  ^
```


https://github.com/llvm/llvm-project/pull/173020


More information about the Mlir-commits mailing list