diff options
author | Richard Biener <rguenther@suse.de> | 2020-10-16 10:32:26 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2020-10-27 14:24:57 +0100 |
commit | 6d65ddca42f296b7e4413aac49497698415abce6 (patch) | |
tree | 1762603b173defc33724605271a70aea05876457 /gcc/c/c-parser.c | |
parent | 4a369d199bf2f34e037030b18d0da923e8a24997 (diff) | |
download | gcc-6d65ddca42f296b7e4413aac49497698415abce6.zip gcc-6d65ddca42f296b7e4413aac49497698415abce6.tar.gz gcc-6d65ddca42f296b7e4413aac49497698415abce6.tar.bz2 |
Refactor array descriptor field access
This refactors the array descriptor component access tree building
to commonize code into new helpers to provide a single place to
fix correctness issues with respect to TBAA.
The only interesting part is the gfc_conv_descriptor_data_get change
to drop broken special-casing of REFERENCE_TYPE desc which, when hit,
would build invalid GENERIC trees, missing an INDIRECT_REF before
subsetting the descriptor with a COMPONENT_REF.
2020-10-16 Richard Biener <rguenther@suse.de>
gcc/fortran/ChangeLog:
* trans-array.c (gfc_get_descriptor_field): New helper.
(gfc_conv_descriptor_data_get): Use it - drop strange
REFERENCE_TYPE handling and make sure we don't trigger it.
(gfc_conv_descriptor_data_addr): Use gfc_get_descriptor_field.
(gfc_conv_descriptor_data_set): Likewise.
(gfc_conv_descriptor_offset): Likewise.
(gfc_conv_descriptor_dtype): Likewise.
(gfc_conv_descriptor_span): Likewise.
(gfc_get_descriptor_dimension): Likewise.
(gfc_conv_descriptor_token): Likewise.
(gfc_conv_descriptor_subfield): New helper.
(gfc_conv_descriptor_stride): Use it.
(gfc_conv_descriptor_lbound): Likewise.
(gfc_conv_descriptor_ubound): Likewise.
Diffstat (limited to 'gcc/c/c-parser.c')
0 files changed, 0 insertions, 0 deletions