summaryrefslogtreecommitdiff
path: root/compiler/cbits
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2021-02-15 04:07:23 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-07-29 13:12:47 -0400
commite6731578246b6e6959026d4a9da9971b097c83aa (patch)
treeb187c46fc1d10b17a1f7d2a5952582269921b73a /compiler/cbits
parent296ed7395c9a45352cf2e03ef9ff0b3b1f5a1a80 (diff)
downloadhaskell-e6731578246b6e6959026d4a9da9971b097c83aa.tar.gz
Add configure flag to enable ASSERTs in all ways
Running the test suite with asserts enabled is somewhat tricky at the moment as running it with a GHC compiled the DEBUG way has some hundred failures from the start. These seem to be unrelated to assertions though. So this provides a toggle to make it easier to debug failing assertions using the test suite.
Diffstat (limited to 'compiler/cbits')
-rw-r--r--compiler/cbits/genSym.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/cbits/genSym.c b/compiler/cbits/genSym.c
index eed2b4f142..19697de25e 100644
--- a/compiler/cbits/genSym.c
+++ b/compiler/cbits/genSym.c
@@ -16,9 +16,7 @@ HsInt ghc_unique_inc = 1;
HsInt genSym(void) {
HsInt u = atomic_inc((StgWord *)&ghc_unique_counter, ghc_unique_inc) & UNIQUE_MASK;
-#if DEBUG
// Uh oh! We will overflow next time a unique is requested.
- assert(u != UNIQUE_MASK);
-#endif
+ ASSERT(u != UNIQUE_MASK);
return u;
}