PR c++/36959
* decl2.c (cxx_callgraph_analyze_expr): Don't reference a function
just because a static variable in it is needed unless -frepo.
From-SVN: r153878
PR target/10127
PR ada/20548
* expr.h (STACK_CHECK_PROBE_INTERVAL): Delete.
(STACK_CHECK_PROBE_INTERVAL_EXP): New macro.
(STACK_CHECK_MOVING_SP): Likewise.
* system.h (STACK_CHECK_PROBE_INTERVAL): Poison it.
* doc/tm.texi (Stack Checking): Delete STACK_CHECK_PROBE_INTERVAL.
Document STACK_CHECK_PROBE_INTERVAL_EXP and STACK_CHECK_MOVING_SP.
* doc/md.texi (Standard Pattern Names): Tweak entry of CHECK_STACK.
Document PROBE_STACK.
* explow.c (anti_adjust_stack_and_probe): New function.
(allocate_dynamic_stack_space): Do not directly allocate space if
STACK_CHECK_MOVING_SP, instead invoke above function.
(emit_stack_probe): Handle probe_stack insn.
(PROBE_INTERVAL): New macro.
(STACK_GROW_OPTAB): Likewise.
(STACK_GROW_OFF): Likewise.
(probe_stack_range): Use Pmode and memory_address consistently. Fix
loop condition in the small constant case. Rewrite in the general
case to be immune to wraparounds. Make sure the address of probes
is valid. Try to use [base + disp] addressing mode if possible.
* ira.c (setup_eliminable_regset): Set frame_pointer_needed if stack
checking is enabled and STACK_CHECK_MOVING_SP.
* rtlanal.c (may_trap_p_1) <MEM>: If stack checking is enabled,
return 1 for volatile references to the stack pointer.
* tree.c (build_common_builtin_nodes): Do not set ECF_NOTHROW on
__builtin_alloca if stack checking is enabled.
* unwind-dw2.c (uw_identify_context): Take into account whether the
context is that of a signal frame or not.
* config/i386/linux.h (STACK_CHECK_MOVING_SP): Define to 1.
* config/i386/linux64.h (STACK_CHECK_MOVING_SP): Likewise.
From-SVN: r153877
PR rtl-optimization/41917
* rtlanal.c (num_sign_bit_copies1) <case UMOD>: If sign bit of second
operand isn't known to be 0, return 1.
* gcc.c-torture/execute/pr41917.c: New test.
From-SVN: r153874
2009-11-03 David Krauss <potswa@mac.com>
Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/41351
* include/bits/stl_algo.h (__rotate(_RandomAccessIterator,
_RandomAccessIterator, _RandomAccessIterator,
random_access_iterator_tag)): Rewrite to use only std::swap in
general and std::copy/std::copy_backward when safe.
Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>
From-SVN: r153860
* config/rx/predicates.md (rx_store_multiple_vector): Reverse
order of expected registers.
(rx_load_multiple_vector): Likewise.
(rx_rtsd_vector): Likewise.
* config/rx/rx.c (rx_cpu_type): New variable.
(rx_print_operand): Fix bug printing 64-bit constant values.
(rx_emit_stack_pushm): Reverse order of pushed registers.
(gen_rx_store_vector): Likewise.
(is_fast_interrupt_func): Only accept "fast_interrupt" as the
attribute name.
(is_exception_func): Rename to is_interrupt_func and only accept
"interrupt" as the attribute name.
(rx_get_stack_layout): Use new function name.
(rx_func_attr_inlinable): Likewise.
(rx_attribute_table): Remove "exception".
(rx_expand_prologue): If necessary push the accumulator register
in the prologue of interrupt functions.
(rx_expand_epilogue): If necessary pop the accumulator.
(rx_builtins): Add RX_BUILTIN_MVTIPL.
(rx_expand_builtin_stz): Remove.
(rx_expand_builtin_mvtipl): New function.
(rx_init_builtins): Handle RX_BUILTIN_MVTIPL.
(rx_expand_builtin): Likewise.
(rx_enable_fpu): New variable.
(rx_handle_option): Handle -fpu, -nofpu, -mcpu and -patch.
* config/rx/rx.h (TARGET_CPU_CPP_BUILTINS): Assert machine based
on rx_cpu_type. Define __RX_FPU_INSNS__ if FPU insns are allowed.
(enum rx_cpu_types): Define.
(ASM_SPEC): Pass -m32bit-doubles on to assembler.
(INCOMING_FRAME_SP_OFFSET): Define.
(ARG_POINTER_CFA_OFFSET): Define.
(FRAME_POINTER_CFA_OFFSET): Define.
(OVERRIDE_OPTIONS): Enable fast math if RX FPU insns are enabled.
(ALLOW_RX_FPU_INSNS): Define.
* config/rx/rx.md: Test ALLOW_RX_FPU_INSNS instead of
fast_math_flags_set_p.
(UNSPEC_BUILTIN_MVTIPL): Define.
(revl): Rename to bswapsi2.
(bswaphi2): New pattern.
(mvtachi): Mark as volatile because it uses a register unknown to
GCC.
(mvtaclo): Likewise.
(racw): Likewise.
(mvtc): Remove clobber of cc0.
(mvtcp): Delete.
(opecp): Delete.
* config/rx/rx.opt (mieee): Remove.
(fpu): Add.
(nofpu): Add.
(mcpu=): Add.
(patch=): Add.
(msave-acc-in-interrupts): Add.
* config/rx/t-rx (MULTILIB_OPTIONS): Change default to 64bit
doubles.
(MULTILIB_DIRS): Likewise.
(MULTILIB_MATCHES): Treat -fpu as an alias for -m32bit-doubles.
* doc/extend.texi: Remove description of "exception" function
attribute.
* doc/invoke.texi: Document -fpu, -nofpu, -mcpu=, -patch= and
-msave-acc-in-interrupts options.
* gcc.target/rx/builtins,c: Remove redundant tests.
Add test of MVTIPL instruction.
* gcc.target/rx/interrupts.c: Use fast_interrupt and interrupt
function attributes. Add -msave-acc-in-interrupts option to the
command line.
Co-Authored-By: Kevin Buettner <kevinb@redhat.com>
From-SVN: r153853
* g++.dg/torture/pr36191.C: Don't run with -fomit-frame-pointer on
sh, m68k and fido.
Co-Authored-By: Maxim Kuvyrkov <maxim@codesourcery.com>
From-SVN: r153852
Fix PR c++/38699
gcc/ChangeLog:
PR c++/38699
* c-common.c (fold_offsetof_1): Issue errors when the
member designator of the offsetoff expression is not legitimate.
gcc/testsuite/ChangeLog:
* c-c++-common/dfp/builtin-offsetof.c: New test.
* g++.dg/other/offsetof6.C: Likewise.
From-SVN: r153843
2009-11-02 Benjamin Kosnik <bkoz@redhat.com>
* include/std/future: Use base class with nested types.
(__future_base): New.
(__future_base::_Result_base): From _Future_result_base.
(__future_base::_Result): From _Future_result.
(__future_base::_Move_result): From _Move_future_result.
(__future_base::_Ptr): From _Future_ptr.
(__future_base::_State): From _Future_state.
(__basic_future): From _Future_impl.
* testsuite/30_threads/packaged_task/cons/assign_neg.cc: Adjust line
numbers.
* testsuite/30_threads/packaged_task/cons/copy_neg.cc: Same.
* testsuite/30_threads/shared_future/cons/assign_neg.cc: Same.
* testsuite/30_threads/unique_future/cons/assign_neg.cc: Same.
* testsuite/30_threads/unique_future/cons/copy_neg.cc: Same.
* testsuite/30_threads/promise/cons/assign_neg.cc: Same.
* testsuite/30_threads/promise/cons/copy_neg.cc: Same.
From-SVN: r153834
2009-11-02 Benjamin Kosnik <bkoz@redhat.com>
* MAINTAINERS: Add Jonathan Wakely under Various Maintainers, move
Phil Edwards to Write-After Approval.
From-SVN: r153833
Fix PR c++/41856
PR c++/41856
* g++.dg/lookup/extern-c-redecl3.C: Make the test x86
only.
* g++.dg/lookup/extern-c-redecl4.C: Likewise.
From-SVN: r153829
Fix PR c++/37093
gcc/cp/ChangeLog:
PR c++/37093
* pt.c (check_valid_ptrmem_cst_expr): New function.
(convert_nontype_argument): Use it to output an error for
illegal pointer to member expressions used as template arguments.
gcc/testsuite/ChangeLog:
PR c++/37093
* g++.dg/other/ptrmem10.C: New test.
* g++.dg/other/ptrmem11.C: Likewise.
From-SVN: r153822
libjava/:
PR bootstrap/38867
* configure.ac (expanded_prefix): New variable, set to the
default prefix if none was passed on the command line.
* configure: Regenerate.
From-SVN: r153820
gcc/
PR tree-optimization/41857
* tree-flow.h (rewrite_use_address): Add BASE_HINT argument.
* tree-ssa-loop-ivopts.c (rewrite_use_address): Pass base hint
to create_mem_ref.
* tree-ssa-address.c (move_hint_to_base): New function.
(most_expensive_mult_to_index): Add TYPE argument. Use mode and
address space associated with TYPE.
(addr_to_parts): Add TYPE and BASE_HINT arguments. Pass TYPE to
most_expensive_mult_to_index. Call move_hint_to_base.
(create_mem_ref): Add BASE_HINT argument. Pass BASE_HINT and
TYPE to addr_to_parts.
gcc/testsuite/
PR tree-optimization/41857
* gcc.target/spu/ea/pr41857.c: New file.
From-SVN: r153810
2009-11-02 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/41750
* tree-sra.c (analyze_modified_params): Loop over all
representatives of components of a parameter.
* testsuite/gcc.c-torture/execute/pr41750.c: New test.
From-SVN: r153809
PR tree-optimization/41841
* ipa-struct-reorg.c (build_data_structure): Don't attempt to look at
local variables of not yet materialized clones.
* gcc.dg/pr41841.c: New test.
From-SVN: r153807
PR debug/41893
* cfgexpand.c (expand_debug_expr): Don't attempt to create DECL_RTL
for a VOIDmode variable.
* gcc.dg/debug/pr41893-1.c: New test.
* gcc.dg/debug/pr41893-2.c: New file.
From-SVN: r153806
PR c++/41774
* c-pragma.c (visstack): Change into vector of ints rather than
enum symbol_visibility.
(push_visibility): Add kind argument, push default_visibility together
with kind.
(pop_visibility): Add kind argument, return true if successful, fail
if visibility stack is empty or if stack top is of different kind.
(handle_pragma_visibility): Don't check length of visstack, instead
call pop_visibility and issue diagnostics if it failed. Pass 0
as last argument to push_visibility and pop_visibility.
* c-pragma.h (push_visibility): Add kind argument.
(pop_visibility): Likewise. Return bool instead of void.
* name-lookup.c (handle_namespace_attrs): Pass 1 as last argument to
push_visibility.
* parser.c (cp_parser_namespace_definition): Pass 1 as argument to
pop_visibility.
* rtti.c (push_abi_namespace): Pass 2 as last argument to
push_visibility.
(pop_abi_namespace): Pass 2 as argument to pop_visibility.
* g++.dg/ext/visibility/namespace3.C: New test.
From-SVN: r153805