Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#9325 - gcc-fortran does not work on files to be pre-prcessed (.F)

Attached to Project: Arch Linux
Opened by Graziano Giuliani (Graziano) - Thursday, 24 January 2008, 08:23 GMT
Last edited by Jan de Groot (JGC) - Sunday, 03 February 2008, 21:50 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Architecture All
Severity Medium
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

gfortran compilation does no work on files to be preprocessed (have includes).

Es:
gfortran -O2 -m64 -fcray-pointer -fno-second-underscore -Dlinux -Dgfortran -DLITTLE_ENDIAN -c abortx.F
cc1: error: unrecognized command line option "-fcray-pointer"
cc1: error: unrecognized command line option "-fno-second-underscore"

Seems cc1 (called in pre-processing the .F) does not support fortran arguments.
Found that this happens when one builds fortran support separated from gcc.
How to solve this?
I have to rebuild gcc-fortran package, take cc1 from that build and substitute cc1 on system.

Additional info:
* package version(s)
GNU Fortran (GCC) 4.2.2
gcc-fortran 4.2.2-1

Steps to reproduce:
Try this source:

my_inc.h:
###################################
integer :: an_integer
###################################

my_prog.F90:
###################################
program my_prog

include "my_inc.h"
print *, 'Hello world'

end program my_prog
###################################

and compile with

gfortran -fno_second_underscore -I. -o my_prog my_prog.F90
cc1: error: unrecognized command line option "-fno-second-underscore"

Albeit the "-fno_second_underscore" is a legal gfortran option, it is not trecognized by cc1.
(Note that without that option the code compiles...).
This task depends upon

Closed by  Jan de Groot (JGC)
Sunday, 03 February 2008, 21:50 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in gcc 4.2.3-1 which includes the fortran compiler now.

Loading...