https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61950
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |WAITING
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
The gimple for the cited line looks good to me:
addarray1 (&class.25, &class.26);
class.26 ={v} {CLOBBER};
class.25 ={v} {CLOBBER};
class.30._data = pt_43->p._data;
SR.179_160 = MEM[(struct object_array_pointer *)pt_43];
SR.181_102 = MEM[(struct object_array_pointer *)pt_43 + 12B];
SR.182_94 = MEM[(struct object_array_pointer *)pt_43 + 16B];
_53 = pt_43->p._vptr;
_57 = SR.182_94 * SR.181_102;
_58 = -_57;
_60 = _53->_hash;
switch (_60) <default: <L20>, case 37104555: <L111>>
<L111>:
_243 = MEM[(struct t[0:] *)SR.179_160][0].i;
if (_243 != 1)
goto <bb 36>;
else
goto <bb 8>;
<bb 8>:
_62 = SR.182_94 + 1;
_63 = _62 * SR.181_102;
_64 = _63 - _57;
_65 = MEM[(struct t[0:] *)SR.179_160][_64].i;
if (_65 != 2)
goto <bb 36>;
else
goto <bb 9> (<L20>);
we have constant-folded from the initializer of A.28 = [1, 2].
For the testcase (at -O1) we never call native_encode_expr with off != -1
so the only difference can be that we call native_encode_expr more
often or that the code-path for off == -1 changed (which it wasn't supposed
to).
Btw all calls to native_encode_expr are via fold_view_convert_expr ultimately
called from the frontend and all return NULL and thus fail.
So I wonder whether it rather is libgfortran that is miscompiled? Can you
check running the testcases against an older version?