New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[flang1]: Lowering error when using is_contiguous intrinsic on an array pointer in a derived type #936
Comments
The problem originates from L5649 in lowerlim.c. Looking at the code the symbol is wrongly classified:
|
Whenever you see this lower error, it's probably because we missed a call to either "check_member" or "mk_member" when we generate the AST for the expression. In this case, I believe we missed the call to check_member() in the PD_is_contiguous case of ref_pd() in semfunc.c. The following line in "case PD_is_contiguous" of ref_pd() is probably the culprit: ARG_AST(1) = mk_id(SDSCG(i)); Try changing it to the following: ARG_AST(1) = STYPEG(SDSCG(i)) == ST_MEMBER ? check_member(ast, mk_id(SDSCG(i))) : mk_id(SDSCG(i)); -Mark |
You're quite right, @mleair , thanks for your remark, I was on a slightly wrong track 😉 |
The following code with storage_size intrinsic and a particular usage also shows the same issue.
|
@kiranchandramohan @gklimowicz Disregard my previous comment (which is now deleted) on this. I thought the storage_size issue was fixed in nvfortran earlier this year but I was mistaken. |
An error is observed when using the is_contiguous intrinsic function on an array pointer in a derived type.
Reproducer:
Error:
The text was updated successfully, but these errors were encountered: