Nick Clifton [Tue, 3 Nov 2009 16:25:29 +0000 (16:25 +0000)]
predicates.md (rx_store_multiple_vector): Reverse order of expected registers.
* 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
Benjamin Kosnik [Tue, 3 Nov 2009 00:47:48 +0000 (00:47 +0000)]
future: Use base class with nested types.
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.
Dodji Seketeli [Mon, 2 Nov 2009 19:55:02 +0000 (19:55 +0000)]
re PR c++/37093 (ICE with pointer to member template parameters)
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.
Ralf Wildenhues [Mon, 2 Nov 2009 18:52:08 +0000 (18:52 +0000)]
Work with defaulted $prefix (NONE) in libjava.
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.
Ulrich Weigand [Mon, 2 Nov 2009 14:30:39 +0000 (14:30 +0000)]
re PR tree-optimization/41857 (Loop optimizer breaks __ea pointers with -mea64)
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.
Jakub Jelinek [Mon, 2 Nov 2009 13:39:46 +0000 (14:39 +0100)]
re PR c++/41774 (ice: vector VEC(visibility,base) pop domain error, in pop_visibility at c-pragma.c:757)
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.
Jason Merrill [Mon, 2 Nov 2009 02:46:35 +0000 (21:46 -0500)]
restrict-1.c: Move to c-c++-common.
* gcc.dg/tree-ssa/restrict-1.c: Move to c-c++-common.
* gcc.dg/tree-ssa/restrict-2.c: Move to c-c++-common.
* gcc.dg/tree-ssa/restrict-4.c: Move to c-c++-common.
Tobias Burnus [Sun, 1 Nov 2009 17:46:50 +0000 (18:46 +0100)]
[multiple changes]
2009-11-01 Tobias Burnus <burnus@net-b.de>
PR fortran/41872
* trans-decl.c (gfc_trans_deferred_vars): Do not nullify
autodeallocated allocatable scalars at the end of scope.
(gfc_generate_function_code): Fix indention.
* trans-expr.c (gfc_conv_procedure_call): For allocatable
scalars, fix calling by reference and autodeallocating
of intent out variables.
2009-11-01 Tobias Burnus <burnus@net-b.de>
PR fortran/41872
* gfortran.dg/allocatable_scalar_4.f90: New test.
lto/
* lto.c (lto_file_read): Do not set file_data->fd.
(lto_read_section_data): Use a single-entry file-descriptor cache.
Do not check the result of xmalloc.
(free_section_data): Do not use file_data->fd.
(lto_read_all_file_options): Likewise.
Eric Botcazou [Fri, 30 Oct 2009 15:08:27 +0000 (15:08 +0000)]
utils.c (MAX_FIXED_MODE_SIZE): Delete.
* gcc-interface/utils.c (MAX_FIXED_MODE_SIZE): Delete.
(create_field_decl): Update description. In a packed record, round
the size up to a byte boundary only if the field's type has BLKmode.
* gcc-interface/gigi.h (create_field_decl): Update description.
Arnaud Charlet [Fri, 30 Oct 2009 13:58:19 +0000 (14:58 +0100)]
[multiple changes]
2009-10-30 Emmanuel Briot <briot@adacore.com>
* make.adb (Start_Compile_If_Possible): Compute location of resulting
ALI file in this procedure instead of after the compilation itself,
since the current directory might have changed in between when using
-j<n>.
* osint.ads: Addded missing alignment clause.
* adaint.c, adaint.h, osint.adb (__gnat_reset_attributes,
__gnat_size_of_file_attributes): Rename reset_attributes and
size_of_file_attributes.
2009-10-30 Javier Miranda <miranda@adacore.com>
* sem_scil.adb (Adjust_SCIL_Node): Add missing management of sequences
of statements when searching for SCIL nodes.
2009-10-30 Tristan Gingold <gingold@adacore.com>
* gnatlink.adb, link.c: By default use shared libgcc on darwin.
Arnaud Charlet [Fri, 30 Oct 2009 13:49:17 +0000 (14:49 +0100)]
[multiple changes]
2009-10-30 Emmanuel Briot <briot@adacore.com>
* make.adb, osint.adb (Add_Lib_Search_Dir): Do not add if dir is
already in the list.
This saves system calls when looking for ALI files
(Scan_Make_Args): The parameter to gnatmake's -D is now converted to an
absolute PATH (so that the above improvement properly occurs if both
-D<dir> and -aO<dir> are specified).
Emmanuel Briot [Fri, 30 Oct 2009 13:44:40 +0000 (13:44 +0000)]
2009-10-30 Emmanuel Briot <briot@adacore.com>
* make.adb, adaint.c, adaint.h, osint.adb, osint.ads, bcheck.adb
(*_attr): new subprograms.
(File_Length, File_Time_Stamp, Is_Writable_File): new subprograms
(Read_Library_Info_From_Full, Full_Library_Info_Name,
Full_Source_Name): Now benefit from a previous cache of the file
attributes, to further save on system calls.
(Smart_Find_File): now also cache the file attributes. This makes the
package File_Stamp_Hash_Table useless, and it was removed.
(Compile_Sources): create subprograms for the various steps of the main
loop, for readibility and to avoid sharing variables between the
various steps.
* sem_case.adb (Check_Choices): Add explanatory message when there are
missing alternatives when the required range of alternatives is given
by the base type of the case expression or discriminant in a variant
part.
* opt.ads: New flag Warn_On_Overlap, to enable warnings on potentially
dangerous overlap between actuals in a call, activated by -gnatw.i
* sem_warn.adb (Set_Dot_Warning_Switch): set flag.
(Warn_On_Overlapping_Actuals): use new flag.
* gnat_ugn.texi: Document -gnatw.i, warning on overlapping actuals
Richard Earnshaw [Fri, 30 Oct 2009 09:16:36 +0000 (09:16 +0000)]
arm.md (QHSI): New mode iterator.
* arm.md (QHSI): New mode iterator.
(movqi): If generating for thumb, then truncate any immediate to
8 bits.
* thumb2.md (thumb2_movsi_shortim and peephole2 generator): Replace
with...
(thumb2_mov<mode>_shortim and peephole2 generator): ... iterator based
version.
* mangle.c (mangle_type_string_for_rtti): Revert r149964.
(needs_fake_anon): Likewise.
(write_name): Likewise.
(write_nested_name): Likewise.
* cp-tree.h (mangle_type_string_for_rtti): Likewise.
(get_anonymous_namespace): Likewise.
* name-lookup.c (get_anonymous_namespace_name): Likewise.
* rtti.c (tinfo_name): Insert '*' in front of private names.
(tinfo_base_init): Use it.
2009-10-28 Jerry Quinn <jlquinn@optonline.net>
* libsupc++/tinfo.cc (operator=(const type_info&)): Compare by
pointer if name begins with '*'.
* libsupc++/typeinfo (type_info::name()): Likewise.
* libsupc++/tinfo2.cc (before): Likewise.
Paolo Carlini [Thu, 29 Oct 2009 19:26:04 +0000 (19:26 +0000)]
[multiple changes]
2009-10-29 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/40925
* include/bits/stl_pair.h (pair<_T1, _T2>::pair(_U1&&, _U2&&)):
Use enable_if to remove it from the overload set when either _U1
is not convertible to _T1 or _U2 is not convertible to _T2.
(pair<>::pair(_U1&&, _Arg0&&, _Args&&...)): Remove.
Jerry DeLisle [Thu, 29 Oct 2009 19:20:18 +0000 (19:20 +0000)]
re PR libfortran/41711 ([F08] BOZ edit-descr does not support reading large kind reals)
2009-10-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/41711
* libgfortran.h: Define larger sizes for BOZ conversion buffers.
* io/write.c (extract_uint): Include case where size is 10 if integer
is large enough. (write_int): Rename to write_boz. (write_boz): Factor
out extract_uint and delete the conversion function.
(btoa_big): New binary conversion function.
(otoa_big): New octal conversion function.
(ztoa_big): New hexidecimal conversion function.
(write_b): Modify to use new function.
(write_o): Likewise.
(write_z): Likewise.
Eric Botcazou [Thu, 29 Oct 2009 18:28:49 +0000 (18:28 +0000)]
decl.c (array_type_has_nonaliased_component): Swap parameters and rewrite comments.
* gcc-interface/decl.c (array_type_has_nonaliased_component): Swap
parameters and rewrite comments. For a derived type, return the
setting of its parent type.
(gnat_to_gnu_entity): Do an alias set copy for derived types if they
are composite. Adjust calls to above function.
David Daney [Thu, 29 Oct 2009 17:39:52 +0000 (17:39 +0000)]
invoke.texi (mmcount-ra-address): Document new command line option.
2009-10-29 David Daney <ddaney@caviumnetworks.com>
* doc/invoke.texi (mmcount-ra-address): Document new command line
option.
* config/mips/mips.opt (mmcount-ra-address): New option.
* config/mips/mips-protos.h (mips_function_profiler): Declare new
function.
* config/mips/mips.c (struct mips_frame_info): Add ra_fp_offset
member.
(mips_for_each_saved_gpr_and_fpr): Set ra_fp_offset.
(mips_function_profiler): Moved from FUNCTION_PROFILER, and
rewritten.
* config/mips/mips.h (FUNCTION_PROFILER): Body of macro moved to
mips_function_profiler.
2009-10-29 David Daney <ddaney@caviumnetworks.com>
* gcc.target/mips/mips.exp (mips_option_groups): Add
mcount-ra-address.
* gcc.target/mips/mmcount-ra-address-1.c: New test.
* gcc.target/mips/mmcount-ra-address-2.c: New test.
* gcc.target/mips/mmcount-ra-address-3.c: New test.
Tobias Burnus [Thu, 29 Oct 2009 15:24:38 +0000 (16:24 +0100)]
re PR fortran/41777 (Wrong-code with POINTER-returning GENERIC function)
2009-10-29 Tobias Burnus <burnus@net-b.de>
PR fortran/41777
* trans-expr.c
* (gfc_conv_procedure_call,gfc_conv_expr_reference):
Use for generic EXPR_FUNCTION the attributes of the specific
function.
2009-10-29 Tobias Burnus <burnus@net-b.de>
PR fortran/41777
gfortran.dg/associated_target_3.f90: New testcase.
Arnaud Charlet [Thu, 29 Oct 2009 14:42:50 +0000 (15:42 +0100)]
[multiple changes]
2009-10-28 Robert Dewar <dewar@adacore.com>
* sem_type.adb: Minor reformatting
2009-10-28 Arnaud Charlet <charlet@adacore.com>
* exp_ch9.adb (Build_Task_Proc_Specification): Generate a different
suffix for task type bodies.
2009-10-28 Ed Schonberg <schonberg@adacore.com>
* exp_aggr.adb (Convert_Aggr_In_Allocator): Do not look for a
finalization list if the designated type requires no control actions,
to prevent a useless semantic dependence on ada.tags.
Martin Jambor [Thu, 29 Oct 2009 12:40:48 +0000 (13:40 +0100)]
re PR tree-optimization/41775 (IPA-SRA: ice in rewrite_stmt, at tree-into-ssa.c:1302)
2009-10-29 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/41775
* tree-sra.c (build_ref_for_offset): Unshare *expr if not NULL.
(generate_subtree_copies): Do not unshare agg.
(load_assign_lhs_subreplacements): Do not unshare rhs.
(sra_modify_assign): Do not unshare exprs.
(propagate_subacesses_accross_link): Renamed to
propagate_subaccesses_across_link.
* testsuite/g++.dg/torture/pr41775.C: New testcase.
Richard Earnshaw [Thu, 29 Oct 2009 09:44:36 +0000 (09:44 +0000)]
arm.c (count_insns_for_constant): Rework to support counting for thumb2 immediates as well.
* arm.c (count_insns_for_constant): Rework to support counting for
thumb2 immediates as well.
(find_best_start): Split out from arm_gen_constant.
(arm_gen_constant): Rework to support XOR with immediate.
Chao-ying Fu [Thu, 29 Oct 2009 07:08:03 +0000 (07:08 +0000)]
mips.c (mips_emit_unary, [...]): New functions.
2009-10-29 Chao-ying Fu <fu@mips.com>
* config/mips/mips.c (mips_emit_unary, mips_force_unary): New
functions.
(mips_expand_synci_loop): Use the length rtx to control the
synci loop from the begin rtx that points to the first byte of
the cache line.