2013-01-16 Richard Biener <rguenther@suse.de>
PR tree-optimization/54767
PR tree-optimization/53465
* tree-vrp.c (vrp_meet_1): Revert original fix for PR53465.
(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.
From-SVN: r195238
PR target/55301
* config/sh/sh.c (sh_expand_prologue): Postpone new_stack mem symbol.
(broken_move): Handle UNSPECV_SP_SWITCH_B.
* config/sh/sh.md (sp_switch_1): Use set (reg:SI SP_REG).
* config/sh/sh.md (UNSPECV_SP_SWITCH_B): New.
(UNSPECV_SP_SWITCH_E): New.
(sp_switch_1): Change to an unspec.
(sp_switch_2): Change to an unspec. Don't use post-inc when we
replace $r15.
* gcc.target/sh/sh-switch.c: New testcase.
From-SVN: r195230
PR rtl-optimization/55547
PR rtl-optimization/53827
PR debug/53671
PR debug/49888
* alias.c (memrefs_conflict_p): Set sizes to negative after
AND adjustments.
From-SVN: r195227
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.
* gcc.dg/pr55940.c: New test.
From-SVN: r195220
2013-01-15 Tom de Vries <tom@codesourcery.com>
PR target/55876
* optabs.c (widen_operand): Use gen_lowpart instead of gen_rtx_SUBREG.
Update comment.
From-SVN: r195212
2013-01-15 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/55920
* tree-sra.c (analyze_access_subtree): Do not mark non-removable
accesses as grp_to_be_debug_replaced.
From-SVN: r195210
PR tree-optimization/55920
* tree-sra.c (sra_modify_assign): If for lacc->grp_to_be_debug_replaced
there is non-useless type conversion needed from debug rhs to lhs,
use build_debug_ref_for_model and/or VIEW_CONVERT_EXPR.
* gcc.c-torture/compile/pr55920.c: New test.
From-SVN: r195209
2013-01-15 Richard Biener <rguenther@suse.de>
PR other/55973
* configure: Re-generate.
config/
* isl.m4 (ISL_INIT_FLAGS): Warn about disabled version check
for in-tree build.
(ISL_CHECK_VERSION): Do not use AC_CACHE_CHECK.
* cloog.m4 (CLOOG_INIT_FLAGS): Disable version check for
in-tree build and warn about that.
(CLOOG_CHECK_VERSION): Do not use AC_CACHE_CHECK.
From-SVN: r195195
PR tree-optimization/55955
* tree-vect-loop.c (vectorizable_reduction): Give up early on
*SHIFT_EXPR and *ROTATE_EXPR codes.
* gcc.c-torture/compile/pr55955.c: New test.
From-SVN: r195190
Consider the example of the problem report
1 template <typename>
2 constexpr bool the_truth () { return true; }
3
4 template <bool>
5 struct Takes_bool { };
6
7 template<bool B>
8 using Alias = Takes_bool<B>;
9
10 template<typename T>
11 struct test { using type = Alias<the_truth<T>()>; };
12
13 int main () {
14 test<int> a;
15
16 return 0;
17 }
that yields the error:
test.cc: In substitution of ‘template<bool B> using Alias = Takes_bool<B> [with bool B = the_truth<int>()]’:
test.cc:11:51: required from ‘struct test<int>’
test.cc:14:13: required from here
test.cc:11:51: error: integral expression ‘the_truth<int>()’ is not constant
struct test { using type = Alias<the_truth<T>()>; };
I think the issue happens in the course of instantiating test<int> at
line 14, when we look into instantiating Alias<the_truth<T>()> (at
line 11) (using instantiate_alias_template) with T = int.
There, when we check the argument 'the_truth<int>()' to see if it
actually is a constant expression, in check_instantiated_arg, we fail
to recognize it constexpr-ness b/c we just look at its TREE_CONSTANT.
At that point, the_truth<int> should have been folded, and it's not,
because instantiate_alias_template forgets to call
coerce_template_parms on its arguments.
Fixed thus, bootstapped and tested on x86_64-unknown-linux-gnu against
trunk.
gcc/cp/
PR c++/55663
* pt.c (coerce_innermost_template_parms): New static function.
(instantiate_alias_template): Use it here.
gcc/testsuite/
PR c++/55663
* g++.dg/cpp0x/alias-decl-31.C: New test.
From-SVN: r195189
2013-01-15 Paul Thomas <pault@gcc.gnu.org>
PR fortran/54286
* expr.c (gfc_check_pointer_assign): Check for presence of
's2' before using it.
2013-01-15 Paul Thomas <pault@gcc.gnu.org>
PR fortran/54286
* gfortran.dg/proc_ptr_result_8.f90 : Add module 'm' to check
case where interface is null.
From-SVN: r195185
2013-01-14 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/55806
* frontend-passes.c (optimize_reduction): New function,
including prototype.
(callback_reduction): Likewise.
(gfc_run_passes): Also run optimize_reduction.
(copy_walk_reduction_arg): New function.
(dummy_code_callback): New function.
2013-01-14 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/55806
* gfortran.dg/array_constructor_40.f90: New test.
From-SVN: r195179
PR target/55974
* config/avr/avr-c.c (avr_cpu_cpp_builtins): Define __FLASH
etc. to 1 and not to __flash.
Use LL suffix for __INT24_MAX__ with -mint8.
Use ULL suffix for __UINT24_MAX__ with -mint8.
From-SVN: r195169