This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/27889] [4.1/4.2 Regression] ICE on complex assignment in nested function
- From: "paul dot richard dot thomas at cea dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Jun 2006 06:47:57 -0000
- Subject: [Bug middle-end/27889] [4.1/4.2 Regression] ICE on complex assignment in nested function
- References: <bug-27889-10979@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from paul dot richard dot thomas at cea dot fr 2006-06-06 06:47 -------
Noting the non-fortran tilt on this, it is interesting that
implicit COMPLEX (a-z)
CALL foo
CONTAINS
SUBROUTINE foo
t = s + s
END SUBROUTINE foo
END
is OK and produces declarations for s and t in foo. Alternatively, declaring s
and t in foo also works.
However,
COMPLEX s, t
CALL foo
CONTAINS
SUBROUTINE foo
t = s + s
END SUBROUTINE foo
END
puts the declarations in MAIN__, thusly:
foo ()
{
t = s + s;
MAIN__ ()
{
complex4 s;
complex4 t;
static void foo (void);
_gfortran_set_std (70, 127, 0);
foo ();
}
and triggers the ICE for any optimization level. In fortran parlance, it is
host or use association of the complex type that is broken.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27889