Bug 161669 - gfrtran entry name cannot be in an expression
Summary: gfrtran entry name cannot be in an expression
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: rawhide
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-06-25 11:28 UTC by Patrice Dumas
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version: 4.0.1-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-07-10 20:41:16 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


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