PR target/26427
PR target/33120
PR testsuite/35710
gcc:
* config/i386/darwin.h (ASM_OUTPUT_COMMON): Remove
(ASM_OUTPUT_LOCAL): Likewise.
* config/darwin-protos.h (darwin_asm_declare_object_name): New.
(darwin_output_aligned_bss): Likewise.
(darwin_asm_output_aligned_decl_local): Likewise.
(darwin_asm_output_aligned_decl_common): Likewise.
(darwin_use_anchors_for_symbol_p): Likewise.
* config/rs6000/darwin.h (ASM_OUTPUT_COMMON): Remove.
(TARGET_ASM_OUTPUT_ANCHOR): Define.
(TARGET_USE_ANCHORS_FOR_SYMBOL_P): Define.
(DARWIN_SECTION_ANCHORS): Set to 1.
* config/darwin.c (emit_aligned_common): New var.
(darwin_init_sections): Check that the Darwin private zero-size section
marker is in range.
(darwin_text_section): Check for zero-sized objects.
(darwin_mergeable_string_section): Likewise.
(darwin_mergeable_constant_section): Likewise.
(machopic_select_section): Adjust to check for zero-sized objects.
Assert that OBJC meta data are non-zero sized.
(darwin_asm_declare_object_name): New.
(darwin_asm_declare_constant_name): Adjust for zero-sized
object sections.
(BYTES_ZFILL): Define.
(darwin_emit_weak_or_comdat): New.
(darwin_emit_local_bss): New.
(darwin_emit_common): New.
(darwin_output_aligned_bss): New.
(darwin_asm_output_aligned_decl_common): New.
(darwin_asm_output_aligned_decl_local): New.
(darwin_file_end): Disable subsections_via_symbols when section
anchoring is active.
(darwin_asm_output_anchor): Re-enable.
(darwin_use_anchors_for_symbol_p): New.
(darwin_override_options): Check for versions that can emit
aligned common. Update usage of flags to current.
* config/darwin-sections.def: Update comments and flags for
non-anchor sections. zobj_const_section, zobj_data_section,
zobj_bss_section, zobj_const_data_section: New.
* config/darwin.h (ASM_DECLARE_OBJECT_NAME): Redefine.
(ASM_OUTPUT_ALIGN): Make whitespace output consistent.
(L2_MAX_OFILE_ALIGNMENT): Define.
(ASM_OUTPUT_ALIGNED_BSS): Define.
(ASM_OUTPUT_ALIGNED_DECL_LOCAL): Define.
(ASM_OUTPUT_ALIGNED_DECL_COMMON): Define.
(SECTION_NO_ANCHOR): Define.
(TARGET_ASM_OUTPUT_ANCHOR) Define with a default of NULL.
(DARWIN_SECTION_ANCHORS): Define with a default of 0.
boehm-gc:
* dyn_load.c (GC_register_dynamic_libraries/DARWIN): Add new writable
data section names.
(GC_dyld_name_for_hdr): Adjust layout.
(GC_dyld_image_add): Adjust layout, add new Darwin sections, adjust
debug to name the sections.
(GC_dyld_image_remove): Adjust layout, remove new Darwin sections,
adjust debug to name the sections.
(GC_register_dynamic_libraries): Adjust layout.
(GC_init_dyld): Likewise.
(GC_register_main_static_data): Likewise.
gcc/testsuite:
* gcc.target/powerpc/darwin-abi-12.c: Adjust for new allocators.
* gcc.dg/pr26427.c: Remove redundant warning for powerpc.
* gcc.dg/darwin-comm.c: Adjust for new allocators.
* gcc.dg/darwin-sections.c: New test.
* g++.dg/ext/instantiate2.C: Adjust for new allocators.
Co-Authored-By: Mike Stump <mrs@gcc.gnu.org>
From-SVN: r167242
In gcc/objc/:
2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-act.c (objc_eh_runtime_type): Avoid ICE if error_mark_node
is passed as argument.
(objc_begin_catch_clause): Added code to deal with an
error_mark_node or NULL_TREE argument. Improved checks for
invalid arguments. Added code to traverse typedefs.
In gcc/testsuite/:
2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/exceptions-1.m: New.
* objc.dg/exceptions-2.m: New.
* objc.dg/exceptions-3.m: New.
* objc.dg/exceptions-4.m: New.
* objc.dg/exceptions-5.m: New.
* obj-c++.dg/exceptions-1.mm: New.
* obj-c++.dg/exceptions-2.mm: New.
* obj-c++.dg/exceptions-3.mm: New.
* obj-c++.dg/exceptions-4.mm: New.
* obj-c++.dg/exceptions-5.mm: New.
In gcc/cp/:
2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
* parser.c (cp_parser_objc_try_catch_finally_statement): Parse
@catch(...) and pass NULL_TREE to objc_begin_catch_clause() in
that case. Improved error recovery. Reorganized code to be
almost identical to c_parser_objc_try_catch_finally_statement.
In gcc/:
2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
* c-parser.c (c_parser_objc_try_catch_statement): Renamed to
c_parser_objc_try_catch_finally_statement for consistency with the
C++ parser. Parse @catch(...) and pass NULL_TREE to
objc_begin_catch_clause() in that case. Improved error recovery.
Reorganized code to be almost identical to
cp_parser_objc_try_catch_finally_statement.
From-SVN: r167233
In gcc/objc/:
2010-11-29 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-act.c (objc_demangle): Return immediately if the string is
too short. Detect names that do not need demangling, and return
them unchanged.
From-SVN: r167231
2010-11-28 Paul Thomas <pault@gcc.gnu.org>
PR fortran/35810
* trans-array.c (gfc_trans_array_constructor): If the loop->to
is a VAR_DECL, assume this is dynamic. In this case, use the
counter to obtain the value and set loop->to appropriately.
(gfc_conv_ss_descriptor): Always save the offset of a variable
in info.saved_offset.
(gfc_conv_ss_startstride): Do not attempt bound checking of the
lhs of an assignment, if allocatable and f2003 is allowed.
(gfc_conv_loop_setup): If possible, do not use an allocatable
lhs variable for the loopspec.
(gfc_is_reallocatable_lhs): New function.
(get_std_lbound): New function.
(gfc_alloc_allocatable_for_assignment): New function.
* gfortran.h : Add flag_realloc_lhs to the options structure.
* lang.opt : Add option f(no-)realloc-lhs.
* invoke.texi : Document option f(no-)realloc-lhs.
* options.c (gfc_init_options, gfc_post_options,
gfc_handle_option): Incorporate f(no-)realloc-lhs with default
to frealloc_lhs for -std > f95.
* trans-array.h : Add primitive for previous.
* trans-expr.c (gfc_conv_string_length): Return if character
length is a variable and the expression is NULL.
(gfc_conv_procedure_call): If the call is of the kind x = f(...)
and the lhs is allocatable and reallocation on assignment OK,
call gfc_alloc_allocatable_for_assignment. Do not generate the
function call unless direct by reference.
(realloc_lhs_loop_for_fcn_call): New function.
(realloc_lhs_bounds_for_intrinsic_call): New function.
(gfc_trans_arrayfunc_assign): Reallocation assignments need
a loopinfo and for the loop bounds to be set. With intrinsic
functions, free the lhs data and let the library allocate the
data array. Done by the new functions above.
(gfc_trans_assignment_1): If the lhs is allocatable and
reallocation on assignment is allowed, mark the lhs and use
gfc_alloc_allocatable_for_assignment to make the reallocation.
* trans.h : Add is_alloc_lhs bitfield to gfc_ss structure.
2010-11-28 Paul Thomas <pault@gcc.gnu.org
PR fortran/35810
* gfortran.dg/realloc_on_assign_1.f03: New test.
* gfortran.dg/realloc_on_assign_2.f03: New test.
* gfortran.dg/transpose_2.f90: dg-option -fno-realloc-lhs.
* gfortran.dg/unpack_bounds_1.f90: The same.
* gfortran.dg/cshift_bounds_2.f90: The same.
* gfortran.dg/matmul_bounds_2.f90: The same.
* gfortran.dg/matmul_bounds_3.f90: The same.
* gfortran.dg/matmul_bounds_4.f90: The same.
* gfortran.dg/matmul_bounds_5.f90: The same.
From-SVN: r167220
2010-11-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/46301
trans-expr.c (gfc_trans_assignment): Add error message for not
implemented assignment to deferred-length character variable.
From-SVN: r167212
* dwarf2out.c (dwarf2out_begin_function): Set cold_text_section
and output cold_text_section_label.
(dwarf2out_init): Don't do that there.
(dwarf2out_finish): Handle cold section end label only if cold
section was used.
From-SVN: r167208
2010-11-27 Jonathan Wakely <jwakely.gcc@gmail.com>
* include/bits/shared_ptr_base.h (operator>, operator>=, operator<=):
Remove comparisons not specified in the C++0x draft.
From-SVN: r167203
In gcc/cp/:
2010-11-27 Nicola Pero <nicola.pero@meta-innovation.com>
PR objc++/46222
* decl.c (grokdeclarator): Replaced an assert (for a case that can
never happen in C++, but could happen in ObjC++ for invalid code)
with a check that prints an error message and returns
error_mark_node.
In gcc/testsuite/:
2010-11-27 Nicola Pero <nicola.pero@meta-innovation.com>
PR objc++/46222
* obj-c++.dg/property/at-property-2.mm: Uncommented testcase.
From-SVN: r167202
2010-11-27 François Dumont <francois.cppdevs@free.fr>
* include/debug/unordered_map (unordered_multimap<>::erase): Fix to
erase all elements associated to the key.
* include/debug/unordered_set (unordered_multiset<>::erase): Likewise.
* testsuite/23_containers/unordered_multimap/erase/1.cc: Modify to
check for multiple erase.
* testsuite/23_containers/unordered_multiset/erase/1.cc: Likewise.
From-SVN: r167199
* include/debug/unordered_map, unordered_set (unordered_map<>::insert,
unordered_multimap<>::insert, unordered_set<>::insert,
unordered_multiset<>::insert) Debug check iterator hint and pass it to
normal implementation.
From-SVN: r167198
In gcc/objc/:
2010-11-27 Nicola Pero <nicola.pero@meta-innovation.com>
Implemented optional properties.
* objc-act.h (PROPERTY_OPTIONAL): New.
* objc-act.c (objc_add_property_declaration): Set
PROPERTY_OPTIONAL if appropriate.
(finish_class): When generating definitions of setter and getter
methods associated with a property for a protocol, mark them as
optional if the property is optional.
(maybe_make_artificial_property_decl): Added 'getter_name'
argument. Set PROPERTY_OPTIONAL.
(objc_maybe_build_component_ref): Updated calls to
maybe_make_artificial_property_decl. Added code for optional,
readonly properties.
(objc_build_class_component_ref): Updated call to
maybe_make_artificial_property_decl.
In gcc/testsuite/:
2010-11-27 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/property/at-property-24.m: New.
* objc.dg/property/at-property-25.m: New.
* obj-c++.dg/property/at-property-24.mm: New.
* obj-c++.dg/property/at-property-25.mm: New.
From-SVN: r167197
2010-11-27 François Dumont <francois.cppdevs@free.fr>
* include/debug/bitset (bitset<>::reference): Clean code, use normal
reference type in experimental mode.
* testsuite/23_containers/bitset/debug/invalid/1.cc: Fix for
experimental mode.
From-SVN: r167196
In gcc/objc/:
2010-11-27 Nicola Pero <nicola.pero@meta-innovation.com>
* objc-act.c (objc_build_struct): Fixed loops that save and
restore TYPE_OBJC_INFO to iterate over all variants of the type; a
special case for the current type is then no longer required.
Duplicate TYPE_LANG_SPECIFIC for each type before restoring
TYPE_OBJC_INFO.
(objc_get_protocol_qualified_type): Updated comments.
In gcc/testsuite/:
2010-11-27 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/protocol-qualifier-1.m: New.
* objc.dg/protocol-qualifier-2.m: New.
* obj-c++.dg/protocol-qualifier-1.mm: New.
* obj-c++.dg/protocol-qualifier-2.mm: New.
From-SVN: r167195
2010-11-26 Richard Guenther <rguenther@suse.de>
PR lto/46648
* gimple.c (gtc_visit): Do not return true for members of an
SCC still being processed but the current lattice value of
the member. Treat SCC members comparison state as lattice,
starting at equal, eventually dropping to unequal.
(gimple_types_compatible_p_1): Likewise.
* gcc.dg/lto/20101125-1_0.c: New testcase.
* gcc.dg/lto/20101125-1_1.c: Likewise.
From-SVN: r167183
2010-11-26 Richard Guenther <rguenther@suse.de>
PR middle-end/46559
* dwarf2out.c (dwarf2out_finish): Use comp_unit_die as root
for location list processing.
From-SVN: r167181