Skip to content
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

Add -fdefault-integer-8 #3124

Merged
merged 8 commits into from
Jan 24, 2024
Merged

Add -fdefault-integer-8 #3124

merged 8 commits into from
Jan 24, 2024

Conversation

meow464
Copy link
Contributor

@meow464 meow464 commented Jan 15, 2024

Question: The passes create a lot of integers and logicals, should those also follow -fdefault-integer-8 or should they be left as 4 bytes wide?

Set the default integer and logical types to an 8 byte wide type. This option also affects the kind of integer constants like 42. Unlike -finteger-4-integer-8, it does not promote variables with explicit kind declaration. 

https://gcc.gnu.org/onlinedocs/gfortran/Fortran-Dialect-Options.html

@certik
Copy link
Contributor

certik commented Jan 16, 2024

I think the default should be 32bit, for performance and backwards compatibility. And we should add an option to use 64bit by default, like you did in this PR. I think test reference results have to be updated.

@meow464 meow464 marked this pull request as ready for review January 22, 2024 19:44
@meow464
Copy link
Contributor Author

meow464 commented Jan 22, 2024

I think test reference results have to be updated.

No, my branch had a bug. The references are still good.

Copy link
Contributor

@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.

Thanks! I think this looks good. If there are issues, we can iterate on it with subsequent PRs.

@certik certik enabled auto-merge (squash) January 24, 2024 15:08
@certik certik merged commit c963a53 into lfortran:main Jan 24, 2024
21 checks passed
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.

None yet

2 participants