PR debug/43299
* var-tracking.c (adjust_sets): New function.
(count_with_sets, add_with_sets): Use it.
(get_adjusted_src): New inline function.
(add_stores): Use it.
* gcc.dg/pr43299.c: New test.
From-SVN: r157316
PR debug/43293
* config/i386/t-i386 (i386.o): Depend on debug.h and dwarf2out.h.
* config/i386/i386.c: Include debug.h and dwarf2out.h.
(ix86_file_end): If dwarf2out_do_cfi_asm (), emit .cfi_startproc
and .cfi_endproc around the pic thunks.
(output_set_got): For TARGET_DEEP_BRANCH_PREDICTION pic, ensure
all queued unwind info register saves are saved before the call.
For !TARGET_DEEP_BRANCH_PREDICTION pic, ensure the call is
considered as sp-=4 for unwind info and the pop as sp+=4 which
also clobbers dest, but doesn't actually restore it.
From-SVN: r157314
2010-03-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/43265
* io/read.c: Include fbuf.h and unix.h to enable lower level I/O for
read_x. (read_x): Replace the use of read_sf with equivalent lower level
I/O, eliminating unneeded code and handling EOF and EOR conditions.
* io/io.h: Revise prototype for read_sf.
* io/transfer.c (read_sf): Delete no_error parameter and all uses of it.
(read_block_form): Likewise.
(next_record_r): Delete wrong code call to hit_eof.
From-SVN: r157310
2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
* graphite-sese-to-poly.c (add_param_constraints): Use
lower_bound_in_type and upper_bound_in_type.
From-SVN: r157291
2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
* graphite-sese-to-poly.c (add_param_constraints): Use sizetype
instead of unsigned_type_node.
From-SVN: r157290
Eric pointed out that my ChangeLog was incorrect. As I forgot to
commit it at all, here the corrected ChangeLogs for the last commit.
gcc/
2010-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
* graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
handle conversions from pointer to integers.
(gcc_type_for_cloog_iv): Choose the smalles signed integer as an
induction variable, to be able to work with code generated by
CLooG.
* graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
(build_poly_scop): Bail out if we cannot codegen a loop.
gcc/testsuite/
2010-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
* gcc.dg/graphite/id-18.c: New.
* gcc.dg/graphite/run-id-pr42644.c: New.
libgomp/
2010-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
* testsuite/libgomp.graphite/force-parallel-1.c: Adjust.
* testsuite/libgomp.graphite/force-parallel-2.c: Adjust.
From-SVN: r157287
Fix pr42644.
Fix pr42130 (dealII).
2010-03-03 Tobias Grosser <grosser@fim.uni-passau.de>
* gcc/graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
handle conversions from pointer to integers.
(gcc_type_for_cloog_iv): Choose the smalles signed integer as an
induction variable, to be able to work with code generated by
CLooG.
* gcc/graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
(build_poly_scop): Bail out if we cannot codegen a loop.
* gcc/testsuite/gcc.dg/graphite/id-18.c: New.
* gcc/testsuite/gcc.dg/graphite/run-id-pr42644.c: New.
* libgomp/testsuite/libgomp.graphite/force-parallel-1.c: Adjust.
* libgomp/testsuite/libgomp.graphite/force-parallel-2.c: Adjust.
From-SVN: r157286
2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
* sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
Call fold_convert on all the returned values.
(expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
the type of the resulting expression.
From-SVN: r157284
2010-03-04 Sebastian Pop <sebastian.pop@amd.com>
* graphite-dependences.c (map_into_dep_poly): Removed.
(dependence_polyhedron_1): Use combine_context_id_scat.
From-SVN: r157282
Cleanup.
2010-02-23 Sebastian Pop <sebastian.pop@amd.com>
* graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
and clean up the logic.
From-SVN: r157279
* var-tracking.c (remove_cselib_value_chains): Define only for
ENABLE_CHECKING.
(dataflow_set_preserve_mem_locs, dataflow_set_remove_mem_locs,
delete_slot_part, emit_notes_for_differences_1): Don't call
remove_cselib_value_chains here.
(set_slot_part, emit_notes_for_differences_2): Don't call
add_cselib_value_chains here.
(preserved_values): New vector.
(preserve_value): New function.
(add_uses, add_stores, vt_add_function_parameters): Use it
instead of cselib_preserve_value.
(changed_values_stack): New vector.
(check_changed_vars_0): New function.
(check_changed_vars_1, check_changed_vars_2): Use it.
(emit_notes_for_changes): Call set_dv_changed (*, false) on all
changed_values_stack VALUEs.
(vt_emit_notes): For all preserved_values call
add_cselib_value_chains. If ENABLE_CHECKING call
remove_cselib_value_chains before verifying value_chains is empty.
Initialize and free changed_values_stack.
(vt_initialize): Initialize preserved_values.
(vt_finalize): Free preserved_values.
From-SVN: r157277
2010-03-08 Martin Jambor <mjambor@suse.cz>
* ipa-prop.h (struct ipa_param_descriptor): Removed the called field.
(ipa_is_param_called): Removed.
* ipa-prop.c (ipa_note_param_call): Do not set the called flag.
(ipa_print_node_params): Do not print the called flag.
(ipa_write_node_info): Do not stream the called flag.
(ipa_read_node_info): Likewise.
From-SVN: r157273
2010-03-08 Janus Weil <janus@gcc.gnu.org>
PR fortran/43256
* resolve.c (resolve_compcall): Don't set 'value.function.name' here
for TBPs, otherwise they will not be resolved properly.
(resolve_function): Use 'value.function.esym' instead of
'value.function.name' to check if we're dealing with a TBP.
(check_class_members): Set correct type of passed object for all TBPs,
not only generic ones, except if the type is abstract.
2010-03-08 Janus Weil <janus@gcc.gnu.org>
PR fortran/43256
* gfortran.dg/typebound_call_13.f03: New.
From-SVN: r157272
2010-03-08 Kai TIetz <kai.tietz@onevision.com>
PR/42950
* libgfortran.h (_POSIX): Define if __MINGW32__ is defined.
(gfc_printf): Define to gnu_printf for __MINGW32__ case,
otherwise to __printf__.
(gfc_strtof,gfc_strtod,gfc_strtold): Define for mingw case
to POSIX compatible converter functions.
(runtime_error): Use instead gfc_printf as formatter
attribute name.
(runtime_error_at): Likewise.
(runtime_warning_at): Likewise.
(st_printf): Likewise.
* intrinsics/date_and_time.c (localtime_r): Undefine
possible defined macro.
(gmtime_r): Likewise.
* io/read.c (convert_real): Use gfc_strtof, gfc_strtod,
and gfc_strtold.
From-SVN: r157271
PR debug/43176
* Makefile.in (var-tracking.o): Depend on pointer-set.h.
* cselib.c (struct expand_value_data): Add dummy field.
(cselib_expand_value_rtx, cselib_expand_value_rtx_cb): Initialize
dummy to false.
(cselib_dummy_expand_value_rtx_cb): New function.
(cselib_expand_value_rtx_1): If evd->dummy is true, don't allocate
any rtl.
* cselib.h (cselib_dummy_expand_value_rtx_cb): New prototype.
* var-tracking.c: Include pointer-set.h.
(variable): Change n_var_parts to char from int. Add
cur_loc_changed and in_changed_variables fields.
(variable_canonicalize): Remove.
(shared_var_p): New inline function.
(unshare_variable): Maintain cur_loc_changed and
in_changed_variables fields. If var was in changed_variables,
replace it there with new_var. Just copy cur_loc instead of
resetting it to something else.
(variable_union): Don't recompute cur_loc. Use shared_var_p.
(dataflow_set_union): Don't call variable_canonicalize.
(loc_cmp): If both x and y are DEBUG_EXPRs, compare uids
of their DEBUG_EXPR_TREE_DECLs.
(canonicalize_loc_order_check): Verify that cur_loc is NULL
and in_changed_variables and cur_loc_changed is false.
(variable_merge_over_cur): Clear cur_loc, in_changed_variables
and cur_loc_changed. Don't update cur_loc here.
(variable_merge_over_src): Don't call variable_canonicalize.
(dataflow_set_preserve_mem_locs): Use shared_var_p. When
removing loc that is equal to cur_loc, clear cur_loc,
set cur_loc_changed and ensure variable_was_changed is called.
(dataflow_set_remove_mem_locs): Use shared_var_p. Only
compare pointers in cur_loc check, if it is equal to loc,
clear cur_loc and set cur_loc_changed. Don't recompute cur_loc here.
(variable_different_p): Remove compare_current_location argument,
don't compare cur_loc.
(dataflow_set_different_1): Adjust variable_different_p caller.
(variable_was_changed): If dv had some var in changed_variables
already, reset in_changed_variables flag for it and propagate
cur_loc_changed over to the new variable. On empty var
always set cur_loc_changed. Set in_changed_variables on whatever
var is added to changed_variables.
(set_slot_part): Clear cur_loc_changed and in_changed_variables.
Use shared_var_p. When removing loc that is equal to cur_loc,
clear cur_loc and set cur_loc_changed. If cur_loc is NULL at the
end, don't set it to something else, just call variable_was_changed.
(delete_slot_part): Use shared_var_p. When cur_loc equals to
loc being removed, clear cur_loc and set cur_loc_changed.
Set cur_loc_changed if all locations have been removed.
(struct expand_loc_callback_data): New type.
(vt_expand_loc_callback): Add dummy mode in which no rtxes are
allocated. Always create SUBREGs if simplify_subreg failed.
Prefer to use cur_loc, when that fails and still in
changed_variables (and seen first time) recompute it. Set
cur_loc_changed of variables which had to change cur_loc and
compute elcd->cur_loc_changed if any of the subexpressions used
had to change cur_loc.
(vt_expand_loc): Adjust to pass arguments in
expand_loc_callback_data structure.
(vt_expand_loc_dummy): New function.
(emitted_notes): New variable.
(emit_note_insn_var_location): For VALUEs and DEBUG_EXPR_DECLs
that weren't used for any other decl in current
emit_notes_for_changes call call vt_expand_loc_dummy to update
cur_loc. For -fno-var-tracking-assignments, set cur_loc to
first loc_chain location if NULL before. Always use just
cur_loc instead of first loc_chain location. When cur_loc_changed
is false, when not --enable-checking=rtl just don't emit any note.
When rtl checking, compute the note and assert it is the same
as previous note. Clear cur_loc_changed and in_changed_variables
at the end before removing from changed_variables.
(check_changed_vars_3): New function.
(emit_notes_for_changes): Traverse changed_vars to call
check_changed_vars_3 on each changed var.
(emit_notes_for_differences_1): Clear cur_loc_changed and
in_changed_variables. Recompute cur_loc of new_var.
(emit_notes_for_differences_2): Clear cur_loc if new variable
appears.
(vt_emit_notes): Initialize and destroy emitted_notes.
From-SVN: r157264
PR rtl-optimization/42220
* regrename.c (scan_rtx) <case STRICT_LOW_PART, ZERO_EXTRACT>:
Use verify_reg_tracked to determine if we should use OP_OUT rather
than OP_INOUT.
(build_def_use): If we see an in-out operand for a register that we
know nothing about, treat is an output if possible, fail the block if
not.
From-SVN: r157263
PR debug/42897
* tree-vect-loop.c (vect_transform_loop): Kill out-of-loop debug
uses of relevant DEFs that are dead outside the loop too.
From-SVN: r157258
* Makefile.in (PLUGINCC, PLUGINCFLAGS): New variables.
(site.exp): Export them when plugins are enabled.
testsuite/
* lib/plugin-support.exp (plugin-test-execute): Use PLUGINCC in lieu
of HOSTCC and PLUGINCFLAGS in lieu of HOSTCFLAGS.
From-SVN: r157246
2010-03-04 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/util/testsuite_container_traits.h (traits_base): Add
has_throwing_erase trait.
(traits<vector>, traits<deque>): Typedef the latter to true_type.
* testsuite/util/exception/safety.h (generation_prohibited):
Do not test vector::erase and deque::erase: can throw if
either copy constructor or assignment operator of value_type
throws.
* testsuite/23_containers/vector/requirements/exception/
generation_prohibited.cc: Remove xfail.
* testsuite/23_containers/deque/requirements/exception/
generation_prohibited.cc: Likewise.
* include/ext/throw_allocator.h (hash<__gnu_cxx::throw_value_limit>::
operator(), hash<__gnu_cxx::throw_value_random>::operator()): Pass
argument by const ref.
* testsuite/util/testsuite_container_traits.h (traits<map>,
traits<multimap>, traits<set>, traits<multiset>,
traits<unordered_map>, traits<unordered_multimap>,
traits<unordered_set>, traits<unordered_multiset>): Typedef
consistently has_erase and has_insert as true_type.
* testsuite/util/testsuite_container_traits.h
(traits<unordered_map>, traits<unordered_multimap>,
traits<unordered_set>, traits<unordered_multiset>): Do not wrongly
typedef has_size_type_constructor as true_type: the constructor
accepting a size_type actually gets the initial number of
buckets.
From-SVN: r157239
2010-03-04 Andrew Pinski <andrew_pinski@caviumnetworks.com>
PR c/43248
* c-decl.c (build_compound_literal): Return early if init is
an error_mark_node.
2010-03-04 Andrew Pinski <andrew_pinski@caviumnetworks.com>
PR c/43248
* gcc.dg/compound-literal-1.c: New testcase.
From-SVN: r157233
2010-03-04 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/43164
PR tree-optimization/43191
* tree-sra.c (type_consists_of_records_p): Reject records with
zero-size bit-fields at the end.
* testsuite/gcc.c-torture/compile/pr43164.c: New test.
* testsuite/gcc.c-torture/compile/pr43191.c: Likewise.
From-SVN: r157232