summaryrefslogtreecommitdiffstats
path: root/libgo/runtime
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2013-03-01 19:26:43 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2013-03-01 19:26:43 +0000
commit9a267c7852dd13f3d15ab0f11c32e7ac8d69a13f (patch)
tree4a9503567f85a3b0ad72cf2fb13c868a4543c694 /libgo/runtime
parent32ddc0d12895521e65b1c3cbbf9fd60f01d44029 (diff)
downloadppe42-gcc-9a267c7852dd13f3d15ab0f11c32e7ac8d69a13f.tar.gz
ppe42-gcc-9a267c7852dd13f3d15ab0f11c32e7ac8d69a13f.zip
runtime, testing/quick: libffi doesn't handle complex on Alpha.
From Uros Bizjak. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196389 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/runtime')
-rw-r--r--libgo/runtime/go-reflect-call.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/libgo/runtime/go-reflect-call.c b/libgo/runtime/go-reflect-call.c
index 06edae45026..a66f92868f8 100644
--- a/libgo/runtime/go-reflect-call.c
+++ b/libgo/runtime/go-reflect-call.c
@@ -30,7 +30,7 @@ static ffi_type *go_struct_to_ffi (const struct __go_struct_type *)
static ffi_type *go_string_to_ffi (void) __attribute__ ((no_split_stack));
static ffi_type *go_interface_to_ffi (void) __attribute__ ((no_split_stack));
static ffi_type *go_complex_to_ffi (ffi_type *)
- __attribute__ ((no_split_stack));
+ __attribute__ ((no_split_stack, unused));
static ffi_type *go_type_to_ffi (const struct __go_type_descriptor *)
__attribute__ ((no_split_stack));
static ffi_type *go_func_return_ffi (const struct __go_func_type *)
@@ -185,13 +185,23 @@ go_type_to_ffi (const struct __go_type_descriptor *descriptor)
return &ffi_type_double;
abort ();
case GO_COMPLEX64:
+#ifdef __alpha__
+ runtime_throw("the libffi library does not support Complex64 type with "
+ "reflect.Call or runtime.SetFinalizer");
+#else
if (sizeof (float) == 4)
return go_complex_to_ffi (&ffi_type_float);
abort ();
+#endif
case GO_COMPLEX128:
+#ifdef __alpha__
+ runtime_throw("the libffi library does not support Complex128 type with "
+ "reflect.Call or runtime.SetFinalizer");
+#else
if (sizeof (double) == 8)
return go_complex_to_ffi (&ffi_type_double);
abort ();
+#endif
case GO_INT16:
return &ffi_type_sint16;
case GO_INT32:
OpenPOWER on IntegriCloud