User account creation filtered due to spam.

View | Details | Raw Unified | Return to bug 49103
Collapse All | Expand All

(-)gcc/tree.h.jj (-2 / +7 lines)
Lines 1330-1335 extern void omp_clause_range_check_faile Link Here
1330
#define DECL_READ_P(NODE) \
1330
#define DECL_READ_P(NODE) \
1331
  (TREE_CHECK2 (NODE, VAR_DECL, PARM_DECL)->decl_common.decl_read_flag)
1331
  (TREE_CHECK2 (NODE, VAR_DECL, PARM_DECL)->decl_common.decl_read_flag)
1332
1332
1333
#define DECL_NONSHAREABLE(NODE) \
1334
  (TREE_CHECK2 (NODE, VAR_DECL, \
1335
		RESULT_DECL)->decl_common.decl_nonshareable_flag)
1336
1333
/* In a CALL_EXPR, means that the call is the jump from a thunk to the
1337
/* In a CALL_EXPR, means that the call is the jump from a thunk to the
1334
   thunked-to function.  */
1338
   thunked-to function.  */
1335
#define CALL_FROM_THUNK_P(NODE) (CALL_EXPR_CHECK (NODE)->base.protected_flag)
1339
#define CALL_FROM_THUNK_P(NODE) (CALL_EXPR_CHECK (NODE)->base.protected_flag)
Lines 2787-2794 struct GTY(()) tree_decl_common { Link Here
2787
     being set.  */
2791
     being set.  */
2788
  unsigned decl_read_flag : 1;
2792
  unsigned decl_read_flag : 1;
2789
2793
2790
  /* Padding so that 'off_align' can be on a 32-bit boundary.  */
2794
  /* In VAR_DECL or RESULT_DECL set when significant code movement precludes
2791
  unsigned decl_common_unused : 1;
2795
     attempting to share the stack slot with some other variable.  */
2796
  unsigned decl_nonshareable_flag : 1;
2792
2797
2793
  /* DECL_OFFSET_ALIGN, used only for FIELD_DECLs.  */
2798
  /* DECL_OFFSET_ALIGN, used only for FIELD_DECLs.  */
2794
  unsigned int off_align : 8;
2799
  unsigned int off_align : 8;
(-)gcc/cfgexpand.c.jj (-1 / +5 lines)
Lines 1134-1140 expand_used_vars_for_block (tree block, Link Here
1134
1134
1135
  /* Expand all variables at this level.  */
1135
  /* Expand all variables at this level.  */
1136
  for (t = BLOCK_VARS (block); t ; t = DECL_CHAIN (t))
1136
  for (t = BLOCK_VARS (block); t ; t = DECL_CHAIN (t))
1137
    if (TREE_USED (t))
1137
    if (TREE_USED (t)
1138
        && ((TREE_CODE (t) != VAR_DECL && TREE_CODE (t) != RESULT_DECL)
1139
	    || !DECL_NONSHAREABLE (t)))
1138
      expand_one_var (t, toplevel, true);
1140
      expand_one_var (t, toplevel, true);
1139
1141
1140
  this_sv_num = stack_vars_num;
1142
  this_sv_num = stack_vars_num;
Lines 1167-1172 clear_tree_used (tree block) Link Here
1167
1169
1168
  for (t = BLOCK_VARS (block); t ; t = DECL_CHAIN (t))
1170
  for (t = BLOCK_VARS (block); t ; t = DECL_CHAIN (t))
1169
    /* if (!TREE_STATIC (t) && !DECL_EXTERNAL (t)) */
1171
    /* if (!TREE_STATIC (t) && !DECL_EXTERNAL (t)) */
1172
    if ((TREE_CODE (t) != VAR_DECL && TREE_CODE (t) != RESULT_DECL)
1173
	|| !DECL_NONSHAREABLE (t))
1170
      TREE_USED (t) = 0;
1174
      TREE_USED (t) = 0;
1171
1175
1172
  for (t = BLOCK_SUBBLOCKS (block); t ; t = BLOCK_CHAIN (t))
1176
  for (t = BLOCK_SUBBLOCKS (block); t ; t = BLOCK_CHAIN (t))
(-)gcc/tree-cfg.c.jj (+24 lines)
Lines 5117-5122 gimple_duplicate_bb (basic_block bb) Link Here
5117
    {
5117
    {
5118
      def_operand_p def_p;
5118
      def_operand_p def_p;
5119
      ssa_op_iter op_iter;
5119
      ssa_op_iter op_iter;
5120
      tree lhs;
5120
5121
5121
      stmt = gsi_stmt (gsi);
5122
      stmt = gsi_stmt (gsi);
5122
      if (gimple_code (stmt) == GIMPLE_LABEL)
5123
      if (gimple_code (stmt) == GIMPLE_LABEL)
Lines 5130-5135 gimple_duplicate_bb (basic_block bb) Link Here
5130
      maybe_duplicate_eh_stmt (copy, stmt);
5131
      maybe_duplicate_eh_stmt (copy, stmt);
5131
      gimple_duplicate_stmt_histograms (cfun, copy, cfun, stmt);
5132
      gimple_duplicate_stmt_histograms (cfun, copy, cfun, stmt);
5132
5133
5134
      /* When copying around a stmt writing into a local non-user
5135
	 aggregate, make sure it won't share stack slot with other
5136
	 vars.  */
5137
      lhs = gimple_get_lhs (stmt);
5138
      if (lhs
5139
	  && (handled_component_p (lhs)
5140
	      || TREE_CODE (lhs) == MEM_REF
5141
	      || TREE_CODE (lhs) == TARGET_MEM_REF
5142
	      || TREE_CODE (lhs) == VAR_DECL
5143
	      || TREE_CODE (lhs) == RESULT_DECL))
5144
	{
5145
	  tree base = get_base_address (lhs);
5146
	  if (base
5147
	      && (TREE_CODE (base) == VAR_DECL
5148
		  || TREE_CODE (base) == RESULT_DECL)
5149
	      && DECL_IGNORED_P (base)
5150
	      && !TREE_STATIC (base)
5151
	      && !DECL_EXTERNAL (base)
5152
	      && (TREE_CODE (base) != VAR_DECL
5153
		  || !DECL_HAS_VALUE_EXPR_P (base)))
5154
	    DECL_NONSHAREABLE (base) = 1;
5155
	}
5156
5133
      /* Create new names for all the definitions created by COPY and
5157
      /* Create new names for all the definitions created by COPY and
5134
	 add replacement mappings for each new name.  */
5158
	 add replacement mappings for each new name.  */
5135
      FOR_EACH_SSA_DEF_OPERAND (def_p, copy, op_iter, SSA_OP_ALL_DEFS)
5159
      FOR_EACH_SSA_DEF_OPERAND (def_p, copy, op_iter, SSA_OP_ALL_DEFS)
(-)gcc/testsuite/gfortran.dg/pr49103.f90.jj (+19 lines)
Line 0 Link Here
1
! PR fortran/49103
2
! { dg-do run }
3
  integer :: a(2), b(2), i, j
4
  open (10, status='scratch')
5
  do j = 1, 2
6
    a = (/ 0, 0 /)
7
    b = (/ 1, 1 /)
8
    do i = 1, 2
9
      write (10, *) a
10
      write (10, *) b
11
    end do
12
  end do
13
  rewind (10)
14
  do i = 0, 7
15
    read (10, *) a
16
    if (any (a .ne. mod (i, 2))) call abort
17
  end do
18
  close (10)
19
end

Return to bug 49103