* gcc-interface/trans.c: Include tree-flow.h.
(gnu_switch_label_stack): Delete.
(Case_Statement_to_gnu): Do not emit the goto at the end of a case if
its associated block cannot fall through. Do not emit the final label
if no cases branche to it.
* gcc-interface/Make-lang.in (ada/trans.o): Add $(TREE_FLOW_H).
From-SVN: r161461
2010-06-27 Daniel Kraft <d@domob.eu>
* dump-parse-tree.c (show_symbol): Dump target-expression for
associate names.
(show_code_node): Make distinction between BLOCK and ASSOCIATE.
(show_namespace): Use show_level for correct indentation of
"inner namespaces" (contained procedures or BLOCK).
From-SVN: r161460
2010-06-27 Richard Guenther <rguenther@suse.de>
PR middle-end/44684
* tree-ssa-alias.c (refs_may_alias_p_1): Allow SSA name refs.
(stmt_may_clobber_ref_p_1): Do not bother to call the oracle
for register LHS. Or non-store assignments.
From-SVN: r161456
* call.c (add_function_candidate): Set LOOKUP_COPY_PARM for any
constructor called with a single argument that takes a reference
to the constructor's class.
(BAD_CONVERSION_RANK): New.
(compare_ics): Use it to compare bad ICSes.
From-SVN: r161443
* gcc.dg/tree-ssa/ipa-split-2.c: New testcase.
* ipa-split.c (consider_split): PHI in entry block is OK as long as all
edges comming from header are equivalent.
(visit_bb): Handle PHIs correctly.
* tree-inline.c (copy_phis_for_bb): Be able to copy
PHI from entry edge.
(copy_cfg_body): Produce edge from entry BB before copying
PHIs.
From-SVN: r161433
2010-06-26 Richard Guenther <rguenther@suse.de>
PR middle-end/44674
* tree-ssa-alias.c (refs_may_alias_p_1): Allow all kind of
decls. Handle LABEL_DECLs like FUNCTION_DECLs.
* gcc.dg/pr44674.c: New testcase.
From-SVN: r161431
* gcc.c (n_switches_alloc, n_infiles_alloc, alloc_infile,
add_infile, alloc_switch): New.
(process_command): Remove variable lang_n_infiles. Process
options in a single pass. Use new functions for allocating
infiles and switches arrays. Properly skip operands of
-Xpreprocessor and -Xassembler.
testsuite:
* gcc.dg/opts-3.c: New test.
From-SVN: r161430
2010-06-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR testsuite/38946
* gfortran.dg/array_constructor_23.f: Update test to allow for small
error in comparing reals.
From-SVN: r161416
2010-06-25 Stephen M. Webb <stephen.webb@bregmasoft.ca>
Initial regex implementation.
* include/std/regex: Modified to use bits/regex_* headers.
* include/bits/regex_compiler.h: New file.
* include/bits/regex_constants.h: New file.
* include/bits/regex_cursor.h: New file.
* include/bits/regex_error.h: New file.
* include/bits/regex_grep_matcher.h: New file.
* include/bits/regex_grep_matcher.tcc: New file.
* include/bits/regex.h: New file.
* include/bits/regex_nfa.h: New file.
* include/bits/regex_nfa.tcc: New file.
* include/Makefile.am: Added above new files.
* include/Makefile.in: Regenerated.
* testsuite/28_regex/02_definitions: New file.
* testsuite/28_regex/03_requirements: New file.
* testsuite/28_regex/03_requirements/typedefs.cc: New file.
* testsuite/28_regex/04_header: New file.
* testsuite/28_regex/04_header/regex: New file.
* testsuite/28_regex/04_header/regex/std_c++0x_neg.cc: New file.
* testsuite/28_regex/05_constants: New file.
* testsuite/28_regex/05_constants/error_type.cc: New file.
* testsuite/28_regex/05_constants/match_flag_type.cc: New file.
* testsuite/28_regex/05_constants/syntax_option_type.cc: New file.
* testsuite/28_regex/06_exception_type: New file.
* testsuite/28_regex/06_exception_type/regex_error.cc: New file.
* testsuite/28_regex/07_traits: New file.
* testsuite/28_regex/07_traits/char: New file.
* testsuite/28_regex/07_traits/char/ctor.cc: New file.
* testsuite/28_regex/07_traits/char/isctype.cc: New file.
* testsuite/28_regex/07_traits/char/length.cc: New file.
* testsuite/28_regex/07_traits/char/lookup_classname.cc: New file.
* testsuite/28_regex/07_traits/char/lookup_collatename.cc: New file.
* testsuite/28_regex/07_traits/char/transform.cc: New file.
* testsuite/28_regex/07_traits/char/transform_primary.cc: New file.
* testsuite/28_regex/07_traits/char/translate.cc: New file.
* testsuite/28_regex/07_traits/char/translate_nocase.cc: New file.
* testsuite/28_regex/07_traits/char/value.cc: New file.
* testsuite/28_regex/07_traits/wchar_t: New file.
* testsuite/28_regex/07_traits/wchar_t/ctor.cc: New file.
* testsuite/28_regex/07_traits/wchar_t/length.cc: New file.
* testsuite/28_regex/07_traits/wchar_t/transform.cc: New file.
* testsuite/28_regex/07_traits/wchar_t/translate.cc: New file.
* testsuite/28_regex/07_traits/wchar_t/translate_nocase.cc: New file.
* testsuite/28_regex/07_traits/wchar_t/value.cc: New file.
* testsuite/28_regex/08_basic_regex: New file.
* testsuite/28_regex/08_basic_regex/assign: New file.
* testsuite/28_regex/08_basic_regex/assign/char: New file.
* testsuite/28_regex/08_basic_regex/assign/char/cstring.cc: New file.
* testsuite/28_regex/08_basic_regex/assign/char/cstring_op.cc: New file.
* testsuite/28_regex/08_basic_regex/assign/char/moveable.cc: New file.
* testsuite/28_regex/08_basic_regex/assign/char/pstring.cc: New file.
* testsuite/28_regex/08_basic_regex/assign/char/range.cc: New file.
* testsuite/28_regex/08_basic_regex/assign/char/string.cc: New file.
* testsuite/28_regex/08_basic_regex/assign/char/string_op.cc: New file.
* testsuite/28_regex/08_basic_regex/assign/wchar_t: New file.
* testsuite/28_regex/08_basic_regex/assign/wchar_t/cstring.cc: New file.
* testsuite/28_regex/08_basic_regex/assign/wchar_t/cstring_op.cc: New file.
* testsuite/28_regex/08_basic_regex/assign/wchar_t/pstring.cc: New file.
* testsuite/28_regex/08_basic_regex/assign/wchar_t/range.cc: New file.
* testsuite/28_regex/08_basic_regex/assign/wchar_t/string.cc: New file.
* testsuite/28_regex/08_basic_regex/assign/wchar_t/string_op.cc: New file.
* testsuite/28_regex/08_basic_regex/ctors: New file.
* testsuite/28_regex/08_basic_regex/ctors/basic: New file.
* testsuite/28_regex/08_basic_regex/ctors/basic/cstring.cc: New file.
* testsuite/28_regex/08_basic_regex/ctors/basic/pstring_char.cc: New file.
* testsuite/28_regex/08_basic_regex/ctors/basic/pstring_wchar_t.cc: New file.
* testsuite/28_regex/08_basic_regex/ctors/basic/string_range_01_02_03.cc: New file.
* testsuite/28_regex/08_basic_regex/ctors/char: New file.
* testsuite/28_regex/08_basic_regex/ctors/char/cstring_awk.cc: New file.
* testsuite/28_regex/08_basic_regex/ctors/char/cstring.cc: New file.
* testsuite/28_regex/08_basic_regex/ctors/char/cstring_ecma.cc: New file.
* testsuite/28_regex/08_basic_regex/ctors/char/cstring_egrep.cc: New file.
* testsuite/28_regex/08_basic_regex/ctors/char/cstring_grep.cc: New file.
* testsuite/28_regex/08_basic_regex/ctors/char/default.cc: New file.
* testsuite/28_regex/08_basic_regex/ctors/char/range.cc: New file.
* testsuite/28_regex/08_basic_regex/ctors/copy_char.cc: New file.
* testsuite/28_regex/08_basic_regex/ctors/extended: New file.
* testsuite/28_regex/08_basic_regex/ctors/extended/cstring.cc: New file.
* testsuite/28_regex/08_basic_regex/ctors/extended/string_range_01_02_03.cc: New file.
* testsuite/28_regex/08_basic_regex/ctors/move_char.cc: New file.
* testsuite/28_regex/08_basic_regex/ctors/string_char.cc: New file.
* testsuite/28_regex/08_basic_regex/ctors/string_wchar_t.cc: New file.
* testsuite/28_regex/08_basic_regex/ctors/wchar_t: New file.
* testsuite/28_regex/08_basic_regex/ctors/wchar_t/cstring.cc: New file.
* testsuite/28_regex/08_basic_regex/ctors/wchar_t/default.cc: New file.
* testsuite/28_regex/08_basic_regex/ctors/wchar_t/range.cc: New file.
* testsuite/28_regex/08_basic_regex/regex.cc: New file.
* testsuite/28_regex/09_sub_match: New file.
* testsuite/28_regex/09_sub_match/cast_char.cc: New file.
* testsuite/28_regex/09_sub_match/cast_wchar_t.cc: New file.
* testsuite/28_regex/09_sub_match/length.cc: New file.
* testsuite/28_regex/09_sub_match/typedefs.cc: New file.
* testsuite/28_regex/10_match_results: New file.
* testsuite/28_regex/10_match_results/ctors: New file.
* testsuite/28_regex/10_match_results/ctors/char: New file.
* testsuite/28_regex/10_match_results/ctors/char/default.cc: New file.
* testsuite/28_regex/10_match_results/ctors/wchar_t: New file.
* testsuite/28_regex/10_match_results/ctors/wchar_t/default.cc: New file.
* testsuite/28_regex/10_match_results/typedefs.cc: New file.
* testsuite/28_regex/11_algorithms: New file.
* testsuite/28_regex/11_algorithms/02_match: New file.
* testsuite/28_regex/11_algorithms/02_match/basic: New file.
* testsuite/28_regex/11_algorithms/02_match/basic/string_01.cc: New file.
* testsuite/28_regex/11_algorithms/02_match/basic/string_range_00_03.cc: New file.
* testsuite/28_regex/11_algorithms/02_match/basic/string_range_01_03.cc: New file.
* testsuite/28_regex/11_algorithms/02_match/basic/string_range_02_03.cc: New file.
* testsuite/28_regex/11_algorithms/02_match/extended: New file.
* testsuite/28_regex/11_algorithms/02_match/extended/cstring_plus.cc: New file.
* testsuite/28_regex/11_algorithms/02_match/extended/cstring_questionmark.cc: New file.
* testsuite/28_regex/11_algorithms/02_match/extended/string_any.cc: New file.
* testsuite/28_regex/11_algorithms/02_match/extended/string_range_00_03.cc: New file.
* testsuite/28_regex/11_algorithms/02_match/extended/string_range_01_03.cc: New file.
* testsuite/28_regex/11_algorithms/02_match/extended/string_range_02_03.cc: New file.
* testsuite/28_regex/12_iterators: New file.
* testsuite/28_regex/12_iterators/regex_iterator: New file.
* testsuite/28_regex/12_iterators/regex_iterator/ctors: New file.
* testsuite/28_regex/12_iterators/regex_iterator/ctors/char: New file.
* testsuite/28_regex/12_iterators/regex_iterator/ctors/char/default.cc: New file.
* testsuite/28_regex/12_iterators/regex_iterator/ctors/wchar_t: New file.
* testsuite/28_regex/12_iterators/regex_iterator/ctors/wchar_t/default.cc: New file.
* testsuite/28_regex/12_iterators/regex_iterator/typedefs.cc: New file.
* testsuite/28_regex/12_iterators/regex_token_iterator: New file.
* testsuite/28_regex/12_iterators/regex_token_iterator/ctors: New file.
* testsuite/28_regex/12_iterators/regex_token_iterator/ctors/char: New file.
* testsuite/28_regex/12_iterators/regex_token_iterator/ctors/char/default.cc: New file.
* testsuite/28_regex/12_iterators/regex_token_iterator/ctors/wchar_t: New file.
* testsuite/28_regex/12_iterators/regex_token_iterator/ctors/wchar_t/default.cc: New file.
* testsuite/28_regex/12_iterators/regex_token_iterator/typedefs.cc: New file.
* testsuite/28_regex/13_ecmascript: New file.
From-SVN: r161410
2010-06-25 Sebastian Pop <sebastian.pop@amd.com>
* tree-if-conv.c (insert_gimplified_predicates): Do not insert
statements computing the true predicate.
From-SVN: r161398
2010-06-25 Sebastian Pop <sebastian.pop@amd.com>
* tree-if-conv.c (init_bb_predicate): Initialize the predicate
to boolean_true_node.
(reset_bb_predicate): New.
(predicate_bbs): Call reset_bb_predicate.
From-SVN: r161397
2010-06-25 Sebastian Pop <sebastian.pop@amd.com>
* tree-if-conv.c (combine_blocks): Remove FIXME comment.
(tree_if_conversion): Returns true when something has been changed.
(main_tree_if_conversion): Return TODO_cleanup_cfg when if-conversion
changed something.
From-SVN: r161396
2010-06-25 Sebastian Pop <sebastian.pop@amd.com>
* Makefile.in (tree-if-conv.o): Depends on DBGCNT_H.
* dbgcnt.def (if_conversion_tree): New DEBUG_COUNTER.
* tree-if-conv.c: Include dbgcnt.h.
(tree_if_conversion): Use if_conversion_tree to count the number of
if-convertible loops.
From-SVN: r161395
2010-06-25 Changpeng Fang <changpeng.fang@amd.com>
* common.opt (fprefetch-loop-arrays): Re-define
-fprefetch-loop-arrays as a tri-state option with the initial
value of -1.
* tree-ssa-loop.c (gate_tree_ssa_loop_prefetch): Invoke prefetch
pass only when flag_prefetch_loop_arrays > 0.
* toplev.c (process_options): Note that, with tri-states,
flag_prefetch_loop_arrays>0 means prefetching is enabled.
* config/i386/i386.c (override_options): Enable prefetching at -O3
for a set of CPUs that sw prefetching is helpful.
(software_prefetching_beneficial_p): New. Return TRUE if software
prefetching is beneficial for the given CPU.
From-SVN: r161391
2010-06-25 Martin Jambor <mjambor@suse.cz>
* ipa-prop.h (struct ipa_param_descriptor): Removed the modified flag.
(struct ipa_node_params): Removed the modification_analysis_done flag.
(ipa_is_param_modified): Removed.
(ipa_analyze_node): Declare.
(ipa_compute_jump_functions): Remove declaration.
(ipa_count_arguments): Likewise.
(ipa_detect_param_modifications): Likewise.
(ipa_analyze_params_uses): Likewise.
* ipa-prop.c (struct param_analysis_info): New type.
(visit_store_addr_for_mod_analysis): Removed.
(visit_load_for_mod_analysis): Renamed to visit_ref_for_mod_analysis,
moved down in the file.
(ipa_detect_param_modifications): Merged into ipa_analyze_params_uses.
(ipa_count_arguments): Made static.
(mark_modified): New function.
(is_parm_modified_before_call): New function.
(compute_pass_through_member_ptrs): New parameter parms_info, call
is_parm_modified_before_call instead of ipa_is_param_modified.
(ipa_compute_jump_functions_for_edge): New parameter parms_info, pass
it to compute_pass_through_member_ptrs.
(ipa_compute_jump_functions): New parameter parms_info, pass it to
ipa_compute_jump_functions_for_edge. Call ipa_initialize_node_params
on the callee if it is analyzed. Made static.
(ipa_analyze_indirect_call_uses): New parameter parms_info, call
is_parm_modified_before_call instead of ipa_is_param_modified.
(ipa_analyze_call_uses): New parameter parms_info, pass it to
ipa_analyze_indirect_call_uses.
(ipa_analyze_stmt_uses): New parameter parms_info, pass it to
ipa_analyze_call_uses.
(ipa_analyze_params_uses): New parameter parms_info, pass it to
ipa_analyze_stmt_uses. Also perform the used analysis. Made static.
(ipa_analyze_node): New function.
(ipa_print_node_params): Do not dump the modified flag.
(ipa_write_node_info): Assert uses_analysis_done rather than streaming
it. Do not stream the modified parameter flag.
(ipa_read_node_info): Set uses_analysis_done to 1 instead of streaming
it. Do not stream the modified parameter flag.
* ipa-cp.c (ipcp_analyze_node): Removed.
(ipcp_init_stage): Iterate only once over the nodes, analyze each one
with only a call to ipa_analyze_node.
* ipa-inline.c (inline_indirect_intraprocedural_analysis): Analyze the
node with only a call to ipa_analyze_node.
* testsuite/g++.dg/ipa/iinline-3.C: New test.
* testsuite/gcc.dg/ipa/modif-1.c: Removed.
From-SVN: r161384
2010-06-25 Martin Jambor <mjambor@suse.cz>
* ipa-prop.c (determine_cst_member_ptr): Ignore non-clobbering
statements instead of bailing out on them.
(ipa_analyze_indirect_call_uses): Do not require that loads from the
parameter are in the same BB as the condition. Update comments.
* testsuite/g++.dg/ipa/iinline-2.C: New test.
From-SVN: r161377
PR middle-end/43866
* tree-ssa-loop-unswitch.c (tree_may_unswitch_on): If stmt is always
true or always false, return NULL_TREE.
(tree_unswitch_single_loop): Optimize conditions even when reaching
max-unswitch-level parameter. If num > 0, optimize first all conditions
using entry checks, then do still reachable block discovery and consider
only conditions in still reachable basic blocks in the loop.
* gfortran.dg/pr43866.f90: New test.
From-SVN: r161375
PR tree-optimization/44539
* tree-cfgcleanup.c (fixup_noreturn_call): Call update_stmt even when
the call doesn't have LHS, but has VDEF.
* gcc.dg/pr44539.c: New test.
From-SVN: r161374