This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fold VIEW_CONVERT_EXPR <type, STRING_CST> generated by Fortran FE a lot (PR target/35366)
Paul Richard Thomas wrote:
Tobi and Jakub,
They are not standard Fortran. Using Hollerith constants this way was the
way of encoding strings before there was a Character type in Fortran, so the
current behavior is intentional. Whether there actually is code that uses
logicals to encode strings, I can't tell. I CCed Feng Wang who added the
original Hollerith support, and Steve who last modified the testcase.
I am not so sure about that in the case of transfer_simplify_4.f90 -
we have already had serious amounts of correspondence about it as
witnessed in PR33759. What the standard says is:
Yes sorry, I phrased this wrongly, I had intended to only talk about the
use of Hollerith constants. But this is moot because due to what both
Jakub and you rightfully pointed out, LOGICAL will likely have to seize
being a BOOLEAN_TYPE. Which in turn will restore the traditional
Hollerith behavior. If all goes well.