Joseph Myers [Sat, 15 Sep 2012 00:29:28 +0000 (01:29 +0100)]
re PR c/54552 (Cast to pointer to VLA crash the compiler)
PR c/54552
* c-typeck.c (c_cast_expr): When casting to a type requiring
C_MAYBE_CONST_EXPR to be created, pass the inner expression to
c_fully_fold first.
testsuite:
* gcc.c-torture/compile/pr54552-1.c: New test.
Joseph Myers [Sat, 15 Sep 2012 00:28:05 +0000 (01:28 +0100)]
re PR c/54103 (ICE at gimplify.c:7790 on current trunk)
PR c/54103
* c-typeck.c (build_unary_op): Pass original argument of
TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
any C_MAYBE_CONST_EXPR, if it has integer operands.
(build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
to c_objc_common_truthvalue_conversion, then remove any
C_MAYBE_CONST_EXPR, if they have integer operands. Use
c_objc_common_truthvalue_conversion not
c_common_truthvalue_conversion.
(c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
call note_integer_operands for arguments with integer operands
that are not integer constants.
re PR fortran/54556 (Marking implicitly pure variables as DECL_PURE_P leads to wrong code)
2012-09-13 Tobias Burnus <burnus@net-b.de>
PR fortran/54556
* resolve.c (resolve_formal_arglist): Allow VALUE arguments
with implicit_pure.
(gfc_impure_variable): Don't check gfc_pure such that the
function also works for gfc_implicit_pure procedures.
Bin Cheng [Wed, 5 Sep 2012 10:54:08 +0000 (10:54 +0000)]
backport: re PR target/45070 (Miscompiled c++ class with packed attribute on ARM with -Os optimizations (Qt 4.6.2))
Backport from 2012-09-04 mainline r190919
PR target/45070
* config/arm/arm.c (thumb1_extra_regs_pushed): Handle return value of
size less than 4 bytes by using macro ARM_NUM_INTS.
(thumb1_unexpanded_epilogue): Use macro ARM_NUM_INTS.
Ulrich Weigand [Fri, 10 Aug 2012 13:26:44 +0000 (13:26 +0000)]
backport: re PR testsuite/49443 (gcc.dg/vect/vect-peel-3.c and vect-peel-4.c fail on IA64 after testsuite change)
ChangeLog:
Backport from mainline
2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
Richard Earnshaw <rearnsha@arm.com>
* target.def (vector_alignment): New target hook.
* doc/tm.texi.in (TARGET_VECTOR_ALIGNMENT): Document new hook.
* doc/tm.texi: Regenerate.
* targhooks.c (default_vector_alignment): New function.
* targhooks.h (default_vector_alignment): Add prototype.
* stor-layout.c (layout_type): Use targetm.vector_alignment.
* config/arm/arm.c (arm_vector_alignment): New function.
(TARGET_VECTOR_ALIGNMENT): Define.
* tree-vect-data-refs.c (vect_update_misalignment_for_peel): Use
vector type alignment instead of size.
* tree-vect-loop-manip.c (vect_do_peeling_for_loop_bound): Use
element type size directly instead of computing it from alignment.
Fix variable naming and comment.
testsuite/ChangeLog:
Backport from mainline
2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
* lib/target-supports.exp
(check_effective_target_vect_natural_alignment): New function.
* gcc.dg/align-2.c: Only run on targets with natural alignment
of vector types.
* gcc.dg/vect/slp-25.c: Adjust tests for targets without natural
alignment of vector types.
2011-12-21 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
* gcc.dg/vect/vect-peel-1.c: Adjust test diag-scans to fix fail on AVX.
* gcc.dg/vect/vect-peel-2.c: Ditto.
2011-06-21 Ira Rosen <ira.rosen@linaro.org>
PR testsuite/49443
* gcc.dg/vect/vect-peel-3.c: Expect to fail on vect_no_align
targets.
* gcc.dg/vect/vect-peel-4.c: Likewise.
Uros Bizjak [Thu, 9 Aug 2012 21:49:40 +0000 (23:49 +0200)]
backport: alpha.c (alpha_pad_noreturn): Rename to ...
Backport from mainline
2012-08-09 Uros Bizjak <ubizjak@gmail.com>
* config/alpha/alpha.c (alpha_pad_noreturn): Rename to ...
(alpha_pad_function_end): ... this. Also insert NOP between
sibling call and GP load.
(alpha_reorg): Update call to alpha_pad_function_end. Expand comment.
re PR target/33135 ([SH] -ffinite-math-only should not be on by default)
PR target/33135
* config/sh/sh.opt (mieee): Use Var instead of Mask. Correct
description.
* config/sh/sh.c (sh_option_override): Do not change
flag_finite_math_only. Set TARGET_IEEE to complement of
flag_finite_math_only.
* doc/invoke.texi (SH options): Add mno-ieee. Correct
description of mieee and mno-ieee behavior.
Jonathan Wakely [Thu, 5 Jul 2012 01:10:10 +0000 (01:10 +0000)]
re PR libstdc++/53830 (condition_variable_any - deadlock issue)
PR libstdc++/53830
* include/std/condition_variable (condition_variable_any::wait):
Move _Unlock type to class scope.
(condition_variable_any::wait_until): Reuse it.
* testsuite/30_threads/condition_variable_any/53830.cc: New.