aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/runtime')
-rw-r--r--libgo/runtime/go-runtime-error.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libgo/runtime/go-runtime-error.c b/libgo/runtime/go-runtime-error.c
index c9ccf98..8179e68 100644
--- a/libgo/runtime/go-runtime-error.c
+++ b/libgo/runtime/go-runtime-error.c
@@ -55,7 +55,10 @@ enum
DIVISION_BY_ZERO = 11,
/* Go statement with nil function. */
- GO_NIL = 12
+ GO_NIL = 12,
+
+ /* Shift by negative value. */
+ SHIFT_BY_NEGATIVE = 13
};
extern void __go_runtime_error (int32) __attribute__ ((noreturn));
@@ -112,6 +115,9 @@ __go_runtime_error (int32 i)
runtime_g()->m->throwing = -1;
runtime_throw ("go of nil func value");
+ case SHIFT_BY_NEGATIVE:
+ runtime_panicstring ("negative shift amount");
+
default:
runtime_panicstring ("unknown runtime error");
}