aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2019-08-21 18:08:42 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2019-08-21 18:08:42 +0000
commit281de4253d972d89f21b2bc3ef4050f88e3fcf3c (patch)
treef786e3135d91f2f3676e58b54e313fc5e368cb9c /libgo
parentb74c00bd10bc789bc2fc4d56b02e25bb431611f2 (diff)
parenteda684e6a77890bd5e13ceab99d95bc1e8439212 (diff)
downloadgcc-281de4253d972d89f21b2bc3ef4050f88e3fcf3c.zip
gcc-281de4253d972d89f21b2bc3ef4050f88e3fcf3c.tar.gz
gcc-281de4253d972d89f21b2bc3ef4050f88e3fcf3c.tar.bz2
Merge from trunk revision 274803.
From-SVN: r274804
Diffstat (limited to 'libgo')
-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");
}