Bug 160853

Summary: gfortran internal error for equivalence with character string
Product: [Fedora] Fedora Reporter: Patrice Dumas <patpertusus>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: taschna
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: 4.0.1-4.fc4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-07-27 18:14: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:

Description Patrice Dumas 2005-06-17 20:18:15 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 program compiles fine with g77, but leads to an internal error with gfortran:

      SUBROUTINE t2
      CHARACTER  CA*1
      CHARACTER*1  CQ(1)
      EQUIVALENCE (CQ(1),CA(1:1))
      END

[dumas@chapelle dzebra]$ gfortran -c -o res.o t2.f
 In file t2.f:5

      END                                                               
                                                                       1
 Internal Error at (1):
 find_array_spec(): Missing spec


In a similar code, but with an undeclared array, there is the same error message. This time the code is broken, but te error message is wrong:
      SUBROUTINE t     
      EQUIVALENCE (I, J(1))
      END
When compiled leads to

[dumas@chapelle dzebra]$  gfortran -c -o t.o  t.f 
 In file t.f:3

      END                                                               
                                                                       1
 Internal Error at (1):
 find_array_spec(): Missing spec

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

How reproducible:
Always

Steps to Reproduce:
1.try to compile the programs above
2.
3.
  

Actual Results:   Internal Error at (1):
 find_array_spec(): Missing spec


Expected Results:  a fine compilation

Additional info:

Comment 1 Patrice Dumas 2005-06-18 23:03:58 UTC
The first has allready been submitted in gcc as

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18833

Comment 2 Jakub Jelinek 2005-07-21 08:04:14 UTC
*** Bug 163800 has been marked as a duplicate of this bug. ***

Comment 4 Jakub Jelinek 2005-07-27 18:14:42 UTC
Should be fixed in gcc-4.0.1-4.fc4.