1// RUN: mlir-opt %s -finalize-memref-to-llvm 2>&1 | FileCheck %s 2// Since the error is at an unknown location, we use FileCheck instead of 3// -veri-y-diagnostics here 4 5// CHECK: redefinition of reserved function 'malloc' of different type '!llvm.func<void (i64)>' is prohibited 6llvm.func @malloc(i64) 7func.func @redef_reserved() { 8 %alloc = memref.alloc() : memref<1024x64xf32, 1> 9 llvm.return 10} 11 12// CHECK: conversion of memref memory space "foo" to integer address space failed. Consider adding memory space conversions. 13// CHECK-LABEL: @bad_address_space 14func.func @bad_address_space(%a: memref<2xindex, "foo">) { 15 %c0 = arith.constant 0 : index 16 // CHECK: memref.store 17 memref.store %c0, %a[%c0] : memref<2xindex, "foo"> 18 return 19} 20