Bug 161669 - gfrtran entry name cannot be in an expression
gfrtran entry name cannot be in an expression
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
rawhide
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-06-25 07:28 EDT by Patrice Dumas
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 4.0.1-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-07-10 16:41:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Patrice Dumas 2005-06-25 07:28:58 EDT
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 16:41:16 EDT
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.