This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/59906] New: [4.7/4.8 Regression] error: size of variable '<anonymous>' is too large
- From: "anlauf at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 22 Jan 2014 14:01:42 +0000
- Subject: [Bug fortran/59906] New: [4.7/4.8 Regression] error: size of variable '<anonymous>' is too large
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59906
Bug ID: 59906
Summary: [4.7/4.8 Regression] error: size of variable
'<anonymous>' is too large
Product: gcc
Version: 4.8.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: anlauf at gmx dot de
Hi,
a colleague just reported a regression for the code below.
It compiles fine with 4.3.4 and 4.5.0, but fails with 4.7.4 and 4.8.2.
Cannot check trunk right now.
% gfortran48 robin_gfortran_bug.f90
robin_gfortran_bug.f90: In function 'y':
robin_gfortran_bug.f90:17:0: error: size of variable '<anonymous>' is too large
print*,str_cmp((/'aaa','bbb'/), str_aux)
^
% gfortran47 robin_gfortran_bug.f90
robin_gfortran_bug.f90: In function 'y':
robin_gfortran_bug.f90:17:0: error: size of variable '<anonymous>' is too large
% cat robin_gfortran_bug.f90
program x
implicit none
call y('abcdef')
contains
subroutine y(str)
character(len=*), intent(in) :: str
character(len=len_trim(str)) :: str_aux
str_aux = str
! Compiles
! print*,str_cmp((/'aaa','bbb'/), str)
! Does not compile:
print*,str_cmp((/'aaa','bbb'/), str_aux)
end subroutine y
elemental logical function str_cmp(str1, str2)
character(len=*), intent(in) :: str1
character(len=*), intent(in) :: str2
str_cmp = (str1 == str2)
end function str_cmp
end program x