Bug 161669

Summary: gfrtran entry name cannot be in an expression
Product: [Fedora] Fedora Reporter: Patrice Dumas <patpertusus>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: 4.0.1-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-07-10 20:41:16 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:

Description Patrice Dumas 2005-06-25 11:28:58 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.7.8) Gecko/20050524 Fedora/1.0.4-4 Firefox/1.0.4

Description of problem:
The following code isn't compiled by gfortran, because of the otherf = otherf/2. with otherf an entry: 

      FUNCTION myfun(x)
      myfun = 2.
      myfun = myfun/2.
      return
      ENTRY otherf(x)
      otherf = 2.
      otherf = otherf/2.
      return
      END

[dumas@chapelle cernlib_work]$ gfortran -c "bug_gfortran_entry_lhs.f" -o truc.o
 In file bug_gfortran_entry_lhs.f:10

      otherf = otherf/2.                                                
                    1
Error: Function 'otherf' requires an argument list at (1)

Notice that there is no issue for normal functions. There is a workaround, use another name for the variable corresponding with the return value and assign it to the entry name just before return.

Version-Release number of selected component (if applicable):
gcc-gfortran-4.0.0-12

How reproducible:
Always

Steps to Reproduce:
1.put an entry name in an expression and try to compile
2.
3.
  

Actual Results:  Error in compilation

Expected Results:  A compilation

Additional info:

I haven't seen that bug in the gcc gfortran bugzilla. Maybe it isn't reported or has been fixed.

Comment 2 Jakub Jelinek 2005-07-10 20:41:16 UTC
Should be fixed in gcc-4.0.1-1 in rawhide.