<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/114730>114730</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            static ConcreteT mlir::detail::StorageUserBase<mlir::MemRefType, mlir::BaseMemRefType, mlir::detail::MemRefTypeStorage, mlir::detail::TypeUniquer, mlir::ShapedType::Trait>::get(MLIRContext *, Args &&...) [ConcreteT = mlir::MemRefType, BaseT = mlir::BaseMemRefType, StorageT = mlir::detail::MemRefTypeStorage, UniquerT = mlir::detail::TypeUniquer, Traits = <mlir::ShapedType::Trait>, Args = <llvm::ArrayRef<long> &, mlir::Type &, mlir::MemRefLayoutAttrInterface &, mlir::Attribute &>]: Assertion `succeeded( ConcreteT::verifyInvariants(getDefaultDiagnosticEmitFn(ctx), args...))' failed.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            mlir
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          xisang0
      </td>
    </tr>
</table>

<pre>
    Test on commit:https://github.com/llvm/llvm-project/commit/efd8938d575d1f8058bfe220e4c672d969c82be0
steps to reproduce:
```
mlir-opt test.mlir --one-shot-bufferize="bufferize-function-boundaries=1 no-analysis-func-filter=contains_to_memref_op"
```
test case:
```
module {
  func.func @main(%arg4: tensor<513x!quant.uniform<i16:f32, 1.000000e+00>>) {
    return
 }
}
```
crash trace:
```
<unknown>:0: error: invalid memref element type
mlir-opt: /home/workdir/llvm-project-19/mlir/include/mlir/IR/StorageUniquerSupport.h:180: static ConcreteT mlir::detail::StorageUserBase<mlir::MemRefType, mlir::BaseMemRefType, mlir::detail::MemRefTypeStorage, mlir::detail::TypeUniquer, mlir::ShapedType::Trait>::get(MLIRContext *, Args &&...) [ConcreteT = mlir::MemRefType, BaseT = mlir::BaseMemRefType, StorageT = mlir::detail::MemRefTypeStorage, UniquerT = mlir::detail::TypeUniquer, Traits = <mlir::ShapedType::Trait>, Args = <llvm::ArrayRef<long> &, mlir::Type &, mlir::MemRefLayoutAttrInterface &, mlir::Attribute &>]: Assertion `succeeded( ConcreteT::verifyInvariants(getDefaultDiagnosticEmitFn(ctx), args...))' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: ./mlir-opt /home/workdir/test2.mlir "--one-shot-bufferize=bufferize-function-boundaries=1 no-analysis-func-filter=contains_to_memref_op"
 #0 0x00005ba3fd6dd998 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (./mlir-opt+0x105e998)
 #1 0x00005ba3fd6db4be llvm::sys::RunSignalHandlers() (./mlir-opt+0x105c4be)
 #2 0x00005ba3fd6de3a8 SignalHandler(int) Signals.cpp:0:0
 #3 0x00007c2e90831520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x00007c2e908859fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #5 0x00007c2e90831476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #6 0x00007c2e908177f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #7 0x00007c2e9081771b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
 #8 0x00007c2e90828e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
 #9 0x00005ba400a2dbb7 (./mlir-opt+0x43aebb7)
#10 0x00005ba400a2dabc mlir::MemRefType::get(llvm::ArrayRef<long>, mlir::Type, mlir::MemRefLayoutAttrInterface, mlir::Attribute) (./mlir-opt+0x43aeabc)
#11 0x00005ba3fdbc7d7d mlir::bufferization::getMemRefTypeWithFullyDynamicLayout(mlir::TensorType, mlir::Attribute) (./mlir-opt+0x1548d7d)
#12 0x00005ba3fdc372c9 mlir::bufferization::func_ext::getBufferizedFunctionArgType(mlir::func::FuncOp, long, mlir::bufferization::BufferizationOptions const&) FuncBufferizableOpInterfaceImpl.cpp:0:0
#13 0x00005ba3fdc367be mlir::bufferization::func_ext::FuncOpInterface::bufferize(mlir::Operation*, mlir::RewriterBase&, mlir::bufferization::BufferizationOptions const&) const (./mlir-opt+0x15b77be)
#14 0x00005ba3fdc119d0 mlir::bufferization::bufferizeOp(mlir::Operation*, mlir::bufferization::BufferizationOptions const&, mlir::bufferization::BufferizationStatistics*) (./mlir-opt+0x15929d0)
#15 0x00005ba3fdc4d232 mlir::bufferization::bufferizeModuleOp(mlir::ModuleOp, mlir::bufferization::OneShotBufferizationOptions const&, mlir::bufferization::BufferizationStatistics*) (./mlir-opt+0x15ce232)
#16 0x00005ba3fdc4db3d mlir::bufferization::runOneShotModuleBufferize(mlir::ModuleOp, mlir::bufferization::OneShotBufferizationOptions const&, mlir::bufferization::BufferizationStatistics*) (./mlir-opt+0x15ceb3d)
#17 0x00005ba3fdc1630f (anonymous namespace)::OneShotBufferizePass::runOnOperation() Bufferize.cpp:0:0
#18 0x00005ba4009028bf mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) (./mlir-opt+0x42838bf)
#19 0x00005ba4009030a2 mlir::detail::OpToOpPassAdaptor::runPipeline(mlir::OpPassManager&, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int, mlir::PassInstrumentor*, mlir::PassInstrumentation::PipelineParentInfo const*) (./mlir-opt+0x42840a2)
#20 0x00005ba40090584e mlir::PassManager::run(mlir::Operation*) (./mlir-opt+0x428684e)
#21 0x00005ba4008fe372 performActions(llvm::raw_ostream&, std::shared_ptr<llvm::SourceMgr> const&, mlir::MLIRContext*, mlir::MlirOptMainConfig const&) MlirOptMain.cpp:0:0
#22 0x00005ba4008fdfdb llvm::LogicalResult llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>::callback_fn<mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&)::$_0>(long, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&) MlirOptMain.cpp:0:0
#23 0x00005ba4009a79b5 mlir::splitAndProcessBuffer(std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::function_ref<llvm::LogicalResult (std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, llvm::raw_ostream&)>, llvm::raw_ostream&, llvm::StringRef, llvm::StringRef) (./mlir-opt+0x43289b5)
#24 0x00005ba4008f91d2 mlir::MlirOptMain(llvm::raw_ostream&, std::unique_ptr<llvm::MemoryBuffer, std::default_delete<llvm::MemoryBuffer>>, mlir::DialectRegistry&, mlir::MlirOptMainConfig const&) (./mlir-opt+0x427a1d2)
#25 0x00005ba4008f9483 mlir::MlirOptMain(int, char**, llvm::StringRef, llvm::StringRef, mlir::DialectRegistry&) (./mlir-opt+0x427a483)
#26 0x00005ba4008f9692 mlir::MlirOptMain(int, char**, llvm::StringRef, mlir::DialectRegistry&) (./mlir-opt+0x427a692)
#27 0x00005ba3fd6bcb77 main (./mlir-opt+0x103db77)
#28 0x00007c2e90818d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#29 0x00007c2e90818e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#30 0x00005ba3fd6bc6f5 _start (./mlir-opt+0x103d6f5)
Aborted (core dumped)
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsWVtv47zR_jXMDWFDInW88IUTx_gCbJAg2Q-9NChxJLMrkXpJajfury8o-STFStaLvm3fYoMg0WE48zzDOZAUM0aUEmCBwlsUrm5Ya7dKL96EYbL0bjLFd4uvYCxWEueqroVFdLm1tjGILhFZI7Iuhd222TxXNSLrqvp--DdrtPo75BaR9X4kWUPBk5QmPIxD7heJFyZZAYR4EORRTHgapX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