Bug 177701

Summary: gfortran internal compiler error: in gfc_conv_function_call, at fortran/trans-expr.c:1108
Product: [Fedora] Fedora Reporter: Seong-Gon Kim <kimsg>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 4   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: 4.1.0-0.14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-01-17 16:39:35 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 Seong-Gon Kim 2006-01-12 23:13:34 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc4 Firefox/1.0.7

Description of problem:
gfortran fails with internal compiler error for a very simple code.
You need extremely simple codes involving one function returning character string as result. I managed to reproduce the error with 19 lines of code.



Version-Release number of selected component (if applicable):
gcc-4.0.2-8.fc4

How reproducible:
Always

Steps to Reproduce:
1. Make two simple files, break-gfortran.f90 and mod1.f90

%[kimsg@ws19-55 break-gfortran]$ cat break-gfortran.f90
MODULE MOD2
  USE MOD1
CONTAINS
  SUBROUTINE BREAKIT ()
    IMPLICIT NONE
    CHARACTER (LEN = 10) :: st1, st2
    st1 = "Hello"
    st2 = F1(st1)
  END SUBROUTINE BREAKIT
END MODULE MOD2

[kimsg@ws19-55 break-gfortran]$ cat mod1.f90
MODULE MOD1
CONTAINS
  FUNCTION F1(s1) RESULT (s2)
    IMPLICIT NONE
    CHARACTER (LEN = *), INTENT (IN) :: s1
    CHARACTER (LEN = LEN(s1)) :: s2
    s2 = s1
  END FUNCTION F1
END MODULE MOD1

2. Attempt to compile with gfortran to get the following error messages.

[kimsg@ws19-55 break-gfortran]$ gfortran -c mod1.f90 break-gfortran.f90
break-gfortran.f90: In function breakit:
break-gfortran.f90:7: internal compiler error: in gfc_conv_function_call, at fortran/trans-expr.c:1108
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
  

Actual Results:  Internal compiler error.

internal compiler error: in gfc_conv_function_call, at fortran/trans-expr.c:1108

Expected Results:  Successful compilation and object files.

Additional info:

Comment 1 Jakub Jelinek 2006-01-17 16:39:35 UTC
Works just fine with gcc-gfortran-4.1.0-0.14.

Comment 2 Seong-Gon Kim 2006-01-17 22:06:27 UTC
(In reply to comment #1)
> Works just fine with gcc-gfortran-4.1.0-0.14.
I am using fedora core 4. How can I get this version?

Thanks,

Seong-Gon