diff options
author | ktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-12 10:40:27 +0000 |
---|---|---|
committer | ktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-12 10:40:27 +0000 |
commit | 0de83fa2c8a4b2ab39f00091f3b116e2e6bee685 (patch) | |
tree | 45f24ba912850002c07771d6cfe99c3baf36f6eb /libjava/java | |
parent | d29b00c932ca5effa634385bec8617cf0aed8755 (diff) | |
download | gcc-0de83fa2c8a4b2ab39f00091f3b116e2e6bee685.tar.gz |
PR libgcj/50053
* java/lang/natClass.cc (java::lang::Class::newInstance): Special case
member-call for 32-bit IA native Window target.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182225 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java')
-rw-r--r-- | libjava/java/lang/natClass.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libjava/java/lang/natClass.cc b/libjava/java/lang/natClass.cc index ec4a18f1b51..b5ad91f2252 100644 --- a/libjava/java/lang/natClass.cc +++ b/libjava/java/lang/natClass.cc @@ -661,7 +661,13 @@ java::lang::Class::newInstance (void) throw new java::lang::InstantiationException (getName()); jobject r = _Jv_AllocObject (this); + /* Class constructors/destructors have __thiscall calling + convention for 32-bit native Windows ABI. */ +#if defined (__MINGW32__) && defined (__i386__) + ((void (__thiscall *) (jobject)) meth->ncode) (r); +#else ((void (*) (jobject)) meth->ncode) (r); +#endif return r; } |