Eric Botcazou [Mon, 9 Jan 2012 09:50:42 +0000 (09:50 +0000)]
re PR ada/41929 (64-bit null_pointer_deref1 gnat.dg test consumes all available memory)
PR ada/41929
* config/sparc/sol2-unwind.h (sparc64_is_sighandler): Remove SAVPC and
add CFA. Revert back to old code for Solaris 8+ multi-threaded.
(sparc_is_sighandler): Likewise.
(MD_FALLBACK_FRAME_STATE_FOR): Adjust call to IS_SIGHANDLER.
re PR middle-end/48660 (ARM ICE in expand_expr_real_1)
gcc/
PR middle-end/48660
* expr.h (copy_blkmode_to_reg): Declare.
* expr.c (copy_blkmode_to_reg): New function.
(expand_assignment): Don't expand register RESULT_DECLs before
the lhs. Use copy_blkmode_to_reg to copy BLKmode values into a
RESULT_DECL register.
(expand_expr_real_1): Handle BLKmode decls when looking for promotion.
gcc/testsuite/
PR middle-end/48660
* g++.dg/pr48660.C: New test.
Eric Botcazou [Thu, 5 Jan 2012 22:24:45 +0000 (22:24 +0000)]
re PR tree-optimization/51315 (unaligned memory accesses generated with -ftree-sra)
PR tree-optimization/51315
* tree-sra.c (tree_non_aligned_mem_for_access_p): New predicate.
(build_accesses_from_assign): Use it instead of tree_non_aligned_mem_p.
Eric Botcazou [Wed, 4 Jan 2012 21:37:11 +0000 (21:37 +0000)]
re PR tree-optimization/51624 (Assert_Failure atree.adb:808 during stage 3)
PR tree-optimization/51624
* tree-sra.c (build_ref_for_model): When replicating a chain of
COMPONENT_REFs, stop as soon as the offset would become negative.
re PR tree-optimization/49651 (nested lambdas and -O3 produced incorrect integer variable increments)
2012-01-04 Richard Guenther <rguenther@suse.de>
PR tree-optimization/49651
* tree-ssa-structalias.c (type_can_have_subvars): New function.
(var_can_have_subvars): Use it.
(get_constraint_for_1): Only consider subfields if there
can be any.
re PR tree-optimization/51070 (ICE verify_gimple failed)
2012-01-03 Richard Guenther <rguenther@suse.de>
PR tree-optimization/51070
* tree-loop-distribution.c (generate_builtin): Do not replace
the loop with a builtin if the partition contains statements which
results are used outside of the loop.
(stmt_has_scalar_dependences_outside_loop): Properly handle calls.
* gcc.dg/torture/pr51070.c: New testcase.
* gcc.dg/torture/pr51070-2.c: Likewise.
Thomas Koenig [Sun, 1 Jan 2012 16:12:39 +0000 (16:12 +0000)]
backport: re PR fortran/51502 (Potentially wrong code generation due to wrong implict_pure check)
2012-01-01 Thomas König <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/51502
* expr.c (gfc_check_vardef_context): When determining
implicit pure status, also check for variable definition
context. Walk up namespaces until a procedure is
found to reset the implict pure attribute.
* resolve.c (gfc_implicit_pure): Walk up namespaces
until a procedure is found.
2012-01-01 Thomas König <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/51502
* lib/gcc-dg.exp (scan-module-absence): New function.
* gfortran.dg/implicit_pure_2.f90: New test.
Toon Moene [Thu, 22 Dec 2011 19:23:26 +0000 (19:23 +0000)]
re PR fortran/51310 (-finit-bla doesn't initialize *all* items of type bla to the requested constant.)
2011-12-22 Toon Moene <toon@moene.org>
PR fortran/51310
* resolve.c (build_default_init_expr): Allow non-allocatable,
non-compile-time-constant-shape arrays to have a default
initializer.
* invoke.texi: Delete the restriction on automatic arrays not
being initialized by -finit-<type>=<constant>.
Uros Bizjak [Wed, 21 Dec 2011 12:26:04 +0000 (13:26 +0100)]
backport: re PR lto/41159 ([LTO] ICE in insert_value_copy_on_edge, at tree-outof-ssa.c:225)
Backport from mainline
2011-12-21 Richard Guenther <rguenther@suse.de>
PR lto/41159
* tree-outof-ssa.c (insert_value_copy_on_edge): Use the
mode of the pseudo as destination mode. Only assert that
is equal to the promoted mode of the decl if it is a REG.
Martin Jambor [Mon, 19 Dec 2011 16:47:28 +0000 (17:47 +0100)]
re PR tree-optimization/51583 (One more missing force_gimple_operand in SRA)
2011-12-19 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/51583
* tree-sra.c (load_assign_lhs_subreplacements): Call
force_gimple_operand_gsi when necessary also in case of no
corresponding replacement on the RHS.
Jonathan Wakely [Mon, 19 Dec 2011 01:49:08 +0000 (01:49 +0000)]
backport: re PR libstdc++/51083 (TR1 [tr.c99.cmath.over] and C++11 [cmplx.over] overloads not constrained)
Backport from mainline
2011-11-13 Paolo Carlini <paolo.carlini@oracle.com>
* include/c_global/cmath (atan2, pow): Simplify constraining on the
return type.
Backport from mainline
2011-11-12 Jonathan Wakely <jwakely.gcc@gmail.com>
PR libstdc++/51083
* include/ext/type_traits.h (__promote): Only define __type member
for integral and floating point types, to prevent math functions
participating in overload resolution for other types.
(__promote_2, __promote_3, __promote_4): Use __promote in default
template argument values, so deduction only succeeds for integral and
floating point types.
* testsuite/26_numerics/cmath/51083.cc: New.
* testsuite/26_numerics/complex/51083.cc: New.
* testsuite/tr1/8_c_compatibility/cmath/51083.cc: New.
* testsuite/tr1/8_c_compatibility/complex/51083.cc: New.
Jonathan Wakely [Mon, 19 Dec 2011 00:34:29 +0000 (00:34 +0000)]
re PR libstdc++/50862 (deadlock in std::condition_variable_any)
PR libstdc++/50862
* include/std/condition_variable (condition_variable_any::wait): Fix
deadlock and ensure _Lock::lock() is called on exit.
* testsuite/30_threads/condition_variable_any/50862.cc: New.
Eric Botcazou [Fri, 16 Dec 2011 23:38:34 +0000 (23:38 +0000)]
sparc.md (UNSPEC_FRAME_BLOCKAGE): New constant.
* config/sparc/sparc.md (UNSPEC_FRAME_BLOCKAGE): New constant.
(frame_blockage): New expander.
(frame_blockage<P:mode>): New instruction.
* config/sparc/sparc.c (sparc_expand_prologue): When the sequence of
instructions establishing the frame isn't atomic, emit frame blockage.
Eric Botcazou [Tue, 13 Dec 2011 22:03:05 +0000 (22:03 +0000)]
lto-streamer-out.c (write_symbol): Use proper 64-bit host type.
* lto-streamer-out.c (write_symbol): Use proper 64-bit host type.
* lto-cgraph.c (input_cgraph_opt_section): Use 'int' for offsets.
* lto-streamer-in.c (lto_read_body): Likewise.
(lto_input_toplevel_asms): Likewise.
* lto-section-in.c (lto_create_simple_input_block): Likewise.
* lto-opts.c (lto_read_file_options): Likewise.
* ipa-prop.c (ipa_prop_read_section): Likewise.
* df.h (DF_NOTE): Fix typo in comment.
lto/
* lto.h (lto_parse_hex): Delete.
* lto.c (lto_read_decls): Use 'int' for offsets.
(lto_parse_hex): Make static and return proper 64-bit host type.
(lto_resolution_read): Use proper 64-bit host type.
Eric Botcazou [Mon, 12 Dec 2011 18:24:31 +0000 (18:24 +0000)]
re PR tree-optimization/50569 (unaligned memory accesses generated for memcpy)
PR tree-optimization/50569
* tree-sra.c (build_ref_for_model): Replicate a chain of COMPONENT_REFs
in the expression of MODEL instead of just the last one.
Tobias Burnus [Sun, 11 Dec 2011 21:37:55 +0000 (22:37 +0100)]
re PR fortran/50923 (No warning if function return value is not set)
2011-12-11 Tobias Burnus <burnus@net-b.de>
PR fortran/50923
* trans-decl.c (generate_local_decl): Set TREE_NO_WARNING only
if the front end has printed a warning.
(gfc_generate_function_code): Fix unset-result warning.
Teresa Johnson [Thu, 8 Dec 2011 15:44:14 +0000 (15:44 +0000)]
backport: i386.md (*movdi_internal_rex64): Use "!o" constraint instead of "!m" for operand 0, alternative 4.
Backport from mainline:
2011-08-05 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*movdi_internal_rex64): Use "!o" constraint
instead of "!m" for operand 0, alternative 4.
(*movdf_internal_rex64): Ditto for operand 0, alernative 6.
Jakub Jelinek [Thu, 8 Dec 2011 13:36:40 +0000 (14:36 +0100)]
backport: re PR middle-end/51323 (g++ confuses this with function argument in optimized call)
Backport from mainline
2011-12-05 Jakub Jelinek <jakub@redhat.com>
Eric Botcazou <ebotcazou@adacore.com>
PR middle-end/51323
PR middle-end/50074
* calls.c (internal_arg_pointer_exp_state): New variable.
(internal_arg_pointer_based_exp_1,
internal_arg_pointer_exp_scan): New functions.
(internal_arg_pointer_based_exp): New function.
(mem_overlaps_already_clobbered_arg_p): Use it.
(expand_call): Free internal_arg_pointer_exp_state.cache vector
and clear internal_arg_pointer_exp_state.scan_start.
Jakub Jelinek [Thu, 8 Dec 2011 13:33:58 +0000 (14:33 +0100)]
backport: re PR rtl-optimization/48721 (ICE: verify_flow_info failed: missing barrier after block 6 with -foptimize-sibling-calls -fsched2-use-superblocks)
Backport from mainline
2011-11-30 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/48721
* sched-deps.c (sched_analyze_insn): For SIBLING_CALL_P set
reg_pending_barrier to TRUE_BARRIER.
Eric Botcazou [Thu, 8 Dec 2011 09:12:12 +0000 (09:12 +0000)]
re PR tree-optimization/51315 (unaligned memory accesses generated with -ftree-sra)
PR tree-optimization/51315
* tree-sra.c (tree_non_mode_aligned_mem_p): Rename to...
(tree_non_aligned_mem_p): ...this. Add ALIGN parameter. Look into
MEM_REFs and use get_object_or_type_alignment for them.
(build_accesses_from_assign): Adjust for above change.
(access_precludes_ipa_sra_p): Likewise.
ada/
Backport from mainline
2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
the alignment if this doesn't prevent BLKmode access to the object.