[Patch, committed] Fortran: Fix "str" to scalar descriptor conversion [PR92482]
Tobias Burnus
tobias@codesourcery.com
Tue Oct 19 13:19:31 GMT 2021
Here, the problem is that the param.expr was:
&"abc" -> type: "char*"
as that's an ADDR_EXPR, the previous code dereferrenced it:
*&"abc" -> type *(char*)
but that's the type 'char'. Thus, at the end, the result
was
scalar = 'a' -> type char
instead of
scalar "abc" -> type char array of size 3
Solution: Do what the comment does – remove the ADDR_EXPR
insead of dereferrencing the result.
Build + regtested on x86_64-gnu-linux
+ installed as r12-4505-g6920d5a1a2834e9c62d441b8f4c6186b01107d13
Tobias
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
-------------- next part --------------
A non-text attachment was scrubbed...
Name: committed.diff
Type: text/x-patch
Size: 4764 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20211019/ba5f4c47/attachment.bin>
More information about the Gcc-patches
mailing list