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 intrinsic rule(s) for testing processors kinds support #95

Closed
szaghi opened this issue Jun 8, 2017 · 2 comments
Closed

add intrinsic rule(s) for testing processors kinds support #95

szaghi opened this issue Jun 8, 2017 · 2 comments
Assignees

Comments

@szaghi
Copy link
Owner

szaghi commented Jun 8, 2017

The modern standards provide many goodies about kindness, but processors (compilers) are free with respect how to implement them, e.g. Intel does not support iso_ 10646 character kind whereas GNU does, thus we have

print*, selected_char_kind('ascii')     ! => 1 for both GNU and Intel
print*, selected_char_kind('iso_10646') ! => 4 for GNU and => -1 for Intel

It could be very helpful if FoBiS provides an intrinsic rule(s) to test the compiler supported kindness, e.g.

FoBiS.py rule -support_char_kind 'iso_10646' # echo yes or not
FoBiS.py rule -support_real_kind '(33,4931)' # echo yes or not

Essentially, FoBiS will automatically create/compile/run/remove a tiny program for the introspective test like the following

program fobis_rule_selected_char_kind
print*, selected_char_kind(#macro_passed_by_fobis)
endprogram fobis_rule_selected_char_kind

program fobis_rule_selected_int_kind
print*, selected_int_kind(#macro_passed_by_fobis)
endprogram fobis_rule_selected_int_kind

program fobis_rule_selected_real_kind
print*, selected_real_kind(#macro_passed_by_fobis)
endprogram fobis_rule_selected_real_kind

Upon execution, FoBiS intercept the output and if it is >0 the compiler is assumed to support the queried kind.

@szaghi
Copy link
Owner Author

szaghi commented Jun 26, 2017

Added in new 2.2.4.

It would be nice to add a new option to exclude files from being parsed for doctesting, but still included for compilation...

@szaghi
Copy link
Owner Author

szaghi commented Jun 26, 2017

Added also option to exclude files from doctesting. Works great.

@szaghi szaghi closed this as completed Jun 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant