This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/35680] [4.3/4.4 regression] ICE on invalid transfer in variable declaration
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Oct 2008 11:56:05 -0000
- Subject: [Bug fortran/35680] [4.3/4.4 regression] ICE on invalid transfer in variable declaration
- References: <bug-35680-10259@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #14 from pault at gcc dot gnu dot org 2008-10-04 11:56 -------
(In reply to comment #13)
> > In fact the ICE is precisely due to the argument not being a restricted
> > expression, since the size of x and its kind are unavailable to the caller and
> > the interfacing cannot be made to work. This is why restricted expressions
> > only permit dummy, host- or use-associated or common variables and why my
> > attempts to evaluate the transfer are failing.
>
> However I disagree with this part of the analysis:
>
> size(transfer(real(1.0,kind(x)), [1_1])) is a "restricted expression" (happily
> accepted by gfortran) that uses exactly the same information as
The real transfer(real(1.0,kind(x)) simplifies to a constant, which is why it
can be evaluated. size(transfer(x, [1])) needs the variable, 'x'; even though
the inquiry function does not need the value. My attempts to bypass this
produced all manner of regressions.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35680