[Bug fortran/54070] [4.9/5/6 Regression] Wrong code with allocatable deferred-length (array) function results
dominiq at lps dot ens.fr
gcc-bugzilla@gcc.gnu.org
Mon Nov 2 03:50:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54070
--- Comment #22 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> What is the status of this issue? It would appear from comment 18
> to be "fixed" insofar as the the provided examples compile, but is
> the compiled code correct?
This a wrong interpretation: most of the tests used to compile (with r188654,
hence the regression), at some point compiling most of them gave an ICE, now
two of them compiles. I never said that the compiled codes were correct, they
are all missing a test for that. In top of that this PR is still opened.
Now the following variant of 'b' ('a' being the original test, i.e., the third
in comment 0):
print *, "'", f(), "'"
contains
function f()
character(len=:),allocatable :: f
f ="ABC"
end function
end
compiles and outputs
'ABC'
Now tha problem is that there are several PRs opened for deferred-length (at
least nine, eight now!-) and so far nobody care to check for duplicates.
Note that comment 18 was an answer to comment 17
> I found it fixed in 5.2.0
More information about the Gcc-bugs
mailing list