1. 13 Jan, 2015 29 commits
  2. 12 Jan, 2015 11 commits
    • * Add TARGET_ATOMIC_ASSIGN_EXPAND_FENV hook for sh. · 801881b0
      From-SVN: r219500
      Kaz Kojima committed
    • libgccjit: detect various kinds of errors relating to params and locals · f6f2b019
      gcc/jit/ChangeLog:
      	* jit-recording.c (class gcc::jit::rvalue_usage_validator): New.
      	(gcc::jit::rvalue_usage_validator::rvalue_usage_validator): New
      	ctor.
      	(gcc::jit::rvalue_usage_validator::visit): New function.
      	(gcc::jit::recording::rvalue::verify_valid_within_stmt): New
      	function.
      	(gcc::jit::recording::rvalue::set_scope): New function.
      	(gcc::jit::recording::function::function): Call set_scope on each
      	param, issuing errors for any params that already have a function.
      	(gcc::jit::recording::block::add_eval): Return the new statement;
      	update the comment given that some error-checking now happens after
      	this returns.
      	(gcc::jit::recording::block::add_assignment): Likewise.
      	(gcc::jit::recording::block::add_assignment_op): Likewise.
      	(gcc::jit::recording::block::add_comment): Likewise.
      	(gcc::jit::recording::block::end_with_conditional): Likewise.
      	(gcc::jit::recording::block::end_with_jump): Likewise.
      	(gcc::jit::recording::block::end_with_return): Likewise.
      	(gcc::jit::recording::block::validate): Add a comment.
      	(gcc::jit::recording::unary_op::visit_children): New function.
      	(gcc::jit::recording::binary_op::visit_children): New function.
      	(gcc::jit::recording::comparison::visit_children): New function.
      	(gcc::jit::recording::cast::visit_children): New function.
      	(gcc::jit::recording::call::visit_children): New function.
      	(gcc::jit::recording::call_through_ptr::visit_children): New function.
      	(gcc::jit::recording::array_access::visit_children): New function.
      	(gcc::jit::recording::access_field_of_lvalue::visit_children): New
      	function.
      	(gcc::jit::recording::access_field_rvalue::visit_children): New
      	function.
      	(gcc::jit::recording::dereference_field_rvalue::visit_children):
      	New function.
      	(gcc::jit::recording::dereference_rvalue::visit_children): New
      	function.
      	(gcc::jit::recording::get_address_of_lvalue::visit_children): New
      	function.
      	* jit-recording.h: Within namespace gcc::jit::recording...
      	(class rvalue_visitor): New.
      	(rvalue::rvalue): Initialize m_scope.
      	(rvalue::get_loc): New accessor.
      	(rvalue::verify_valid_within_stmt): New function.
      	(rvalue::visit_children): New pure virtual function.
      	(rvalue::set_scope): New function.
      	(rvalue::get_scope): New function.
      	(rvalue::dyn_cast_param): New function.
      	(rvalue::m_scope): New field.
      	(param::visit_children): New empty function.
      	(param::dyn_cast_param): New function.
      	(function::get_loc): New function.
      	(block::add_eval): Return the new statement.
      	(block::add_assignment): Likewise.
      	(block::add_assignment_op): Likewise.
      	(block::add_comment): Likewise.
      	(block::end_with_conditional): Likewise.
      	(block::end_with_jump): Likewise.
      	(block::end_with_return): Likewise.
      	(global::visit_children): New function.
      	(memento_of_new_rvalue_from_const<HOST_TYPE>::visit_children):
      	New function.
      	(memento_of_new_string_literal::visit_children): New function.
      	(unary_op::visit_children): New function.
      	(binary_op::visit_children): New function.
      	(comparison::visit_children): New function.
      	(cast::visit_children): New function.
      	(call::visit_children): New function.
      	(call_through_ptr::visit_children): New function.
      	(array_access::visit_children): New function.
      	(access_field_of_lvalue::visit_children): New function.
      	(access_field_rvalue::visit_children): New function.
      	(dereference_field_rvalue::visit_children): New function.
      	(dereference_rvalue::visit_children): New function.
      	(get_address_of_lvalue::visit_children): New function.
      	(local::local): Call set_scope.
      	(local::visit_children): New function.
      	(statement::get_block): Make public.
      	* libgccjit.c (RETURN_VAL_IF_FAIL_PRINTF5): New macro.
      	(RETURN_NULL_IF_FAIL_PRINTF5): New macro.
      	(gcc_jit_context_new_function): Verify that each param has
      	not yet been used for creating another function.
      	(gcc_jit_block_add_eval): After creating the stmt, verify
      	that the rvalue expression tree is valid to use within it.
      	(gcc_jit_block_add_assignment): Likewise for the lvalue and
      	rvalue expression trees.
      	(gcc_jit_block_add_assignment_op): Likewise.
      	(gcc_jit_block_end_with_conditional): Likewise for the boolval
      	expression tree.
      	(gcc_jit_block_end_with_return): Likewise for the rvalue
      	expression tree.
      	(gcc_jit_block_end_with_void_return): Remove return of "void",
      	now that block::end_with_return is now non-void.
      
      gcc/testsuite/ChangeLog:
      	* jit.dg/test-error-local-used-from-other-function.c: New test
      	case.
      	* jit.dg/test-error-param-reuse.c: New test case.
      	* jit.dg/test-error-param-sharing.c: New test case.
      	* jit.dg/test-error-param-used-from-other-function.c: New test
      	case.
      	* jit.dg/test-error-param-used-without-a-function.c: New test
      	case.
      
      From-SVN: r219498
      David Malcolm committed
    • invoke.texi ([-Wsuggest-attribute=]): Don't use parentheses after a funtion name… · 16ba6203
      invoke.texi ([-Wsuggest-attribute=]): Don't use parentheses after a funtion name just to indicate it is a function.
      
      2015-01-12  Sandra Loosemore  <sandra@codesourcery.com>
      
      	gcc/
      	* doc/invoke.texi ([-Wsuggest-attribute=]): Don't use parentheses
      	after a funtion name just to indicate it is a function.
      	([-fsanitize-undefined-trap-on-error]): Likewise.
      	([-fdbg-cnt=]): Likewise.
      	([-mmemcpy]): Likewise.
      	([-mflush-func]): Likewise.
      	([-msynci]): Likewise.
      
      From-SVN: r219497
      Sandra Loosemore committed
    • re PR libstdc++/64553 (Missing '# ifdef _GLIBCXX_USE_WCHAR_T' in src/c++11/cxx11-shim_facet.cc) · 1b9ad1d9
      	PR libstdc++/64553
      	* src/c++11/cxx11-shim_facets.cc: Check for wchar_t support.
      
      From-SVN: r219496
      Jonathan Wakely committed
    • re PR libstdc++/64560 (building libstdc++ with -fno-rtti fails in new cxx11-shim-facets.cc file) · 5e67acc9
      	PR libstdc++/64560
      	* src/c++11/cxx11-shim_facets.cc (locale::facet::_M_sso_shim): Check
      	for RTTI support.
      
      From-SVN: r219495
      Jonathan Wakely committed
    • invoke.texi ([-Wbad-function-cast]): Rewrite to avoid confusing example. · 3ae79bfd
      2015-01-12  Sandra Loosemore  <sandra@codesourcery.com>
      
      	gcc/
      	* doc/invoke.texi ([-Wbad-function-cast]): Rewrite to avoid confusing
      	example.
      
      From-SVN: r219494
      Sandra Loosemore committed
    • re PR tree-optimization/64563 (ICE with "-Wall -Wextra" at -Os and above on x86_64-linux-gnu) · 737fde1d
      	PR tree-optimization/64563
      	* tree-vrp.c (vrp_evaluate_conditional): Check for VR_RANGE
      	instead of != VR_VARYING.
      
      	* gcc.dg/pr64563.c: New test.
      
      From-SVN: r219493
      Jakub Jelinek committed
    • re PR target/64513 (ICE: in maybe_record_trace_start, at dwarf2cfi.c:2231 with -mstack-arg-probe) · 631b8d78
      	PR target/64513
      	* config/i386/i386.c (ix86_expand_prologue): Add
      	REG_FRAME_RELATED_EXPR to %rax and %r10 pushes.
      
      	* gcc.target/i386/pr64513.c: New test.
      
      From-SVN: r219492
      Jakub Jelinek committed
    • re PR tree-optimization/64454 (optimize (x%5)%5) · f51286f2
      	PR tree-optimization/64454
      	* tree-vrp.c (simplify_div_or_mod_using_ranges): Optimize
      	op0 % op1 into op0 if op0 is in range [-op1 + 1, op1 - 1]
      	for signed or [0, op1 - 1] for unsigned modulo.
      	(simplify_stmt_using_ranges): Call simplify_div_or_mod_using_ranges
      	even if op1 does not satisfy integer_pow2p.
      
      	* gcc.dg/pr64454.c: New test.
      
      From-SVN: r219491
      Jakub Jelinek committed
    • re PR testsuite/64028 (r211599 caused many vectorizer test failures with -fPIC) · 01991953
      	PR testsuite/64028
      	* gcc.dg/vect/no-section-anchors-vect-31.c: Add dg-add-options
      	bind_pic_locally.
      	* gcc.dg/vect/no-section-anchors-vect-34.c: Likewise.
      	* gcc.dg/vect/no-section-anchors-vect-36.c: Likewise.
      	* gcc.dg/vect/no-section-anchors-vect-64.c: Likewise.
      	* gcc.dg/vect/no-section-anchors-vect-65.c: Likewise.
      	* gcc.dg/vect/no-section-anchors-vect-68.c: Likewise.
      	* gcc.dg/vect/no-section-anchors-vect-69.c: Likewise.
      	* gcc.dg/vect/slp-25.c: Likewise.
      	* gcc.dg/vect/vect-109.c: Likewise.
      	* gcc.dg/vect/vect-13.c: Likewise.
      	* gcc.dg/vect/vect-17.c: Likewise.
      	* gcc.dg/vect/vect-18.c: Likewise.
      	* gcc.dg/vect/vect-19.c: Likewise.
      	* gcc.dg/vect/vect-20.c: Likewise.
      	* gcc.dg/vect/vect-21.c: Likewise.
      	* gcc.dg/vect/vect-22.c: Likewise.
      	* gcc.dg/vect/vect-27.c: Likewise.
      	* gcc.dg/vect/vect-29.c: Likewise.
      	* gcc.dg/vect/vect-2-big-array.c: Likewise.
      	* gcc.dg/vect/vect-2.c: Likewise.
      	* gcc.dg/vect/vect-3.c: Likewise.
      	* gcc.dg/vect/vect-4.c: Likewise.
      	* gcc.dg/vect/vect-5.c: Likewise.
      	* gcc.dg/vect/vect-72.c: Likewise.
      	* gcc.dg/vect/vect-73-big-array.c: Likewise.
      	* gcc.dg/vect/vect-73.c: Likewise.
      	* gcc.dg/vect/vect-77-global.c: Likewise.
      	* gcc.dg/vect/vect-78-global.c: Likewise.
      	* gcc.dg/vect/vect-7.c: Likewise.
      	* gcc.dg/vect/vect-86.c: Likewise.
      	* gcc.dg/vect/vect-align-1.c: Likewise.
      	* gcc.dg/vect/vect-align-3.c: Likewise.
      	* gcc.dg/vect/vect-all-big-array.c: Likewise.
      	* gcc.dg/vect/vect-all.c: Likewise.
      	* gcc.dg/vect/vect-multitypes-1.c: Likewise.
      	* gcc.dg/vect/vect-multitypes-4.c: Likewise.
      	* gcc.dg/vect/vect-peel-3.c: Likewise.
      	* gcc.dg/vect/vect-peel-4.c: Likewise.
      	* gcc.dg/vect/wrapv-vect-7.c: Likewise.
      
      From-SVN: r219490
      Jakub Jelinek committed
    • re PR other/64370 (sreal.c:125:23: error: 'exp2' was not declared in this scope) · aadb701b
      	PR other/64370
      	* sreal.c (sreal::to_double): Use ldexp instead of scalbnl.
      
      From-SVN: r219489
      Jakub Jelinek committed