Fortran 'allocatable': 'gfc_allocate_using_malloc' vs. plain 'BUILT_IN_MALLOC'
Thomas Schwinge
thomas@codesourcery.com
Wed Jun 5 09:06:00 GMT 2019
Hi!
Thanks for educating me in PR90741 "Unreachable second '__builtin_malloc'
for scalar 'allocatable'" -- I didn't know about the default
'-frealloc-lhs' behavior.
One additional question:
The 'allocate' statement uses 'gfc_allocate_using_malloc' (via
'gfc_allocate_allocatable'), but '-frealloc-lhs' uses plain
'BUILT_IN_MALLOC'. The former does an "Allocation would exceed memory
limit" ('NULL' return) check, the latter doesn't. (Likewise the latter
for other 'BUILT_IN_MALLOC' uses in 'gcc/fortran/'.) Is this difference
intentional?
Grüße
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 658 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20190605/f9f71b24/attachment.sig>
More information about the Fortran
mailing list