Georg-Johann Lay [Thu, 12 Jan 2012 17:23:32 +0000 (17:23 +0000)]
backport: re PR target/51756 (wrong warning: uninitialized variable put into program memory area)
Backport from mainline r183129
PR target/51756
* config/avr/avr.c (avr_encode_section_info): Test for absence of
DECL_EXTERNAL when checking for initializers of progmem variables.
Joseph Myers [Tue, 10 Jan 2012 16:55:40 +0000 (16:55 +0000)]
Revert:
2008-09-18 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR rtl-opt/37451
* loop-doloop.c (doloop_modify): New argument zero_extend_p and
zero extend count after the correction to it is done.
(doloop_optimize): Update call to doloop_modify, don't zero extend
count before call.
2008-11-03 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR rtl-opt/37782
* loop-doloop.c (doloop_modify): Add from_mode argument that says what
mode count is in.
(doloop_optimize): Update call to doloop_modify.
testsuite:
* gcc.c-torture/execute/doloop-1.c,
gcc.c-torture/execute/doloop-2.c: New tests.
Eric Botcazou [Mon, 9 Jan 2012 18:21:52 +0000 (18:21 +0000)]
sol2-unwind.h (sparc64_is_sighandler): Check that the purported sigacthandler address isn't null before dereferencing it.
* config/sparc/sol2-unwind.h (sparc64_is_sighandler): Check that the
purported sigacthandler address isn't null before dereferencing it.
(sparc_is_sighandler): Likewise.
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.