Index: libgomp/ChangeLog =================================================================== --- libgomp/ChangeLog (.../tags/gcc_4_7_1_release) (wersja 188635) +++ libgomp/ChangeLog (.../branches/gcc-4_7-branch) (wersja 188635) @@ -1,3 +1,23 @@ +2012-06-14 Jakub Jelinek + + Backported from mainline + 2012-06-07 Jakub Jelinek + + PR middle-end/53580 + * testsuite/libgomp.c/pr26943-2.c: Remove #pragma omp barrier, + use GOMP_barrier () call instead. + * testsuite/libgomp.c/pr26943-3.c: Likewise. + * testsuite/libgomp.c/pr26943-4.c: Likewise. + * testsuite/libgomp.fortran/vla4.f90: Remove !$omp barrier, + call GOMP_barrier instead. + * testsuite/libgomp.fortran/vla5.f90: Likewise. + + 2012-06-06 Jakub Jelinek + + PR libgomp/52993 + * config/linux/lock.c (gomp_init_nest_lock_25): Fix up last + argument to memset call. + 2012-06-14 Release Manager * GCC 4.7.1 released. Index: libgomp/testsuite/libgomp.fortran/vla4.f90 =================================================================== --- libgomp/testsuite/libgomp.fortran/vla4.f90 (.../tags/gcc_4_7_1_release) (wersja 188635) +++ libgomp/testsuite/libgomp.fortran/vla4.f90 (.../branches/gcc-4_7-branch) (wersja 188635) @@ -10,6 +10,10 @@ subroutine foo (c, d, e, f, g, h, i, j, k, n) use omp_lib + interface + subroutine GOMP_barrier () bind(c, name="GOMP_barrier") + end subroutine + end interface integer :: n character (len = *) :: c character (len = n) :: d @@ -94,7 +98,7 @@ forall (p = 1:2, q = 3:7, r = 1:7) u(p, q, r) = 30 - x - p + q - 2 * r forall (p = 1:5, q = 3:7, p + q .le. 8) v(p, q) = w(1:7) forall (p = 1:5, q = 3:7, p + q .gt. 8) v(p, q) = w(20:26) -!$omp barrier ! { dg-warning "may not be closely nested" } + call GOMP_barrier y = '' if (x .eq. 0) y = '0' if (x .eq. 1) y = '1' Index: libgomp/testsuite/libgomp.fortran/vla5.f90 =================================================================== --- libgomp/testsuite/libgomp.fortran/vla5.f90 (.../tags/gcc_4_7_1_release) (wersja 188635) +++ libgomp/testsuite/libgomp.fortran/vla5.f90 (.../branches/gcc-4_7-branch) (wersja 188635) @@ -10,6 +10,10 @@ subroutine foo (c, d, e, f, g, h, i, j, k, n) use omp_lib + interface + subroutine GOMP_barrier () bind(c, name="GOMP_barrier") + end subroutine + end interface integer :: n character (len = *) :: c character (len = n) :: d @@ -66,7 +70,7 @@ forall (p = 1:2, q = 3:7, r = 1:7) u(p, q, r) = 30 - x - p + q - 2 * r forall (p = 1:5, q = 3:7, p + q .le. 8) v(p, q) = w(1:7) forall (p = 1:5, q = 3:7, p + q .gt. 8) v(p, q) = w(20:26) -!$omp barrier ! { dg-warning "may not be closely nested" } + call GOMP_barrier y = '' if (x .eq. 0) y = '0' if (x .eq. 1) y = '1' Index: libgomp/testsuite/libgomp.c/pr26943-2.c =================================================================== --- libgomp/testsuite/libgomp.c/pr26943-2.c (.../tags/gcc_4_7_1_release) (wersja 188635) +++ libgomp/testsuite/libgomp.c/pr26943-2.c (.../branches/gcc-4_7-branch) (wersja 188635) @@ -3,6 +3,7 @@ extern int omp_set_dynamic (int); extern void abort (void); +extern void GOMP_barrier (void); int a = 8, b = 12, c = 16, d = 20, j = 0; char e[10] = "a", f[10] = "b", g[10] = "c", h[10] = "d"; @@ -20,7 +21,7 @@ { if (a != 8 || b != 12 || e[0] != 'a' || f[0] != 'b') j++; -#pragma omp barrier /* { dg-warning "may not be closely nested" } */ + GOMP_barrier (); #pragma omp atomic a += i; b += i; @@ -31,7 +32,7 @@ f[0] += i; g[0] = 'g' + i; h[0] = 'h' + i; -#pragma omp barrier /* { dg-warning "may not be closely nested" } */ + GOMP_barrier (); if (a != 8 + 6 || b != 12 + i || c != i || d != i) j += 8; if (e[0] != 'a' + 6 || f[0] != 'b' + i || g[0] != 'g' + i) Index: libgomp/testsuite/libgomp.c/pr26943-3.c =================================================================== --- libgomp/testsuite/libgomp.c/pr26943-3.c (.../tags/gcc_4_7_1_release) (wersja 188635) +++ libgomp/testsuite/libgomp.c/pr26943-3.c (.../branches/gcc-4_7-branch) (wersja 188635) @@ -4,6 +4,7 @@ extern int omp_set_dynamic (int); extern int omp_get_thread_num (void); extern void abort (void); +extern void GOMP_barrier (void); int a = 8, b = 12, c = 16, d = 20, j = 0, l = 0; char e[10] = "a", f[10] = "b", g[10] = "c", h[10] = "d"; @@ -26,7 +27,7 @@ { if (a != 8 || b != 12 || e[0] != 'a' || f[0] != 'b') j++; -#pragma omp barrier /* { dg-warning "may not be closely nested" } */ + GOMP_barrier (); #pragma omp atomic a += i; b += i; @@ -37,7 +38,7 @@ f[0] += i; g[0] = 'g' + i; h[0] = 'h' + i; -#pragma omp barrier /* { dg-warning "may not be closely nested" } */ + GOMP_barrier (); if (a != 8 + 6 || b != 12 + i || c != i || d != i) j += 8; if (e[0] != 'a' + 6 || f[0] != 'b' + i || g[0] != 'g' + i) Index: libgomp/testsuite/libgomp.c/pr26943-4.c =================================================================== --- libgomp/testsuite/libgomp.c/pr26943-4.c (.../tags/gcc_4_7_1_release) (wersja 188635) +++ libgomp/testsuite/libgomp.c/pr26943-4.c (.../branches/gcc-4_7-branch) (wersja 188635) @@ -4,6 +4,7 @@ extern int omp_set_dynamic (int); extern int omp_get_thread_num (void); extern void abort (void); +extern void GOMP_barrier (void); int a = 8, b = 12, c = 16, d = 20, j = 0, l = 0; char e[10] = "a", f[10] = "b", g[10] = "c", h[10] = "d"; @@ -27,7 +28,7 @@ { if (a != 8 || b != 12 || e[0] != 'a' || f[0] != 'b') j++; -#pragma omp barrier /* { dg-warning "may not be closely nested" } */ + GOMP_barrier (); #pragma omp atomic a += i; b += i; @@ -38,7 +39,7 @@ f[0] += i; g[0] = 'g' + i; h[0] = 'h' + i; -#pragma omp barrier /* { dg-warning "may not be closely nested" } */ + GOMP_barrier (); if (a != 8 + 6 || b != 12 + i || c != i || d != i) j += 8; if (e[0] != 'a' + 6 || f[0] != 'b' + i || g[0] != 'g' + i) Index: libgomp/config/linux/lock.c =================================================================== --- libgomp/config/linux/lock.c (.../tags/gcc_4_7_1_release) (wersja 188635) +++ libgomp/config/linux/lock.c (.../branches/gcc-4_7-branch) (wersja 188635) @@ -1,4 +1,4 @@ -/* Copyright (C) 2005, 2008, 2009, 2011 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2008, 2009, 2011, 2012 Free Software Foundation, Inc. Contributed by Richard Henderson . This file is part of the GNU OpenMP Library (libgomp). @@ -175,7 +175,7 @@ void gomp_init_nest_lock_25 (omp_nest_lock_25_t *lock) { - memset (lock, 0, sizeof (lock)); + memset (lock, 0, sizeof (*lock)); } void Index: gcc/tree-ssa-loop-im.c =================================================================== --- gcc/tree-ssa-loop-im.c (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/tree-ssa-loop-im.c (.../branches/gcc-4_7-branch) (wersja 188635) @@ -52,7 +52,7 @@ } } - Where COND and INV are is invariants, but evaluating INV may trap or be + Where COND and INV are invariants, but evaluating INV may trap or be invalid from some other reason if !COND. This may be transformed to if (cond) @@ -1626,6 +1626,7 @@ fprintf (dump_file, "\n"); } } + if (is_stored) mark_ref_stored (ref, loop); @@ -1956,6 +1957,173 @@ return lsm_tmp_name; } +struct prev_flag_edges { + /* Edge to insert new flag comparison code. */ + edge append_cond_position; + + /* Edge for fall through from previous flag comparison. */ + edge last_cond_fallthru; +}; + +/* Helper function for execute_sm. Emit code to store TMP_VAR into + MEM along edge EX. + + The store is only done if MEM has changed. We do this so no + changes to MEM occur on code paths that did not originally store + into it. + + The common case for execute_sm will transform: + + for (...) { + if (foo) + stuff; + else + MEM = TMP_VAR; + } + + into: + + lsm = MEM; + for (...) { + if (foo) + stuff; + else + lsm = TMP_VAR; + } + MEM = lsm; + + This function will generate: + + lsm = MEM; + + lsm_flag = false; + ... + for (...) { + if (foo) + stuff; + else { + lsm = TMP_VAR; + lsm_flag = true; + } + } + if (lsm_flag) <-- + MEM = lsm; <-- +*/ + +static void +execute_sm_if_changed (edge ex, tree mem, tree tmp_var, tree flag) +{ + basic_block new_bb, then_bb, old_dest; + bool loop_has_only_one_exit; + edge then_old_edge, orig_ex = ex; + gimple_stmt_iterator gsi; + gimple stmt; + struct prev_flag_edges *prev_edges = (struct prev_flag_edges *) ex->aux; + + /* ?? Insert store after previous store if applicable. See note + below. */ + if (prev_edges) + ex = prev_edges->append_cond_position; + + loop_has_only_one_exit = single_pred_p (ex->dest); + + if (loop_has_only_one_exit) + ex = split_block_after_labels (ex->dest); + + old_dest = ex->dest; + new_bb = split_edge (ex); + then_bb = create_empty_bb (new_bb); + if (current_loops && new_bb->loop_father) + add_bb_to_loop (then_bb, new_bb->loop_father); + + gsi = gsi_start_bb (new_bb); + stmt = gimple_build_cond (NE_EXPR, flag, boolean_false_node, + NULL_TREE, NULL_TREE); + gsi_insert_after (&gsi, stmt, GSI_CONTINUE_LINKING); + + gsi = gsi_start_bb (then_bb); + /* Insert actual store. */ + stmt = gimple_build_assign (unshare_expr (mem), tmp_var); + gsi_insert_after (&gsi, stmt, GSI_CONTINUE_LINKING); + + make_edge (new_bb, then_bb, EDGE_TRUE_VALUE); + make_edge (new_bb, old_dest, EDGE_FALSE_VALUE); + then_old_edge = make_edge (then_bb, old_dest, EDGE_FALLTHRU); + + set_immediate_dominator (CDI_DOMINATORS, then_bb, new_bb); + + if (prev_edges) + { + basic_block prevbb = prev_edges->last_cond_fallthru->src; + redirect_edge_succ (prev_edges->last_cond_fallthru, new_bb); + set_immediate_dominator (CDI_DOMINATORS, new_bb, prevbb); + set_immediate_dominator (CDI_DOMINATORS, old_dest, + recompute_dominator (CDI_DOMINATORS, old_dest)); + } + + /* ?? Because stores may alias, they must happen in the exact + sequence they originally happened. Save the position right after + the (_lsm) store we just created so we can continue appending after + it and maintain the original order. */ + { + struct prev_flag_edges *p; + + if (orig_ex->aux) + orig_ex->aux = NULL; + alloc_aux_for_edge (orig_ex, sizeof (struct prev_flag_edges)); + p = (struct prev_flag_edges *) orig_ex->aux; + p->append_cond_position = then_old_edge; + p->last_cond_fallthru = find_edge (new_bb, old_dest); + orig_ex->aux = (void *) p; + } + + if (!loop_has_only_one_exit) + for (gsi = gsi_start_phis (old_dest); !gsi_end_p (gsi); gsi_next (&gsi)) + { + gimple phi = gsi_stmt (gsi); + unsigned i; + + for (i = 0; i < gimple_phi_num_args (phi); i++) + if (gimple_phi_arg_edge (phi, i)->src == new_bb) + { + tree arg = gimple_phi_arg_def (phi, i); + add_phi_arg (phi, arg, then_old_edge, UNKNOWN_LOCATION); + update_stmt (phi); + } + } + /* Remove the original fall through edge. This was the + single_succ_edge (new_bb). */ + EDGE_SUCC (new_bb, 0)->flags &= ~EDGE_FALLTHRU; +} + +/* Helper function for execute_sm. On every location where REF is + set, set an appropriate flag indicating the store. */ + +static tree +execute_sm_if_changed_flag_set (struct loop *loop, mem_ref_p ref) +{ + unsigned i; + mem_ref_loc_p loc; + tree flag; + VEC (mem_ref_loc_p, heap) *locs = NULL; + char *str = get_lsm_tmp_name (ref->mem, ~0); + + lsm_tmp_name_add ("_flag"); + flag = make_rename_temp (boolean_type_node, str); + get_all_locs_in_loop (loop, ref, &locs); + FOR_EACH_VEC_ELT (mem_ref_loc_p, locs, i, loc) + { + gimple_stmt_iterator gsi; + gimple stmt; + + gsi = gsi_for_stmt (loc->stmt); + stmt = gimple_build_assign (flag, boolean_true_node); + gsi_insert_after (&gsi, stmt, GSI_CONTINUE_LINKING); + } + VEC_free (mem_ref_loc_p, heap, locs); + return flag; +} + /* Executes store motion of memory reference REF from LOOP. Exits from the LOOP are stored in EXITS. The initialization of the temporary variable is put to the preheader of the loop, and assignments @@ -1964,12 +2132,13 @@ static void execute_sm (struct loop *loop, VEC (edge, heap) *exits, mem_ref_p ref) { - tree tmp_var; + tree tmp_var, store_flag; unsigned i; - gimple load, store; + gimple load; struct fmt_data fmt_data; - edge ex; + edge ex, latch_edge; struct lim_aux_data *lim_data; + bool multi_threaded_model_p = false; if (dump_file && (dump_flags & TDF_DETAILS)) { @@ -1985,23 +2154,47 @@ fmt_data.orig_loop = loop; for_each_index (&ref->mem, force_move_till, &fmt_data); + if ((flag_tm && block_in_transaction (loop_preheader_edge (loop)->src)) + || !PARAM_VALUE (PARAM_ALLOW_STORE_DATA_RACES)) + multi_threaded_model_p = true; + + if (multi_threaded_model_p) + store_flag = execute_sm_if_changed_flag_set (loop, ref); + rewrite_mem_refs (loop, ref, tmp_var); - /* Emit the load & stores. */ + /* Emit the load code into the latch, so that we are sure it will + be processed after all dependencies. */ + latch_edge = loop_latch_edge (loop); + + /* FIXME/TODO: For the multi-threaded variant, we could avoid this + load altogether, since the store is predicated by a flag. We + could, do the load only if it was originally in the loop. */ load = gimple_build_assign (tmp_var, unshare_expr (ref->mem)); lim_data = init_lim_data (load); lim_data->max_loop = loop; lim_data->tgt_loop = loop; + gsi_insert_on_edge (latch_edge, load); - /* Put this into the latch, so that we are sure it will be processed after - all dependencies. */ - gsi_insert_on_edge (loop_latch_edge (loop), load); + if (multi_threaded_model_p) + { + load = gimple_build_assign (store_flag, boolean_false_node); + lim_data = init_lim_data (load); + lim_data->max_loop = loop; + lim_data->tgt_loop = loop; + gsi_insert_on_edge (latch_edge, load); + } + /* Sink the store to every exit from the loop. */ FOR_EACH_VEC_ELT (edge, exits, i, ex) - { - store = gimple_build_assign (unshare_expr (ref->mem), tmp_var); - gsi_insert_on_edge (ex, store); - } + if (!multi_threaded_model_p) + { + gimple store; + store = gimple_build_assign (unshare_expr (ref->mem), tmp_var); + gsi_insert_on_edge (ex, store); + } + else + execute_sm_if_changed (ex, ref->mem, tmp_var, store_flag); } /* Hoists memory references MEM_REFS out of LOOP. EXITS is the list of exit @@ -2410,6 +2603,8 @@ if (flag_tm) compute_transaction_bits (); + + alloc_aux_for_edges (0); } /* Cleans up after the invariant motion pass. */ @@ -2421,6 +2616,8 @@ unsigned i; bitmap b; + free_aux_for_edges (); + FOR_EACH_BB (bb) SET_ALWAYS_EXECUTED_IN (bb, NULL); Index: gcc/omp-low.c =================================================================== --- gcc/omp-low.c (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/omp-low.c (.../branches/gcc-4_7-branch) (wersja 188635) @@ -1823,8 +1823,8 @@ /* Check OpenMP nesting restrictions. */ -static void -check_omp_nesting_restrictions (gimple stmt, omp_context *ctx) +static bool +check_omp_nesting_restrictions (gimple stmt, omp_context *ctx) { switch (gimple_code (stmt)) { @@ -1843,17 +1843,19 @@ case GIMPLE_OMP_TASK: if (is_gimple_call (stmt)) { - warning (0, "barrier region may not be closely nested inside " - "of work-sharing, critical, ordered, master or " - "explicit task region"); - return; + error_at (gimple_location (stmt), + "barrier region may not be closely nested inside " + "of work-sharing, critical, ordered, master or " + "explicit task region"); + return false; } - warning (0, "work-sharing region may not be closely nested inside " - "of work-sharing, critical, ordered, master or explicit " - "task region"); - return; + error_at (gimple_location (stmt), + "work-sharing region may not be closely nested inside " + "of work-sharing, critical, ordered, master or explicit " + "task region"); + return false; case GIMPLE_OMP_PARALLEL: - return; + return true; default: break; } @@ -1866,11 +1868,12 @@ case GIMPLE_OMP_SECTIONS: case GIMPLE_OMP_SINGLE: case GIMPLE_OMP_TASK: - warning (0, "master region may not be closely nested inside " - "of work-sharing or explicit task region"); - return; + error_at (gimple_location (stmt), + "master region may not be closely nested inside " + "of work-sharing or explicit task region"); + return false; case GIMPLE_OMP_PARALLEL: - return; + return true; default: break; } @@ -1881,17 +1884,22 @@ { case GIMPLE_OMP_CRITICAL: case GIMPLE_OMP_TASK: - warning (0, "ordered region may not be closely nested inside " - "of critical or explicit task region"); - return; + error_at (gimple_location (stmt), + "ordered region may not be closely nested inside " + "of critical or explicit task region"); + return false; case GIMPLE_OMP_FOR: if (find_omp_clause (gimple_omp_for_clauses (ctx->stmt), OMP_CLAUSE_ORDERED) == NULL) - warning (0, "ordered region must be closely nested inside " + { + error_at (gimple_location (stmt), + "ordered region must be closely nested inside " "a loop region with an ordered clause"); - return; + return false; + } + return true; case GIMPLE_OMP_PARALLEL: - return; + return true; default: break; } @@ -1902,14 +1910,16 @@ && (gimple_omp_critical_name (stmt) == gimple_omp_critical_name (ctx->stmt))) { - warning (0, "critical region may not be nested inside a critical " - "region with the same name"); - return; + error_at (gimple_location (stmt), + "critical region may not be nested inside a critical " + "region with the same name"); + return false; } break; default: break; } + return true; } @@ -1980,15 +1990,21 @@ /* Check the OpenMP nesting restrictions. */ if (ctx != NULL) { + bool remove = false; if (is_gimple_omp (stmt)) - check_omp_nesting_restrictions (stmt, ctx); + remove = !check_omp_nesting_restrictions (stmt, ctx); else if (is_gimple_call (stmt)) { tree fndecl = gimple_call_fndecl (stmt); if (fndecl && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL && DECL_FUNCTION_CODE (fndecl) == BUILT_IN_GOMP_BARRIER) - check_omp_nesting_restrictions (stmt, ctx); + remove = !check_omp_nesting_restrictions (stmt, ctx); } + if (remove) + { + stmt = gimple_build_nop (); + gsi_replace (gsi, stmt, false); + } } *handled_ops_p = true; Index: gcc/cfg.c =================================================================== --- gcc/cfg.c (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/cfg.c (.../branches/gcc-4_7-branch) (wersja 188635) @@ -814,10 +814,10 @@ clear_aux_for_blocks (); } -/* Allocate a memory edge of SIZE as BB->aux. The obstack must +/* Allocate a memory edge of SIZE as E->aux. The obstack must be first initialized by alloc_aux_for_edges. */ -static void +void alloc_aux_for_edge (edge e, int size) { /* Verify that aux field is clear. */ Index: gcc/DEV-PHASE =================================================================== --- gcc/DEV-PHASE (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/DEV-PHASE (.../branches/gcc-4_7-branch) (wersja 188635) @@ -0,0 +1 @@ +prerelease Index: gcc/ChangeLog =================================================================== --- gcc/ChangeLog (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/ChangeLog (.../branches/gcc-4_7-branch) (wersja 188635) @@ -1,3 +1,61 @@ +2012-06-14 Aldy Hernandez + + PR tree-optimization/52558 + + Backport from mainline: + 2012-05-21 Aldy Hernandez + * gimple.h (gimple_set_in_transaction): Remove. + (gimple_in_transaction): Look in BB instead. + (gimple_statement_base): Remove in_transaction field. + * basic-block.h (enum bb_flags): Add BB_IN_TRANSACTION. + * trans-mem.c (compute_transaction_bits): Place transaction bit + information into basic blocks. + + 2012-05-31 Aldy Hernandez + + PR tree-optimization/52558 + * cfg.c (alloc_aux_for_edge): Fix comment. + (alloc_aux_for_edge): Remove static. + * basic-block.h (alloc_aux_for_edge): Protoize. + * tree-ssa-loop-im.c (execute_sm_if_changed): New. + (execute_sm_if_changed_flag): New. + (execute_sm_if_changed_flag_set): New. + (execute_sm): Do not generate data races unless requested. + (tree_ssa_lim_initialize): Call alloc_aux_for_edges. + (tree_ssa_lim_finalize): Call free_aux_for_edges. + * gimple.h (block_in_transaction): New. + (gimple_in_transaction): Use block_in_transaction. + +2012-06-14 Jakub Jelinek + + Backported from mainline + 2012-06-12 Jakub Jelinek + + PR rtl-optimization/53589 + * cfgrtl.c (force_nonfallthru_and_redirect): Do asm_goto_edge + discovery even when e->dest != target. If any LABEL_REF points + to e->dest label, redirect it to target's label. + + 2012-06-07 Jakub Jelinek + + PR middle-end/53580 + * omp-low.c (scan_omp_1_stmt): If check_omp_nesting_restrictions + returns false, replace stmt with GIMPLE_NOP. + (check_omp_nesting_restrictions): Instead of issuing warnings, + issue errors and return false if any errors were reported. + +2012-06-14 Richard Guenther + + * BASE-VER: Set to 4.7.2. + * DEV-PHASE: Set to prerelease. + +2012-06-12 Christian Bruel + + PR target/53621 + * config/sh/sh.c (sh_option_override): Don't force + flag_omit_frame_pointer and maccumulate_outgoing_args. + * config/sh/sh.opt (maccumulate-outgoing-args): Init as Var. + 2012-06-14 Release Manager * GCC 4.7.1 released. Index: gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.1.f90 =================================================================== --- gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.1.f90 (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.1.f90 (.../branches/gcc-4_7-branch) (wersja 188635) @@ -10,7 +10,7 @@ !$OMP DO DO I = 1, N ! incorrect nesting of loop regions -!$OMP DO ! { dg-warning "may not be closely nested" } +!$OMP DO ! { dg-error "may not be closely nested" } DO J = 1, N CALL WORK(I,J) END DO Index: gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.3.f90 =================================================================== --- gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.3.f90 (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.3.f90 (.../branches/gcc-4_7-branch) (wersja 188635) @@ -7,7 +7,7 @@ !$OMP DO DO I = 1, N ! incorrect nesting of regions -!$OMP SINGLE ! { dg-warning "may not be closely nested" } +!$OMP SINGLE ! { dg-error "may not be closely nested" } CALL WORK(I, 1) !$OMP END SINGLE END DO Index: gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.4.f90 =================================================================== --- gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.4.f90 (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.4.f90 (.../branches/gcc-4_7-branch) (wersja 188635) @@ -8,7 +8,7 @@ DO I = 1, N CALL WORK(I, 1) ! incorrect nesting of barrier region in a loop region -!$OMP BARRIER ! { dg-warning "may not be closely nested" } +!$OMP BARRIER ! { dg-error "may not be closely nested" } CALL WORK(I, 2) END DO !$OMP END PARALLEL Index: gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.6.f90 =================================================================== --- gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.6.f90 (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.6.f90 (.../branches/gcc-4_7-branch) (wersja 188635) @@ -6,7 +6,7 @@ !$OMP SINGLE CALL WORK(N,1) ! incorrect nesting of barrier region in a single region -!$OMP BARRIER ! { dg-warning "may not be closely nested" } +!$OMP BARRIER ! { dg-error "may not be closely nested" } CALL WORK(N,2) !$OMP END SINGLE !$OMP END PARALLEL Index: gcc/testsuite/gfortran.dg/init_flag_10.f90 =================================================================== --- gcc/testsuite/gfortran.dg/init_flag_10.f90 (.../tags/gcc_4_7_1_release) (wersja 0) +++ gcc/testsuite/gfortran.dg/init_flag_10.f90 (.../branches/gcc-4_7-branch) (wersja 188635) @@ -0,0 +1,43 @@ +! { dg-do run } +! { dg-options "-finit-real=NAN" } +! { dg-add-options ieee } +! { dg-skip-if "NaN not supported" { spu-*-* } { "*" } { "" } } +! +! PR fortran/50619 +! +! Contributed by Fred Krogh +! +! The NaN initialization used to set the associate name to NaN! +! + +module testa2 +type, public :: test_ty + real :: rmult = 1.0e0 +end type test_ty + +contains + subroutine test(e, var1) + type(test_ty) :: e + real :: var1, var2 ! Should get NaN initialized + + ! Should be the default value + if (e%rmult /= 1.0) call abort () + + ! Check that NaN initialization is really turned on + if (var1 == var1) call abort () + if (var2 == var2) call abort () + + ! The following was failing: + associate (rmult=>e%rmult) + if (e%rmult /= 1.0) call abort () + end associate + end subroutine test +end module testa2 + +program testa1 + use testa2 + type(test_ty) :: e + real :: var1 ! Should get NaN initialized + call test(e, var1) + stop +end program testa1 Index: gcc/testsuite/gfortran.dg/save_4.f90 =================================================================== --- gcc/testsuite/gfortran.dg/save_4.f90 (.../tags/gcc_4_7_1_release) (wersja 0) +++ gcc/testsuite/gfortran.dg/save_4.f90 (.../branches/gcc-4_7-branch) (wersja 188635) @@ -0,0 +1,13 @@ +! { dg-do compile } +! { dg-options "-std=f2003" } +! +! PR fortran/53597 +! +MODULE somemodule + IMPLICIT NONE + TYPE sometype + INTEGER :: i + DOUBLE PRECISION, POINTER, DIMENSION(:,:) :: coef => NULL() + END TYPE sometype + TYPE(sometype) :: somevariable ! { dg-error "Fortran 2008: Implied SAVE for module variable 'somevariable' at .1., needed due to the default initialization" } +END MODULE somemodule Index: gcc/testsuite/gcc.dg/gomp/critical-4.c =================================================================== --- gcc/testsuite/gcc.dg/gomp/critical-4.c (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/testsuite/gcc.dg/gomp/critical-4.c (.../branches/gcc-4_7-branch) (wersja 188635) @@ -15,7 +15,7 @@ foo2 (void) { #pragma omp critical - #pragma omp critical /* { dg-warning "with the same name" } */ + #pragma omp critical /* { dg-error "with the same name" } */ bar (0); } @@ -23,6 +23,6 @@ foo3 (void) { #pragma omp critical(foo) - #pragma omp critical(foo) /* { dg-warning "with the same name" } */ + #pragma omp critical(foo) /* { dg-error "with the same name" } */ bar (0); } Index: gcc/testsuite/gcc.dg/gomp/nesting-1.c =================================================================== --- gcc/testsuite/gcc.dg/gomp/nesting-1.c (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/testsuite/gcc.dg/gomp/nesting-1.c (.../branches/gcc-4_7-branch) (wersja 188635) @@ -8,89 +8,89 @@ #pragma omp for for (i = 0; i < 3; i++) { - #pragma omp for /* { dg-warning "may not be closely nested" } */ + #pragma omp for /* { dg-error "may not be closely nested" } */ for (j = 0; j < 3; j++) ; - #pragma omp sections /* { dg-warning "may not be closely nested" } */ + #pragma omp sections /* { dg-error "may not be closely nested" } */ { ; #pragma omp section ; } - #pragma omp single /* { dg-warning "may not be closely nested" } */ + #pragma omp single /* { dg-error "may not be closely nested" } */ ; - #pragma omp master /* { dg-warning "may not be closely nested" } */ + #pragma omp master /* { dg-error "may not be closely nested" } */ ; - #pragma omp barrier /* { dg-warning "may not be closely nested" } */ + #pragma omp barrier /* { dg-error "may not be closely nested" } */ } #pragma omp sections { - #pragma omp for /* { dg-warning "may not be closely nested" } */ + #pragma omp for /* { dg-error "may not be closely nested" } */ for (j = 0; j < 3; j++) ; - #pragma omp sections /* { dg-warning "may not be closely nested" } */ + #pragma omp sections /* { dg-error "may not be closely nested" } */ { ; #pragma omp section ; } - #pragma omp single /* { dg-warning "may not be closely nested" } */ + #pragma omp single /* { dg-error "may not be closely nested" } */ ; - #pragma omp master /* { dg-warning "may not be closely nested" } */ + #pragma omp master /* { dg-error "may not be closely nested" } */ ; #pragma omp section ; } #pragma omp single { - #pragma omp for /* { dg-warning "may not be closely nested" } */ + #pragma omp for /* { dg-error "may not be closely nested" } */ for (j = 0; j < 3; j++) ; - #pragma omp sections /* { dg-warning "may not be closely nested" } */ + #pragma omp sections /* { dg-error "may not be closely nested" } */ { ; #pragma omp section ; } - #pragma omp single /* { dg-warning "may not be closely nested" } */ + #pragma omp single /* { dg-error "may not be closely nested" } */ ; - #pragma omp master /* { dg-warning "may not be closely nested" } */ + #pragma omp master /* { dg-error "may not be closely nested" } */ ; - #pragma omp barrier /* { dg-warning "may not be closely nested" } */ + #pragma omp barrier /* { dg-error "may not be closely nested" } */ } #pragma omp master { - #pragma omp for /* { dg-warning "may not be closely nested" } */ + #pragma omp for /* { dg-error "may not be closely nested" } */ for (j = 0; j < 3; j++) ; - #pragma omp sections /* { dg-warning "may not be closely nested" } */ + #pragma omp sections /* { dg-error "may not be closely nested" } */ { ; #pragma omp section ; } - #pragma omp single /* { dg-warning "may not be closely nested" } */ + #pragma omp single /* { dg-error "may not be closely nested" } */ ; #pragma omp master ; - #pragma omp barrier /* { dg-warning "may not be closely nested" } */ + #pragma omp barrier /* { dg-error "may not be closely nested" } */ } #pragma omp task { - #pragma omp for /* { dg-warning "may not be closely nested" } */ + #pragma omp for /* { dg-error "may not be closely nested" } */ for (j = 0; j < 3; j++) ; - #pragma omp sections /* { dg-warning "may not be closely nested" } */ + #pragma omp sections /* { dg-error "may not be closely nested" } */ { ; #pragma omp section ; } - #pragma omp single /* { dg-warning "may not be closely nested" } */ + #pragma omp single /* { dg-error "may not be closely nested" } */ ; - #pragma omp master /* { dg-warning "may not be closely nested" } */ + #pragma omp master /* { dg-error "may not be closely nested" } */ ; - #pragma omp barrier /* { dg-warning "may not be closely nested" } */ + #pragma omp barrier /* { dg-error "may not be closely nested" } */ } #pragma omp parallel { @@ -117,20 +117,20 @@ int i, j; #pragma omp ordered { - #pragma omp for /* { dg-warning "may not be closely nested" } */ + #pragma omp for /* { dg-error "may not be closely nested" } */ for (j = 0; j < 3; j++) ; - #pragma omp sections /* { dg-warning "may not be closely nested" } */ + #pragma omp sections /* { dg-error "may not be closely nested" } */ { ; #pragma omp section ; } - #pragma omp single /* { dg-warning "may not be closely nested" } */ + #pragma omp single /* { dg-error "may not be closely nested" } */ ; #pragma omp master ; - #pragma omp barrier /* { dg-warning "may not be closely nested" } */ + #pragma omp barrier /* { dg-error "may not be closely nested" } */ } } @@ -139,7 +139,7 @@ { #pragma omp critical { - #pragma omp ordered /* { dg-warning "may not be closely nested" } */ + #pragma omp ordered /* { dg-error "may not be closely nested" } */ ; } } @@ -149,7 +149,7 @@ { #pragma omp task { - #pragma omp ordered /* { dg-warning "may not be closely nested" } */ + #pragma omp ordered /* { dg-error "may not be closely nested" } */ ; } } @@ -161,7 +161,7 @@ #pragma omp for for (i = 0; i < 10; i++) { - #pragma omp ordered /* { dg-warning "must be closely nested" } */ + #pragma omp ordered /* { dg-error "must be closely nested" } */ ; } #pragma omp for ordered @@ -190,9 +190,9 @@ #pragma omp critical ; #pragma omp critical (bar) - #pragma omp critical (bar) /* { dg-warning "may not be nested" } */ + #pragma omp critical (bar) /* { dg-error "may not be nested" } */ ; #pragma omp critical - #pragma omp critical /* { dg-warning "may not be nested" } */ + #pragma omp critical /* { dg-error "may not be nested" } */ ; } Index: gcc/testsuite/gcc.dg/pr52558-1.c =================================================================== --- gcc/testsuite/gcc.dg/pr52558-1.c (.../tags/gcc_4_7_1_release) (wersja 0) +++ gcc/testsuite/gcc.dg/pr52558-1.c (.../branches/gcc-4_7-branch) (wersja 188635) @@ -0,0 +1,22 @@ +/* { dg-do compile } */ +/* { dg-options "--param allow-store-data-races=0 -O2 -fdump-tree-lim1" } */ + +/* Test that `count' is not written to unless p->data > 0. */ + +int count; + +struct obj { + int data; + struct obj *next; +} *q; + +void func() +{ + struct obj *p; + for (p = q; p; p = p->next) + if (p->data > 0) + count++; +} + +/* { dg-final { scan-tree-dump-times "MEM count_lsm.. count_lsm_flag" 1 "lim1" } } */ +/* { dg-final { cleanup-tree-dump "lim1" } } */ Index: gcc/testsuite/gcc.dg/pr52558-2.c =================================================================== --- gcc/testsuite/gcc.dg/pr52558-2.c (.../tags/gcc_4_7_1_release) (wersja 0) +++ gcc/testsuite/gcc.dg/pr52558-2.c (.../branches/gcc-4_7-branch) (wersja 188635) @@ -0,0 +1,23 @@ +/* { dg-do compile } */ +/* { dg-options "--param allow-store-data-races=0 -O2 -fdump-tree-lim1" } */ + +/* Test that g_2 is not written to unless !g_1. */ + +int g_1 = 1; +int g_2 = 0; + +int func_1(void) +{ + int l; + for (l = 0; l < 1234; l++) + { + if (g_1) + return l; + else + g_2 = 0; + } + return 999; +} + +/* { dg-final { scan-tree-dump-times "MEM.*g_2_lsm_flag" 1 "lim1" } } */ +/* { dg-final { cleanup-tree-dump "lim1" } } */ Index: gcc/testsuite/gcc.dg/stack-usage-1.c =================================================================== --- gcc/testsuite/gcc.dg/stack-usage-1.c (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/testsuite/gcc.dg/stack-usage-1.c (.../branches/gcc-4_7-branch) (wersja 188635) @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-fstack-usage" } */ +/* { dg-options "-fstack-usage -fomit-frame-pointer" { target { sh-*-* } } } */ /* This is aimed at testing basic support for -fstack-usage in the back-ends. See the SPARC back-end for example (grep flag_stack_usage_info in sparc.c). Index: gcc/testsuite/gcc.dg/torture/pr53589.c =================================================================== --- gcc/testsuite/gcc.dg/torture/pr53589.c (.../tags/gcc_4_7_1_release) (wersja 0) +++ gcc/testsuite/gcc.dg/torture/pr53589.c (.../branches/gcc-4_7-branch) (wersja 188635) @@ -0,0 +1,15 @@ +/* PR rtl-optimization/53589 */ +/* { dg-do compile } */ + +extern void foo (void) __attribute__ ((__noreturn__)); + +void +bar (int x) +{ + if (x < 0) + foo (); + if (x == 0) + return; + __asm goto ("# %l[lab]" : : : : lab); +lab:; +} Index: gcc/testsuite/gcc.dg/tm/reg-promotion.c =================================================================== --- gcc/testsuite/gcc.dg/tm/reg-promotion.c (.../tags/gcc_4_7_1_release) (wersja 0) +++ gcc/testsuite/gcc.dg/tm/reg-promotion.c (.../branches/gcc-4_7-branch) (wersja 188635) @@ -0,0 +1,24 @@ +/* { dg-do compile } */ +/* { dg-options "-fgnu-tm -O2 -fdump-tree-lim1" } */ + +/* Test that `count' is not written to unless p->data>0. */ + +int count; + +struct obj { + int data; + struct obj *next; +} *q; + +void func() +{ + struct obj *p; + __transaction_atomic { + for (p = q; p; p = p->next) + if (p->data > 0) + count++; + } +} + +/* { dg-final { scan-tree-dump-times "MEM count_lsm.. count_lsm_flag" 1 "lim1" } } */ +/* { dg-final { cleanup-tree-dump "lim1" } } */ Index: gcc/testsuite/ChangeLog =================================================================== --- gcc/testsuite/ChangeLog (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/testsuite/ChangeLog (.../branches/gcc-4_7-branch) (wersja 188635) @@ -1,3 +1,56 @@ +2012-06-14 Jakub Jelinek + + Backported from mainline + 2012-06-12 Jakub Jelinek + + PR rtl-optimization/53589 + * gcc.dg/torture/pr53589.c: New test. + + 2012-06-07 Jakub Jelinek + + PR middle-end/53580 + * gcc.dg/gomp/nesting-1.c: Expect errors rather than warnings. + * gcc.dg/gomp/critical-4.c: Likewise. + * gfortran.dg/gomp/appendix-a/a.35.1.f90: Likewise. + * gfortran.dg/gomp/appendix-a/a.35.3.f90: Likewise. + * gfortran.dg/gomp/appendix-a/a.35.4.f90: Likewise. + * gfortran.dg/gomp/appendix-a/a.35.6.f90: Likewise. + * c-c++-common/gomp/pr53580.c: New test. + +2012-06-14 Tobias Burnus + + Backport from mainline + 2012-06-04 Tobias Burnus + + PR fortran/50619 + * gfortran.dg/init_flag_10.f90: New. + +2012-06-14 Richard Guenther + + Backport from mainline + 2012-06-11 Richard Guenther + + PR c++/53616 + * g++.dg/ext/pr53605.C: New testcase. + +2012-06-14 Tobias Burnus + + PR fortran/53597 + * gfortran.dg/save_4.f90: New. + +2012-06-14 Richard Guenther + + Backport from mainline + 2012-06-06 Fabien ChĂȘne + + PR c++/52841 + * g++.dg/cpp0x/pr52841.C: New testcase. + +2012-06-13 Christian Bruel + + PR target/53621 + * gcc.dg/stack-usage-1.c: Force -fomit-frame-pointer on SH. + 2012-06-14 Release Manager * GCC 4.7.1 released. Index: gcc/testsuite/g++.dg/ext/pr53605.C =================================================================== --- gcc/testsuite/g++.dg/ext/pr53605.C (.../tags/gcc_4_7_1_release) (wersja 0) +++ gcc/testsuite/g++.dg/ext/pr53605.C (.../branches/gcc-4_7-branch) (wersja 188635) @@ -0,0 +1,16 @@ +// { dg-do compile } + +// Avoid -pedantic-error default +// { dg-options "" } + +template +class EqHelper { +public: + template + static int Compare( const T1& expected, + const T2& actual); +}; +void foo(){ + static const int kData[] = {}; + ::EqHelper::Compare(kData, "abc"); +} Index: gcc/testsuite/g++.dg/cpp0x/pr52841.C =================================================================== --- gcc/testsuite/g++.dg/cpp0x/pr52841.C (.../tags/gcc_4_7_1_release) (wersja 0) +++ gcc/testsuite/g++.dg/cpp0x/pr52841.C (.../branches/gcc-4_7-branch) (wersja 188635) @@ -0,0 +1,17 @@ +// { dg-do compile } + +struct Solvable; +namespace sat +{ + class Solvable + { + public: + typedef bool bool_type; + }; +} + +class Resolvable : public sat::Solvable +{ +public: + using sat::Solvable::bool_type; +}; Index: gcc/testsuite/c-c++-common/gomp/pr53580.c =================================================================== --- gcc/testsuite/c-c++-common/gomp/pr53580.c (.../tags/gcc_4_7_1_release) (wersja 0) +++ gcc/testsuite/c-c++-common/gomp/pr53580.c (.../branches/gcc-4_7-branch) (wersja 188635) @@ -0,0 +1,19 @@ +/* PR middle-end/53580 */ +/* { dg-do compile } */ +/* { dg-options "-fopenmp" } */ + +int +main () +{ + int x, y, v = 0; + +#pragma omp parallel + #pragma omp for + for (x = 0; x < 10; x++) + { + #pragma omp for reduction(+: v) /* { dg-error "work-sharing region may not be closely nested inside of work-sharing" } */ + for (y = 0; y < 10; y++) + v++; + } + return v - 100; +} Index: gcc/cp/ChangeLog =================================================================== --- gcc/cp/ChangeLog (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/cp/ChangeLog (.../branches/gcc-4_7-branch) (wersja 188635) @@ -1,3 +1,21 @@ +2012-06-14 Richard Guenther + + Backport from mainline + 2012-06-11 Richard Guenther + + PR c++/53616 + * mangle.c (write_array_type): Use double-ints for array domain + arithmetic. + +2012-06-14 Richard Guenther + + Backport from mainline + 2012-06-06 Fabien ChĂȘne + + PR c++/52841 + * parser.c (cp_parser_alias_declaration): Return earlier + if an error occured. + 2012-06-14 Release Manager * GCC 4.7.1 released. Index: gcc/cp/parser.c =================================================================== --- gcc/cp/parser.c (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/cp/parser.c (.../branches/gcc-4_7-branch) (wersja 188635) @@ -15071,6 +15071,9 @@ cp_parser_require (parser, CPP_EQ, RT_EQ); + if (cp_parser_error_occurred (parser)) + return error_mark_node; + /* Now we are going to parse the type-id of the declaration. */ /* Index: gcc/cp/mangle.c =================================================================== --- gcc/cp/mangle.c (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/cp/mangle.c (.../branches/gcc-4_7-branch) (wersja 188635) @@ -3107,8 +3107,10 @@ { /* The ABI specifies that we should mangle the number of elements in the array, not the largest allowed index. */ - max = size_binop (PLUS_EXPR, max, size_one_node); - write_unsigned_number (tree_low_cst (max, 1)); + double_int dmax + = double_int_add (tree_to_double_int (max), double_int_one); + gcc_assert (double_int_fits_in_uhwi_p (dmax)); + write_unsigned_number (dmax.low); } else { Index: gcc/go/gofrontend/gogo.cc =================================================================== --- gcc/go/gofrontend/gogo.cc (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/go/gofrontend/gogo.cc (.../branches/gcc-4_7-branch) (wersja 188635) @@ -339,9 +339,14 @@ // symbol names. if (!this->pkgpath_set_) { - if (!this->prefix_from_option_) - this->prefix_ = "go"; - this->pkgpath_ = this->prefix_ + '.' + package_name; + if (!this->prefix_from_option_ && package_name == "main") + this->pkgpath_ = package_name; + else + { + if (!this->prefix_from_option_) + this->prefix_ = "go"; + this->pkgpath_ = this->prefix_ + '.' + package_name; + } this->pkgpath_set_ = true; } Index: gcc/go/gofrontend/expressions.h =================================================================== --- gcc/go/gofrontend/expressions.h (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/go/gofrontend/expressions.h (.../branches/gcc-4_7-branch) (wersja 188635) @@ -1888,6 +1888,10 @@ do_is_addressable() const { return this->expr_->is_addressable(); } + void + do_address_taken(bool escapes) + { this->expr_->address_taken(escapes); } + tree do_get_tree(Translate_context*); Index: gcc/go/gofrontend/types.cc =================================================================== --- gcc/go/gofrontend/types.cc (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/go/gofrontend/types.cc (.../branches/gcc-4_7-branch) (wersja 188635) @@ -8337,14 +8337,23 @@ { // We handle -fgo-prefix and -fgo-pkgpath differently here for // compatibility with how the compiler worked before - // -fgo-pkgpath was introduced. + // -fgo-pkgpath was introduced. When -fgo-pkgpath is specified, + // we use it to make a unique reflection string, so that the + // type canonicalization in the reflect package will work. In + // order to be compatible with the gc compiler, we put tabs into + // the package path, so that the reflect methods can discard it. const Package* package = this->named_object_->package(); if (gogo->pkgpath_from_option()) - ret->append(package != NULL ? package->pkgpath() : gogo->pkgpath()); - else - ret->append(package != NULL - ? package->package_name() - : gogo->package_name()); + { + ret->push_back('\t'); + ret->append(package != NULL + ? package->pkgpath_symbol() + : gogo->pkgpath_symbol()); + ret->push_back('\t'); + } + ret->append(package != NULL + ? package->package_name() + : gogo->package_name()); ret->push_back('.'); } if (this->in_function_ != NULL) Index: gcc/go/gofrontend/expressions.cc =================================================================== --- gcc/go/gofrontend/expressions.cc (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/go/gofrontend/expressions.cc (.../branches/gcc-4_7-branch) (wersja 188635) @@ -168,7 +168,8 @@ if (lhs_type_tree == error_mark_node) return error_mark_node; - if (lhs_type != rhs_type && lhs_type->interface_type() != NULL) + if (lhs_type->forwarded() != rhs_type->forwarded() + && lhs_type->interface_type() != NULL) { if (rhs_type->interface_type() == NULL) return Expression::convert_type_to_interface(context, lhs_type, @@ -179,7 +180,8 @@ rhs_type, rhs_tree, false, location); } - else if (lhs_type != rhs_type && rhs_type->interface_type() != NULL) + else if (lhs_type->forwarded() != rhs_type->forwarded() + && rhs_type->interface_type() != NULL) return Expression::convert_interface_to_type(context, lhs_type, rhs_type, rhs_tree, location); else if (lhs_type->is_slice_type() && rhs_type->is_nil_type()) Index: gcc/ada/ChangeLog =================================================================== --- gcc/ada/ChangeLog (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/ada/ChangeLog (.../branches/gcc-4_7-branch) (wersja 188635) @@ -1,3 +1,8 @@ +2012-06-14 Jakub Jelinek + + * gcc-interface/Makefile.in (gnatlib-shared-default): Append + $(PICFLAG_FOR_TARGET) to GNATLIBCFLAGS_FOR_C passed to submake. + 2012-06-14 Release Manager * GCC 4.7.1 released. Index: gcc/ada/gcc-interface/Makefile.in =================================================================== --- gcc/ada/gcc-interface/Makefile.in (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/ada/gcc-interface/Makefile.in (.../branches/gcc-4_7-branch) (wersja 188635) @@ -2597,7 +2597,7 @@ $(MAKE) $(FLAGS_TO_PASS) \ GNATLIBFLAGS="$(GNATLIBFLAGS)" \ GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(PICFLAG_FOR_TARGET)" \ - GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \ + GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C) $(PICFLAG_FOR_TARGET)" \ MULTISUBDIR="$(MULTISUBDIR)" \ THREAD_KIND="$(THREAD_KIND)" \ gnatlib Index: gcc/fortran/decl.c =================================================================== --- gcc/fortran/decl.c (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/fortran/decl.c (.../branches/gcc-4_7-branch) (wersja 188635) @@ -3786,8 +3786,9 @@ } } - /* Module variables implicitly have the SAVE attribute. */ - if (gfc_current_state () == COMP_MODULE && !current_attr.save) + /* Since Fortran 2008 module variables implicitly have the SAVE attribute. */ + if (gfc_current_state () == COMP_MODULE && !current_attr.save + && (gfc_option.allow_std & GFC_STD_F2008) != 0) current_attr.save = SAVE_IMPLICIT; colon_seen = 1; Index: gcc/fortran/ChangeLog =================================================================== --- gcc/fortran/ChangeLog (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/fortran/ChangeLog (.../branches/gcc-4_7-branch) (wersja 188635) @@ -1,3 +1,18 @@ +2012-06-14 Tobias Burnus + + Backport from mainline + 2012-06-04 Tobias Burnus + + PR fortran/50619 + * resolve.c (build_default_init_expr): Don't initialize + ASSOCIATE names. + +2012-06-14 Tobias Burnus + + PR fortran/53597 + * decl.c (match_attr_spec): Only mark module variables + as SAVE_IMPLICIT for Fortran 2008 and later. + 2012-06-14 Release Manager * GCC 4.7.1 released. Index: gcc/fortran/resolve.c =================================================================== --- gcc/fortran/resolve.c (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/fortran/resolve.c (.../branches/gcc-4_7-branch) (wersja 188635) @@ -10027,7 +10027,8 @@ || sym->attr.data || sym->module || sym->attr.cray_pointee - || sym->attr.cray_pointer) + || sym->attr.cray_pointer + || sym->assoc) return NULL; /* Now we'll try to build an initializer expression. */ Index: gcc/BASE-VER =================================================================== --- gcc/BASE-VER (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/BASE-VER (.../branches/gcc-4_7-branch) (wersja 188635) @@ -1 +1 @@ -4.7.1 +4.7.2 Index: gcc/trans-mem.c =================================================================== --- gcc/trans-mem.c (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/trans-mem.c (.../branches/gcc-4_7-branch) (wersja 188635) @@ -2442,13 +2442,15 @@ struct tm_region *region; VEC (basic_block, heap) *queue; unsigned int i; - gimple_stmt_iterator gsi; basic_block bb; /* ?? Perhaps we need to abstract gate_tm_init further, because we certainly don't need it to calculate CDI_DOMINATOR info. */ gate_tm_init (); + FOR_EACH_BB (bb) + bb->flags &= ~BB_IN_TRANSACTION; + for (region = all_tm_regions; region; region = region->next) { queue = get_tm_region_blocks (region->entry_block, @@ -2457,11 +2459,7 @@ NULL, /*stop_at_irr_p=*/true); for (i = 0; VEC_iterate (basic_block, queue, i, bb); ++i) - for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi)) - { - gimple stmt = gsi_stmt (gsi); - gimple_set_in_transaction (stmt, true); - } + bb->flags |= BB_IN_TRANSACTION; VEC_free (basic_block, heap, queue); } Index: gcc/basic-block.h =================================================================== --- gcc/basic-block.h (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/basic-block.h (.../branches/gcc-4_7-branch) (wersja 188635) @@ -256,7 +256,12 @@ df_set_bb_dirty, but not cleared by df_analyze, so it can be used to test whether a block has been modified prior to a df_analyze call. */ - BB_MODIFIED = 1 << 12 + BB_MODIFIED = 1 << 12, + + /* Set on blocks that are in a transaction. This is calculated on + demand, and is available after calling + compute_transaction_bits(). */ + BB_IN_TRANSACTION = 1 << 13 }; /* Dummy flag for convenience in the hot/cold partitioning code. */ @@ -787,6 +792,7 @@ extern void alloc_aux_for_blocks (int); extern void clear_aux_for_blocks (void); extern void free_aux_for_blocks (void); +extern void alloc_aux_for_edge (edge, int); extern void alloc_aux_for_edges (int); extern void clear_aux_for_edges (void); extern void free_aux_for_edges (void); Index: gcc/gimple.h =================================================================== --- gcc/gimple.h (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/gimple.h (.../branches/gcc-4_7-branch) (wersja 188635) @@ -305,11 +305,6 @@ /* Nonzero if this statement contains volatile operands. */ unsigned has_volatile_ops : 1; - /* Nonzero if this statement appears inside a transaction. This bit - is calculated on de-mand and has relevant information only after - it has been calculated with compute_transaction_bits. */ - unsigned in_transaction : 1; - /* The SUBCODE field can be used for tuple-specific flags for tuples that do not require subcodes. Note that SUBCODE should be at least as wide as tree codes, as several tuples store tree codes @@ -1587,20 +1582,20 @@ stmt->gsbase.has_volatile_ops = (unsigned) volatilep; } -/* Return true if STMT is in a transaction. */ +/* Return true if BB is in a transaction. */ static inline bool -gimple_in_transaction (gimple stmt) +block_in_transaction (basic_block bb) { - return stmt->gsbase.in_transaction; + return bb->flags & BB_IN_TRANSACTION; } -/* Set the IN_TRANSACTION flag to TRANSACTIONP. */ +/* Return true if STMT is in a transaction. */ -static inline void -gimple_set_in_transaction (gimple stmt, bool transactionp) +static inline bool +gimple_in_transaction (gimple stmt) { - stmt->gsbase.in_transaction = (unsigned) transactionp; + return block_in_transaction (gimple_bb (stmt)); } /* Return true if statement STMT may access memory. */ Index: gcc/config/sh/sh.c =================================================================== --- gcc/config/sh/sh.c (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/config/sh/sh.c (.../branches/gcc-4_7-branch) (wersja 188635) @@ -747,8 +747,6 @@ if (! VALID_REGISTER_P (ADDREGNAMES_REGNO (regno))) sh_additional_register_names[regno][0] = '\0'; - flag_omit_frame_pointer = (PREFERRED_DEBUGGING_TYPE == DWARF2_DEBUG); - if ((flag_pic && ! TARGET_PREFERGOT) || (TARGET_SHMEDIA && !TARGET_PT_FIXED)) flag_no_function_cse = 1; @@ -780,22 +778,17 @@ flag_schedule_insns = 0; } - if ((target_flags_explicit & MASK_ACCUMULATE_OUTGOING_ARGS) == 0) - target_flags |= MASK_ACCUMULATE_OUTGOING_ARGS; - - /* Unwind info is not correct around the CFG unless either a frame - pointer is present or M_A_O_A is set. Fixing this requires rewriting - unwind info generation to be aware of the CFG and propagating states + /* Unwind info is not correct around the CFG unless either a frame + pointer is present or M_A_O_A is set. Fixing this requires rewriting + unwind info generation to be aware of the CFG and propagating states around edges. */ if ((flag_unwind_tables || flag_asynchronous_unwind_tables - || flag_exceptions || flag_non_call_exceptions) - && flag_omit_frame_pointer - && !(target_flags & MASK_ACCUMULATE_OUTGOING_ARGS)) + || flag_exceptions || flag_non_call_exceptions) + && flag_omit_frame_pointer && !TARGET_ACCUMULATE_OUTGOING_ARGS) { - if (target_flags_explicit & MASK_ACCUMULATE_OUTGOING_ARGS) - warning (0, "unwind tables currently require either a frame pointer " - "or -maccumulate-outgoing-args for correctness"); - target_flags |= MASK_ACCUMULATE_OUTGOING_ARGS; + warning (0, "unwind tables currently require either a frame pointer " + "or -maccumulate-outgoing-args for correctness"); + TARGET_ACCUMULATE_OUTGOING_ARGS = 1; } /* Unwinding with -freorder-blocks-and-partition does not work on this @@ -805,7 +798,7 @@ { if (flag_exceptions) { - inform (input_location, + inform (input_location, "-freorder-blocks-and-partition does not work with " "exceptions on this architecture"); flag_reorder_blocks_and_partition = 0; Index: gcc/config/sh/sh.opt =================================================================== --- gcc/config/sh/sh.opt (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/config/sh/sh.opt (.../branches/gcc-4_7-branch) (wersja 188635) @@ -202,7 +202,7 @@ Generate FPU-less SHcompact code maccumulate-outgoing-args -Target Report Mask(ACCUMULATE_OUTGOING_ARGS) +Target Report Var(TARGET_ACCUMULATE_OUTGOING_ARGS) Init(1) Reserve space for outgoing arguments in the function prologue madjust-unroll Index: gcc/cfgrtl.c =================================================================== --- gcc/cfgrtl.c (.../tags/gcc_4_7_1_release) (wersja 188635) +++ gcc/cfgrtl.c (.../branches/gcc-4_7-branch) (wersja 188635) @@ -1224,21 +1224,21 @@ } /* If e->src ends with asm goto, see if any of the ASM_OPERANDS_LABELs - don't point to target label. */ + don't point to the target or fallthru label. */ if (JUMP_P (BB_END (e->src)) && target != EXIT_BLOCK_PTR - && e->dest == target && (e->flags & EDGE_FALLTHRU) && (note = extract_asm_operands (PATTERN (BB_END (e->src))))) { int i, n = ASM_OPERANDS_LABEL_LENGTH (note); for (i = 0; i < n; ++i) - if (XEXP (ASM_OPERANDS_LABEL (note, i), 0) == BB_HEAD (target)) - { + { + if (XEXP (ASM_OPERANDS_LABEL (note, i), 0) == BB_HEAD (e->dest)) + XEXP (ASM_OPERANDS_LABEL (note, i), 0) = block_label (target); + if (XEXP (ASM_OPERANDS_LABEL (note, i), 0) == BB_HEAD (target)) asm_goto_edge = true; - break; - } + } } if (EDGE_COUNT (e->src->succs) >= 2 || abnormal_edge_flags || asm_goto_edge) Index: libgo/Makefile.in =================================================================== --- libgo/Makefile.in (.../tags/gcc_4_7_1_release) (wersja 188635) +++ libgo/Makefile.in (.../branches/gcc-4_7-branch) (wersja 188635) @@ -2041,6 +2041,7 @@ LD_LIBRARY_PATH="`${PWD_COMMAND}`/.libs:$${libgccdir}:${LD_LIBRARY_PATH}"; \ LD_LIBRARY_PATH=`echo $${LD_LIBRARY_PATH} | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; \ export LD_LIBRARY_PATH; \ + $(MKDIR_P) $(@D); \ rm -f $@-testsum $@-testlog; \ if test "$(use_dejagnu)" = "yes"; then \ $(SHELL) $(srcdir)/testsuite/gotest --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" --testname="$(@D)" --goarch="$(GOARCH)" $(GOTESTFLAGS); \ @@ -4676,7 +4677,6 @@ archive/tar.lo: $(go_archive_tar_files) $(BUILDPACKAGE) archive/tar/check: $(CHECK_DEPS) - @$(MKDIR_P) archive/tar @$(CHECK) .PHONY: archive/tar/check @@ -4686,7 +4686,6 @@ archive/zip.lo: $(go_archive_zip_files) $(BUILDPACKAGE) archive/zip/check: $(CHECK_DEPS) - @$(MKDIR_P) archive/zip @$(CHECK) .PHONY: archive/zip/check @@ -4696,7 +4695,6 @@ compress/bzip2.lo: $(go_compress_bzip2_files) $(BUILDPACKAGE) compress/bzip2/check: $(CHECK_DEPS) - @$(MKDIR_P) compress/bzip2 @$(CHECK) .PHONY: compress/bzip2/check @@ -4706,7 +4704,6 @@ compress/flate.lo: $(go_compress_flate_files) $(BUILDPACKAGE) compress/flate/check: $(CHECK_DEPS) - @$(MKDIR_P) compress/flate @$(CHECK) .PHONY: compress/flate/check @@ -4716,7 +4713,6 @@ compress/gzip.lo: $(go_compress_gzip_files) $(BUILDPACKAGE) compress/gzip/check: $(CHECK_DEPS) - @$(MKDIR_P) compress/gzip @$(CHECK) .PHONY: compress/gzip/check @@ -4726,7 +4722,6 @@ compress/lzw.lo: $(go_compress_lzw_files) $(BUILDPACKAGE) compress/lzw/check: $(CHECK_DEPS) - @$(MKDIR_P) compress/lzw @$(CHECK) .PHONY: compress/lzw/check @@ -4736,7 +4731,6 @@ compress/zlib.lo: $(go_compress_zlib_files) $(BUILDPACKAGE) compress/zlib/check: $(CHECK_DEPS) - @$(MKDIR_P) compress/zlib @$(CHECK) .PHONY: compress/zlib/check @@ -4746,7 +4740,6 @@ container/heap.lo: $(go_container_heap_files) $(BUILDPACKAGE) container/heap/check: $(CHECK_DEPS) - @$(MKDIR_P) container/heap @$(CHECK) .PHONY: container/heap/check @@ -4756,7 +4749,6 @@ container/list.lo: $(go_container_list_files) $(BUILDPACKAGE) container/list/check: $(CHECK_DEPS) - @$(MKDIR_P) container/list @$(CHECK) .PHONY: container/list/check @@ -4766,7 +4758,6 @@ container/ring.lo: $(go_container_ring_files) $(BUILDPACKAGE) container/ring/check: $(CHECK_DEPS) - @$(MKDIR_P) container/ring @$(CHECK) .PHONY: container/ring/check @@ -4776,7 +4767,6 @@ crypto/aes.lo: $(go_crypto_aes_files) $(BUILDPACKAGE) crypto/aes/check: $(CHECK_DEPS) - @$(MKDIR_P) crypto/aes @$(CHECK) .PHONY: crypto/aes/check @@ -4786,7 +4776,6 @@ crypto/cipher.lo: $(go_crypto_cipher_files) $(BUILDPACKAGE) crypto/cipher/check: $(CHECK_DEPS) - @$(MKDIR_P) crypto/cipher @$(CHECK) .PHONY: crypto/cipher/check @@ -4796,7 +4785,6 @@ crypto/des.lo: $(go_crypto_des_files) $(BUILDPACKAGE) crypto/des/check: $(CHECK_DEPS) - @$(MKDIR_P) crypto/des @$(CHECK) .PHONY: crypto/des/check @@ -4806,7 +4794,6 @@ crypto/dsa.lo: $(go_crypto_dsa_files) $(BUILDPACKAGE) crypto/dsa/check: $(CHECK_DEPS) - @$(MKDIR_P) crypto/dsa @$(CHECK) .PHONY: crypto/dsa/check @@ -4816,7 +4803,6 @@ crypto/ecdsa.lo: $(go_crypto_ecdsa_files) $(BUILDPACKAGE) crypto/ecdsa/check: $(CHECK_DEPS) - @$(MKDIR_P) crypto/ecdsa @$(CHECK) .PHONY: crypto/ecdsa/check @@ -4826,7 +4812,6 @@ crypto/elliptic.lo: $(go_crypto_elliptic_files) $(BUILDPACKAGE) crypto/elliptic/check: $(CHECK_DEPS) - @$(MKDIR_P) crypto/elliptic @$(CHECK) .PHONY: crypto/elliptic/check @@ -4836,7 +4821,6 @@ crypto/hmac.lo: $(go_crypto_hmac_files) $(BUILDPACKAGE) crypto/hmac/check: $(CHECK_DEPS) - @$(MKDIR_P) crypto/hmac @$(CHECK) .PHONY: crypto/hmac/check @@ -4846,7 +4830,6 @@ crypto/md5.lo: $(go_crypto_md5_files) $(BUILDPACKAGE) crypto/md5/check: $(CHECK_DEPS) - @$(MKDIR_P) crypto/md5 @$(CHECK) .PHONY: crypto/md5/check @@ -4856,7 +4839,6 @@ crypto/rand.lo: $(go_crypto_rand_files) $(BUILDPACKAGE) crypto/rand/check: $(CHECK_DEPS) - @$(MKDIR_P) crypto/rand @$(CHECK) .PHONY: crypto/rand/check @@ -4866,7 +4848,6 @@ crypto/rc4.lo: $(go_crypto_rc4_files) $(BUILDPACKAGE) crypto/rc4/check: $(CHECK_DEPS) - @$(MKDIR_P) crypto/rc4 @$(CHECK) .PHONY: crypto/rc4/check @@ -4876,7 +4857,6 @@ crypto/rsa.lo: $(go_crypto_rsa_files) $(BUILDPACKAGE) crypto/rsa/check: $(CHECK_DEPS) - @$(MKDIR_P) crypto/rsa @$(CHECK) .PHONY: crypto/rsa/check @@ -4886,7 +4866,6 @@ crypto/sha1.lo: $(go_crypto_sha1_files) $(BUILDPACKAGE) crypto/sha1/check: $(CHECK_DEPS) - @$(MKDIR_P) crypto/sha1 @$(CHECK) .PHONY: crypto/sha1/check @@ -4896,7 +4875,6 @@ crypto/sha256.lo: $(go_crypto_sha256_files) $(BUILDPACKAGE) crypto/sha256/check: $(CHECK_DEPS) - @$(MKDIR_P) crypto/sha256 @$(CHECK) .PHONY: crypto/sha256/check @@ -4906,7 +4884,6 @@ crypto/sha512.lo: $(go_crypto_sha512_files) $(BUILDPACKAGE) crypto/sha512/check: $(CHECK_DEPS) - @$(MKDIR_P) crypto/sha512 @$(CHECK) .PHONY: crypto/sha512/check @@ -4916,7 +4893,6 @@ crypto/subtle.lo: $(go_crypto_subtle_files) $(BUILDPACKAGE) crypto/subtle/check: $(CHECK_DEPS) - @$(MKDIR_P) crypto/subtle @$(CHECK) .PHONY: crypto/subtle/check @@ -4926,7 +4902,6 @@ crypto/tls.lo: $(go_crypto_tls_files) $(BUILDPACKAGE) crypto/tls/check: $(CHECK_DEPS) - @$(MKDIR_P) crypto/tls @$(CHECK) .PHONY: crypto/tls/check @@ -4936,7 +4911,6 @@ crypto/x509.lo: $(go_crypto_x509_files) $(BUILDPACKAGE) crypto/x509/check: $(CHECK_DEPS) - @$(MKDIR_P) crypto/x509 @$(CHECK) .PHONY: crypto/x509/check @@ -4946,7 +4920,6 @@ crypto/x509/pkix.lo: $(go_crypto_x509_pkix_files) $(BUILDPACKAGE) crypto/x509/pkix/check: $(CHECK_DEPS) - @$(MKDIR_P) crypto/x509/pkix @$(CHECK) .PHONY: crypto/x509/pkix/check @@ -4956,7 +4929,6 @@ database/sql.lo: $(go_database_sql_files) $(BUILDPACKAGE) database/sql/check: $(CHECK_DEPS) - @$(MKDIR_P) database/sql @$(CHECK) .PHONY: database/sql/check @@ -4966,7 +4938,6 @@ database/sql/driver.lo: $(go_database_sql_driver_files) $(BUILDPACKAGE) database/sql/driver/check: $(CHECK_DEPS) - @$(MKDIR_P) database/sql/driver @$(CHECK) .PHONY: database/sql/driver/check @@ -4976,7 +4947,6 @@ debug/dwarf.lo: $(go_debug_dwarf_files) $(BUILDPACKAGE) debug/dwarf/check: $(CHECK_DEPS) - @$(MKDIR_P) debug/dwarf @$(CHECK) .PHONY: debug/dwarf/check @@ -4986,7 +4956,6 @@ debug/elf.lo: $(go_debug_elf_files) $(BUILDPACKAGE) debug/elf/check: $(CHECK_DEPS) - @$(MKDIR_P) debug/elf @$(CHECK) .PHONY: debug/elf/check @@ -4996,7 +4965,6 @@ debug/gosym.lo: $(go_debug_gosym_files) $(BUILDPACKAGE) debug/gosym/check: $(CHECK_DEPS) - @$(MKDIR_P) debug/gosym @$(CHECK) .PHONY: debug/gosym/check @@ -5006,7 +4974,6 @@ debug/macho.lo: $(go_debug_macho_files) $(BUILDPACKAGE) debug/macho/check: $(CHECK_DEPS) - @$(MKDIR_P) debug/macho @$(CHECK) .PHONY: debug/macho/check @@ -5016,7 +4983,6 @@ debug/pe.lo: $(go_debug_pe_files) $(BUILDPACKAGE) debug/pe/check: $(CHECK_DEPS) - @$(MKDIR_P) debug/pe @$(CHECK) .PHONY: debug/pe/check @@ -5026,7 +4992,6 @@ encoding/asn1.lo: $(go_encoding_asn1_files) $(BUILDPACKAGE) encoding/asn1/check: $(CHECK_DEPS) - @$(MKDIR_P) encoding/asn1 @$(CHECK) .PHONY: encoding/asn1/check @@ -5036,7 +5001,6 @@ encoding/ascii85.lo: $(go_encoding_ascii85_files) $(BUILDPACKAGE) encoding/ascii85/check: $(CHECK_DEPS) - @$(MKDIR_P) encoding/ascii85 @$(CHECK) .PHONY: encoding/ascii85/check @@ -5046,7 +5010,6 @@ encoding/base32.lo: $(go_encoding_base32_files) $(BUILDPACKAGE) encoding/base32/check: $(CHECK_DEPS) - @$(MKDIR_P) encoding/base32 @$(CHECK) .PHONY: encoding/base32/check @@ -5056,7 +5019,6 @@ encoding/base64.lo: $(go_encoding_base64_files) $(BUILDPACKAGE) encoding/base64/check: $(CHECK_DEPS) - @$(MKDIR_P) encoding/base64 @$(CHECK) .PHONY: encoding/base64/check @@ -5066,7 +5028,6 @@ encoding/binary.lo: $(go_encoding_binary_files) $(BUILDPACKAGE) encoding/binary/check: $(CHECK_DEPS) - @$(MKDIR_P) encoding/binary @$(CHECK) .PHONY: encoding/binary/check @@ -5076,7 +5037,6 @@ encoding/csv.lo: $(go_encoding_csv_files) $(BUILDPACKAGE) encoding/csv/check: $(CHECK_DEPS) - @$(MKDIR_P) encoding/csv @$(CHECK) .PHONY: encoding/csv/check @@ -5086,7 +5046,6 @@ encoding/gob.lo: $(go_encoding_gob_files) $(BUILDPACKAGE) encoding/gob/check: $(CHECK_DEPS) - @$(MKDIR_P) encoding/gob @$(CHECK) .PHONY: encoding/gob/check @@ -5096,7 +5055,6 @@ encoding/hex.lo: $(go_encoding_hex_files) $(BUILDPACKAGE) encoding/hex/check: $(CHECK_DEPS) - @$(MKDIR_P) encoding/hex @$(CHECK) .PHONY: encoding/hex/check @@ -5106,7 +5064,6 @@ encoding/json.lo: $(go_encoding_json_files) $(BUILDPACKAGE) encoding/json/check: $(CHECK_DEPS) - @$(MKDIR_P) encoding/json @$(CHECK) .PHONY: encoding/json/check @@ -5116,7 +5073,6 @@ encoding/pem.lo: $(go_encoding_pem_files) $(BUILDPACKAGE) encoding/pem/check: $(CHECK_DEPS) - @$(MKDIR_P) encoding/pem @$(CHECK) .PHONY: encoding/pem/check @@ -5126,7 +5082,6 @@ encoding/xml.lo: $(go_encoding_xml_files) $(BUILDPACKAGE) encoding/xml/check: $(CHECK_DEPS) - @$(MKDIR_P) encoding/xml @$(CHECK) .PHONY: encoding/xml/check @@ -5136,7 +5091,6 @@ exp/ebnf.lo: $(go_exp_ebnf_files) $(BUILDPACKAGE) exp/ebnf/check: $(CHECK_DEPS) - @$(MKDIR_P) exp/ebnf @$(CHECK) .PHONY: exp/ebnf/check @@ -5146,7 +5100,6 @@ exp/html.lo: $(go_exp_html_files) $(BUILDPACKAGE) exp/html/check: $(CHECK_DEPS) - @$(MKDIR_P) exp/html @$(CHECK) .PHONY: exp/html/check @@ -5156,7 +5109,6 @@ exp/norm.lo: $(go_exp_norm_files) $(BUILDPACKAGE) exp/norm/check: $(CHECK_DEPS) - @$(MKDIR_P) exp/norm @$(CHECK) .PHONY: exp/norm/check @@ -5166,7 +5118,6 @@ exp/proxy.lo: $(go_exp_proxy_files) $(BUILDPACKAGE) exp/proxy/check: $(CHECK_DEPS) - @$(MKDIR_P) exp/proxy @$(CHECK) .PHONY: exp/proxy/check @@ -5176,7 +5127,6 @@ exp/terminal.lo: $(go_exp_terminal_files) $(BUILDPACKAGE) exp/terminal/check: $(CHECK_DEPS) - @$(MKDIR_P) exp/terminal @$(CHECK) .PHONY: exp/terminal/check @@ -5186,7 +5136,6 @@ exp/types.lo: $(go_exp_types_files) $(BUILDPACKAGE) exp/types/check: $(CHECK_DEPS) - @$(MKDIR_P) exp/types @$(CHECK) .PHONY: exp/types/check @@ -5196,7 +5145,6 @@ exp/utf8string.lo: $(go_exp_utf8string_files) $(BUILDPACKAGE) exp/utf8string/check: $(CHECK_DEPS) - @$(MKDIR_P) exp/utf8string @$(CHECK) .PHONY: exp/utf8string/check @@ -5206,7 +5154,6 @@ exp/inotify.lo: $(go_exp_inotify_files) $(BUILDPACKAGE) exp/inotify/check: $(CHECK_DEPS) - @$(MKDIR_P) exp/inotify @$(CHECK) .PHONY: exp/inotify/check @@ -5216,7 +5163,6 @@ html/template.lo: $(go_html_template_files) $(BUILDPACKAGE) html/template/check: $(CHECK_DEPS) - @$(MKDIR_P) html/template @$(CHECK) .PHONY: html/template/check @@ -5226,7 +5172,6 @@ go/ast.lo: $(go_go_ast_files) $(BUILDPACKAGE) go/ast/check: $(CHECK_DEPS) - @$(MKDIR_P) go/ast @$(CHECK) .PHONY: go/ast/check @@ -5236,7 +5181,6 @@ go/build.lo: $(go_go_build_files) $(BUILDPACKAGE) go/build/check: $(CHECK_DEPS) - @$(MKDIR_P) go/build @$(CHECK) .PHONY: go/build/check @@ -5255,7 +5199,6 @@ go/doc.lo: $(go_go_doc_files) $(BUILDPACKAGE) go/doc/check: $(CHECK_DEPS) - @$(MKDIR_P) go/doc @$(CHECK) .PHONY: go/doc/check @@ -5265,7 +5208,6 @@ go/parser.lo: $(go_go_parser_files) $(BUILDPACKAGE) go/parser/check: $(CHECK_DEPS) - @$(MKDIR_P) go/parser @$(CHECK) .PHONY: go/parser/check @@ -5275,7 +5217,6 @@ go/printer.lo: $(go_go_printer_files) $(BUILDPACKAGE) go/printer/check: $(CHECK_DEPS) - @$(MKDIR_P) go/printer @$(CHECK) .PHONY: go/printer/check @@ -5285,7 +5226,6 @@ go/scanner.lo: $(go_go_scanner_files) $(BUILDPACKAGE) go/scanner/check: $(CHECK_DEPS) - @$(MKDIR_P) go/scanner @$(CHECK) .PHONY: go/scanner/check @@ -5295,7 +5235,6 @@ go/token.lo: $(go_go_token_files) $(BUILDPACKAGE) go/token/check: $(CHECK_DEPS) - @$(MKDIR_P) go/token @$(CHECK) .PHONY: go/token/check @@ -5305,7 +5244,6 @@ hash/adler32.lo: $(go_hash_adler32_files) $(BUILDPACKAGE) hash/adler32/check: $(CHECK_DEPS) - @$(MKDIR_P) hash/adler32 @$(CHECK) .PHONY: hash/adler32/check @@ -5315,7 +5253,6 @@ hash/crc32.lo: $(go_hash_crc32_files) $(BUILDPACKAGE) hash/crc32/check: $(CHECK_DEPS) - @$(MKDIR_P) hash/crc32 @$(CHECK) .PHONY: hash/crc32/check @@ -5325,7 +5262,6 @@ hash/crc64.lo: $(go_hash_crc64_files) $(BUILDPACKAGE) hash/crc64/check: $(CHECK_DEPS) - @$(MKDIR_P) hash/crc64 @$(CHECK) .PHONY: hash/crc64/check @@ -5335,7 +5271,6 @@ hash/fnv.lo: $(go_hash_fnv_files) $(BUILDPACKAGE) hash/fnv/check: $(CHECK_DEPS) - @$(MKDIR_P) hash/fnv @$(CHECK) .PHONY: hash/fnv/check @@ -5345,7 +5280,6 @@ image/color.lo: $(go_image_color_files) $(BUILDPACKAGE) image/color/check: $(CHECK_DEPS) - @$(MKDIR_P) image/color @$(CHECK) .PHONY: image/color/check @@ -5355,7 +5289,6 @@ image/draw.lo: $(go_image_draw_files) $(BUILDPACKAGE) image/draw/check: $(CHECK_DEPS) - @$(MKDIR_P) image/draw @$(CHECK) .PHONY: image/draw/check @@ -5365,7 +5298,6 @@ image/gif.lo: $(go_image_gif_files) $(BUILDPACKAGE) image/gif/check: $(CHECK_DEPS) - @$(MKDIR_P) image/gif @$(CHECK) .PHONY: image/gif/check @@ -5375,7 +5307,6 @@ image/jpeg.lo: $(go_image_jpeg_files) $(BUILDPACKAGE) image/jpeg/check: $(CHECK_DEPS) - @$(MKDIR_P) image/jpeg @$(CHECK) .PHONY: image/jpeg/check @@ -5385,7 +5316,6 @@ image/png.lo: $(go_image_png_files) $(BUILDPACKAGE) image/png/check: $(CHECK_DEPS) - @$(MKDIR_P) image/png @$(CHECK) .PHONY: image/png/check @@ -5395,7 +5325,6 @@ index/suffixarray.lo: $(go_index_suffixarray_files) $(BUILDPACKAGE) index/suffixarray/check: $(CHECK_DEPS) - @$(MKDIR_P) index/suffixarray @$(CHECK) .PHONY: index/suffixarray/check @@ -5405,7 +5334,6 @@ io/ioutil.lo: $(go_io_ioutil_files) $(BUILDPACKAGE) io/ioutil/check: $(CHECK_DEPS) - @$(MKDIR_P) io/ioutil @$(CHECK) .PHONY: io/ioutil/check @@ -5418,7 +5346,6 @@ @$(MKDIR_P) log/syslog $(LTCOMPILE) -c -o $@ $(srcdir)/go/log/syslog/syslog_c.c log/syslog/check: $(CHECK_DEPS) - @$(MKDIR_P) log/syslog @$(CHECK) .PHONY: log/syslog/check @@ -5428,7 +5355,6 @@ math/big.lo: $(go_math_big_files) $(BUILDPACKAGE) math/big/check: $(CHECK_DEPS) - @$(MKDIR_P) math/big @$(CHECK) .PHONY: math/big/check @@ -5438,7 +5364,6 @@ math/cmplx.lo: $(go_math_cmplx_files) $(BUILDPACKAGE) math/cmplx/check: $(CHECK_DEPS) - @$(MKDIR_P) math/cmplx @$(CHECK) .PHONY: math/cmplx/check @@ -5448,7 +5373,6 @@ math/rand.lo: $(go_math_rand_files) $(BUILDPACKAGE) math/rand/check: $(CHECK_DEPS) - @$(MKDIR_P) math/rand @$(CHECK) .PHONY: math/rand/check @@ -5458,7 +5382,6 @@ mime/multipart.lo: $(go_mime_multipart_files) $(BUILDPACKAGE) mime/multipart/check: $(CHECK_DEPS) - @$(MKDIR_P) mime/multipart @$(CHECK) .PHONY: mime/multipart/check @@ -5468,7 +5391,6 @@ net/http.lo: $(go_net_http_files) $(BUILDPACKAGE) net/http/check: $(CHECK_DEPS) - @$(MKDIR_P) net/http @$(CHECK) .PHONY: net/http/check @@ -5478,7 +5400,6 @@ net/mail.lo: $(go_net_mail_files) $(BUILDPACKAGE) net/mail/check: $(CHECK_DEPS) - @$(MKDIR_P) net/mail @$(CHECK) .PHONY: net/mail/check @@ -5488,7 +5409,6 @@ net/rpc.lo: $(go_net_rpc_files) $(BUILDPACKAGE) net/rpc/check: $(CHECK_DEPS) - @$(MKDIR_P) net/rpc @$(CHECK) .PHONY: net/rpc/check @@ -5498,7 +5418,6 @@ net/smtp.lo: $(go_net_smtp_files) $(BUILDPACKAGE) net/smtp/check: $(CHECK_DEPS) - @$(MKDIR_P) net/smtp @$(CHECK) .PHONY: net/smtp/check @@ -5508,7 +5427,6 @@ net/url.lo: $(go_net_url_files) $(BUILDPACKAGE) net/url/check: $(CHECK_DEPS) - @$(MKDIR_P) net/url @$(CHECK) .PHONY: net/url/check @@ -5518,7 +5436,6 @@ net/textproto.lo: $(go_net_textproto_files) $(BUILDPACKAGE) net/textproto/check: $(CHECK_DEPS) - @$(MKDIR_P) net/textproto @$(CHECK) .PHONY: net/textproto/check @@ -5528,7 +5445,6 @@ net/http/cgi.lo: $(go_net_http_cgi_files) $(BUILDPACKAGE) net/http/cgi/check: $(CHECK_DEPS) - @$(MKDIR_P) net/http/cgi @$(CHECK) .PHONY: net/http/cgi/check @@ -5538,7 +5454,6 @@ net/http/fcgi.lo: $(go_net_http_fcgi_files) $(BUILDPACKAGE) net/http/fcgi/check: $(CHECK_DEPS) - @$(MKDIR_P) net/http/fcgi @$(CHECK) .PHONY: net/http/fcgi/check @@ -5548,7 +5463,6 @@ net/http/httptest.lo: $(go_net_http_httptest_files) $(BUILDPACKAGE) net/http/httptest/check: $(check_deps) - @$(MKDIR_P) net/http/httptest @$(CHECK) .PHONY: net/http/httptest/check @@ -5558,7 +5472,6 @@ net/http/httputil.lo: $(go_net_http_httputil_files) $(BUILDPACKAGE) net/http/httputil/check: $(check_deps) - @$(MKDIR_P) net/http/httputil @$(CHECK) .PHONY: net/http/httputil/check @@ -5568,7 +5481,6 @@ net/http/pprof.lo: $(go_net_http_pprof_files) $(BUILDPACKAGE) net/http/pprof/check: $(CHECK_DEPS) - @$(MKDIR_P) net/http/pprof @$(CHECK) .PHONY: net/http/pprof/check @@ -5578,7 +5490,6 @@ net/rpc/jsonrpc.lo: $(go_net_rpc_jsonrpc_files) $(BUILDPACKAGE) net/rpc/jsonrpc/check: $(CHECK_DEPS) - @$(MKDIR_P) net/rpc/jsonrpc @$(CHECK) .PHONY: net/rpc/jsonrpc/check @@ -5588,7 +5499,6 @@ old/netchan.lo: $(go_old_netchan_files) $(BUILDPACKAGE) old/netchan/check: $(CHECK_DEPS) - @$(MKDIR_P) old/netchan @$(CHECK) .PHONY: old/netchan/check @@ -5598,7 +5508,6 @@ old/regexp.lo: $(go_old_regexp_files) $(BUILDPACKAGE) old/regexp/check: $(CHECK_DEPS) - @$(MKDIR_P) old/regexp @$(CHECK) .PHONY: old/regexp/check @@ -5608,7 +5517,6 @@ old/template.lo: $(go_old_template_files) $(BUILDPACKAGE) old/template/check: $(CHECK_DEPS) - @$(MKDIR_P) old/template @$(CHECK) .PHONY: old/template/check @@ -5618,7 +5526,6 @@ os/exec.lo: $(go_os_exec_files) $(BUILDPACKAGE) os/exec/check: $(CHECK_DEPS) - @$(MKDIR_P) os/exec @$(CHECK) .PHONY: os/exec/check @@ -5628,7 +5535,6 @@ os/signal.lo: $(go_os_signal_files) $(BUILDPACKAGE) os/signal/check: $(CHECK_DEPS) - @$(MKDIR_P) os/signal @$(CHECK) .PHONY: os/signal/check @@ -5638,7 +5544,6 @@ os/user.lo: $(go_os_user_files) $(BUILDPACKAGE) os/user/check: $(CHECK_DEPS) - @$(MKDIR_P) os/user @$(CHECK) .PHONY: os/user/check @@ -5648,7 +5553,6 @@ path/filepath.lo: $(go_path_filepath_files) $(BUILDPACKAGE) path/filepath/check: $(CHECK_DEPS) - @$(MKDIR_P) path/filepath @$(CHECK) .PHONY: path/filepath/check @@ -5658,7 +5562,6 @@ regexp/syntax.lo: $(go_regexp_syntax_files) $(BUILDPACKAGE) regexp/syntax/check: $(CHECK_DEPS) - @$(MKDIR_P) regexp/syntax @$(CHECK) .PHONY: regexp/syntax/check @@ -5668,7 +5571,6 @@ runtime/debug.lo: $(go_runtime_debug_files) $(BUILDPACKAGE) runtime/debug/check: $(CHECK_DEPS) - @$(MKDIR_P) runtime/debug @$(CHECK) .PHONY: runtime/debug/check @@ -5678,7 +5580,6 @@ runtime/pprof.lo: $(go_runtime_pprof_files) $(BUILDPACKAGE) runtime/pprof/check: $(CHECK_DEPS) - @$(MKDIR_P) runtime/pprof @$(CHECK) .PHONY: runtime/pprof/check @@ -5690,7 +5591,6 @@ sync/atomic_c.lo: $(go_sync_atomic_c_files) sync/atomic.lo $(LTCOMPILE) -c -o $@ $(srcdir)/go/sync/atomic/atomic.c sync/atomic/check: $(CHECK_DEPS) - @$(MKDIR_P) sync/atomic @$(CHECK) .PHONY: sync/atomic/check @@ -5700,7 +5600,6 @@ text/scanner.lo: $(go_text_scanner_files) $(BUILDPACKAGE) text/scanner/check: $(CHECK_DEPS) - @$(MKDIR_P) text/scanner @$(CHECK) .PHONY: text/scanner/check @@ -5710,7 +5609,6 @@ text/tabwriter.lo: $(go_text_tabwriter_files) $(BUILDPACKAGE) text/tabwriter/check: $(CHECK_DEPS) - @$(MKDIR_P) text/tabwriter @$(CHECK) .PHONY: text/tabwriter/check @@ -5729,7 +5627,6 @@ text/template/parse.lo: $(go_text_template_parse_files) $(BUILDPACKAGE) text/template/parse/check: $(CHECK_DEPS) - @$(MKDIR_P) text/template/parse @$(CHECK) .PHONY: text/template/parse/check @@ -5739,7 +5636,6 @@ testing/iotest.lo: $(go_testing_iotest_files) $(BUILDPACKAGE) testing/iotest/check: $(CHECK_DEPS) - @$(MKDIR_P) testing/iotest @$(CHECK) .PHONY: testing/iotest/check @@ -5749,7 +5645,6 @@ testing/quick.lo: $(go_testing_quick_files) $(BUILDPACKAGE) testing/quick/check: $(CHECK_DEPS) - @$(MKDIR_P) testing/quick @$(CHECK) .PHONY: testing/quick/check @@ -5759,7 +5654,6 @@ unicode/utf16.lo: $(go_unicode_utf16_files) $(BUILDPACKAGE) unicode/utf16/check: $(CHECK_DEPS) - @$(MKDIR_P) unicode/utf16 @$(CHECK) .PHONY: unicode/utf16/check @@ -5769,7 +5663,6 @@ unicode/utf8.lo: $(go_unicode_utf8_files) $(BUILDPACKAGE) unicode/utf8/check: $(CHECK_DEPS) - @$(MKDIR_P) unicode/utf8 @$(CHECK) .PHONY: unicode/utf8/check Index: libgo/runtime/go-traceback.c =================================================================== --- libgo/runtime/go-traceback.c (.../tags/gcc_4_7_1_release) (wersja 188635) +++ libgo/runtime/go-traceback.c (.../branches/gcc-4_7-branch) (wersja 188635) @@ -35,8 +35,8 @@ if (__go_file_line (pcbuf[i], &fn, &file, &line) && runtime_showframe (fn.__data)) { - runtime_printf ("%s\n", fn.__data); - runtime_printf ("\t%s:%d\n", file.__data, line); + runtime_printf ("%S\n", fn); + runtime_printf ("\t%S:%d\n", file, line); } } } Index: libgo/go/os/dir.go =================================================================== --- libgo/go/os/dir.go (.../tags/gcc_4_7_1_release) (wersja 188635) +++ libgo/go/os/dir.go (.../branches/gcc-4_7-branch) (wersja 188635) @@ -42,7 +42,11 @@ if file.dirinfo == nil { file.dirinfo = new(dirInfo) file.dirinfo.buf = make([]byte, elen) - file.dirinfo.dir = libc_opendir(syscall.StringBytePtr(file.name)) + p := syscall.StringBytePtr(file.name) + syscall.Entersyscall() + r := libc_opendir(p) + syscall.Exitsyscall() + file.dirinfo.dir = r } entry_dirent := unsafe.Pointer(&file.dirinfo.buf[0]).(*syscall.Dirent) @@ -62,7 +66,10 @@ for n != 0 { var result *syscall.Dirent - i := libc_readdir_r(dir, entry_dirent, &result) + pr := &result + syscall.Entersyscall() + i := libc_readdir_r(dir, entry_dirent, pr) + syscall.Exitsyscall() if i != 0 { return names, NewSyscallError("readdir_r", i) } Index: libgo/go/os/user/lookup_unix.go =================================================================== --- libgo/go/os/user/lookup_unix.go (.../tags/gcc_4_7_1_release) (wersja 188635) +++ libgo/go/os/user/lookup_unix.go (.../branches/gcc-4_7-branch) (wersja 188635) @@ -73,11 +73,14 @@ const bufSize = 1024 buf := make([]byte, bufSize) if lookupByName { - rv := libc_getpwnam_r(syscall.StringBytePtr(username), + p := syscall.StringBytePtr(username) + syscall.Entersyscall() + rv := libc_getpwnam_r(p, &pwd, &buf[0], bufSize, &result) + syscall.Exitsyscall() if rv != 0 { return nil, fmt.Errorf("user: lookup username %s: %s", username, syscall.GetErrno()) } @@ -85,11 +88,13 @@ return nil, UnknownUserError(username) } } else { + syscall.Entersyscall() rv := libc_getpwuid_r(syscall.Uid_t(uid), &pwd, &buf[0], bufSize, &result) + syscall.Exitsyscall() if rv != 0 { return nil, fmt.Errorf("user: lookup userid %d: %s", uid, syscall.GetErrno()) } Index: libgo/go/encoding/xml/marshal_test.go =================================================================== --- libgo/go/encoding/xml/marshal_test.go (.../tags/gcc_4_7_1_release) (wersja 188635) +++ libgo/go/encoding/xml/marshal_test.go (.../branches/gcc-4_7-branch) (wersja 188635) @@ -726,7 +726,7 @@ }, { Value: map[*Ship]bool{nil: false}, - Err: "xml: unsupported type: map[*encoding/xml.Ship]bool", + Err: "xml: unsupported type: map[*xml.Ship]bool", Kind: reflect.Map, }, { Index: libgo/go/html/template/escape_test.go =================================================================== --- libgo/go/html/template/escape_test.go (.../tags/gcc_4_7_1_release) (wersja 188635) +++ libgo/go/html/template/escape_test.go (.../branches/gcc-4_7-branch) (wersja 188635) @@ -226,7 +226,7 @@ { "badMarshaler", `