https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87289

--- Comment #5 from pdbain at ca dot ibm.com ---
The compiler trips on this part of jnicsup.cpp (ca. line 500):

#ifdef J9VM_INTERP_FLOAT_SUPPORT
                        case 'F':
                                /* float type */
                                fltPtr = (jfloat*)--sp;
                                /* The Linux SH4 compiler needs the next two
lines to be two steps.  If you combine them it fails to compile */
                                dbl = ARG(jdouble, f);
                                *fltPtr = (jfloat)dbl;
                                break;
                        case 'D':
                                /* double type */
                                dbl = ARG(jdouble, d);
                                lngOrDblPtr = (UDATA *) &dbl;
                                goto pushLongOrDouble;
#endif
                        case 'J':
                                /* long type */
                                lng = ARG(jlong, j);
                                lngOrDblPtr = (UDATA *) &lng;
pushLongOrDouble:
#ifdef J9VM_ENV_DATA64
                                --sp;
                                *--sp = *(lngOrDblPtr);
#else
                                *--sp = *(lngOrDblPtr + 1);
                                *--sp = *(lngOrDblPtr);
#endif
                                break;

Replacing the "goto" with a copy of the "gone-to" code makes the test pass.

Reply via email to