* c-tree.h (push_init_level, pop_init_level, set_init_index)
(process_init_element): New argument of type struct obstack *.
* c-typeck.c (push_init_level, pop_init_level, set_designator)
(set_init_index, set_init_label, set_nonincremental_init)
(set_nonincremental_init_from_string, find_init_member)
(output_init_element, output_pending_init_elements)
(process_init_element): New argument braced_init_obstack. Pass it
down.
(push_range_stack, add_pending_init): New argument
braced_init_obstack. Use obstack allocation.
* c-parser.c (c_parser_initelt, c_parser_initval): New argument
braced_init_obstack. Pass it down.
(c_parser_braced_init): New variables ret, braced_init_obstack.
Initialize obstack, pass it down and finally free it.
From-SVN: r158634
2010-04-22 Richard Guenther <rguenther@suse.de>
PR fortran/43829
* resolve.c (gfc_resolve_index): Wrap around ...
(gfc_resolve_index_1): ... this. Add parameter to allow
any integer kind index type.
(resolve_array_ref): Allow any integer kind for the start
index of an array ref.
* gfortran.dg/vector_subscript_6.f90: New testcase.
* gfortran.dg/assign_10.f90: Adjust.
From-SVN: r158632
* lto-cgraph.c (lto_output_node): Do not output comdat groups
for boundary nodes.
(output_cgraph): Do not arrange comdat groups for boundary nodes.
From-SVN: r158615
* lto.c (globalize_cross_file_statics): When function has address taken,
it needs to be public.
* varpool.c (decide_is_variable_needed): Variable is always needed
during ltrans.
From-SVN: r158609
* cgraph.c (dump_cgraph_node): Dump also assembler name.
* ipa-inline.c (cgraph_decide_inlining_of_small_functions): Do not ice
at WPA dumping.
(cgraph_decide_inlining): Do not expect callee to be removed in all
cases.
From-SVN: r158607
PR middle-end/43570
* omp-low.c (scan_sharing_clauses): Don't scan_omp_op
OMP_CLAUSE_DECL for OMP_CLAUSE_COPYPRIVATE.
(lower_copyprivate_clauses): Use private var in outer
context instead of original var. Make sure the types
are correct for VLAs.
* testsuite/libgomp.fortran/vla8.f90: New test.
From-SVN: r158594
* dwarf2out.c (add_var_loc_to_decl): Add LABEL argument. Drop
last chain entry if it starts with the still current label.
(add_location_or_const_value_attribute): Check that
loc_list->first->next is NULL instead of comparing ->first with
->last.
(dwarf2out_var_location): Pass last_label resp. last_postcall_label
to add_var_loc_to_decl.
From-SVN: r158590
* dwarf2out.c (output_call_frame_info): For dw_cie_version
>= 4 add also address size and segment size fields into CIE
header.
* unwind-dw2.c (extract_cie_info): Handle CIE version 4, as
long as address size is the same as sizeof (void *) and
segment size is 0.
* unwind-dw2-fde.c (get_cie_encoding): Likewise. If
address size or segment size is unexpected, return DW_EH_PE_omit.
(classify_object_over_fdes): If get_cie_encoding returned
DW_EH_PE_omit, return -1.
(init_object): If classify_object_over_fdes returned -1,
pretend there were no FDEs at all.
From-SVN: r158589
* config/i386/i386.md (bswap<mode>2): Macroize expander from
bswap{si,di}2 using SWI48 mode iterator.
(*bswap<mode>2_movbe): Macroize insn from *bswap{si,di}_movbe using
SWI48 mode iterator. Set type attribute of bswap insn to bitmanip,
set modrm attribute of bswap insn to 0 and remove length attribute.
(*bswap<mode>2_1): Macroize insn from *bswap{si,di}_1 using SWI48 mode
iterator. Set type attribute to bitmanip, set modrm attribute to 0,
set mode attribute to <MODE> and remove length attribute.
From-SVN: r158587
Fix PR c++/43800
gcc/cp/ChangeLog:
PR c++/43800
PR c++/43704
* typeck.c (incompatible_dependent_types_p): If one of the
compared types if not a typedef then honour their main variant
equivalence.
gcc/testsuite/ChangeLog:
PR c++/43800
PR c++/43704
* g++.dg/template/typedef32.C: Adjust.
* g++.dg/template/typedef33.C: New test.
From-SVN: r158571
2010-04-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/43227
* resolve.c (resolve_fl_derived): If a component character
length has not been resolved, do so now.
(resolve_symbol): The same as above for a symbol character
length.
* trans-decl.c (gfc_create_module_variable): A 'length' decl is
not needed for a character valued, procedure pointer.
PR fortran/43266
* resolve.c (ensure_not_abstract_walker): If 'overriding' is
not found, return FAILURE rather than ICEing.
2010-04-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/43227
* gfortran.dg/proc_decl_23.f90: New test.
PR fortran/43266
* gfortran.dg/abstract_type_6.f03: New test.
From-SVN: r158570
* config/i386/i386.md (ffs<mode>2): Macroize expander from ffs_cmove
and ffsdi2 using SWI48 mode iterator. Expand SImode insn through
ffsi2_no_cmove for !TARGET_CMOVE.
(ffssi2_no_cmove): Rename from *ffs_no_cmove. Make public.
(ffssi2): Remove expander.
(*ffs<mode>_1): Macroize insn from *ffs{si,di} using SWI48
mode iterator.
(ctz<mode>2): Ditto from ctz{si,di}2.
(clz<mode>2): Macroize expander from ctz{hi,si,di}2 using SWI248
mode iterator.
(clz<mode>2_abm): Macroize insn from clz{hi,si,di}2_abm using SWI248
mode iterator.
From-SVN: r158569
PR libgomp/43706
* config/linux/affinity.c (gomp_init_affinity): Decrease
gomp_available_cpus if affinity mask confines the process to fewer
CPUs.
* config/linux/proc.c (get_num_procs): If gomp_cpu_affinity is
non-NULL, just return gomp_available_cpus.
From-SVN: r158565
* cgraph.c (cgraph_remove_node): Kill bodies in other partitoin.
(dump_cgraph_node): Dump new flags.
* cgraph.h (struct cgraph_node): Add flags reachable_from_other_partition
and in_other_partition.
(cgraph_can_remove_if_no_direct_calls_p): Functions used by other partition
can not be removed.
* cgraphunit.c (cgraph_mark_functions_to_output): Functions used by the other
partition must be output; silence sanity checking on leaking functions
bodies from other paritition.
* lto-cgraph.c (reachable_from_other_partition_p): New function.
(lto_output_node): Output new flags; do not sanity check that inline
clones are output; drop lto_forced_extern_inline_p code; do not mock
visibility flags at partition boundaries.
(add_node_to): New function.
(output_cgraph): Use it to sort functions so masters appear before
clones.
(input_overwrite_node): Input new flags.
* passes.c (ipa_write_summaries): Do not call
lto_new_extern_inline_states.
* lto-section-out.c (forced_extern_inline, lto_new_extern_inline_states,
lto_delete_extern_inline_states, lto_force_functions_extern_inline,
lto_forced_extern_inline_p): Kill.
* lto-streamer.h (lto_new_extern_inline_states,
* lto_delete_extern_inline_states, lto_force_functions_extern_inline,
lto_forced_extern_inline_p): Kill.
* lto.c (lto_add_inline_clones): Do not track inlined_decls.
(lto_add_all_inlinees): Likewise.
(lto_wpa_write_files): Likewise.
From-SVN: r158563
2010-04-20 Richard Guenther <rguenther@suse.de>
* tree-ssa-structalias.c (do_sd_constraint): Add edges only
from vars that can have pointers.
(process_constraint): Dump useless constraints.
From-SVN: r158558
2010-04-20 Richard Guenther <rguenther@suse.de>
* tree-ssa-structalias.c (do_structure_copy): Properly handle
DEREF.
(dump_sa_points_to_info): Remove asserts.
(init_base_vars): nothing_id isn't an escape point nor does it
have pointers.
* gcc.dg/ipa/ipa-pta-14.c: New testcase.
From-SVN: r158553
2010-04-20 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
PR target/43635
* config/s390/s390.c (s390_emit_call): Turn direct into indirect
calls for -fpic -m31 if they have been sibcall optimized.
2010-04-20 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
PR target/43635
* gcc.c-torture/compile/pr43635.c: New testcase.
From-SVN: r158540
partial fix, make all 'e' class regs fixed
PR rtl-optimization/43520
* config/ia64/ia64.h (FIXED_REGISTERS, CALL_USED_REGISTERS): Make
ar.lc fixed and call-used.
From-SVN: r158539