summaryrefslogtreecommitdiff
path: root/gcc/fortran/target-memory.c
Commit message (Collapse)AuthorAgeFilesLines
* 2007-06-12 Paul Thomas <pault@gcc.gnu.org>pault2007-06-111-2/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR fortran/29786 PR fortran/30875 * trans-common.c (get_init_field): New function. (create_common): Call get_init_field for overlapping initializers in equivalence blocks. * resolve.c (resolve_equivalence_derived, resolve_equivalence): Remove constraints on initializers in equivalence blocks. * target-memory.c (expr_to_char, gfc_merge_initializers): New functions. (encode_derived): Add the bit offset to the byte offset to get the total offset to the field. * target-memory.h : Add prototype for gfc_merge_initializers. 2007-06-12 Paul Thomas <pault@gcc.gnu.org> PR fortran/29786 * gfortran.dg/equiv_7.f90: New test. * gfortran.dg/equiv_constraint_7.f90: Change error message. PR fortran/30875 * gfortran.dg/equiv_constraint_5.f90: Correct code and error. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125628 138bc75d-0d04-0410-961f-82ee72b054a4
* PR 31972/fortranbrooks2007-05-281-0/+2
| | | | | | | | | | * target-memory.c (gfc_target_expr_size): Add handling for size of BT_HOLLERITH variables. * check.c (gfc_check_transfer): Reject BT_HOLLERITH variables in MOLD argument of TRANSFER. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125141 138bc75d-0d04-0410-961f-82ee72b054a4
* * gfortran.h (gfc_expr): Remove from_H, add "representation"brooks2007-05-281-26/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | struct. * primary.c (match_hollerith_constant): Store the representation of the Hollerith in representation, not in value.character. * arith.c: Add dependency on target-memory.h. (eval_intrinsic): Remove check for from_H. (hollerith2representation): New function. (gfc_hollerith2int): Determine value of the new constant. (gfc_hollerith2real): Likewise. (gfc_hollerith2complex): Likewise. (gfc_hollerith2logical): Likewise. (gfc_hollerith2character): Point both representation.string and value.character.string at the value string. * data.c (create_character_initializer): For BT_HOLLERITH rvalues, get the value from the representation rather than value.character. * expr.c (free_expr0): Update handling of BT_HOLLERITH values and values with representation.string. (gfc_copy_expr): Likewise. * intrinsic.c (do_simplify): Remove special treatement of variables resulting from Hollerith constants. * dump-parse-trees.c (gfc_show_expr): Update handling of Holleriths. * trans-const.c (gfc_conv_constant_to_tree): Replace from_H check with check for representation.string; get Hollerith representation from representation.string, not value.character. * trans-expr.c (is_zero_initializer_p): Replace from_H check with check for representation.string. * trans-stmt.c (gfc_trans_integer_select): Use gfc_conv_mpz_to_tree for case values, so as to avoid picking up the memory representation if the case is given by a transfer expression. * target-memory.c (gfc_target_encode_expr): Use the known memory representation rather than the value, if it exists. (gfc_target_interpret_expr): Store the memory representation of the interpreted expression as well as its value. (interpret_integer): Move to gfc_interpret_integer, make non-static. (interpret_float): Move to gfc_interpret_float, make non-static. (interpret_complex): Move to gfc_interpret_complex, make non-static. (interpret_logical): Move to gfc_interpret_logical, make non-static. (interpret_character): Move to gfc_interpret_character, make non-static. (interpret_derived): Move to gfc_interpret_derived, make non-static. * target-memory.h: Add prototypes for newly-exported gfc_interpret_* functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125135 138bc75d-0d04-0410-961f-82ee72b054a4
* 2007-05-16 Brooks Moses <brooks.moses@codesourcery.com>pault2007-05-161-0/+451
PR fortran/18769 PR fortran/30881 PR fortran/31194 PR fortran/31216 PR fortran/31427 * target-memory.c: New file. * target-memory.h: New file. * simplify.c: Add #include "target-memory.h". (gfc_simplify_transfer): Implement constant- folding for TRANSFER intrinsic. * Make-lang.in: Add dependencies on new target-memory.* files. 2007-05-16 Paul Thomas <pault@gcc.gnu.org> PR fortran/18769 PR fortran/30881 PR fortran/31194 PR fortran/31216 PR fortran/31427 * transfer_simplify_1.f90: New test. * transfer_simplify_2.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124759 138bc75d-0d04-0410-961f-82ee72b054a4