Tobias Burnus [Sun, 17 Feb 2013 22:59:52 +0000 (23:59 +0100)]
backport: re PR fortran/53537 (Explicit IMPORT of renamed USE-associated symbol fails)
2013-02-17 Tobias Burnus <burnus@net-b.de>
Mikael Morin <mikael@gcc.gnu.org>
Backport from trunk
2013-01-28 Tobias Burnus <burnus@net-b.de>
Mikael Morin <mikael@gcc.gnu.org>
PR fortran/53537
* symbol.c (gfc_find_sym_tree): Don't look for the symbol outside an
interface block.
(gfc_get_ha_symtree): Let gfc_find_sym_tree lookup the parent namespace.
* decl.c (gfc_match_data_decl): Ditto.
(variable_decl): Remove undeclared type error.
(gfc_match_import): Use renamed instead of original name.
2013-02-17 Tobias Burnus <burnus@net-b.de>
Mikael Morin <mikael@gcc.gnu.org>
Backport from trunk
2013-01-28 Tobias Burnus <burnus@net-b.de>
Mikael Morin <mikael@gcc.gnu.org>
PR target/52123
* adaint.c (__gnat_check_OWNER_ACL): Cast from pointer via
SECURITY_DESCRIPTOR *.
(__gnat_set_OWNER_ACL): Cast from DWORD to ACCESS_MODE.
(__gnat_portable_spawn): Fix cast to char* const*.
(add_handle): Cast from pointer via void **.
(add_handle): Cast from pointer via int *.
(__gnat_locate_exec_on_path): Cast from pointer via TCHAR *.
(__gnat_locate_exec_on_path): Cast from pointer via char *.
* initialize.c (append_arg): Cast from pointer via LPWSTR.
(__gnat_initialize): Cast from pointer via LPWSTR.
* seh_init.c (__gnat_SEH_error_handler): Cast from pointer via FARPROC.
* tracebak.c: Cast from pointer via FARPROC.
Uros Bizjak [Mon, 11 Feb 2013 17:27:30 +0000 (18:27 +0100)]
backport: re PR rtl-optimization/56275 (ICE in simplify_subreg, at simplify-rtx.c:5261 with vector code.)
Backport from mainline
2013-02-11 Uros Bizjak <ubizjak@gmail.com>
PR rtl-optimization/56275
* simplify-rtx.c (avoid_constant_pool_reference): Check that
offset is non-negative and less than cmode size before
calling simplify_subreg.
testsuite/ChangeLog:
Backport from mainline
2013-02-11 Uros Bizjak <ubizjak@gmail.com>
PR rtl-optimization/56275
* gcc.dg/pr56275.c: New test.
Uros Bizjak [Sat, 9 Feb 2013 06:58:54 +0000 (07:58 +0100)]
backport: sse.md (FMAMODEM): New mode iterator.
Backport from mainline
2013-02-08 Uros Bizjak <ubizjak@gmail.com>
* config/i386/sse.md (FMAMODEM): New mode iterator.
(fma<mode>4, fms<mode>4, fnma<mode>4, fnms<mode>4): Use FMAMODEM
mode iterator. Do not use TARGET_SSE_MATH in insn constraint.
2013-02-08 Uros Bizjak <ubizjak@gmail.com>
* config/i386/gnu-user.h (TARGET_CAN_SPLIT_STACK): Define only
when HAVE_GAS_CFI_PERSONALITY_DIRECTIVE is set.
* config/i386/gnu-user64.h (TARGET_CAN_SPLIT_STACK): Ditto.
David S. Miller [Thu, 7 Feb 2013 23:42:03 +0000 (23:42 +0000)]
Fix variable tracking for leaf functions on sparc.
* dwarf2out.c (based_loc_descr): Perform leaf register remapping
on 'reg'.
* var-tracking.c (vt_add_function_parameter): Test the presence of
HAVE_window_save properly and do not remap argument registers when
we have a leaf function.
Simon Wright [Thu, 7 Feb 2013 18:07:58 +0000 (18:07 +0000)]
re PR target/50678 (FAIL: c52104y on x86_64-apple-darwin10)
PR target/50678
* init.c (__darwin_major_version): New function for x86-64/Darwin.
(__gnat_adjust_context_for_raise) [Darwin]: Disable the workaround
on Darwin 12 and above.
Alan Modra [Tue, 5 Feb 2013 13:40:25 +0000 (00:10 +1030)]
re PR libgomp/51376 (libgomp taskwait failure)
PR libgomp/51376
PR libgomp/56073
* task.c (GOMP_task): Revert 2011-12-09 change.
(GOMP_taskwait): Likewise. Instead use atomic load with acquire
barrier to read task->children..
(gomp_barrier_handle_tasks): ..and matching atomic store with
release barrier here when setting parent->children to NULL.
Richard Biener [Tue, 5 Feb 2013 12:56:51 +0000 (12:56 +0000)]
backport: re PR tree-optimization/55107 (GCC in an infinite loop in PRE)
2013-02-05 Richard Biener <rguenther@suse.de>
Backport from mainline
2012-12-10 Richard Biener <rguenther@suse.de>
PR tree-optimization/55107
* tree-ssa-pre.c (struct pre_stats): Remove constified field.
(bitmap_set_replace_value): Add gcc_unreachable.
(do_regular_insertion): Re-write all_same handling. Insert
an assignment instead of a PHI in this case.
(execute_pre): Do not record constified events.
* gcc.dg/torture/pr55107.c: New testcase.
* gcc.dg/tree-ssa/ssa-pre-5.c: Adjust.
Richard Biener [Tue, 5 Feb 2013 12:54:12 +0000 (12:54 +0000)]
re PR tree-optimization/54767 (Incorrect code generated with "-O2 -fcheck=bounds")
2013-02-05 Richard Biener <rguenther@suse.de>
PR tree-optimization/54767
* tree-vrp.c (vrp_visit_phi_node): For PHI arguments coming via
backedges drop all symbolical range information.
(execute_vrp): Compute backedges.
* gfortran.fortran-torture/execute/pr54767.f90: New testcase.
PR lto/55660
* tree-streamer.c (record_common_node): Check that we are not
recursively pre-loading nodes we want to skip. Handle
char_type_node appearing as part of va_list_type_node.
* gcc.dg/lto/pr55660_0.c: New testcase.
* gcc.dg/lto/pr55660_1.c: Likewise.
2013-02-04 Richard Biener <rguenther@suse.de>
PR middle-end/55890
* gimple.h (gimple_call_builtin_class_p): New function.
* gimple.c (validate_call): New function.
(gimple_call_builtin_class_p): Likewise.
* tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
Use gimple_call_builtin_class_p.
(find_func_clobbers): Likewise.
* tree-ssa-strlen.c (adjust_last_stmt): Likewise.
(strlen_optimize_stmt): Likewise.
* gcc.dg/torture/pr55890-1.c: New testcase.
* gcc.dg/torture/pr55890-2.c: Likewise.
Thomas Koenig [Sat, 2 Feb 2013 22:38:14 +0000 (22:38 +0000)]
backport: re PR fortran/50627 (Error recovery: ICE in gfc_free_namespace after diagnosing missing end of construct)
2013-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/50627
PR fortran/56054
* decl.c (gfc_match_end): Remove half-ready namespace
from parent if the end of a block is missing.
* parse.c (parse_module): Do not put namespace into
gsymbol on error.
2013-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/50627
PR fortran/56054
* gfortran.dg/block_12.f90: New test.
* gfortran.dg/module_error_1.f90: New test.
Jakub Jelinek [Fri, 1 Feb 2013 14:17:50 +0000 (15:17 +0100)]
backport: re PR tree-optimization/56125 (-O2 -ffast-math generates bad code when dividing a double by the square of another double.)
Backported from mainline
2013-01-28 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/56125
* tree-ssa-math-opts.c (gimple_expand_builtin_pow): Don't optimize
pow(x,c) into sqrt(x) * powi(x, n/2) or
1.0 / (sqrt(x) * powi(x, abs(n/2))) if c is an integer or when
optimizing for size.
Don't optimize pow(x,c) into powi(x, n/3) * powi(cbrt(x), n%3) or
1.0 / (powi(x, abs(n)/3) * powi(cbrt(x), abs(n)%3)) if 2c is an
integer.
Jakub Jelinek [Fri, 1 Feb 2013 14:16:20 +0000 (15:16 +0100)]
backport: re PR middle-end/56098 (conditional write through volatile pointer produces unintended read)
Backported from mainline
2013-01-25 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/56098
* tree-ssa-phiopt.c (nt_init_block): Don't call add_or_mark_expr
for stmts with volatile ops.
(cond_store_replacement): Don't optimize if assign has volatile ops.
(cond_if_else_store_replacement_1): Don't optimize if either
then_assign or else_assign have volatile ops.
Jakub Jelinek [Fri, 1 Feb 2013 14:15:21 +0000 (15:15 +0100)]
backport: re PR fortran/56052 ([OOP] ICE in omp_add_variable, at gimplify.c:5606)
Backported from mainline
2013-01-23 Jakub Jelinek <jakub@redhat.com>
PR fortran/56052
* trans-decl.c (gfc_get_symbol_decl): Set DECL_ARTIFICIAL
and DECL_IGNORED_P on select_type_temporary and don't set
DECL_BY_REFERENCE.
Jakub Jelinek [Fri, 1 Feb 2013 14:14:11 +0000 (15:14 +0100)]
backport: re PR target/49069 (ICE in gen_cstoredi4, at config/arm/arm.md:7554)
Backported from mainline
2013-01-23 Jakub Jelinek <jakub@redhat.com>
PR target/49069
* config/arm/arm.md (cbranchdi4, cstoredi4): Use s_register_operand
instead of cmpdi_operand for first comparison operand.
Don't assert that comparison operands aren't both constants.
Jakub Jelinek [Fri, 1 Feb 2013 14:11:46 +0000 (15:11 +0100)]
backport: re PR tree-optimization/56051 (Wrong expression evaluation)
Backported from mainline
2013-01-21 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/56051
* fold-const.c (fold_binary_loc): Don't fold
X < (cast) (1 << Y) into (X >> Y) != 0 if cast is either
a narrowing conversion, or widening conversion from signed
to unsigned.
Jakub Jelinek [Fri, 1 Feb 2013 14:09:38 +0000 (15:09 +0100)]
backport: re PR target/55940 (Incorrect code for accessing parameters with 32-bit Intel hosts)
Backported from mainline
2013-01-15 Jakub Jelinek <jakub@redhat.com>
PR target/55940
* function.c (thread_prologue_and_epilogue_insns): Always
add crtl->drap_reg to set_up_by_prologue.set, even if
stack_realign_drap is false.
Jakub Jelinek [Fri, 1 Feb 2013 14:03:44 +0000 (15:03 +0100)]
backport: re PR c++/55542 (g++ segmentation fault)
Backported from mainline
2012-12-01 Jakub Jelinek <jakub@redhat.com>
PR c++/55542
* pt.c (make_ith_pack_parameter_name): Return NULL if
name is NULL.
(tsubst_decl): Call make_ith_pack_parameter_name even if
DECL_NAME is NULL.
Jakub Jelinek [Fri, 1 Feb 2013 14:00:12 +0000 (15:00 +0100)]
backport: re PR debug/55094 (ICE in maybe_record_trace_start, at dwarf2cfi.c:2224)
Backported from mainline
2012-11-20 Jakub Jelinek <jakub@redhat.com>
PR middle-end/55094
* builtins.c (expand_builtin_trap): Add REG_ARGS_SIZE note
on the trap insn for !ACCUMULATE_OUTGOING_ARGS.
* cfgcleanup.c (outgoing_edges_match): Don't look at debug insns
on the first old_insns_match_p call. For !ACCUMULATE_OUTGOING_ARGS
fail if the last real insn doesn't have REG_ARGS_SIZE note.
Jakub Jelinek [Fri, 1 Feb 2013 13:57:46 +0000 (14:57 +0100)]
backport: re PR rtl-optimization/54127 (ICE in maybe_record_trace_start with asm goto, --target=powerpc-unknown-linux-gnu)
Backported from mainline
2012-11-13 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/54127
* cfgrtl.c (force_nonfallthru_and_redirect): When redirecting
asm goto labels from BB_HEAD (e->dest) to target bb, decrement
LABEL_NUSES of BB_HEAD (e->dest) and increment LABEL_NUSES of
BB_HEAD (target) appropriately and adjust JUMP_LABEL and/or
REG_LABEL_TARGET and REG_LABEL_OPERAND.
Kai Tietz [Thu, 31 Jan 2013 08:14:27 +0000 (09:14 +0100)]
backport: re PR other/53285 (libibiberty's md5.c builds with warnings with 4.7 and trunk)
Merged from trunk.
PR other/53285
* md5.c (md5_finish_ctx): Declare swap_bytes. Assign SWAP() output
to swap_bytes, and then call memcpy to move it to ctx->buffer.
Richard Biener [Tue, 29 Jan 2013 14:23:48 +0000 (14:23 +0000)]
re PR c/56113 (out of memory when compiling a function with many goto labels (50k > ))
2013-01-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/56113
* tree-ssa-structalias.c (equiv_class_lookup): Also return
the bitmap leader.
(label_visit): Free duplicate bitmaps and record the leader instead.
(perform_var_substitution): Adjust.
Serowk [Mon, 28 Jan 2013 15:07:41 +0000 (15:07 +0000)]
re PR target/35294 (iwmmxt intrinsics, internal compiler error)
PR target/35294
* config/arm/arm.c (arm_expand_binop_builtin): Add new parameter.
Fix mode checks to allow for the passing of constants in the
second parameter.
(arm_expand_builtin): Adjust calls to arm_expand_binop_builtin.
Add entries in the switch statement for builtin iwmmxt vector
shift and rotate builtins.
* config/i386/constraints.md (Yf): New constraint.
* config/i386/i386.md (*movdf_internal_rex64): Use Yf*f instead
of f constraint to conditionaly disable x87 register preferences.
(*movdf_internal): Ditto.
(*movsf_internal): Ditto.
2012-01-24 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*movti_internal_rex64): Add (o,e) alternative.
(*movtf_internal_rex64): Add (!o,C) alternative
(*movxf_internal_rex64): Ditto.
(*movdf_internal_rex64): Add (?r,C) and (?m,C) alternatives.
testsuite/ChangeLog:
Backport from mainline
2013-01-22 Uros Bizjak <ubizjak@gmail.com>
PR target/56028
* gcc.target/i386/pr56028.c: New test.