View | Details | Return to bug 69368
Collapse All | Expand All

(-)a/gcc/expr.c (+1 lines)
Lines 6638-6643 store_field (rtx target, HOST_WIDE_INT bitsize, HOST_WIDE_INT bitpos, Link Here
6638
	 RHS isn't the same size as the bitfield, we must use bitfield
6638
	 RHS isn't the same size as the bitfield, we must use bitfield
6639
	 operations.  */
6639
	 operations.  */
6640
      || (bitsize >= 0
6640
      || (bitsize >= 0
6641
	  && TYPE_SIZE (TREE_TYPE (exp))
6641
	  && TREE_CODE (TYPE_SIZE (TREE_TYPE (exp))) == INTEGER_CST
6642
	  && TREE_CODE (TYPE_SIZE (TREE_TYPE (exp))) == INTEGER_CST
6642
	  && compare_tree_int (TYPE_SIZE (TREE_TYPE (exp)), bitsize) != 0
6643
	  && compare_tree_int (TYPE_SIZE (TREE_TYPE (exp)), bitsize) != 0
6643
	  /* Except for initialization of full bytes from a CONSTRUCTOR, which
6644
	  /* Except for initialization of full bytes from a CONSTRUCTOR, which
(-)a/gcc/fortran/trans-common.c (+35 lines)
Lines 284-291 build_field (segment_info *h, tree union_type, record_layout_info rli) Link Here
284
  unsigned HOST_WIDE_INT desired_align, known_align;
284
  unsigned HOST_WIDE_INT desired_align, known_align;
285
285
286
  name = get_identifier (h->sym->name);
286
  name = get_identifier (h->sym->name);
287
288
  gcc_assert (TYPE_P (h->field));
289
  tree size = TYPE_SIZE (h->field);
290
  tree size_unit = TYPE_SIZE_UNIT (h->field);
291
  if (GFC_ARRAY_TYPE_P (h->field)
292
      && !h->sym->value
293
      /*&& (gfc_option.allow_std & GFC_STD_LEGACY)*/)
294
    {
295
      gcc_assert (!GFC_DESCRIPTOR_TYPE_P (h->field));
296
      gcc_assert (TREE_CODE (h->field) == ARRAY_TYPE);
297
298
      /* Could be merged at link time with a larger array whose size we don't
299
	 know.  */
300
      static tree range_type = NULL_TREE;
301
      if (!range_type)
302
	range_type = build_range_type (gfc_array_index_type,
303
				       gfc_index_zero_node, NULL_TREE);
304
      tree type = copy_node (h->field);
305
      TYPE_DOMAIN (type) = range_type;
306
      TYPE_SIZE (type) = NULL_TREE;
307
      TYPE_SIZE_UNIT (type) = NULL_TREE;
308
      SET_TYPE_MODE (type, BLKmode);
309
      gcc_assert (TYPE_CANONICAL (h->field) == h->field);
310
      gcc_assert (TYPE_MAIN_VARIANT (h->field) == h->field);
311
      TYPE_CANONICAL (type) = type;
312
      TYPE_MAIN_VARIANT (type) = type;
313
      layout_type (type);
314
      h->field = type;
315
    }
316
287
  field = build_decl (h->sym->declared_at.lb->location,
317
  field = build_decl (h->sym->declared_at.lb->location,
288
		      FIELD_DECL, name, h->field);
318
		      FIELD_DECL, name, h->field);
319
  DECL_SIZE (field) = size;
320
  DECL_SIZE_UNIT (field) = size_unit;
321
289
  known_align = (offset & -offset) * BITS_PER_UNIT;
322
  known_align = (offset & -offset) * BITS_PER_UNIT;
290
  if (known_align == 0 || known_align > BIGGEST_ALIGNMENT)
323
  if (known_align == 0 || known_align > BIGGEST_ALIGNMENT)
291
    known_align = BIGGEST_ALIGNMENT;
324
    known_align = BIGGEST_ALIGNMENT;
Lines 703-708 create_common (gfc_common_head *com, segment_info *head, bool saw_equiv) Link Here
703
			     VAR_DECL, DECL_NAME (s->field),
736
			     VAR_DECL, DECL_NAME (s->field),
704
			     TREE_TYPE (s->field));
737
			     TREE_TYPE (s->field));
705
      TREE_STATIC (var_decl) = TREE_STATIC (decl);
738
      TREE_STATIC (var_decl) = TREE_STATIC (decl);
739
      DECL_SIZE (var_decl) = DECL_SIZE (s->field);
740
      DECL_SIZE_UNIT (var_decl) = DECL_SIZE_UNIT (s->field);
706
      /* Mark the variable as used in order to avoid warnings about
741
      /* Mark the variable as used in order to avoid warnings about
707
	 unused variables.  */
742
	 unused variables.  */
708
      TREE_USED (var_decl) = 1;
743
      TREE_USED (var_decl) = 1;
(-)a/gcc/tree-dfa.c (-1 / +5 lines)
Lines 617-623 get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset, Link Here
617
      if (maxsize == -1
617
      if (maxsize == -1
618
	  && DECL_SIZE (exp)
618
	  && DECL_SIZE (exp)
619
	  && TREE_CODE (DECL_SIZE (exp)) == INTEGER_CST)
619
	  && TREE_CODE (DECL_SIZE (exp)) == INTEGER_CST)
620
	maxsize = wi::to_offset (DECL_SIZE (exp)) - bit_offset;
620
	{
621
	  maxsize = wi::to_offset (DECL_SIZE (exp)) - bit_offset;
622
	  if (maxsize == bitsize)
623
	    maxsize = -1;
624
	}
621
    }
625
    }
622
  else if (CONSTANT_CLASS_P (exp))
626
  else if (CONSTANT_CLASS_P (exp))
623
    {
627
    {
(-)a/gcc/tree-vect-data-refs.c (+8 lines)
Lines 3412-3417 again: Link Here
3412
          return false;
3412
          return false;
3413
        }
3413
        }
3414
3414
3415
      if (TYPE_SIZE (TREE_TYPE (DR_REF (dr))) == NULL_TREE)
3416
	{
3417
	  if (dump_enabled_p ())
3418
	    dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
3419
			     "not vectorized: data-ref of unknown size\n");
3420
	  return false;
3421
	}
3422
3415
      stmt = DR_STMT (dr);
3423
      stmt = DR_STMT (dr);
3416
      stmt_info = vinfo_for_stmt (stmt);
3424
      stmt_info = vinfo_for_stmt (stmt);
3417
3425

Return to bug 69368