Bug 158232
Summary: | f95 compiler dies compiling fortran 90 code with LAM MPI | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Sam Adams <samuel.adams> | ||||||||||||||
Component: | gcc4 | Assignee: | Jakub Jelinek <jakub> | ||||||||||||||
Status: | CLOSED RAWHIDE | QA Contact: | |||||||||||||||
Severity: | medium | Docs Contact: | |||||||||||||||
Priority: | medium | ||||||||||||||||
Version: | 4 | ||||||||||||||||
Target Milestone: | --- | ||||||||||||||||
Target Release: | --- | ||||||||||||||||
Hardware: | i386 | ||||||||||||||||
OS: | Linux | ||||||||||||||||
Whiteboard: | |||||||||||||||||
Fixed In Version: | 4.0.0-9 | Doc Type: | Bug Fix | ||||||||||||||
Doc Text: | Story Points: | --- | |||||||||||||||
Clone Of: | Environment: | ||||||||||||||||
Last Closed: | 2005-06-03 16:10:42 UTC | Type: | --- | ||||||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||||||
Documentation: | --- | CRM: | |||||||||||||||
Verified Versions: | Category: | --- | |||||||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||||||
Embargoed: | |||||||||||||||||
Attachments: |
|
Description
Sam Adams
2005-05-19 18:59:24 UTC
Please attach orig_pw.f90 and sh -x mpif77 -c orig_pw.f90 output (so that I know what options were actually passed to gfortran. Created attachment 114739 [details]
lam mpi wrapper fortran compiler
Created attachment 114740 [details]
Makefile
this is the Makefile used
Created attachment 114741 [details]
fortran code in question
Can you please also attach the modules it uses (either source, or incident_field.mod, commona.mod, aitoc.mod, or both)? Created attachment 114747 [details]
incident_field.mod
Created attachment 114748 [details]
commona.mod
Created attachment 114749 [details]
aitoc.mod
I am not sure if the AF would be keen if I stuck the rest of the source code on the web, but I hope the moduals are sufficent. Thanks, I can now reproduce it. module modice contains real function foo () foo = 6 end function end module modice function foo () use modice implicit none end function foo crashes the same way. So, does this have to do with ambiguity in the code that needs to be fixed, or is it a bug in the Fortran compiler. Have you ever tried compiling that code with other Fortran90 compiler? My Fortran knowledge is limited, but I'd say that the code is invalid. When using implicit none, a type must be given to encode_log_file_name, but that is missing. It seems to me that encode_log_file_name_str was just meant to be called encode_log_file_name in the 2 occurences of encode_log_file_name_str in that file. Now, of course gfortran shouldn't issue an internal compiler error about this, but should issue an error. (In reply to comment #13) > Have you ever tried compiling that code with other Fortran90 compiler? We currently compile this code with Lahey's Fortran 95 compiler without problem. It dosn't seem to mind how the code is written, but that is not to say that it is not invalid. ===using Lahey=== The orignal version has the variable "encode_log_file_name_str" as just "encode_log_file_name", or in other words, the name of the function. From what I have read, that is the correct way to do a return value in fortran. If you use the variable "encode_log_file_name_str", this will also work if it is assinged to "encode_log_file_name" before the function returns. If the code is as I have if posted in this bug, it will compile, but with a warning that the function has no return value. ===using gfortran=== The first two forementioned ways, will produce an error about ambiguity. The last produces an internal compiler error. > My Fortran knowledge is limited, but I'd say that the code is invalid. > When using implicit none, a type must be given to encode_log_file_name, but > that is missing. It seems to me that encode_log_file_name_str was just meant > to be called encode_log_file_name in the 2 occurences of encode_log_file_name_str > in that file. I would guess that my Fortran knowlage is even more limited than yours, so I am not really sure what the correct syntax is, but from what I have read from my Fortran book, it seems that with fortran the return value of a function goes into a variable of the same name as the function. Although, I am not certain. I guess I need to get more knowlagable of Fortran. I probably need to do a good scrub of the code, and break it up. Right now the the program is over 16k lines of Fortran code. I would like to just dump fortran all together and use C. > Now, of course gfortran shouldn't issue an internal compiler error about this, > but should issue an error. The ICE has been fixed in gcc-4.0.0-9, which is now in rawhide. what is ICE, and rawhide? (In reply to comment #15) > The ICE has been fixed in gcc-4.0.0-9, which is now in rawhide. > ICE is Internal Compiler Error. rawhide is Fedora development tree, http://download.fedora.redhat.com/pub/fedora/linux/core/development/ (or preferrably one of its mirrors). |