diff options
author | Michael Forney <mforney@mforney.org> | 2019-04-16 17:21:36 -0700 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2019-04-16 17:21:36 -0700 |
commit | 2d2903b113c99f5202105e3915f616181b896c90 (patch) | |
tree | 7d3a00748a38a68b02f12bdf536212f2af0a8287 | |
parent | 70a293121f71e2481fd5b85007195c879cf218ef (diff) |
Error instead of segfault when working with `long double`
-rw-r--r-- | qbe.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1020,6 +1020,8 @@ emitvalue(struct value *v) static void emitrepr(struct repr *r, bool abi, bool ext) { + if (!r) + fatal("type has no QBE representation"); if (abi && r->abi.id) { putchar(':'); emitname(&r->abi); |