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

Fix problems with using f2c.e/f77.sh on plain Fortran files #370

Merged
merged 9 commits into from
Feb 3, 2024

Conversation

olebole
Copy link
Member

@olebole olebole commented Jan 18, 2024

This reverts 2dee32c

While the patch successfully fixes the problem with equivalencies, it brings other problems; namely that standard FORTRAN I/O doesn't work anymore, as reported in #369.

$ cat simple.f
      PROGRAM simple
      OPEN (1, FILE='test.x')
      CLOSE (1)
      END
$ ${host}bin/f2c.e simple.f
Error on line 3 of simple.f: p1_const:  bad constant type '1'
Error on line 3 of simple.f: p1_const:  bad constant type '1'
Error on line 3 of simple.f: p1_const:  bad constant type '1'
Error on line 3 of simple.f: p1_const:  bad constant type '1'
Error on line 4 of simple.f: p1_const:  bad constant type '1'

Equivalencies are not used in IRAF, while standard FORTRAN I/O is used by people interacting with IRAF.

The f2c maintainer (David M. Gay) was contacted to find a proper solution for the original problem described in iraf-v216/iraf#107, and he provided an updated version 20240130, which is included in this PR. The other major change in this version is that there is a command line flag "-cw" to reduce the info output of f2c. This removed another patch in IRAF which did the same unconditionally.

Also included is a small fix that made the output of a failing f2c disappear when the "-w" flag was used, and a fix that removes duplicate linking of f2c on host programs.

@olebole olebole changed the title Fix f2c Revert adjustment of integer size in f2c Jan 18, 2024
@olebole olebole force-pushed the fix-f2c branch 8 times, most recently from 2064eca to 71a369f Compare January 23, 2024 10:33
@olebole olebole marked this pull request as draft January 29, 2024 21:47
@olebole olebole marked this pull request as ready for review February 2, 2024 11:16
@olebole olebole changed the title Revert adjustment of integer size in f2c Fix problems with using f2c.e/f77.sh on plain Fortran files Feb 2, 2024
@olebole olebole merged commit 264ce41 into iraf-community:main Feb 3, 2024
4 checks passed
@olebole olebole deleted the fix-f2c branch February 4, 2024 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant