comparison gcc/ada/gcc-interface/utils2.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1437 case BIT_FIELD_REF: 1437 case BIT_FIELD_REF:
1438 /* If this is for 'Address, find the address of the prefix and add 1438 /* If this is for 'Address, find the address of the prefix and add
1439 the offset to the field. Otherwise, do this the normal way. */ 1439 the offset to the field. Otherwise, do this the normal way. */
1440 if (op_code == ATTR_ADDR_EXPR) 1440 if (op_code == ATTR_ADDR_EXPR)
1441 { 1441 {
1442 HOST_WIDE_INT bitsize; 1442 poly_int64 bitsize;
1443 HOST_WIDE_INT bitpos; 1443 poly_int64 bitpos;
1444 tree offset, inner; 1444 tree offset, inner;
1445 machine_mode mode; 1445 machine_mode mode;
1446 int unsignedp, reversep, volatilep; 1446 int unsignedp, reversep, volatilep;
1447 1447
1448 inner = get_inner_reference (operand, &bitsize, &bitpos, &offset, 1448 inner = get_inner_reference (operand, &bitsize, &bitpos, &offset,
1458 1458
1459 /* Compute the offset as a byte offset from INNER. */ 1459 /* Compute the offset as a byte offset from INNER. */
1460 if (!offset) 1460 if (!offset)
1461 offset = size_zero_node; 1461 offset = size_zero_node;
1462 1462
1463 offset = size_binop (PLUS_EXPR, offset, 1463 offset
1464 size_int (bitpos / BITS_PER_UNIT)); 1464 = size_binop (PLUS_EXPR, offset,
1465 size_int (bits_to_bytes_round_down (bitpos)));
1465 1466
1466 /* Take the address of INNER, convert it to a pointer to our type 1467 /* Take the address of INNER, convert it to a pointer to our type
1467 and add the offset. */ 1468 and add the offset. */
1468 inner = build_unary_op (ADDR_EXPR, 1469 inner = build_unary_op (ADDR_EXPR,
1469 build_pointer_type (TREE_TYPE (operand)), 1470 build_pointer_type (TREE_TYPE (operand)),