[Patch, Fortran] PR92277 - Fix assumed-rank array with bind(C)
Tobias Burnus
tobias@codesourcery.com
Wed Oct 30 15:40:00 GMT 2019
The attached test case (w/o optional and with "this") gave an ICE as
"*this" was passed to DECL_ARTIFICIAL and only "this" but not the
INDIRECT_REF is a declaration. [I added optional as those often act
slightly different, but it doesn't seem to make a difference here.]
Solution: If it is an INDIRECT_REF, check the the arg0 of it.
Note: The INDIRECT_REF not only comes about via the
build_fold_indirect_ref_loc call in the line above "is_artificial" but
can be produced earlier. An example is this test case.
(This is GCC 10 regression, only.)
OK for the trunk?
Tobias
PS: Review is also still pending for
https://gcc.gnu.org/ml/fortran/2019-10/msg00237.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr92277.diff
Type: text/x-patch
Size: 2760 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20191030/fd78fcca/attachment.bin>
More information about the Fortran
mailing list