This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33295] New: ICE in fold_const.c (fold_convert) when reordering USE statements
- From: "jaydub66 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Sep 2007 18:00:37 -0000
- Subject: [Bug fortran/33295] New: ICE in fold_const.c (fold_convert) when reordering USE statements
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following code produces the error
"internal compiler error: in fold_convert, at fold-const.c:2626"
when compiled with GCC trunk rev. 128037:
module A
type A_type
real comp
end type
end module A
module B
contains
function initA()
use A
implicit none
type(A_type):: initA
initA%comp=1.0
end function
end module B
program C
use B
use A
implicit none
type(A_type):: A_var
A_var = initA()
end program C
The crucial part here are the USE statements in program C. The error only pops
up when they appear as listed above. Exchanging them to
use A
use B
makes the error vanish. The error is also killed by
A_var = initA()
It happens for GCC 4.3.0 (trunk) as well as 4.1.3 and 4.2.1. The target system
is i686-pc-linux-gnu.
--
Summary: ICE in fold_const.c (fold_convert) when reordering USE
statements
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jaydub66 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33295