@@ -1774,12 +1774,13 @@ llvm::LogicalResult fir::CoordinateOp::verify() {
1774
1774
return emitOpError (" too many operands for len_param_index case" );
1775
1775
}
1776
1776
if (eleTy != index.getOnType ())
1777
- emitOpError (
1777
+ return emitOpError (
1778
1778
" len_param_index type not compatible with reference type" );
1779
1779
return mlir::success ();
1780
1780
} else if (auto index = mlir::dyn_cast<fir::FieldIndexOp>(defOp)) {
1781
1781
if (eleTy != index.getOnType ())
1782
- emitOpError (" field_index type not compatible with reference type" );
1782
+ return emitOpError (
1783
+ " field_index type not compatible with reference type" );
1783
1784
if (auto recTy = mlir::dyn_cast<fir::RecordType>(eleTy)) {
1784
1785
eleTy = recTy.getType (index.getFieldName ());
1785
1786
continue ;
@@ -3406,26 +3407,30 @@ llvm::LogicalResult fir::SaveResultOp::verify() {
3406
3407
auto eleTy = resultType;
3407
3408
if (auto seqTy = mlir::dyn_cast<fir::SequenceType>(resultType)) {
3408
3409
if (seqTy.getDimension () != shapeTyRank)
3409
- emitOpError (" shape operand must be provided and have the value rank "
3410
- " when the value is a fir.array" );
3410
+ return emitOpError (
3411
+ " shape operand must be provided and have the value rank "
3412
+ " when the value is a fir.array" );
3411
3413
eleTy = seqTy.getEleTy ();
3412
3414
} else {
3413
3415
if (shapeTyRank != 0 )
3414
- emitOpError (
3416
+ return emitOpError (
3415
3417
" shape operand should only be provided if the value is a fir.array" );
3416
3418
}
3417
3419
3418
3420
if (auto recTy = mlir::dyn_cast<fir::RecordType>(eleTy)) {
3419
3421
if (recTy.getNumLenParams () != getTypeparams ().size ())
3420
- emitOpError (" length parameters number must match with the value type "
3421
- " length parameters" );
3422
+ return emitOpError (
3423
+ " length parameters number must match with the value type "
3424
+ " length parameters" );
3422
3425
} else if (auto charTy = mlir::dyn_cast<fir::CharacterType>(eleTy)) {
3423
3426
if (getTypeparams ().size () > 1 )
3424
- emitOpError (" no more than one length parameter must be provided for "
3425
- " character value" );
3427
+ return emitOpError (
3428
+ " no more than one length parameter must be provided for "
3429
+ " character value" );
3426
3430
} else {
3427
3431
if (!getTypeparams ().empty ())
3428
- emitOpError (" length parameters must not be provided for this value type" );
3432
+ return emitOpError (
3433
+ " length parameters must not be provided for this value type" );
3429
3434
}
3430
3435
3431
3436
return mlir::success ();
0 commit comments