Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/flang
diff options
context:
space:
mode:
authorPeter Steinfeld <psteinfeld@nvidia.com>2022-05-10 00:12:41 +0300
committerPeter Steinfeld <psteinfeld@nvidia.com>2022-05-11 06:08:03 +0300
commitd4609ae47d16a8f5ccd761fa1b61cf52505b1a08 (patch)
tree165b84bd9ff02636a7143cf69a67f1764317d0da /flang
parentcb22cb2691d0b0d2f7e0183e9049e76dac6e2b9d (diff)
[flang] Change "bad kind" messages in the runtime to "not yet implemented"
Similar to change D125046. If a programmer is able to compile and link a program that contains types that are not yet supported by the runtime, it must be because they're not yet implemented. This change will make it easier to find unimplemented code in tests. Differential Revision: https://reviews.llvm.org/D125267
Diffstat (limited to 'flang')
-rw-r--r--flang/runtime/character.cpp4
-rw-r--r--flang/runtime/random.cpp10
-rw-r--r--flang/runtime/tools.cpp3
-rw-r--r--flang/runtime/transformational.cpp2
4 files changed, 11 insertions, 8 deletions
diff --git a/flang/runtime/character.cpp b/flang/runtime/character.cpp
index 50f796d8acae..2264fe6b8f62 100644
--- a/flang/runtime/character.cpp
+++ b/flang/runtime/character.cpp
@@ -253,7 +253,7 @@ static void LenTrimKind(Descriptor &result, const Descriptor &string, int kind,
result, string, terminator);
break;
default:
- terminator.Crash("LEN_TRIM: bad KIND=%d", kind);
+ terminator.Crash("not yet implemented: LEN_TRIM: KIND=%d", kind);
}
}
@@ -454,7 +454,7 @@ static void GeneralCharFuncKind(Descriptor &result, const Descriptor &string,
result, string, arg, back, terminator);
break;
default:
- terminator.Crash("INDEX/SCAN/VERIFY: bad KIND=%d", kind);
+ terminator.Crash("not yet implemented: INDEX/SCAN/VERIFY: KIND=%d", kind);
}
}
diff --git a/flang/runtime/random.cpp b/flang/runtime/random.cpp
index a2753da70af1..8f8145b299f4 100644
--- a/flang/runtime/random.cpp
+++ b/flang/runtime/random.cpp
@@ -108,7 +108,8 @@ void RTNAME(RandomNumber)(
break;
#endif
default:
- terminator.Crash("RANDOM_NUMBER(): bad REAL kind %d", kind);
+ terminator.Crash(
+ "not yet implemented: RANDOM_NUMBER(): REAL kind %d", kind);
}
}
@@ -127,7 +128,8 @@ void RTNAME(RandomSeedSize)(
*size.OffsetElement<CppTypeFor<TypeCategory::Integer, 8>>() = 1;
break;
default:
- terminator.Crash("RANDOM_SEED(SIZE=): bad kind %d\n", kind);
+ terminator.Crash(
+ "not yet implemented: RANDOM_SEED(SIZE=): kind %d\n", kind);
}
}
@@ -148,7 +150,7 @@ void RTNAME(RandomSeedPut)(
seed = *put.OffsetElement<CppTypeFor<TypeCategory::Integer, 8>>();
break;
default:
- terminator.Crash("RANDOM_SEED(PUT=): bad kind %d\n", kind);
+ terminator.Crash("not yet implemented: RANDOM_SEED(PUT=): kind %d\n", kind);
}
{
CriticalSection critical{lock};
@@ -186,7 +188,7 @@ void RTNAME(RandomSeedGet)(
*got.OffsetElement<CppTypeFor<TypeCategory::Integer, 8>>() = seed;
break;
default:
- terminator.Crash("RANDOM_SEED(GET=): bad kind %d\n", kind);
+ terminator.Crash("not yet implemented: RANDOM_SEED(GET=): kind %d\n", kind);
}
}
} // extern "C"
diff --git a/flang/runtime/tools.cpp b/flang/runtime/tools.cpp
index 598083b5ab7a..ccea7956ccae 100644
--- a/flang/runtime/tools.cpp
+++ b/flang/runtime/tools.cpp
@@ -106,7 +106,8 @@ void CheckConformability(const Descriptor &to, const Descriptor &x,
void CheckIntegerKind(Terminator &terminator, int kind, const char *intrinsic) {
if (kind < 1 || kind > 16 || (kind & (kind - 1)) != 0) {
- terminator.Crash("%s: bad KIND=%d argument", intrinsic, kind);
+ terminator.Crash(
+ "not yet implemented: %s: KIND=%d argument", intrinsic, kind);
}
}
} // namespace Fortran::runtime
diff --git a/flang/runtime/transformational.cpp b/flang/runtime/transformational.cpp
index 803c55bcf372..ac12627293aa 100644
--- a/flang/runtime/transformational.cpp
+++ b/flang/runtime/transformational.cpp
@@ -106,7 +106,7 @@ static void DefaultInitialize(
static_cast<char32_t>(' '));
break;
default:
- terminator.Crash("EOSHIFT: bad CHARACTER kind %d", kind);
+ terminator.Crash("not yet implemented: EOSHIFT: CHARACTER kind %d", kind);
}
} else {
std::memset(result.raw().base_addr, 0, bytes);