Skip to content

Conversation

sakamoti
Copy link
Contributor

@sakamoti sakamoti commented Jun 4, 2020

"complex" function which is not a fortran standard causes an error like below in nagfor.

(for example)
"Error: test_linalg.f90, line 445: Implicit type for COMPLEX in TEST_TRACE_CQP"

So, "complex" is replaced with "cmplx" which is one of the fortran standard function.
At the same time, I specified the "kind" value so that it has the same precision as the "cmplx" function argument.

@milancurcic
Copy link
Member

Thank you @sakamoti! This is in part covered by #205, and to your PR also adds the explicit kind parameter to cmplx.

I suggest we wait to merge #205, then rebase this with master and merge. @certik does this sound reasonable?

@certik
Copy link
Member

certik commented Jun 4, 2020

@sakamoti thank you for the fixes! I apologize that it took us longer to merge #205. We just did. Is there anything still failing in the latest master? If so, would you mind sending a PR or rebasing this one?

I apologize for this. Thank you again for our PR. Let me know if you need any help.

@sakamoti
Copy link
Contributor Author

sakamoti commented Jun 4, 2020

The latest version "48b28e8" resolved compilation error. But some "Questionable" message appeare from nagfor.

(example)
"Questionable: fortran-lang_stdlib/src/tests/io/test_savetxt.f90, line 106: Intrinsic function CMPLX with double precision argument and no KIND= argument returns single precision result"

So, adds the explicit kind parameter to cmplx is still meaningfull I think. How do you think about this?

If it is preffer to add kind parameter, I'll try it according to compiler message and send new PR.

@certik
Copy link
Member

certik commented Jun 4, 2020

Yes, I think if the standard says that the result can be single precision (I think that's correct), we have to add the kind parameters. If you wouldn't mind doing it, we would really appreciate it. Thank you!

"complex" function which is not a fortran standard causes error like
below in nagfor.

"Error: test_linalg.f90, line 445: Implicit type for COMPLEX in TEST_TRACE_CQP"

So, this is replaced with "cmplx" fortran standard function.
At the same time, I specified the "kind" value so that it has the
same precision as the "cmplx" function argument.
@sakamoti
Copy link
Contributor Author

sakamoti commented Jun 4, 2020

Please wait a moment, I just editing. (It is my first time to rebase...)
when finish, I will add the comment.

@sakamoti
Copy link
Contributor Author

sakamoti commented Jun 4, 2020

Rebase is over. Please review.

Copy link
Member

@certik certik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the changes look great, thank you @sakamoti for fixing it!

@certik certik merged commit 85f7f6d into fortran-lang:master Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants