Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 46465 - fortran code does not get properly translated from foo.F to foo.f
fortran code does not get properly translated from foo.F to foo.f
Product: Red Hat Linux
Classification: Retired
Component: cpp (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2001-06-28 17:53 EDT by Marize Pommot-Maia
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-06-28 17:53:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Marize Pommot-Maia 2001-06-28 17:53:55 EDT
Description of Problem:
There are two problems to report here:

1) When writing the foo.f originated from foo.F, by means of cpp, the
format of the foo.f file gets corrupted since the rigid structure of text
in FORTRAN is not kept in the translation.  

2) Option fixed-lline-ength-132 is reported as unknown.

How Reproducible:
It ALWAYS happen

Steps to Reproduce:
1. All is done by means of a Makefile that identifies the platform and
compilers.  Based on that information it will take the steps needed to
compile and link

Actual Results:
Cannot compile because of bad formatting of FORTRAN code.  Not even by
forcing the size of the tab.

Expected Results:
It should have created the libraries and the executable.  I must add that
it works flawlessly in RH6.2 with gcc2.91.66, gcc2.95.2

Additional Information:
The report is typically as shown below:

/lib/cpp -ftabstop=8 -DX11_exists -I/usr/X11R6/include -P alias.F alias.f
f77 -v -c -O -ffixed-line-length-132  alias.f
g77 version 2.96 20000731 (Red Hat Linux 7.1 2.96-85) (from FSF-g77 version
0.5.26 20000731 (Red Hat Linux 7.1 2.96-85))
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-85)
 /usr/lib/gcc-lib/i386-redhat-linux/2.96/f771 alias.f -quiet -dumpbase
alias.f -O -version -ffixed-line-length-132 -o /tmp/ccPtMZtz.s
f771: warning: unknown register name: line-length-132
GNU F77 version 2.96 20000731 (Red Hat Linux 7.1 2.96-85)
(i386-redhat-linux) compiled by GNU C version 2.96 20000731 (Red Hat Linux
7.1 2.96-85).
alias.f: In subroutine `alias':
Non-numeric character at (^) in label field [info -f g77 M LEX]
1    2
Label at (1) invalid with continuation line indicator at (2) [info -f g77 M
Comment 1 Jakub Jelinek 2001-07-23 11:08:24 EDT
You need to use cpp -traditional to preprocess Fortran source.
cpp is C Preprocessor, not Fortran preprocessor and is allowed to do with
whitespace with some exceptions all it wants.
As for -ffixed-line-length-132, see

Note You need to log in before you can comment on or make changes to this bug.