Age | Commit message (Collapse) | Author | Files | Lines |
|
gcc/ChangeLog:
* c-common.c: Move to c-family/.
* c-common.def: Likewise.
* c-common.h: Likewise.
* c-cppbuiltin.c: Likewise.
* c-dump.c: Likewise.
* c-format.c: Likewise.
* c-format.h : Likewise.
* c-gimplify.c: Likewise.
* c-lex.c: Likewise.
* c-omp.c: Likewise.
* c.opt: Likewise.
* c-opts.c: Likewise.
* c-pch.c: Likewise.
* c-ppoutput.c: Likewise.
* c-pragma.c: Likewise.
* c-pragma.h: Likewise.
* c-pretty-print.c: Likewise.
* c-pretty-print.h: Likewise.
* c-semantics.c: Likewise.
* stub-objc.c: Likewise.
* gengtype.c (get_file_langdir): Special-case files in c-family/.
(get_output_file_with_visibility): Fix name for c-common.h.
* c-config-lang.in: Update paths in gtfiles for files in c-family/.
* c-tree.h: Update include path for moved files.
* c-lang.c: Likewise.
* c-lang.h: Likewise.
* c-parser.c: Likewise.
* c-convert.c: Likewise.
* c-decl.c: Likewise.
* c-objc-common.c: Likewise.
* configure.ac: Make sure c-family/ exists in the build directory.
* configure: Regenerate.
* Makefile.in: Update paths for moved files. Regroup files per
location and update dependencies. Move generated_files down after
ALL_GTFILES_H.
* config/spu/spu-c.c: Update paths for moved files.
* config/mep/mep-pragma.c: Likewise.
* config/darwin-c.c: Likewise.
* config/i386/msformat-c.c: Likewise.
* config/i386/i386-c.c: Likewise.
* config/avr/avr-c.c: Likewise.
* config/sol2-c.c: Likewise.
* config/ia64/ia64-c.c: Likewise.
* config/rs6000/rs6000-c.c: Likewise.
* config/arm/arm.c: Likewise.
* config/arm/arm-c.c: Likewise.
* config/h8300/h8300.c: Likewise.
* config/v850/v850-c.c: Likewise.
* config/t-darwin: Fix dependencies for moved files.
* config/t-sol2: Fix dependencies for moved files.
* config/mep/t-mep: Fix dependencies for moved files.
* config/ia64/t-ia64: Fix dependencies for moved files.
* config/rs6000/t-rs6000: Fix dependencies for moved files.
* config/v850/t-v850: Fix dependencies for moved files.
* config/v850/t-v850e: Fix dependencies for moved files.
* config/m32c/m32c-pragma.c
* po/exgettext: Look in c-family/ also.
c-family/ChangeLog:
* c-common.c: Include gt-c-family-c-common.h.
* c-pragma.c: Include gt-c-family-c-pragma.h.
objc/ChangeLog:
* objc-act.c: Update include path for moved files.
* objc-lang.c: Likewise.
* config-lang.in: Update paths in gtfiles for files in c-family/.
objcp/ChangeLog:
* objcp-lang.c: Update include path for moved files.
* config-lang.in: Update paths in gtfiles for files in c-family/.
cp/ChangeLog:
* typeck.c: Update include path for moved files.
* decl.c: Likewise.
* rtti.c: Likewise.
* cp-gimplify.c: Likewise.
* cp-lang.c: Likewise.
* pt.c: Likewise.
* semantics.c: Likewise.
* cxx-pretty-print.h: Likewise.
* decl2.c: Likewise.
* parser.c: Likewise.
* cp-objcp-common.c: Likewise.
* cp-tree.h: Likewise.
* name-lookup.c: Likewise.
* lex.c: Likewise.
* name-lookup.h: Likewise.
* config-lang.in: Update paths in gtfiles for files in c-family/.
* Make-lang.in: Likewise.
From-SVN: r160330
|
|
* c-lex.c: Do not include c-tree.h.
* c-pretty-print.c: Likewise.
* c-opts.c: Likewise.
* c-gimplify.c: Likewise.
* c-common.c: Likewise.
* c-dump.c: Likewise. Include c-common.h.
From-SVN: r160008
|
|
* diagnostic-core.h: New. Contents moved from diagnostic.h and
toplev.h.
* diagnostic.c: Don't include toplev.h.
(progname): Define. Moved from toplev.c.
(seen_error): New function.
* diagnostic.h: Include diagnostic-core.h.
(diagnostic_t, emit_diagnostic): Don't declare here.
* toplev.c (progname): Move to toplev.c.
(emit_debug_global_declarations, compile_file, finalize,
do_compile, toplev_main): Use seen_error.
* toplev.h: Include diagnostic-core.h.
(trim_filename, GCC_DIAG_STYLE, ATTRIBUTE_GCC_DIAG,
internal_error, warning, warning_at, error, error_n, error_at,
fatal_error, pedwarn, permerror, sorry, inform, inform_n,
verbatim, fnotice, progname): Move to diagnostic-core.h.
* builtins.c: Include diagnostic-core.h instead of diagnostic.h.
(expand_builtin_expect): Use seen_error.
* c-decl.c: Include diagnostic-core.h instead of diagnostic.h.
(c_make_fname_decl, c_write_global_declarations): Use seen_error.
* c-format.c: Include diagnostic-core.h instead of diagnostic.h.
* c-gimplify.c: Include diagnostic-core.h instead of diagnostic.h.
* c-lang.c: Include diagnostic-core.h instead of diagnostic.h.
* c-lex.c (c_lex_with_flags, interpret_float): Don't increment
errorcount for errors.
* c-opts.c (c_common_finish): Use seen_error.
* cgraph.c: Include diagnostic-core.h instead of diagnostic.h.
* cgraphunit.c (verify_cgraph_node, verify_cgraph,
cgraph_output_pending_asms, cgraph_optimize): Use seen_error.
* coverage.c: Include diagnostic-core.h instead of diagnostic.h.
(get_coverage_counts): Use seen_error.
* dwarf2out.c (dwarf2out_finish): Use seen_error.
* gimplify.c (gimplify_var_or_parm_decl, gimple_push_cleanup,
gimplify_body): Use seen_error.
* ipa-inline.c (cgraph_early_inlining): Use seen_error.
* ipa-pure-const.c (gate_pure_const): Use seen_error.
* ipa-reference.c (gate_reference): Use seen_error.
* jump.c: Include diagnostic-core.h instead of diagnostic.h.
* lambda-code.c: Include diagnostic-core.h instead of
diagnostic.h.
* lto-cgraph.c: Include diagnostic-core.h instead of diagnostic.h.
* lto-compress.c: Include diagnostic-core.h instead of
diagnostic.h.
* lto-section-in.c: Include diagnostic-core.h instead of
diagnostic.h.
* lto-streamer-out.c: Include diagnostic-core.h instead of
diagnostic.h.
* lto-streamer.c: Include diagnostic-core.h instead of
diagnostic.h.
(gate_lto_out): Use seen_error.
* matrix-reorg.c: Include diagnostic-core.h instead of
diagnostic.h.
* omega.c: Include diagnostic-core.h instead of diagnostic.h.
* omp-low.c: Include diagnostic-core.h instead of diagnostic.h.
(gate_expand_omp, lower_omp_1): Use seen_error.
* passes.c: Include diagnostic-core.h instead of diagnostic.h.
(rest_of_decl_compilation, rest_of_type_compilation,
gate_rest_of_compilation, ipa_write_summaries): Use seen_error.
* tree-cfg.c (label_to_block_fn): Use seen_error.
* tree-inline.c (optimize_inline_calls): Use seen_error.
* tree-mudflap.c (mudflap_finish_file): Use
seen_error.
* tree-optimize.c (gate_all_optimizations,
gate_all_early_local_passes, gate_all_early_optimizations): Use
seen_error.
* tree-ssa-structalias.c (gate_ipa_pta): Use seen_error.
* varpool.c: Include diagnostic-core.h instead of diagnostic.h.
(varpool_remove_unreferenced_decls,
varpool_assemble_pending_decls): Use seen_error.
* Makefile.in (DIAGNOSTIC_CORE_H): Define.
(TOPLEV_H, DIAGNOSTIC_H): Update.
(c-decl.o, c-lang.o, c-format.o, lto-compress.o, lto-cgraph.o,
lto-streamer-out.o, lto-section-in.o, lto-streamer.o,
c-gimplify.o, omp-low.o, omega.o, diagnostic.o, passes.o,
builtins.o, jump.o, cgraph.o, varpool.o, matrix-reorg.o,
coverage.o, lambda-code.o): Update dependencies.
cp:
* call.c: Include diagnostic-core.h instead of diagnostic.h.
* cp-lang.c: Don't include diagnostic.h
* name-lookup.c: Include diagnostic-core.h instead of
diagnostic.h.
(cp_emit_debug_info_for_using): Use seen_error.
* optimize.c: Include diagnostic-core.h instead of diagnostic.h.
* parser.c: Include diagnostic-core.h instead of diagnostic.h.
* pt.c (iterative_hash_template_arg): Use seen_error.
* repo.c: Include diagnostic-core.h instead of diagnostic.h.
* typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
* Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
dependencies.
lto:
* lto.c: Include diagnostic-core.h instead of diagnostic.h.
(read_cgraph_and_symbols, lto_main): Use seen_error.
* Make-lang.in (lto/lto.o): Update dependencies.
objc:
* objc-act.c: Include diagnostic-core.h instead of diagnostic.h.
* Make-lang.in (objc/objc-act.o): Update dependencies.
From-SVN: r159947
|
|
gcc/ChangeLog:
* rtl.h (decl_default_tls_model): Move prototype from here...
* output.h: ...to here.
* c-decl.c: Do not include rtl.h.
* c-pragma.c: Likewise.
* c-parser.c: Likewise.
* c-gimplify.c: Likewise. And also not hard-reg-set.
* c-common.c: Do not include rtl.h. Include tm_p.h and add a
FIXME note for it. Add a FIXME note for expr.h.
* config/i386/i386-protos.h (ix86_enum_va_list, ix86_fn_abi_va_list,
ix86_canonical_va_list_type): Make visible even if RTX_CODE is not
defined.
cp/ChangeLog:
* decl.c: Do not include rtl.h
* semantics.c: Likewise.
ada/ChangeLog:
* gcc-interface/utils.c: Do not include rtl.h.
fortran/ChangeLog:
* trans-common.c: Do not include rtl.h, include output.h instead.
* trans-decl.c: Likewise.
From-SVN: r159856
|
|
gcc/ChangeLog:
* toplev.c: Include varray.h for statistics dumping.
* tree.h: Do not declare varray_head_tag.
* tree-into-ssa.c, tree-ssa-uninit.c, tree-phinodes.c, omega.c,
regs.h, lto-cgraph.c, tree-ssa-loop-ivopts.c, tree-nomudflap.c,
c-objc-common.c, lto-streamer-out.c, tree-ssa-propagate.c,
gimple-low.c, c-semantics.c, dwarf2out.c, lto-streamer-in.c,
lto-section-in.c, alias.c, tree-if-conv.c, gimplify.c, ggc-zone.c,
tree-ssa.c, tree-ssa-loop-prefetch.c, integrate.h, c-gimplify.c,
c-common.c, c-common.h, reg-stack.c, basic-block.h,
tree-ssa-structalias.c, lto-section-out.c, tree-ssanames.c: Do not
include varray.h.
* Makefile.in: Update for abovementioned changes.
objc/ChangeLog:
* objc-act.c: Do not include varray.h.
objcp/ChangeLog:
* objcp-decl.c: Do not include varray.h.
cp/ChangeLog:
* optimize.c, parser.c,mangle.c, cp-tree.h: DO not include varray.h.
* Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.
From-SVN: r158933
|
|
2009-07-17 Richard Guenther <rguenther@suse.de>
PR c/40401
* tree-pass.h (pass_diagnose_omp_blocks): Declare.
(pass_warn_unused_result): Likewise.
(TODO_set_props): Remove.
* omp-low.c (diagnose_omp_structured_block_errors): Change to
run as a pass.
(pass_diagnose_omp_blocks): Define.
* c-decl.c (pop_file_scope): Do not finalize the CU here.
(c_gimple_diagnostics_recursively): Remove.
(finish_function): Do not call it.
(c_write_global_declarations): Continue after errors.
Finalize the CU here.
* c-gimplify.c (c_genericize): Do not gimplify here.
* c-common.c (c_warn_unused_result): Move ...
* tree-cfg.c (do_warn_unused_result): ... here.
(run_warn_unused_result): New function.
(gate_warn_unused_result): New function.
(pass_warn_unused_result): New pass.
* c-common.h (c_warn_unused_result): Remove.
* flags.h (flag_warn_unused_result): Declare.
* c-opts.c (c_common_init_options): Enable flag_warn_unused_result.
* opts.c (flag_warn_unused_result): Initialize to false.
* toplev.c (compile_file): Add comment.
* omp-low.c (create_omp_child_function): Do not register
the function with the frontend.
(diagnose_omp_structured_block_errors): Prepare to be
called as optimization pass.
(gate_diagnose_omp_blocks): New function.
(pass_diagnose_omp_blocks): New pass.
* cgraph.h (cgraph_optimize): Remove.
(cgraph_analyze_function): Likewise.
* cgraph.c (cgraph_add_new_function): Gimplify C++ thunks.
* cgraphunit.c (cgraph_lower_function): Lower nested functions
before their parents here.
(cgraph_finalize_function): Not here.
(cgraph_analyze_function): Gimplify functions here.
(cgraph_finalize_compilation_unit): Continue after errors.
Optimize the callgraph from here.
(cgraph_optimize): Make static.
* langhooks.c (write_global_declarations): Finalize the CU.
* gimplify.c (gimplify_asm_expr): Do not emit ASMs with errors.
(gimplify_function_tree): Assert we gimplify only once.
Set PROP_gimple_any property.
* tree-nested.c (gimplify_all_functions): New function.
(lower_nested_functions): Gimplify all nested functions.
* gimple.h (diagnose_omp_structured_block_errors): Remove.
* passes.c (init_optimization_passes): Add pass_warn_unused_result
and pass_diagnose_omp_blocks after gimplification. Do not
set TODO_set_props on all_lowering_passes.
(execute_one_pass): Do not handle TODO_set_props.
* Makefile.in (cgraphunit.o): Add $(TREE_DUMP_H) dependency.
(gimplify.o): Add tree-pass.h dependency.
* tree-inline.c (copy_statement_list): Properly copy STATEMENT_LIST.
(copy_tree_body_r): Properly handle TARGET_EXPR like SAVE_EXPR.
(unsave_r): Likewise.
* c-omp.c (c_finish_omp_atomic): Set DECL_CONTEXT on the
temporary variable.
cp/
* decl.c (finish_function): Do not emit unused result warnings
from here.
* cp-objcp-common.h (LANG_HOOKS_POST_GIMPLIFY_PASS): Use
c_warn_unused_result_pass.
* semantics.c (expand_or_defer_fn): Adjust assertion about IL status.
* optimize.c (clone_body): Clone in GENERIC.
(maybe_clone_body): Do not clear DECL_SAVED_TREE.
* decl2.c (cp_write_global_declarations): Fix body test.
Do not call cgraph_optimize.
* Make-lang.in (optimize.o): Add tree-iterator.h dependency.
* method.c (use_thunk): Register thunk with
cgraph_finalize_function.
* error.c (function_category): Guard access of DECL_LANG_SPECIFIC.
java/
* java-gimplify.c (java_genericize): Do not gimplify here.
But replace all local references.
(java_gimplify_expr): Do not replace local references here.
(java_gimplify_modify_expr): Likewise.
* jcf-parse.c (java_parse_file): Do not finalize the CU or
optimize the cgraph here.
* decl.c (java_replace_reference): Make static.
(java_replace_references): New function.
(end_java_method): Clear base_decl_map.
* java-tree.h (java_replace_references): Declare.
(java_replace_reference): Remove.
ada/
* utils.c (end_subprog_body): Revert to pre-tuples state. Remove
unused parameter.
(gnat_gimplify_function): Do not gimplify here.
Fold into its only caller and remove.
(gnat_builtin_function): Adjust for end_subprog_body signature change.
(gnat_write_global_declarations): Also finalize the CU.
* misc.c (gnat_parse_file): Do not finalize the CU here.
* trans.c (gigi): Revert to pre-tuples state.
(Subprogram_Body_to_gnu): Adjust for end_subprog_body signature
change.
* gigi.h (end_subprog_body): Remove unused parameter.
fortran/
* f95-lang.c (gfc_be_parse_file): Do not finalize the CU here.
* trans-decl.c (gfc_gimplify_function): Remove.
(build_entry_thunks): Do not gimplify here.
(create_main_function): Likewise.
(gfc_generate_function_code): Likewise.
* g++.dg/rtti/crash4.C: New testcase.
* g++.dg/torture/20090706-1.C: Likewise.
* gcc.dg/redecl-17.c: Likewise.
* gfortran.dg/missing_optional_dummy_5.f90: Adjust pattern.
* gcc.dg/declspec-9.c: Expect extra error.
* gcc.dg/declspec-10.c: Likewise.
* gcc.dg/declspec-11.c: Likewise.
* gcc.dg/redecl-10.c: Expect extra warnings.
* gcc.target/i386/pr39082-1.c: Adjust diagnostic location.
* gcc.target/i386/pr39545-1.c: Likewise.
* g++.dg/ext/asm3.C: Expect more errors.
* g++.dg/gomp/block-1.C: Likewise.
* g++.dg/gomp/block-2.C: Likewise.
* g++.dg/gomp/block-3.C: Likewise.
* g++.dg/gomp/block-5.C: Likewise.
* g++.old-deja/g++.jason/report.C: Expect extra warnings.
* g++.dg/warn/unused-result1.C: XFAIL.
From-SVN: r149750
|
|
gcc/java/
* java-gimplify.c (java_gimplify_block): New argument to
build_empty_stmt.
* expr.c (force_evaluation_order): Same.
* typeck.c: Add location to build_decl or PUSH_FIELD calls.
* class.c: Same.
* decl.c: Same.
* jcf-parse.c: Same.
* constants.c: Same.
* resource.c: Same.
* except.c: Same.
* builtins.c: Same.
* expr.c: Same.
* java-tree.h (PUSH_FIELD): Add location field.
gcc/objc/
* objc-act.c (finish_var_decl): Pass location to finish_decl.
(objc_get_parm_info): Same.
(get_super_receiver): Same.
* objc-act.c (objc_build_component_ref): Pass location to
build_compound_ref.
(build_module_initializer_routine): Pass location to
c_end_compound_stmt.
(objc_generate_static_init_call): Pass location to build_stmt.
(build_typed_selector_reference): New location argument.
(build_selector_reference): Same.
(objc_substitute_decl): Pass location to build_array_ref.
(next_sjlj_build_try_catch_finally): Pass location to build_stmt.
(objc_begin_catch_clause): Same.
(objc_finish_try_stmt): Same.
(objc_finish_catch_clause): Pass location to c_end_compound_stmt.
(objc_build_throw_stmt): New argument.
(generate_shared_structures): Pass location to build_c_cast.
(objc_build_message_expr): Use local location.
(objc_finish_message_expr): Use input_location.
(build_objc_method_call): New argument.
(objc_build_selector_expr): Same.
(get_super_receiver): Pass location to build_c_cast,
build_modify_expr, build_compound_expr.
* objc-act.c: Add location to all calls to start_struct, build_decl,
finish_struct.
gcc/
* tree-pretty-print.c (dump_generic_node): Dump column numbers.
* gimple-pretty-print.c (dump_gimple_stmt): Same.
* gimplify.c (gimplify_modify_expr): Set location for GIMPLE_ASSIGNs
created.
* c-parser.c (c_parser_binary_expression): Use current column while
building binary operations.
* common.opt (fshow-column): Enable by default.
* tree-vrp.c (check_array_ref): Use warning_at.
(check_array_bounds): Use location from call back if expr has no
location.
* tree.h: Add location argument to maybe_fold_*.
* tree-ssa-ccp.c (ccp_fold): Pass location to maybe_fold_*.
(maybe_fold_offset_to_array_ref): Add location argument and use it.
(maybe_fold_offset_to_component_ref): Same.
(maybe_fold_offset_to_reference): Same.
(maybe_fold_offset_to_address): Same.
(maybe_fold_stmt_indirect): Same.
(maybe_fold_stmt_addition): Same.
(fold_stmt_r): Pass location to maybe_fold_*.
(fold_gimple_assign): Same.
* c-tree.h: Add location argument to finish_decl,
default_function_array_conversion, store_init_value.
* c-decl.c (define_label): Use error_at.
(c_make_fname_decl): Pass location to finish_decl.
(finish_decl): New location argument.
(build_compound_literal): Pass location to store_init_value.
(grokdeclarator): Pass location to finish_decl.
(grokfield): Same.
* c-typeck.c (array_to_pointer_conversion): New location argument.
(function_to_pointer_conversion): Same.
(default_function_array_conversion): Same.
(parser_build_unary_op): Pass location to overflow_warning.
(parser_build_binary_op): Same. Use warning_at.
(build_unary_op): Pass location to array_to_pointer_conversion.
(build_c_cast): Pass location to digest_init.
(build_modify_expr): New location argument.
(convert_for_assignment): Same.
(store_init_value): Same.
(digest_init): Same.
(output_init_element): Pass location to digest_init and
array_to_pointer_conversion.
(c_finish_return): Pass location to convert_for_assignment.
* gimplify.c (gimplify_conversion): Pass location to
maybe_fold_offset_to_address.
* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Pass location
to maybe_fold_stmt_addition.
* c-omp.c (c_finish_omp_atomic): Pass new location to
build_modify_expr.
(c_finish_omp_for): Same.
* c-common.c (overflow_warning): New argument.
* c-common.h: New argument to build_modify_expr, overflow_warning.
* c-parser.c (c_parser_declaration_or_fndef): Pass location to
finish_decl.
(c_parser_initializer): Pass location to
default_function_array_conversion.
(c_parser_initelt): Same.
(c_parser_initval): Same.
(c_parser_asm_operands): Same.
(c_parser_expr_no_commas): Same. Pass location to build_modify_expr.
(c_parser_conditional_expression): Same.
(c_parser_binary_expression): Add location info to stack. Use it.
(c_parser_unary_expression): Pass location to
default_function_array_conversion, parser_build_unary_op,
build_indirect_ref, c_parser_postfix_expression_after_primary.
(c_parser_postfix_expression_after_primary): New location argument.
Use it.
(c_parser_expression_conv): Pass location to
default_function_array_conversion.
(c_parser_expr_list): Same.
(c_parser_omp_atomic): Same.
(c_parser_omp_for_loop): Same.
* c-tree.h: (struct c_declarator): Add comment to id_loc.
(build_array_declarator): New argument.
* c-decl.c (build_array_declarator): Add location argument.
(grokdeclarator): Set id_loc for cdk_array.
* c-parser.c (c_parser_direct_declarator_inner): Pass location to
build_array_declarator.
* tree.c (build_omp_clause): Add location argument.
* tree.h (OMP_CLAUSE_HAS_LOCATION): New macro.
(OMP_CLAUSE_LOCATION): New macro.
(struct tree_omp_clause): Add location field.
(build_omp_clause): Add argument.
* testsuite/gcc.dg/gomp/for-1.c: Fix column.
* cp/pt.c (tsubst_omp_for_iterator): Pass location to
build_omp_clause.
* cp/parser.c (cp_parser_omp_var_list_no_open): Same.
(cp_parser_omp_clause_collapse): Same.
(cp_parser_omp_clause_default): Same.
(cp_parser_omp_clause_if): Same.
(cp_parser_omp_clause_nowait): Same.
(cp_parser_omp_clause_num_threads): Same.
(cp_parser_omp_clause_ordered): Same.
(cp_parser_omp_clause_schedule): Same.
(cp_parser_omp_clause_untied): Same.
(cp_parser_omp_for_loop): Same.
(cp_parser_omp_parallel): Pass location to c_split_parallel_clauses.
* c-tree.h (c_start_case): Add location argument.
(c_process_expr_stmt): Same.
(c_finish_goto_*): Same.
* tree-parloops.c (initialize_reductions): Pass location to
build_omp_clause.
(create_parallel_loop): Same.
* fortran/trans-openmp.c (gfc_trans_omp_variable_list): Same.
(gfc_trans_omp_reduction_list): Same.
(gfc_trans_omp_clauses): Same.
(gfc_trans_omp_do): Same.
* c-typeck.c (c_finish_goto_label): Same.
(c_finish_goto_ptr): New location argument.
(c_start_case): Same.
(emit_side_effect_warnings): Same.
(c_process_expr_stmt): Same.
(c_finish_stmt_expr): Same.
(c_finish_omp_clauses): Use error_at instead of error.
* gimplify.c (gimplify_adjust_omp_clauses_1): Pass location to
build_omp_clause.
* c-omp.c (c_split_parallel_clauses): New location argument.
* tree-nested.c (convert_nonlocal_reference_stmt): Pass location
to build_omp_clause.
(convert_local_reference_stmt): Same.
(convert_gimple_call): Same.
* c-common.h (c_split_parallel_clauses): New argument.
* c-parser.c (c_parser_statement_after_labels): Pass location to
c_finish_goto_label.
(c_parser_switch_statement): Pass location to c_start_case.
(c_parser_for_statement): Pass location to c_finish_expr_stmt,
and c_process_expr_stmt.
(c_parser_omp_variable_list): Add location argument.
(c_parser_omp_clause_collapse): Pass location to
build_omp_clause.
(c_parser_omp_clause_default): Same.
(c_parser_omp_clause_if): Same.
(c_parser_omp_clause_num_threads): Same.
(-c_parser_omp_clause_ordered): Same.
(c_parser_omp_clause_reduction): Pass location to
c_parser_omp_variable_list.
(c_parser_omp_clause_schedule): Pass location to build_omp_clause.
(c_parser_omp_clause_untied): Same.
(c_parser_omp_for_loop): Pass location to c_process_expr_stmt.
(c_parser_omp_parallel): Pass location to
c_split_parallel_clauses.
* c-tree.h (check_for_loop_decls, undeclared_variable,
build_component_ref, build_array_ref, build_external_ref,
c_expr_sizeof_expr, c_expr_sizeof_type, parser_build_unary_op,
build_conditional_expr, build_compound_expr, c_cast_expr,
build_c_cast, build_asm_expr, c_end_compound_stmt, c_finish_stmt_expr,
c_finish_return, c_finish_omp_parallel, c_finish_omp_task): New
argument.
* c-semantics.c (build_stmt): Same.
(build_case_label): Same.
* c-decl.c (c_finish_incomplete_decl): Pass location on down.
(undeclared_variable): New argument.
(make_label): Same.
(lookup_label): Pass location on down.
(define_label): Same.
(finish_decl): Same.
(build_compound_literal): Same.
(finish_struct): Same.
(finish_function): Do not set location here.
(check_for_loop_decls): New argument.
* tree.c (save_expr): Set location.
(build_empty_stmt): New argument.
* tree.h (build_empty_stmt): New argument to build_empty_stmt.
(CAN_HAVE_LOCATION_P): Make sure we have a non empty node.
* builtins.c (gimplify_va_arg_expr): Use locations.
(expand_builtin_sync_operation): Same.
* c-typeck.c (build_component_ref): New argument.
(build_array_ref): Same.
(build_external_ref): Same.
(c_expr_sizeof_expr): Same.
(c_expr_sizeof_type): Same.
(parser_build_unary_op): Same.
(build_conditional_expr): Same.
(build_compound_expr): Pass location on down.
(build_compound_expr): New argument.
(build_c_cast): Same.
(c_cast_expr): Same.
(build_asm_expr): Same.
(c_finish_return): Same.
(c_process_expr_stmt): Pass location on down.
(c_finish_stmt_expr): New argument.
(push_clenaup): Same.
(c_finish_omp_parallel): Same.
(c_finish_omp_task): Same.
* gimplify.c (gimplify_call_expr): Pass location on down.
* c-omp.c (c_finish_omp_master): New argument.
(c_finish_omp_critical): Same.
(c_finish_omp_ordered): Same.
(c_finish_omp_barrier): Same.
(-c_finish_omp_taskwait): Same.
(c_finish_omp_atomic): Same.
(c_finish_omp_flush): Same.
* tree-inline.c (copy_tree_body_r): Pass location on down.
(inline_forbidden_p): Remove use of input_location.
* c-gimplify.c (c_build_bind_expr): New argument.
* c-common.c (c_common_truthvalue_conversion): Pass location on down.
(c_sizeof_or_alignof_type): New argument.
(c_alignof_expr): Same.
(build_va_arg): Same.
(c_add_case_label): Same.
* c-common.h (c_sizeof_or_alignof_type, c_alignof_expr,
c_sizeof, c_alignof, build_va_arg, build_stmt, build_case_label,
c_build_bind_expr, objc_build_selector_expr, objc_build_throw_stmt,
c_finish_omp_master, c_finish_omp_critical, c_finish_omp_ordered,
c_finish_omp_barrier, c_finish_omp_atomic, c_finish_omp_flush,
c_finish_omp_taskwait, c_finish_omp_for, c_split_parallel_clauses):
New argument.
* stub-objc.c (objc_build_selector_expr): Same.
(objc_build_throw_stmt): Same.
* c-parser.c (c_parser_declaration_or_fndef): Pass location on down.
(c_parser_initelt): Same.
(c_parser_compound_statement): Same.
(c_parser_compound_statement_nostart): Same.
(c_parser_label): Same.
(c_parser_statement_after_labels): Same.
(c_parser_if_body): Same.
(c_parser_else_body): Same.
(c_parser_if_statement): Same.
(c_parser_switch_statement): Same.
(c_parser_while_statement): Same.
(c_parser_do_statement): Same.
(c_parser_for_statement): Same.
(c_parser_asm_statement): Same.
(c_parser_conditional_expression): Same.
(c_parser_binary_expression): Same.
(c_parser_cast_expression): Same.
(c_parser_unary_expression): Same.
(c_parser_sizeof_expression): Same.
(c_parser_alignof_expression): Same.
(c_parser_postfix_expression): Same.
(c_parser_expression): Same.
(c_parser_objc_receiver): Same.
(c_parser_omp_variable_list): Same.
(c_parser_omp_structured_block): Same.
(c_parser_omp_atomic): New argument.
(c_parser_omp_barrier): Same.
(c_parser_omp_critical): Same.
(c_parser_omp_flush): Pass location on down.
(c_parser_omp_for_loop): New argument.
(c_parser_omp_for): Same.
(c_parser_omp_master): Same.
(c_parser_omp_ordered): Same.
(c_parser_omp_sections_scope): Same.
(c_parser_omp_sections): Same.
(c_parser_omp_parallel): Same.
(c_parser_omp_single): Same.
(c_parser_omp_task): Same.
(c_parser_omp_taskwait): Pass location on down.
(c_parser_omp_construct): Same.
(c_parser_omp_threadprivate): Same.
* dwarf2asm.c, targhooks.c, optabs.c, tree.c, tree.h, target.h,
builtins.c, omp-low.c, cgraphunit.c, tree-call-cdce.c,
tree-ssa-alias.c, gimple-low.c, c-tree.h, expr.c, tree-parloops.c,
c-decl.c, tree-eh.c, langhooks.c, function.c, stor-layout.c,
c-typeck.c, gimplify.c, c-pragma.c, expmed.c, except.c, coverage.c,
emit-rtl.c, cfgexpand.c, tree-mudflap.c, varasm.c, tree-nested.c,
rtl.h, tree-inline.c, tree-profile.c, c-common.c, c-common.h,
tree-switch-conversion.c, tree-cfg.c, ipa-struct-reorg.c, c-parser.c,
config/i386/i386.c, stmt.c:
Add location argument to the following function definitions and/or
function calls: build_decl, objcp_start_struct, objcp_finish_struct,
start_struct, finish_struct, PUSH_FIELD, create_artificial_label,
cp_make_fname_decl, pushtag, implicitly_declare, c_make_fname_decl,
build_compound_literal, parser_xref_tag, resolve_overloaded_builtin,
do_case, c_finish_bc_stmt, build_compound_literal,
build_function_call.
* c-decl.c (build_compound_literal): Add location argument.
Make all diagnostic calls use location.
(start_struct): Same.
(finish_struct): Same.
(start_enum): Same.
(build_enumerator): Same.
(start_function): Same.
(grokdeclarator): Make all diagnostic calls use location.
(store_parm_decls_oldstyle): Same.
* c-typeck.c (build_function_call): Add location argument.
Make all diagnostic calls use location.
(do_case): Same.
(c_finish_bc_stmt): Same.
* tree-nested.c (get_trampoline_type): Add argument.
Pass location to build_decl.
(lookup_tramp_for_decl): Pass location to get_trampoline_type.
* rtl.h (RTL_LOCATION): New.
* c-common.c (c_add_case_label): Add location argument.
Make all diagnostic calls use location.
* c-common.h: Add location argument to make_fname_decl, do_case,
c_add_case_label, build_function_call, resolve_overloaded_builtin.
* c-parser.c (c_parser_enum_specifier): Rename ident_loc to enum_loc.
Set it appropriately for every case. Pass enum_loc to start_enum
call. Pass value_loc first to build_enumerator. Pass enum_loc to
parser_xref_tag.
(c_parser_struct_or_union_specifier): Save location. Use it for
start_struct, finish_struct, and parser_xref_tag.
gcc/testsuite/
* gcc.dg/old-style-prom-3.c: Add column info.
* gcc.dg/overflow-warn-1.c
* gcc.dg/gomp/pr27415.c
* gcc.dg/gomp/for-1.c: Same.
* gcc.dg/enum-compat-1.c: Same.
* gcc.dg/c99-tag-3.c: Same.
* gcc.dg/Wredundant-decls-2.c: Same.
* gcc.dg/func-ptr-conv-1.c: Same.
* gcc.dg/asm-wide-1.c: Same.
* gcc.dg/nofixed-point-2.c: Same.
* gcc.dg/cpp/line3.c: Same.
* gcc.dg/array-10.c: Same.
* gcc.dg/c99-vla-jump-1.c: Same.
* gcc.dg/pr20368-1.c: Same.
* gcc.dg/Wshadow-3.c: Same.
* gcc.dg/c90-const-expr-8.c: Same.
* gcc.dg/label-decl-2.c: Same.
* gcc.dg/dremf-type-compat-2.c: Same.
* gcc.dg/c90-const-expr-5.c: Same.
* gcc.dg/builtins-30.c: Same.
* gcc.dg/Warray-bounds.c: Same.
* gcc.dg/Wcxx-compat-2.c: Same.
* gcc.dg/tree-ssa/col-1.c: Same.
* gcc.dg/old-style-prom-2.c: Same.
* gcc.dg/cast-function-1.c: Same.
* gcc.dg/pr15698-1.c: Same.
* gcc.dg/dremf-type-compat-3.c: Same.
* gcc.dg/vla-8.c: Same.
* gcc.dg/gomp/pr27415.c: Move firstprivate diagnostics to correct
line.
* gcc.dg/label-decl-2.c: Move label diagnostic to correct line.
* gcc.dg/old-style-prom-3.c: Check for error on the correct line.
* gcc.dg/enum-compat-1.c: Same.
* gcc.dg/dremf-type-compat-2.c: Same.
* gcc.dg/old-style-prom-2.c: Same.
* gcc.dg/pr15698-1.c: Same.
* gcc.dg/pr20368-1.c: Same.
* gcc.dg/dremf-type-compat-3.c: Same.
* gcc.dg/builtins-30.c: Same. Test for columns.
gcc/objcp/
* objcp-decl.h (c_end_compound_stmt): New argument.
* objcp-decl.c (objcp_start_struct): Add argument.
(objcp_finish_struct): Same.
gcc/cp/
* typeck.c (cp_build_binary_op): Pass location to overflow_warning.
(build_modify_expr): New arg.
* semantics.c (finish_unary_op_expr): Pass location to
overflow_warning.
(handle_omp_for_class_iterator): Pass location to build_modify_expr.
* typeck.c (cxx_sizeof_or_alignof_type): Pass location to
c_sizeof_or_alignof_type.
(build_array_ref): New argument.
(build_compound_expr): Same.
(build_const_cast): Same.
(build_ptrmemfunc): Pass location to build_c_cast.
* init.c (avoid_placement_new_aliasing): Pass location to
build_stmt.
(build_vec_delete_1): Pass location to cp_build_modify_expr,
build_compound_expr.
* class.c (build_vtbl_ref_1): Pass location to build_array_ref.
* decl.c (poplevel): Pass location to c_build_bind_expr.
(finish_case_label): Pass location to build_case_label.
(finish_constructor_body): Same.
(finish_destructor_body): Pass location to build_stmt.
(cxx_maybe_build_cleanup): Same, but to build_compound_expr.
* call.c (build_new_op): Pass location to build_array_ref.
(build_x_va_arg): Pass location to build_va_arg.
* except.c (expand_end_catch_block): Pass location to
build_stmt.
* cp-tree.h (build_array_ref): New argument.
(build_compound_expr): Same.
(build_c_cast): Same.
* cp-gimplify.c (gimplify_if_stmt): Pass location on down.
(gimplify_switch_stmt): Same.
* typeck2.c (split_nonconstant_init_1): Same.
* pt.c (tsubst_copy): Same.
* semantics.c (add_decl_expr): Same.
(do_poplevel): Same.
(push_cleanup): Same.
(finish_goto_stmt): Same.
(finish_expr_stmt): Same.
(begin_if_stmt): Same.
(begin_while_stmt): Same.
(begin_do_stmt): Same.
(finish_return_stmt): Same.
(begin_for_stmt): Same.
(finish_break_stmt): Same.
(finish_continue_stmt): Same.
(begin_switch_stmt): Same.
(begin_try_block): Same.
(begin_handler): Same.
(finish_asm_stmt): Same.
(finish_label_stmt): Same.
(finish_stmt_expr_expr): Same.
(finalize_nrv_r): Same.
(finish_omp_atomic): Same.
* name-lookup.c (do_using_directive): Same.
* decl2.c (grok_array_decl): Same.
* parser.c (cp_parser_cast_expression): Same.
(cp_parser_selection_statement): Same.
(cp_parser_implicitly_scoped_statement): Same.
(cp_parser_objc_selector_expression): Same.
(cp_parser_objc_synchronized_statement): Same.
(cp_parser_objc_throw_statement): Same.
(cp_parser_omp_critical): Same.
(cp_parser_omp_master): Same.
* typeck.c (build_function_call): Add location argument.
* init.c: Add location argument to all build_decl calls.
* class.c: Same.
* method.c: Same.
* rtti.c: Same.
* tree.c: Same.
* pt.c: Same.
* semantics.c: Same.
* lex.c: Same.
* decl2.c: Same.
* cp-gimplify.c: Same.
* decl.c: Same.
(cp_make_fname_decl): Add location argument. Pass location ot
build_decl.
(finish_case_label): Same.
* cp-tree.h (finish_case_label): Add location argument.
* parser.c (cp_parser_label_for_labeled_statement): Pass location to
finish_case_label.
gcc/fortran/
* trans-array.c (gfc_trans_allocate_array_storage): Pass
location on down.
(gfc_trans_array_constructor_value): Same.
(gfc_trans_scalarized_loop_end): Same.
(gfc_conv_ss_startstride): Same.
(gfc_trans_g77_array): Same.
(gfc_trans_dummy_array_bias): Same.
(gfc_conv_array_parameter): Same.
(structure_alloc_comps): Same.
* trans-expr.c (gfc_conv_function_call): Same.
(fill_with_spaces): Same.
(gfc_trans_string_copy): Same.
(gfc_trans_scalar_assign): Same.
* trans-stmt.c (gfc_trans_goto): Same.
(gfc_trans_if_1): Same.
(gfc_trans_simple_do): Same.
(gfc_trans_do): Same.
(gfc_trans_do_while): Same.
(gfc_trans_logical_select): Same.
(gfc_trans_select): Same.
(gfc_trans_forall_loop): Same.
(gfc_trans_nested_forall_loop): Same.
(generate_loop_for_temp_to_lhs): Same.
(generate_loop_for_rhs_to_temp): Same.
(gfc_trans_forall_1): Same.
(gfc_trans_where_assign): Same.
(gfc_trans_where_3): Same.
(gfc_trans_allocate): Same.
* trans.c (gfc_finish_block): Same.
(gfc_trans_runtime_check): Same.
(gfc_call_malloc): Same.
(gfc_allocate_with_status): Same.
(gfc_call_free): Same.
(gfc_deallocate_with_status): Same.
(gfc_call_realloc): Same.
(gfc_trans_code): Same.
* trans-decl.c (gfc_init_default_dt): Same.
(gfc_generate_constructors): Same.
* trans-io.c (gfc_trans_io_runtime_check): Same.
* trans-intrinsic.c (gfc_conv_intrinsic_ctime): Same.
(gfc_conv_intrinsic_fdate): Same.
(gfc_conv_intrinsic_ttynam): Same.
(gfc_conv_intrinsic_minmax): Same.
(gfc_conv_intrinsic_minmax_char): Same.
(gfc_conv_intrinsic_anyall): Same.
(gfc_conv_intrinsic_count): Same.
(gfc_conv_intrinsic_arith): Same.
(gfc_conv_intrinsic_minmaxloc): Same.
(gfc_conv_intrinsic_minmaxval): Same.
(gfc_conv_intrinsic_rrspacing): Same.
(gfc_conv_intrinsic_array_transfer): Same.
(gfc_conv_intrinsic_trim): Same.
(gfc_conv_intrinsic_repeat): Same.
From-SVN: r148442
|
|
2009-05-03 Richard Guenther <rguenther@suse.de>
PR c/39983
* c-typeck.c (array_to_pointer_conversion): Do not built
ADDR_EXPRs of arrays of pointer-to-element type.
* c-gimplify.c (c_gimplify_expr): Revert change fixing
up wrong ADDR_EXPRs after-the-fact.
* c-common.c (strict_aliasing_warning): Strip pointer
conversions for obtaining the original type.
* builtins.c (fold_builtin_memset): Handle array types.
(fold_builtin_memory_op): Handle folded POINTER_PLUS_EXPRs
and array types
* gcc.c-torture/compile/pr39983.c: New testcase.
From-SVN: r147083
|
|
2009-04-11 Richard Guenther <rguenther@suse.de>
PR c/39712
* c-gimplify.c (c_gimplify_expr): Adjust check for mismatched
address expressions.
* gcc.dg/pr39712.c: New testcase.
From-SVN: r145950
|
|
adjusting their types and...
2009-04-09 Richard Guenther <rguenther@suse.de>
* c-gimplify.c (c_gimplify_expr): Fix the invalid GENERIC
&ARRAY addresses by adjusting their types and prepending
a conversion.
* tree-cfg.c (verify_gimple_assign_single): Verify that
addresses are correct.
* gcc.dg/vect/vect-54.c: Make constant input data file-scope
to prevent constant propagation.
* gcc.dg/vect/vect-56.c: Likewise.
* gcc.dg/vect/vect-58.c: Likewise.
* gcc.dg/vect/vect-60.c: Likewise.
* gcc.dg/vect/no-vfa-vect-57.c: Likewise.
* gcc.dg/vect/no-vfa-vect-61.c: Likewise.
* gcc.dg/tree-prof/stringop-2.c: Adjust expected outcome.
From-SVN: r145800
|
|
2009-03-28 Paolo Bonzini <bonzini@gnu.org>
* c-common.c (c_expand_expr, c_staticp): Remove.
* c-common.def (COMPOUND_LITERAL_EXPR): Delete.
* c-common.h (emit_local_var, c_staticp, COMPOUND_LITERAL_EXPR_DECL,
COMPOUND_LITERAL_EXPR_DECL_EXPR): Remove.
* c-gimplify.c (gimplify_compound_literal_expr,
optimize_compound_literals_in_ctor): Remove.
(c_gimplify_expr): Remove COMPOUND_LITERAL_EXPR handling.
* c-objc-common.h (LANG_HOOKS_STATICP): Remove.
* c-semantics.c (emit_local_var): Remove.
* langhooks-def.h (lhd_expand_expr): Remove.
* langhooks.c (lhd_expand_expr): Remove.
* langhooks.h (LANG_HOOKS_DEF): Remove LANG_HOOKS_EXPAND_EXPR.
* expr.c (expand_expr_real_1): Move COMPOUND_LITERAL_EXPR
handling from c-semantics.c; don't call into langhook.
(expand_expr_addr_expr_1): Check that we don't get non-GENERIC trees.
* gimplify.c (gimplify_compound_literal_expr,
optimize_compound_literals_in_ctor): Move from c-gimplify.c.
(gimplify_init_constructor): Call optimize_compound_literals_in_ctor.
(gimplify_modify_expr_rhs, gimplify_expr): Handle COMPOUND_LITERAL_EXPR
as was done in c-gimplify.c.
* tree.c (staticp): Move COMPOUND_LITERAL_EXPR handling from c_staticp.
* tree.h (COMPOUND_LITERAL_EXPR_DECL, COMPOUND_LITERAL_EXPR_DECL_EXPR):
Move from c-common.h.
* tree.def (COMPOUND_LITERAL_EXPR): Move from c-common.def.
* tree.c (staticp): Do not call langhook.
* langhooks.c (lhd_staticp): Delete.
* langhooks-def.h (lhd_staticp): Delete prototype.
(LANG_HOOKS_STATICP): Delete.
(LANG_HOOKS_INITIALIZER): Delete LANG_HOOKS_STATICP.
* doc/c-tree.texi (Expression nodes): Refer to DECL_EXPRs
instead of DECL_STMTs.
cp:
2009-03-28 Paolo Bonzini <bonzini@gnu.org>
* cp/cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
* cp/cp-objcp-common.c (cxx_staticp): Remove.
* cp/cp-tree.h (cxx_staticp): Remove.
From-SVN: r145256
|
|
ensuring it's already computed.
* c-gimplify.c (c_genericize): Don't refer to DECL_ASSEMBLER_NAME
before ensuring it's already computed.
From-SVN: r141020
|
|
2008-07-28 Richard Guenther <rguenther@suse.de>
Merge from gimple-tuples-branch.
* ChangeLog.tuples: ChangeLog from gimple-tuples-branch.
* gimple.def: New file.
* gsstruct.def: Likewise.
* gimple-iterator.c: Likewise.
* gimple-pretty-print.c: Likewise.
* tree-gimple.c: Removed. Merged into ...
* gimple.c: ... here. New file.
* tree-gimple.h: Removed. Merged into ...
* gimple.h: ... here. New file.
* Makefile.in: Add dependencies on GIMPLE_H and tree-iterator.h.
* configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the
--enable-checking=gimple flag.
* config.in: Likewise.
* configure: Regenerated.
* tree-ssa-operands.h: Tuplified.
* tree-vrp.c: Likewise.
* tree-loop-linear.c: Likewise.
* tree-into-ssa.c: Likewise.
* tree-ssa-loop-im.c: Likewise.
* tree-dump.c: Likewise.
* tree-complex.c: Likewise.
* cgraphbuild.c: Likewise.
* tree-ssa-threadupdate.c: Likewise.
* tree-ssa-loop-niter.c: Likewise.
* tree-pretty-print.c: Likewise.
* tracer.c: Likewise.
* gengtype.c: Likewise.
* tree-loop-distribution.c: Likewise.
* tree-ssa-loop-unswitch.c: Likewise.
* cgraph.c: Likewise.
* cgraph.h: Likewise.
* tree-ssa-loop-manip.c: Likewise.
* value-prof.c: Likewise.
* tree-ssa-loop-ch.c: Likewise.
* tree-tailcall.c: Likewise.
* value-prof.h: Likewise.
* tree.c: Likewise.
* tree.h: Likewise.
* tree-pass.h: Likewise.
* ipa-cp.c: Likewise.
* tree-scalar-evolution.c: Likewise.
* tree-scalar-evolution.h: Likewise.
* target.h: Likewise.
* lambda-mat.c: Likewise.
* tree-phinodes.c: Likewise.
* diagnostic.h: Likewise.
* builtins.c: Likewise.
* tree-ssa-alias-warnings.c: Likewise.
* cfghooks.c: Likewise.
* fold-const.c: Likewise.
* cfghooks.h: Likewise.
* omp-low.c: Likewise.
* tree-ssa-dse.c: Likewise.
* ipa-reference.c: Likewise.
* tree-ssa-uncprop.c: Likewise.
* toplev.c: Likewise.
* tree-gimple.c: Likewise.
* tree-gimple.h: Likewise.
* tree-chrec.c: Likewise.
* tree-chrec.h: Likewise.
* tree-ssa-sccvn.c: Likewise.
* tree-ssa-sccvn.h: Likewise.
* cgraphunit.c: Likewise.
* tree-ssa-copyrename.c: Likewise.
* tree-ssa-ccp.c: Likewise.
* tree-ssa-loop-ivopts.c: Likewise.
* tree-nomudflap.c: Likewise.
* tree-call-cdce.c: Likewise.
* ipa-pure-const.c: Likewise.
* c-format.c: Likewise.
* tree-stdarg.c: Likewise.
* tree-ssa-math-opts.c: Likewise.
* tree-ssa-dom.c: Likewise.
* tree-nrv.c: Likewise.
* tree-ssa-propagate.c: Likewise.
* ipa-utils.c: Likewise.
* tree-ssa-propagate.h: Likewise.
* tree-ssa-alias.c: Likewise.
* gimple-low.c: Likewise.
* tree-ssa-sink.c: Likewise.
* ipa-inline.c: Likewise.
* c-semantics.c: Likewise.
* dwarf2out.c: Likewise.
* expr.c: Likewise.
* tree-ssa-loop-ivcanon.c: Likewise.
* predict.c: Likewise.
* tree-ssa-loop.c: Likewise.
* tree-parloops.c: Likewise.
* tree-ssa-address.c: Likewise.
* tree-ssa-ifcombine.c: Likewise.
* matrix-reorg.c: Likewise.
* c-decl.c: Likewise.
* tree-eh.c: Likewise.
* c-pretty-print.c: Likewise.
* lambda-trans.c: Likewise.
* function.c: Likewise.
* langhooks.c: Likewise.
* ebitmap.h: Likewise.
* tree-vectorizer.c: Likewise.
* function.h: Likewise.
* langhooks.h: Likewise.
* tree-vectorizer.h: Likewise.
* ipa-type-escape.c: Likewise.
* ipa-type-escape.h: Likewise.
* domwalk.c: Likewise.
* tree-if-conv.c: Likewise.
* profile.c: Likewise.
* domwalk.h: Likewise.
* tree-data-ref.c: Likewise.
* tree-data-ref.h: Likewise.
* tree-flow-inline.h: Likewise.
* tree-affine.c: Likewise.
* tree-vect-analyze.c: Likewise.
* c-typeck.c: Likewise.
* gimplify.c: Likewise.
* coretypes.h: Likewise.
* tree-ssa-phiopt.c: Likewise.
* calls.c: Likewise.
* tree-ssa-coalesce.c: Likewise.
* tree.def: Likewise.
* tree-dfa.c: Likewise.
* except.c: Likewise.
* except.h: Likewise.
* cfgexpand.c: Likewise.
* tree-cfgcleanup.c: Likewise.
* tree-ssa-pre.c: Likewise.
* tree-ssa-live.c: Likewise.
* tree-sra.c: Likewise.
* tree-ssa-live.h: Likewise.
* tree-predcom.c: Likewise.
* lambda.h: Likewise.
* tree-mudflap.c: Likewise.
* ipa-prop.c: Likewise.
* print-tree.c: Likewise.
* tree-ssa-copy.c: Likewise.
* ipa-prop.h: Likewise.
* tree-ssa-forwprop.c: Likewise.
* ggc-page.c: Likewise.
* c-omp.c: Likewise.
* tree-ssa-dce.c: Likewise.
* tree-vect-patterns.c: Likewise.
* tree-ssa-ter.c: Likewise.
* tree-nested.c: Likewise.
* tree-ssa.c: Likewise.
* lambda-code.c: Likewise.
* tree-ssa-loop-prefetch.c: Likewise.
* tree-inline.c: Likewise.
* tree-inline.h: Likewise.
* tree-iterator.c: Likewise.
* tree-optimize.c: Likewise.
* tree-ssa-phiprop.c: Likewise.
* tree-vect-transform.c: Likewise.
* tree-object-size.c: Likewise.
* tree-outof-ssa.c: Likewise.
* cfgloop.c: Likewise.
* system.h: Likewise.
* tree-profile.c: Likewise.
* cfgloop.h: Likewise.
* c-gimplify.c: Likewise.
* c-common.c: Likewise.
* tree-vect-generic.c: Likewise.
* tree-flow.h: Likewise.
* c-common.h: Likewise.
* basic-block.h: Likewise.
* tree-ssa-structalias.c: Likewise.
* tree-switch-conversion.c: Likewise.
* tree-ssa-structalias.h: Likewise.
* tree-cfg.c: Likewise.
* passes.c: Likewise.
* ipa-struct-reorg.c: Likewise.
* ipa-struct-reorg.h: Likewise.
* tree-ssa-reassoc.c: Likewise.
* cfgrtl.c: Likewise.
* varpool.c: Likewise.
* stmt.c: Likewise.
* tree-ssanames.c: Likewise.
* tree-ssa-threadedge.c: Likewise.
* langhooks-def.h: Likewise.
* tree-ssa-operands.c: Likewise.
* config/alpha/alpha.c: Likewise.
* config/frv/frv.c: Likewise.
* config/s390/s390.c: Likewise.
* config/m32c/m32c.c: Likewise.
* config/m32c/m32c-protos.h: Likewise.
* config/spu/spu.c: Likewise.
* config/sparc/sparc.c: Likewise.
* config/i386/i386.c: Likewise.
* config/sh/sh.c: Likewise.
* config/xtensa/xtensa.c: Likewise.
* config/stormy16/stormy16.c: Likewise.
* config/ia64/ia64.c: Likewise.
* config/rs6000/rs6000.c: Likewise.
* config/pa/pa.c: Likewise.
* config/mips/mips.c: Likewise.
From-SVN: r138207
|
|
PR c/34146
* c-gimplify.c (optimize_compound_literals_in_ctor): New function.
(c_gimplify_expr): Use it.
PR c/34146
* gcc.dg/tree-ssa/pr34146.c: New test.
PR testsuite/33978
* gcc.dg/tree-ssa/pr33723.c: Adjust scan pattern to make it less
dependent on target settings like move_by_pieces etc.
From-SVN: r130311
|
|
PR tree-optimization/33723
* c-gimplify.c (c_gimplify_expr): Optimize INIT_EXPR or
MODIFY_EXPR with non-addressable COMPOUND_LITERAL_EXPR as source.
* gcc.c-torture/execute/20071029-1.c: New test.
* gcc.dg/tree-ssa/pr33723.c: New test.
From-SVN: r129743
|
|
License and to point readers at the COPYING3 file and the FSF's license web page.
From-SVN: r126948
|
|
2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR C/30265
* c-gimplifier.c (gimplify_compound_literal_expr): Mark the
decl as addressable if the compound literal was marked as
addressable.
Mark the decl as a gimple register if it is a complex or
vector decl and does not live in memory.
2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR C/30265
* gcc.c-torture/compile/compound-literal-2.c: New testcase.
* gcc.c-torture/compile/compound-literal-3.c: New testcase.
From-SVN: r124024
|
|
2006-08-25 Fariborz Jahanian <fjahanian@apple.com>
PR c/28418
* c-gimplify.c (gimplify_compound_literal_expr): Don't add
variable again if DECL_SEEN_IN_BIND_EXPR_P.
2006-08-25 Joseph S. Myers <joseph@codesourcery.com>
* gcc.c-torture/compile/compound-literal-1.c: New test.
From-SVN: r116436
|
|
From-SVN: r113893
|
|
* tree-vrp.c (execute_vrp): Do not pass dump argument to.
loop_optimizer_init and loop_optimizer_finalize
* tree-ssa-sink.c (execute_sink_code): Ditto.
* tree-ssa-loop-ch.c (copy_loop_headers): Ditto.
* tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init,
tree_ssa_loop_done): Ditto.
* tree-ssa-pre.c (init_pre, fini_pre): Ditto.
* sched-ebb.c: Include output.h.
(schedule_ebbs): Do not use dump argument.
* value-prof.h (struct profile_hooks): Remove profile_dump_file.
* loop.c (loop_dump_stream): Removed.
(loop_optimize, rest_of_handle_loop_optimize): Do not use dump
argument.
(scan_loop, move_movables, find_and_verify_loops, mark_loop_jump,
emit_prefetch_instructions, loop_bivs_find, loop_bivs_check,
final_biv_value, loop_biv_eliminable_p, loop_givs_rescan,
loop_iterations, strength_reduce, record_biv, record_giv,
final_giv_value, check_final_value, check_ext_dependent_givs,
combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems,
try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use
dump_file instead of loop_dump_stream.
* ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call
argument dump_file.
* reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use
dump argument.
* flow.c (life_analysis, rest_of_handle_life): Ditto.
* haifa-sched.c: Include output.h
(schedule_insns, sched_init): Do not use dump argument.
* mode-switching.c (optimize_mode_switching): Ditto.
* modulo-sched.c (stats_file): Removed.
(print_node_sched_params): Do not call argument dump_file.
(sms_schedule_by_order, loop_canon_p, sms_schedule,
rest_of_handle_sms): Do not use dump argument. Use dump_file instead
of stats_file.
* cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not
use dump argument.
* loop-init.c (loop_optimizer_init, loop_optimizer_finalize,
rtl_loop_init, rtl_loop_done): Ditto.
* global.c (global_alloc, rest_of_handle_global_alloc): Ditto.
* predict.c (combine_predictions_for_bb, tree_estimate_probability):
Ditto.
* recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto.
* lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto.
* regmove.c (fixup_match_1, fixup_match_2, regmove_optimize,
rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto.
* emit-rtl.c (renumber_insns): Ditto.
* cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr,
expand_gimple_basic_block, tree_expand_cfg): Ditto.
* regclass.c (regclass): Ditto.
* tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts,
remove_ssa_form, rewrite_out_of_ssa): Ditto.
* reg-stack.c (compensate_edge, compensate_edges, convert_regs_1,
convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs):
Ditto.
* sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto.
* local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file
to regclass.
* gcse.c (gcse_file, debug_stderr): Removed.
(gcse_main, bypass_jumps, rest_of_handle_jump_bypass,
rest_of_handle_gcse): Do not use dump argument.
(cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets,
one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb,
pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass,
compute_code_hoist_vbeinout, compute_code_hoist_data,
one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores,
compute_store_table, build_store_vectors, insert_insn_start_bb,
insert_store, remove_reachable_equiv_notes, replace_store_insn,
store_motion): Use dump_file instead of gcse_file.
* ipa-type-escape.c (type_escape_execute): Remove debugging comments.
* profile.c (profile_dump_file): Removed.
(branch_prob): Use dump_file instead of profile_dump_file.
* ipa.c (cgraph_remove_unreachable_nodes): Do not call argument
dump_file.
* tree-ssa-copy.c (dump_copy_of): Ditto.
* rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass
dump file to life_analysis.
* bt-load.c (branch_target_load_optimize): Ditto.
* cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to
renumber_insns.
* rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs,
regclass, dbr_schedule): Declaration changed.
* sched-int.h (sched_init): Declaration changed.
* tree-profile.c (tree_profile_dump_file): Removed.
(tree_profile_hooks): Removed profile_dump_file hook.
* rtl-profile (rtl_profile_dump_file): Removed.
(rtl_profile_hooks): emoved profile_dump_file hook.
* cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration
changed.
* c-gimplify.c (c_genericize): Do not call local variable dump_file.
* tree-cfg.c (build_tree_cfg): Ditto.
* Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency.
* basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm):
Declaration changed.
* config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to
life_analysis and schedule_insns.
* config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to
life_analysis.
* config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to
dbr_schedule.
* config/mips/mips.c (mips_reorg): Ditto.
* config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to
schedule_ebbs.
From-SVN: r110656
|
|
From-SVN: r101317
|
|
* basic-block.h, bb-reorder.c, c-gimplify.c, config/darwin.c,
config/rs6000/rs6000-c.c, dominance.c, gimple-low.c, gimplify.c,
lambda-code.c, lambda-trans.c, tree-browser.c, tree-cfg.c,
tree-chrec.c, tree-data-ref.c, tree-dfa.c, tree-eh.c,
tree-if-conv.c, tree-into-ssa.c, tree-loop-linear.c,
tree-mudflap.c, tree-nomudflap.c, tree-outof-ssa.c,
tree-pretty-print.c, tree-scalar-evolution.c, tree-sra.c,
tree-ssa-ccp.c, tree-ssa-copy.c, tree-ssa-dce.c, tree-ssa-dom.c,
tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-live.c,
tree-ssa-operands.c, tree-ssa-phiopt.c, tree-ssa-pre.c,
tree-ssa-propagate.c, tree-ssa-sink.c, tree-ssa-threadupdate.c,
tree-ssa-uncprop.c, tree-ssa.c, tree-vect-analyze.c,
tree-vect-transform.c, tree-vectorizer.c, vec.c: Don't include
errors.h and include toplev.h if necessary.
* rtl.c, varray.c: If we're compiling as a GENERATOR_FILE, include
errors.h otherwise include toplev.h.
* Makefile.in: Update dependencies.
ada:
* misc.c: Don't include errors.h.
fortran:
* fortran/trans-decl.c: Don't include errors.h.
* fortran/Make-lang.in: Updates dependencies.
java:
* java/verify-glue.c: Don't include errors.h and include toplev.h.
* java/Make-lang.in: Updates dependencies.
treelang:
* treelang/lex.l, treelang/parse.y: Don't include errors.h and
include toplev.h.
* treelang/Make-lang.in: Updates dependencies.
From-SVN: r100420
|
|
./ * c-common.def (EXPR_STMT): Remove, moved to C++ frontend.
* c-common.h (EXPR_STMT_EXPR): Don't define.
(c_common_stmt_codes): Don't define.
* c-dump.c (c_dump_tree): Remove EXPR_STMT case.
* c-gimplify.c (gimplify_expr_stmt): Remove.
(c_gimplify_expr): Remove EXPR_STMT case.
* c-objc-common.c (c_objc_common_init): Remove stmt_codes and call
to INIT_STATEMENT_CODES.
* c-pretty-print.c (pp_c_statement): Just call dump_generic_node.
cp/
* cp-tree.def: Add EXPR_STMT.
* cp-tree.h (cp_stmt_codes): Add EXPR_STMT.
(EXPR_STMT_EXPR): Define.
* cp-gimplify.c: Include "flags.h".
(gimplify_expr_stmt): New static function.
(cp_gimplify_expr): Handle EXPR_STMT.
* cxx-pretty-print.c (pp_cxx_statement): Use pp_cxx_expression
rather than pp_expression.
(pp_cxx_statement): Handle EXPR_STMT.
* dump.c (cp_dump_tree): Handle EXPR_STMT.
* lex.c (cxx_init): Don't use c_common_stmt_codes in stmt_codes
initializer.
From-SVN: r98731
|
|
* diagnostic.c (warning): Accept parameter to classify warning option.
(warning0): New, for when a pointer to an error() like function is needed.
* errors.c (warning): Likewise.
* errors.h (warning, warning0): Adjust prototypes.
* toplev.h (warning, warning0): Likewise.
* attribs.c, builtins.c, c-common.c, c-decl.c, c-format.c,
c-gimplify.c, c-lex.c, c-objc-common.c, c-opts.c, c-parser.c,
c-pragma.c, c-typeck.c, calls.c, cgraph.c, coverage.c, emit-rtl.c,
fold-const.c, fortran/trans-decl.c, function.c, gcse.c,
genautomata.c, haifa-sched.c, opts.c, passes.c, regclass.c,
reload1.c, stmt.c, stor-layout.c, toplev.c, tree-cfg.c,
tree-dump.c, tree-inline.c, tree-mudflap.c, tree-optimize.c,
tree-ssa.c, tree.c, varasm.c: Adjust warning() callers.
* config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c,
config/avr/avr.c, config/bfin/bfin.c, config/c4x/c4x-c.c,
config/c4x/c4x.c, config/cris/cris.c, config/darwin-c.c,
config/darwin.c, config/darwin.h, config/h8300/h8300.c,
config/i386/cygming.h, config/i386/djgpp.h, config/i386/i386.c,
config/i386/winnt.c, config/ia64/ia64-c.c, config/ia64/ia64.c,
config/ip2k/ip2k.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c,
config/m68k/m68k.c, config/mcore/mcore.c, config/mips/mips.c,
config/mmix/mmix.c, config/ns32k/ns32k.c, config/pa/pa-hpux11.h,
config/pa/pa.c, config/rs6000/aix43.h, config/rs6000/aix51.h,
config/rs6000/aix52.h, config/rs6000/darwin.h,
config/rs6000/rs6000-c.c, config/rs6000/rs6000.c,
config/s390/s390.c, config/sh/sh.c, config/sh/sh.h,
config/sh/symbian.c, config/sol2-c.c, config/sol2.c,
config/stormy16/stormy16.c, config/v850/v850-c.c,
config/v850/v850.c, config/xtensa/xtensa.c: Adjust warning()
callers.
* ada/misc.c: Adjust warning() callers.
* cp/call.c, cp/class.c, cp/cvt.c, cp/decl.c, cp/decl2.c,
cp/except.c, cp/friend.c, cp/init.c, cp/lex.c, cp/mangle.c,
cp/method.c, cp/name-lookup.c, cp/parser.c, cp/repo.c, cp/rtti.c,
cp/tree.c, cp/typeck.c, cp/typeck2.c: Adjust warning() callers.
* fortran/trans-decl.c: Adjust warning() callers.
* java/class.c, java/decl.c, java/expr.c, java/jcf-io.c,
java/jcf-parse.c, java/jv-scan.c, java/parse.y: Adjust warning()
callers.
* objc/objc-act.c: Adjust warning() callers.
* treelang/parse.y: Adjust warning() callers.
From-SVN: r98633
|
|
./ * c-common.def: Move FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT,
CONTINUE_STMT, and SWITCH_STMT to cp/cp-tree.def.
* c-common.h (WHILE_COND, WHILE_BODY): Move to cp/cp-tree.h.
(DO_COND, DO_BODY): Likewise.
(FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Likewise.
(SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Likewise.
(c_common_stmt_codes): Remove FOR_STMT, WHILE_STMT, DO_STMT,
BREAK_STMT, CONTINUE_STMT, and SWITCH_STMT.
(build_continue_stmt, build_break_stmt): Don't declare.
(c_do_switch_warnings): Update declaration.
* c-gimplify.c (enum bc_t): Remove.
(struct c_gimplify_ctx, ctxp): Remove.
(push_context, pop_context): Remove static functions.
(c_genericize): Don't call push_context or pop_context.
(begin_bc_block, finish_bc_block): Remove static functions.
(build_bc_goto): Likewise.
(gimplify_c_loop): Likewise.
(gimplify_for_stmt, gimplify_while_stmt): Likewise.
(gimplify_do_stmt, gimplify_switch_stmt): Likewise.
(c_gimplify_expr): Remove handling of FOR_STMT, WHILE_STMT,
DO_STMT, SWITCH_STMT, CONTINUE_STMT, BREAK_STMT.
* c-common.c (c_do_switch_warnings): Rename from
c_do_switch_warnings_1.
(c_do_switch_warnings) [old version]: Remove.
(c_do_switch_expr_warnings): Remove.
* c-typeck.c (c_finish_case): Call new c_do_switch_warnings
function instead of c_do_switch_expr_warnings.
* c-dump.c (c_dump_tree): Remove handling of BREAK_STMT,
CONTINUE_STMT, DO_STMT, FOR_STMT, SWITCH_STMT, and WHILE_STMT.
* c-pretty-print.c (pp_c_statement): Likewise.
* c-semantics.c (build_break_stmt, build_continue_stmt): Remove.
cp/
* cp-tree.def: Define FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT,
CONTINUE_STMT, SWITCH_STMT.
* cp-tree.h (cp_stmt_codes): Add FOR_STMT, WHILE_STMT, DO_STMT,
BREAK_STMT, CONTINUE_STMT, SWITCH_STMT.
(WHILE_COND, WHILE_BODY): Define.
(DO_COND, DO_BODY): Define.
(FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Define.
(SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Define.
* cp-gimplify.c (enum bc_t): Define.
(struct cp_gimplify_ctx, ctxp): Define.
(push_context, pop_context): New static functions.
(begin_bc_block, finish_bc_block): New static functions.
(build_bc_goto): New static function.
(gimplify_cp_loop, gimplify_for_stmt): New static functions.
(gimplify_while_stmt, gimplify_do_stmt): Likewise.
(gimplify_switch_stmt): Likewise.
(cp_gimplify_expr): Handle FOR_STMT, WHILE_STMT, DO_STMT,
SWITCH_STMT, CONTINUE_STMT, BREAK_STMT.
(cp_genericize): Call push_context and pop_context.
* semantics.c (finish_break_stmt): Just call build_stmt
(BREAK_STMT) rather than build_break_stmt.
(finish_continue_stmt): Corresponding change.
* decl.c (pop_switch): Update call to c_do_switch_warnings for new
parameters.
* cxx-pretty-print.c (pp_cxx_statement): Handle SWITCH_STMT,
WHILE_STMT, DO_STMT, FOR_STMT, BREAK_STMT, CONTINUE_STMT.
* dump.c (cp_dump_tree): Likewise.
From-SVN: r97885
|
|
* c-common.def, c-dump.c, c-gimplify.c, c-objc-common.c,
cfgexpand.c, dbxout.c, function.h, opts.c, tree-flow-inline.h,
tree-ssa-operands.h, tree-ssa-threadupdate.c, tree-tailcall.c,
config/avr/avr.md, config/cris/aout.h, config/cris/cris.h,
config/mips/iris6.h, config/sh/sh.c: Update copyright.
From-SVN: r94328
|
|
* tree.h (SWITCH_COND, SWITCH_BODY, SWITCH_LABELS, CASE_LOW,
CASE_HIGH, CASE_LABEL, ASM_STRING, ASM_OUTPUTS, ASM_INPUTS,
ASM_CLOBBERS): Add tree checks.
* c-common.h (SWITCH_TYPE): Rename to SWITCH_STMT_TYPE.
(SWITCH_STMT_COND, SWITCH_STMT_BODY): New.
* c-common.def (SWITCH_STMT): Update to match.
* c-common.c (c_do_switch_warnings): Use SWITCH_STMT accessor
macros instead of SWITCH_EXPR ones.
* c-dump.c (c_dump_tree): Likewise.
* c-gimplify.c (gimplify_switch_stmt): Likewise.
* c-typeck.c (c_start_case, do_case, c_finish_case): Likewise.
cp/
* decl.c (finish_case_label): Use SWITCH_STMT accessor macros
instead of SWITCH_EXPR ones.
* pt.c (tsubst_expr): Likewise.
* semantics.c (begin_switch_stmt, finish_switch_cond,
finish_switch_stmt): Likewise.
doc/
* c-tree.texi (SWITCH_STMT): Update accessor macro names.
From-SVN: r94315
|
|
whose conditions are known at...
* c-gimplify.c (gimplify_c_loop): Improve initial implementations
for loops whose conditions are known at compile-time.
* gimplify.c (append_to_statement_list_1): Remove side_effects
parameter, this function should never be called if its false.
(append_to_statement_list): Only call append_to_statement_list_1
if t is non-NULL tree with side-effects.
(append_to_statement_list_force): Likewise, if t is not NULL.
From-SVN: r91784
|
|
* c-aux-info.c (gen_type): Use gcc_assert or gcc_unreachable.
* c-common.c (c_type_hash, c_common_nodes_and_builtins,
c_expand_expr, boolean_increment, nonnull_check_p,
check_function_arguments_recurse, fold_offsetof_1): Likewise.
* c-cppbuiltin.c (define__GNUC__, builtin_define_stdint_macros,
builtin_define_type_max): Likewise.
* c-decl.c (bind, pop_scope, merge_decls, pushdecl_top_level,
implicit_decl_warning, builtin_function, build_compound_literal,
complete_array_type, grokdeclarator, get_parm_info,
start_function, store_parm_decls_oldstyle,
c_write_global_declarations): Likewise.
* c-format.c (get_constant, decode_format_attr,
maybe_read_dollar_number, get_flag_spec, check_format_arg,
check_format_types, format_type_warning,
find_char_info_specifier_index, init_dynamic_asm_fprintf_info,
init_dynamic_diag_info, handle_format_attribute): Likewise.
* c-gimplify.c (push_context, pop_context, finish_bc_block):
* c-lex.c (c_lex_with_flags, lex_string): Likewise.
* c-objc-common.c (c_tree_printer): Likewise.
* c-pch.c (pch_init): Likewise.
* c-pragma.c (maybe_apply_pragma_weak): Likewise.
* c-pretty-print.c (pp_c_tree_decl_identifier): Likewise.
* c-typeck.c (c_incomplete_type_error, composite_type,
common_pointer_type, common_type, same_translation_unit_p,
tagged_types_tu_compatible_p, finish_init, pop_init_level,
set_designator, set_nonincremental_init_from_string,
process_init_element, c_finish_if_stmt): Likewise.
* caller-save.c (init_caller_save, save_call_clobbered_regs,
insert_restore, insert_save, insert_one_insn): Likewise.
* calls.c (emit_call_1, compute_argument_block_size,
precompute_arguments, expand_call, emit_library_call_value_1,
store_one_arg): Likewise.
From-SVN: r87140
|
|
buildN.
* c-common.c (shorten_compare, pointer_int_sum,
c_common_truthvalue_conversion, boolean_increment): Replace calls
to build with calls to buildN.
* c-decl.c (complete_array_type, grokdeclarator): Likewise.
* c-gimplify.c (c_build_bind_expr, gimplify_c_loop,
gimplify_switch_stmt): Likewise.
* c-typeck.c (default_function_array_conversion,
build_component_ref, build_array_ref, build_function_call,
pointer_diff, build_unary_op, build_conditional_expr,
build_compound_expr, build_modify_expr, c_finish_goto_label,
c_finish_goto_ptr, c_finish_return, c_finish_loop,
c_finish_bc_stmt, c_finish_stmt_expr, c_end_compound_stmt,
build_binary_op): Likewise.
From-SVN: r86018
|
|
* basic-block.h (struct edge_def): Use new source_locus typedef.
* c-common.c (fname_decl): Update save/clear/store of input_location.
(c_do_switch_warnings): Update for USE_MAPPED_LOCATION case.
* c-decl.c: Likewise.
* c-dump.c (dump_stmt): Likewise.
* c-gimplify.c (c-gimplify.c): Generalize using SET_EXPR_LOCATION.
* c-lex.c (cb_line_change): If USE_MAPPED_LOCATION use token's src_loc
to set input_location direction, rather than using linemap_lookup.
(fe_file_change, cb_def_pragma): Again use source_location directly.
* c-opts.c (saved_lineno): Remove static variable.
(c_common_post_options, c_common_init): Don't bothner to save,
clear and restore input_Location - now handled by lang_dependent_init.
* function.c (init_function_start): Use new DECL_IS_BUILTIN macro.
* xcoffout.c (xcoff_assign_fundamental_type_number): Likewise.
From-SVN: r83919
|
|
2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* c-common.c (c_safe_from_p, c_walk_subtrees): Deleted.
* c-common.def (DECL_STMT): Remove.
* c-common.h (DECL_STMT_DECL): Deleted.
(COMPOUNT_LITERAL_EXPR_DECL): Use DECL_EXPR_DECL.
(c_safe_from_p, c_walk_subtrees): Deleted.
* c-decl.c, c-parse.in, c-pretty-print.c: DECL_STMT now DECL_EXPR.
* c-dump.c (c_dump_tree, case DECL_STMT): Deleted.
* c-gimplify.c (gimplify_decl_stmt): Deleted.
(gimplify_compound_literal_expr): Use DECL_EXPR_DECL
and gimplify_and_add.
(c_gimplify_expr, case DECL_EXPR): New case.
(c_gimplify_expr, case DECL_STMT): Deleted.
* c-lang.c (LANG_HOOKS_SAFE_FROM_P): Likewise.
(LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Likewise.
* expr.c (safe_from_p, case 's'): New case.
* gimplify.c (gimplify_decl_expr): New function.
(gimplify_expr, case DECL_EXPR): New case.
* tree-inline.c (walk_tree): Walk into all fields of a type and
decl only if they are in a DECL_EXPR.
(mark_local_for_remap_r): Minor code cleanup.
* tree-outof-ssa.c (discover_nonconstant_array_refs_r): Add else.
* tree.c (has_cleanups, case DECL_EXPR): New case.
* tree.def (DECL_EXPR): New code.
* tree.h (DECL_EXPR_DECL): New macro.
* objc/objc-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
From-SVN: r83721
|
|
* c-gimplify.c (gimplify_for_stmt): Use gimplify_and_add.
* gimplify.c (internal_get_tmp_var, gimplify_return_expr): Likewise.
(gimplify_loop_expr, gimplify_init_constructor): Likewise.
(gimplify_self_mod_expr, gimplify_cond_expr): Likewise.
From-SVN: r83634
|
|
non-constant size check.
* c-gimplify.c (gimplify_decl_stmt): Push gimplify_one_sizepos inside
non-constant size check. Gimplify the type too. Tidy building
BUILT_IN_STACK_ALLOC call
From-SVN: r83582
|
|
* c-gimplify.c (gimplify_decl_stmt): Update gimplify_type_sizes call.
Use gimplify_and_add.
* c-typeck.c (c_finish_if_stmt): Use NULL instead of empty stmt.
* gimplify.c (build_and_jump, gimplify_exit_expr,
gimplify_init_constructor, gimplify_save_expr, gimple_push_cleanup,
gimplify_stmt, gimplify_expr): Likewise.
(shortcut_cond_expr): Handle NULL arms of COND_EXPR.
(gimplify_statement_list): Remove NULL entries.
(gimplify_to_stmt_list): Handle NULL results.
(gimplify_type_sizes): Add list_p argument.
(gimplify_one_sizepos): Don't use internal pre/post queue.
* tree-gimple.h (gimplify_type_sizes): Update.
ada/
* trans.c (gnat_gimplify_stmt): Update gimplify_type_sizes call.
From-SVN: r83539
|
|
* alias.c (adjust_offset_for_component_ref): Use
component_ref_field_offset.
* c-decl.c (build_array_declarator): Add news args for ARRAY_REF.
* c-gimplify.c (gimplify_expr_stmt): Use alloc_stmt_list.
(gimplify_decl_stmt): Call gimplify_type_sizes for type.
For decl, call gimplify_one_sizepos and use statement list.
(gimplify_compound_literal_expr): New arg PRE_P.
Add statement to PRE_P list and return DECL.
(c_gimplify_expr, case COMPOUND_LITERAL_EXPR): Add arg to
gimplify_compound_literal_expr.
* c-tree.h (getdecls): Deleted.
* c-typeck.c (build_component_ref): Add operand for COMPONENT_REF.
(build_array_ref): Add two operands for ARRAY_REF.
(build_unary_op): Set TREE_INVARIANT and TREE_CONSTANT for
COMPOUND_LITERAL_EXPR.
* coverage.c (tree_coverage_counter_ref): Add new operands
for ARRAY_REF.
* emit-rtl.c (component_ref_for_mem_expr): Add new operand
for COMPONENT_REF.
(set_mem_attributes_minus_bitpos): Use array_ref_low_bound
and array_ref_element_size.
(widen_memory_access):Use component_ref_field_offset.
* explow.c (update_nonlocal_goto_save_area): Add two operands
for ARRAY_REF.
* expr.c (array_ref_element_size, array_ref_low_bound): New functions.
(component_ref_field_offset): Likewise.
(get_inner_reference): Use them.
(expand_expr_real_1, case ARRAY_REF): Use array_ref_low_bound.
* fold-const.c (fold, case EQ_EXPR): Properly handle DECL_SIZE.
(fold_read_from_constant_string): Use array_ref_low_bound.
Verify that result is a character type.
(build_fold_indirect_ref): Add two operands for ARRAY_REF.
* function.c (expand_function_start): Likewise.
* gimple-low.c (expand_var_p): Delete duplicated line.
* gimplify.c: Add static decls for local functions.
(cgraph.h): Now included.
(create_tmp_var): Remove check for ARRAY_TYPE.
(copy_if_shared_r): Look at bounds and sizes of types.
(build_and_jump): Return alloc_stmt_list instead of build_empty_stmt.
(gimplify_exit_expr, shortcut_cond_expr): Likewise.
(gimplify_save_expr, gimple_push_cleanup): Likewise.
(gimplify_init_constructor): Likewise.
WANT_VALUE now bool.
If empty list with no result wanted, return GS_UNHANDLED.
Add additional operands for ARRAY_REF and COMPONENT_REF.
(canonicalize_component_ref): Convert to &array[L].
(gimplify_array_ref_to_plus): Use array_ref_element_size and
array_ref_lower_bound.
(build_addr_expr_with_type, build_addr_expr): New functions.
(gimplify_compound_lval): WANT_LVALUE now bool.
Major rework to allow handle_component_p and initialize and
gimplify new operands for ARRAY_REF, ARRAY_RANGE_REF, and
COMPONENT_REF.
(gimplify_array_ref): Deleted.
(gimplify_self_mod_expr): WANT_VALUE now bool.
(gimplify_modify_expr): Gimplify to_p and from_p later.
Factor out code into gimplify_modify_expr_rhs and call twice.
Move variable-size code earlier and handle PLACEHOLDER_EXPR.
(gimplify_modify_expr_rhs, gimplify_variable_sized_compare): New fns.
(gimplify_addr_expr, case VIEW_CONVERT_EXPR): New case.
(gimplify_expr, case ARRAY_REF): Delete special case.
Instead handle like COMPONENT_REF; also do ARRAY_RANGE_REF,
IMAGPART, and REALPART the same way.
(gimplify_expr, case VIEW_CONVERT_EXPR): New case.
(gimplify_expr): Call gimplify_variable_sized_compare if applicable.
Call alloc_stmt_list instead of build_empty_stmt.
Deal with _REF that's volatile.
(gimplify_type_sizes, gimplify_one_sizepos): New functions.
(unshare_body, unvisit_body): New functions.
(gimplify_body): Call them.
* stmt.c (expand_stack_alloc): Don't expand TYPE_MAX_VALUE.
* stor-layout.c (get_pending_sizes): Don't change SAVE_EXPR_CONTEXT.
* tree-alias-common.c (get_alias_var): Also skip ARRAY_RANGE_REF.
* tree-cfg.c (tree_node_can_be_shared): Treat ARRAY_RANGE_REF
like ARRAY_REF.
(verify_expr, case ADDR_EXPR): Use handled_component_p.
* tree-dfa.c (get_virtual_var): Likewise.
* tree-dump.c (dequeue_and_dump, case COMPONENT_REF, ARRAY_REF):
New cases to dump new operands; likewise for ARRAY_RANGE_REF.
* tree-eh.c (tree_could_trap, case ARRAY_RANGE_REF): Like ARRAY_REF.
* tree-gimple.c (is_gimple_addr_expr_arg): Add ARRAY_RANGE_REF
and INDIRECT_REF.
(get_base_address): Use handled_component_p.
* tree-gimple.h (gimplify_type_sizes, gimplify_one_sizepos): New.
* tree-line.c (walk_tree): Walk more things for types and decls.
* tree-mudflap.c (mf_build_check_statement_for): Add new operands
for ARRAY_REF and COMPONENT_REF.
(mx_xform_derefs_1): Clean up usage of decl sizes.
* tree-nested.c (build_addr): Use handled_component_p.
(walk_stmts, case CATCH_EXPR): Add missing "break".
(get_static_chain, get_frame_field): Add new operand for COMPONENT_REF.
(finalize_nesting_tree_1): Likewise.
(convert_nonlocal_reference, case ARRAY_RANGE_REF): Like ARRAY_REF
and process additional operands.
(convert_local_reference): Likewise.
* tree-outof-ssa.c (discover_nonconstant_array_refs_r): Treat
ARRAY_RANGE_REF similarly to ARRAY_REF.
* tree-pretty-print.c (dump_generic_node, case QUAL_UNION_TYPE): Handle
like RECORD_TYPE.
(dump_generic_node, case COMPONENT_REF): Print offset operand.
(dump_generic_node, case ARRAY_RANGE_REF): Treat like ARRAY_REF
and print lower bound and element size for both.
(op_prio, case ARRAY_RANGE_REF): Like ARRAY_REF.
* tree-sra.c (csc_build_component_ref): Add new operand.
(scalarize_call_expr): Use get_base_address.
* tree-ssa-ccp.c (widen_bitfield): Clean up size handling.
(maybe_fold_offset_to_array_ref): Rework to handle input having an
ARRAY_REF, refine handling of lower bound, and add new operands
for ARRAY_REF.
(maybe_fold_to_component_ref): Add new operand for COMPONENT_REF.
(maybe_fold_stmt_indirect): Only fold *&B to B if types match.
(maybe_fold_stmt_addition): Only handle constant lower bound.
* tree-ssa-operands.c (get_expr_operands): Minor rearrangements.
Treat ARRAY_REF and ARRAY_RANGE_REF the same; look at extra operands.
Look at new offset operand of COMPONENT_REF.
* tree-ssa.c (set_is_used): Use handled_component_p.
* tree.c (substitute_in_expr, case COMPONENT_REF): Add new operand.
(stabilize_reference, case COMPONENT_REF): Likewise.
(stabilize_reference, case ARRAY_RANGE_REF, ARRAY_REF): Similarly.
(recompute_tree_invariant_for_addr_expr): Completely rework to
be more precise. Also set TREE_SIDE_EFFECTS.
(build1_stat, case ARRAY_EXPR): Don't handle TREE_SIDE_EFFECTS here.
(build2_stat, build3_stat, build4_stat): For references,
propagate TREE_THIS_VOLATILE.
(get_unwidened): Add new operand for COMPONENT_REF.
(get_narrower): Likewise; use host_integerp for DECL_SIZE.
* tree.def (COMPONENT_REF): Add new operand.
(ARRAY_REF, ARRAY_RANGE_REF): Add two new operands.
* tree.h (array_ref_element_size, array_ref_low_bound): New decls.
(component_ref_field_offset): Likewise.
* config/alpha/alpha.c (alpha_va_start): Add new op for COMPONENT_REF.
(alpha_gimplify_va_arg): Likewise.
* config/i386/i386.c (ix86_va_start, ix86_gimplify_va_arg): Likewise.
* config/i860/i860.c (i860_va_start, i860_va_arg): Likewise.
* config/iq2000/iq2000.c (iq2000_va_arg): Likewise.
* config/mips/mips.c (mips_va_start, mips_va_arg): Likewise.
* config/rs6000/rs6000.c (rs6000_va_start, rs6000_gimplify_va_arg):
Likewise.
* config/s390/s390.c (s390_va_start, s390_gimplify_va_arg): Likewise.
* config/sh/sh.c (sh_va_start, sh_va_arg): Likewise.
* config/stormy16/stormy16.c (xstormy1_expand_builin_va_start):
Likewise.
(xstormy16_expand_builtin_va_arg): Likewise.
* config/xtensa/xtensa.c (xtensa_va_start, xtensa_va_arg): Likewise.
* cp/call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
(build_new_method_call): Likewise.
* cp/decl.c (local_variable_p_walkfn): Don't walk into types.
* cp/decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
(build_anon_union_vars): Add new operand for COMPONENT_REF.
* cp/init.c (buld_new): Add new operand for ARRAY_REF.
* cp/method.c (do_build_copy_constructor): New op for COMPONENT_REF.
(do_build_assign_ref): Likewise.
* cp/parser.c (cp_parser_direct_new_declarator): Add new operands
for ARRAY_REF.
(cp_parser_direct_declarator): Likewise.
* cp/pt.c (tsubst): Likewise.
(tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
for COMPONENT_REF.
* cp/semantics.c (finish_non_static_data_member): Add new operand
for COMPONENT_REF.
* cp/typeck.c (build_class_member_access_expr): Likewise.
(build_class_member_access_expr, finish_class_member_access_expr):
Likewise.
(build_ptrmemfunc_access_expr): Likewise.
(build_array_ref): Add new operands for ARRAY_REF.
* cp/typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
* cp/tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
* fortran/f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
* fortran/trans-array.c (gfc_conv_descriptor_data): Add operand
for COMPONENT_REF.
(gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
(gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
(gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
* fortran/trans-common.c (create_common): Likewise.
* fortran/trans-expr.c (gfc_conv_component_ref): Likewise.
* fortran/trans-io.c (set_parameter_value): Likewise.
(set_parameter_ref, set_string, set_flag, io_result): Likewise.
(transfer_expr): Likewise.
* fortran/trans-decl.c (gfc_trans_auto_character_variable):
Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
(gfc_simplify_function): New function.
(gfc_generate_function-code): Properly handle nested functions.
* fortran/trans.c (gfc_build_array_ref): Add two new operands
for ARRAY_REF.
* java/class.c (build_class_ref): Add new operand for COMPONENT_REF.
(build_static_field_ref): Likewise and add new operands for ARRAY_REF.
* java/constants.c (build_ref_from_constant_pool): Likewise.
* java/expr.c (build_java_array_length_access): Likewise.
(build_get_class, build_field_ref, build_known_method_ref): Likewise.
(invoke_build_dtable, build_invokevirtual): Likewise.
(build_invokeinterface, java_expand_expr): Likewise.
(emit_init_test_initialization): Likewise.
* java/java-gimplify.c (java_gimplify_new_array_init): Likewise.
* java/parse.y (make_qualifed_name, build_array_ref): Likewise.
* objc/ojbc-act.c (generate_static_references): Add additional
operands to ARRAY_REF.
(generate_strings, build_method_prototype_list_template): Likewise.
(generate_protocol_list): Likewise.
From-SVN: r83474
|
|
* c-common.def (RETURN_STMT): Remove.
* c-common.h (RETURN_STMT_EXPR): Remove.
(c_expand_return, build_return_stmt): Remove.
(c_common_stmt_codes): Remove RETURN_STMT.
* c-dump.c (dump_next_stmt): Remove.
(c_dump_tree): Remove RETURN_STMT.
* c-decl.c (finish_function): Use c_finish_return.
* c-parse.in (stmt): Likewise.
* c-gimplify.c (gimplify_return_stmt): Remove.
(c_gimplify_expr): Remove RETURN_STMT.
* c-pretty-print.c (pp_c_statement): Likewise.
* c-semantics.c (build_return_stmt): Remove.
* c-tree.h (c_finish_return): Declare.
* c-typeck.c (c_finish_return): Rename from c_expand_return.
Return void. Build RETURN_EXPR directly.
* tree-dump.h (dump_next_stmt): Remove.
cp/
* dump.c (cp_dump_tree): Don't use dump_next_stmt.
* parser.c (cp_parser_jump_statement): Update commentary.
* pt.c (tsubst_expr): Use RETURN_EXPR.
* semantics.c (finish_return_stmt): Likewise.
(finalize_nrv_r): Likewise.
* typeck.c, typeck2.c: Update file start commentary.
From-SVN: r83461
|
|
* stmt.c (warn_if_unused_value): Add locus argument.
* tree.h (warn_if_unused_value): Update decl.
* c-typeck.c (internal_build_compound_expr): Update call.
* c-gimplify.c (gimplify_expr_stmt): Likewise.
From-SVN: r83416
|
|
* c-common.h (add_decl_stmt): Move to cp-tree.h.
* c-decl.c (finish_decl): Don't use add_decl_stmt.
* c-parse.in: Likewise.
* c-gimplify.c (gimplify_expr_stmt): Don't build CLEANUP_POINT_EXPR.
(gimplify_c_loop, gimplify_return_stmt, gimplify_decl_stmt): Likewise.
* c-semantics.c (add_decl_stmt): Move to cp/semantics.c.
cp/
* cp-tree.h (add_decl_stmt): Declare.
* pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
* semantics.c (maybe_cleanup_point_expr): New.
(add_decl_stmt, finish_expr_stmt, finish_return_stmt,
finish_for_expr, finish_switch_cond): Use it.
(finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
From-SVN: r83409
|
|
* c-common.def (IF_STMT, CLEANUP_STMT): Move to cp-tree.def.
* c-common.h (IF_COND, THEN_CLAUSE, ELSE_CLAUSE, CLEANUP_BODY,
CLEANUP_EXPR, CLEANUP_DECL): Move to cp-tree.h.
(c_common_stmt_codes): Remove IF_STMT, CLEANUP_STMT.
* c-dump.c (c_dump_tree): Move IF_STMT, CLEANUP_STMT to cp_dump_tree.
* c-pretty-print.c (pp_c_statement): Similarly.
* c-gimplify.c (gimplify_cleanup_stmt, gimplify_cleanup_stmts,
gimplify_if_stmt): Move to cp-gimplify.c.
(c_genericize, c_gimplify_expr): Don't call them.
* c-semantics.c (push_cleanup): Move to cp/semantics.c.
* c-typeck.c (push_cleanup): New.
(c_begin_if_stmt, c_finish_if_cond, c_finish_then, c_finish_else,
c_finish_if_stmt): Use COND_EXPR.
* tree.h (CLEANUP_EH_ONLY): Update documentation.
cp/
* cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
* cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
(cp_gimplify_expr): Call it.
(gimplify_cleanup_stmt): Move from c-gimplify.c.
(cp_genericize): New.
* decl.c (finish_function): Call it.
* cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
(CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
(IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
(cp_genericize): Declare.
* cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
* dump.c (cp_dump_tree): Likewise.
* semantics.c (push_cleanup): Move from c-semantics.c.
From-SVN: r83407
|
|
* c-common.c, c-common.h (lang_gimplify_stmt): Remove.
* c-gimplify.c: Remove unnecessary prototypes.
(c_gimplify_stmt): Merge into ...
(c_gimplify_expr): ... here. Don't play with prep_stmt.
* c-semantics.c (prep_stmt): Remove.
* gimplify.c (annotate_one_with_locus): Break out from ...
(annotate_all_with_locus): ... here.
(gimplify_expr): Add locus to expressions even if pre/post queues
are not present.
cp/
* cp-gimplify.c: Remove unnecessary prototypes.
(cp_gimplify_stmt): Merge into ...
(cp_gimplify_expr): ... here. Move to end of file. Handle
stmts_are_full_exprs_p frobbing.
* cp-tree.h (cp_gimplify_stmt): Remove.
* pt.c (tsubst_expr): Merge prep_stmt and unify.
* tree.c (init_tree): Don't set lang_gimplify_stmt.
From-SVN: r83397
|
|
PR c++/16034
* c-gimplify.c (gimplify_condition): Remove.
(gimplify_c_loop, gimplify_if_stmt, gimplify_switch_stmt): Don't
call it.
cp/
* semantics.c (begin_cond): New.
(finish_cond): Rewrite to handle template DECL_STMTs specially.
Assume that non-template decls go land before the conditional.
(simplify_loop_decl_cond): Likewise.
(begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
begin_switch_stmt, finish_switch_cond): Update to match.
From-SVN: r83368
|
|
* c-common.def (COMPOUND_STMT): Remove.
* c-common.c (finish_fname_decls): Don't look through it.
* c-typeck.c (c_tree_expr_nonnegative_p): Likewise.
* c-common.h (COMPOUND_BODY): Remove.
(c_common_stmt_codes): Remove COMPOUND_STMT.
* c-dump.c (c_dump_tree): Likewise.
* c-gimplify.c (c_gimplify_stmt): Likewise.
* c-pretty-print.c (pp_c_statement): Likewise.
* tree.h (DECL_SAVED_TREE): Update commentary.
* doc/c-tree.texi (ASM_EXPR): Rename from ASM_STMT.
(CASE_LABEL_EXPR): Rename from CASE_LABEL.
(GOTO_EXPR): Rename from GOTO_STMT.
(GOTO_FAKE_P): Remove.
(COMPOUND_STMT): Remove.
(HANDLER): Update wrt COMPOUND_STMT.
(STMT_EXPR): Likewise.
(LABEL_EXPR): Rename from LABEL_STMT.
(SCOPE_STMT): Remove.
* objc/objc-act.c (objc_build_try_catch_finally_stmt): Don't look
through COMPOUND_STMT.
cp/
* cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
(BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
* cxx-pretty-print.c (pp_cxx_function_definition): Move handling
of CTOR_INITIALIZER ...
(pp_cxx_statement): ... here.
* decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
(finish_function): Use alloc_stmt_list to zap entire function.
* parser.c (cp_parser_compound_statement): Update commentary.
* pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
* semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
(finish_stmt_expr): Don't look through COMPOUND_STMT.
From-SVN: r83281
|
|
* c-common.def (CASE_LABEL): Remove.
* c-common.c (c_add_case_label): Use CASE_LABEL, not CASE_LABEL_DECL.
(match_case_to_enum_1): Likewise.
* c-common.h (c_common_stmt_codes): Remove CASE_LABEL.
* c-dump.c (c_dump_tree): Likewise.
* c-gimplify.c (c_gimplify_stmt): Likewise.
* c-pretty-print.c (pp_c_statement): Likewise.
* c-semantics.c (build_case_label): Use CASE_LABEL_EXPR.
* tree.h (CASE_LOW): Update commentary.
cp/
* parser.c (cp_parser_labeled_statement): Update commentary.
* pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
* tree.c (mark_local_for_remap_r): Likewise.
From-SVN: r83261
|
|
* c-common.def (ASM_STMT): Remove.
* c-common.h (c_common_stmt_codes): Remove ASM_STMT.
* c-dump.c (c_dump_tree): Likewise.
* c-gimplify.c (c_gimplify_stmt): Likewise.
* c-pretty-print.c (pp_c_statement): Likewise.
* c-typeck.c (build_asm_expr): Use ASM_EXPR.
* tree.h: Fix commentary.
cp/
* parser.c (cp_parser_asm_definition): Update commentary.
* pt.c (tsubst_expr): Use ASM_EXPR.
* semantics.c (finish_asm_stmt): Likewise.
From-SVN: r83260
|
|
* c-common.def (GOTO_STMT, LABEL_STMT): Remove.
* c-common.c (c_add_case_label): Use LABEL_EXPR.
* c-common.h (GOTO_FAKE_P, LABEL_STMT_LABEL): Remove.
(c_common_stmt_codes): Remove GOTO_STMT, LABEL_STMT.
* c-dump.c (c_dump_tree): Likewise.
* c-gimplify.c (c_gimplify_stmt): Likewise.
* c-pretty-print.c (pp_c_statement): Likewise.
* c-parse.in (stmt): Use GOTO_EXPR.
(label): Use LABEL_EXPR.
* c-semantics.c (build_stmt): Set TREE_TYPE to void.
* tree-inline.c (copy_body_r): Don't build empty BLOCKs.
cp/
* decl.c (finish_destructor_body): Use LABEL_EXPR.
* parser.c (cp_parser_statement): Update commentary.
* pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
* semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
* tree.c (mark_local_for_remap_r): Likewise.
From-SVN: r83255
|
|
* c-common.c (lang_gimplify_stmt): Remove next_p argument.
(if_elt, if_stack, if_stack_space, c_expand_start_cond, c_finish_then,
c_expand_end_cond, c_expand_start_else, c_finish_else, c_begin_if_stmt,
c_begin_while_stmt, c_finish_while_stmt_cond): Move to c-typeck.c.
(finish_fname_decls, fname_decl): Use statement_lists.
(c_expand_expr_stmt): Don't set last_expr_type.
(c_type_hash): Fix indentation.
(c_safe_from_p): Don't follow TREE_CHAIN.
(c_tree_chain_matters_p): Remove.
* c-common.def (SCOPE_STMT): Remove.
(CLEANUP_STMT): Redefine to contain its own body.
* c-common.h (struct stmt_tree_s): Remove x_last_stmt,
x_last_expr_type, x_last_expr_filename, x_scope_stmt_stack.
Add x_cur_stmt_list.
(last_tree, last_expr_type, last_expr_filename, RECHAIN_STMTS): Remove.
(cur_stmt_list): New.
(STATEMENT_LIST_STMT_EXPR): New.
(SCOPE_BEGIN_P, SCOPE_END_P, SCOPE_STMT_BLOCK, SCOPE_NULLIFIED_P,
SCOPE_NO_CLEANUPS_P, SCOPE_PARTIAL_P, NEW_FOR_SCOPE_P): Remove.
(CLEANUP_BODY): New.
(CLEANUP_DECL): Move to operand 2.
(c_common_stmt_codes): Remove SCOPE_STMT.
(COMPOUND_STMT_NO_SCOPE, COMPOUND_STMT_BODY_BLOCK): Remove.
* c-decl.c (c_scope_stmt_stack, current_scope_stmt_stack): Remove.
(c_push_function_context, c_pop_function_context): Don't save it.
(finish_decl): Set TREE_USED on the decl for a cleanup.
Use push_cleanup.
(store_parm_decls): Use statement lists.
(finish_function): Remove compstmt rule workaround. Use statement
lists. Call finish_fname_decls after finalizing the body.
(c_begin_compound_stmt): Move to c-typeck.c.
* c-dump.c (c_dump_tree): Remove SCOPE_STMT.
* c-gimplify.c (gimplify_cleanup_stmt, gimplify_cleanup_stmts): New.
(c_genericize): Invoke them.
(c_gimplify_stmt): Don't look through TREE_CHAIN. Kill SCOPE_STMT.
(c_build_bind_expr): Export.
(gimplify_block, gimplify_cleanup): Remove.
(gimplify_condition): Use gimplify_stmt.
(gimplify_for_stmt): Remove FOR_INIT_STMT chaining hack.
(gimplify_if_stmt): Remove recursion hack.
(c_gimplify_expr): Remove STMT_EXPR handling.
(stmt_expr_last_stmt, gimplify_stmt_expr): Remove.
(is_last_stmt_of_scope): Remove.
* c-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
* c-mudflap.c (mflang_flush_calls): Use c_begin_compound_stmt,
c_end_compound_stmt.
* c-objc-common.c (build_cdtor): Likewise.
* c-parse.in (primary): Use c_finish_stmt_expr.
(push_scope, pop_scope): Remove.
(c99_block_start, compstmt_start): Use c_begin_compound_stmt.
(c99_block_end, compstmt): Use c_end_compound_stmt.
(c99_block_lineno_labeled_stmt): Likewise.
(compstmt_primary_start): Use c_begin_stmt_expr.
(simple_if, select_or_iter_stmt): Update calls to stmt builders.
(do_stmt_start): Fill in body directly.
(lineno_stmt): Avoid setting lineno on constants.
* c-pretty-print.c (pp_c_statement): Handle STATEMENT_LIST.
Remove SCOPE_STMT.
* c-semantics.c (begin_stmt_tree): Remove.
(push_stmt_list, re_push_stmt_list, pop_stmt_list): New.
(add_stmt): Use statement lists.
(add_scope_stmt, finish_stmt_tree): Remove.
(push_cleanup): New.
* c-tree.h: Move some decls from c-common.h.
* c-typeck.c (c_tree_expr_nonnegative_p): Simplify for statement lists.
(do_case, c_finish_case): Likewise.
(c_finish_then): Take body for then as argument.
(c_finish_else): Similarly.
(c_begin_for_stmt, c_finish_for_stmt_init, c_finish_for_stmt_cond,
c_finish_for_stmt_incr, c_finish_for_stmt): New.
(c_begin_stmt_expr, c_finish_stmt_expr): New.
(c_begin_compound_stmt): Do scope management.
(c_end_compound_stmt): New.
* fold-const.c (tree_expr_nonnegative_p): Fix BIND_EXPR.
* gimplify.c (voidify_wrapper_expr): Accept temporary argument.
Look through exception handling constructs.
(gimplify_bind_expr): Accept temporary argument.
(gimplify_target_expr): Special case BIND_EXPR bodies.
(gimplify_expr): Handle fallback == fb_none like a statement.
* langhooks-def.h (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Kill.
* langhooks.c (lhd_tree_inlining_tree_chain_matters_p): Remove.
* langhooks.h (tree_chain_matters_p): Remove.
* stub-objc.c (objc_clear_super_receiver): New.
* tree-gimple.h (voidify_wrapper_expr): Update decl.
(append_to_statement_list, append_to_statement_list_force): Move
to tree-iterator.h.
* tree-inline.c (expand_call_inline): Update call.
(clone_body): Use statement lists.
(walk_tree): Don't check tree_chain_matters_p.
(copy_tree_r): Likewise.
* tree-iterator.c (alloc_stmt_list): Clear lang bits.
(tsi_link_before, tsi_link_after): Set TREE_SIDE_EFFECTS properly.
* tree-iterator.h (append_to_statement_list,
append_to_statement_list_force): Moved from tree-gimple.h.
* tree-pretty-print.c (dump_generic_node): Clean up TARGET_EXPR dump.
* objc/objc-act.c (build_module_descriptor): Use c_begin_compound_stmt.
(objc_enter_block): Likewise.
(objc_exit_block): Use c_end_compound_stmt.
(objc_build_try_enter_fragment): Add #error and comment for
rewriting for OBJCPLUS.
(objc_build_extract_fragment, objc_build_try_epilogue,
objc_build_catch_stmt, objc_build_finally_prologue,
objc_build_finally_epilogue): Update for C statement builders.
* objc/objc-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P):
Remove.
cp/
* call.c (initialize_reference): Don't build CLEANUP_STMT here.
* cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
(genericize_try_block): Use gimplify_stmt.
(genericize_catch_block, genericize_eh_spec_block): Likewise.
(cp_gimplify_init_expr): Remove STMT_EXPR special case.
(gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
* cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
(cp_tree_chain_matters_p): Remove.
* cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
(COMPOUND_STMT_BODY_BLOCK): New.
(STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
(EXPR_STMT_STMT_EXPR_RESULT): New.
(building_stmt_tree): Check cur_stmt_list.
(tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
(BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
* decl.c (poplevel): Use pop_stmt_list for minding cleanups.
(cp_finish_decl): Use push_cleanup.
(start_function, finish_function): Use statement lists.
(finish_stmt): Do nothing.
* except.c (begin_eh_spec_block): Use statement lists.
(check_handlers_1, check_handlers): Likewise.
* init.c (construct_virtual_base): Don't add extra compound stmts.
(build_vec_init): Likewise.
* name-lookup.c (maybe_push_cleanup_level): Use statement lists.
* name-lookup.h (struct cp_binding_level): Add statement_list.
* parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
(cp_parser_labeled_statement, cp_parser_expression_statement,
cp_parser_statement_seq_opt): Likewise.
(cp_parser_compound_statement): Likewise. Take bool for try block.
(cp_parser_selection_statement): Tidy if processing.
(cp_parser_already_scoped_statement): Rewrite to do what it says.
* pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
(tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
* semantics.c (do_poplevel, do_pushlevel): Use statement lists.
(finish_cond): New, rewritten from FINISH_COND.
(simplify_loop_decl_cond): New.
(finish_expr_stmt): Avoid nested EXPR_STMTs.
(begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
begin_else_clause, finish_else_clause, finish_if_stmt,
begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
finish_for_cond, finish_for_stmt, begin_switch_stmt,
finish_switch_cond, finish_switch_stmt, begin_try_block,
finish_try_block, finish_cleanup_try_block, finish_function_try_block,
finish_handler_sequence, finish_function_handler_sequence,
begin_handler, finish_handler_parms, finish_handler,
begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
using statement lists.
(begin_compound_stmt): Replace has_no_scope argument with flags.
Update all callers. Use statement lists.
(finish_compound_stmt): Likewise.
(finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
(current_scope_stmt_stack): Remove.
(simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
* typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
Rewrite with statement lists.
testsuite/
* g++.dg/ext/stmtexpr1.C: XFAIL.
* gcc.dg/20030612-1.c: XFAIL.
From-SVN: r83221
|
|
From-SVN: r82885
|
|
* bb-reorder.c, builtins.c, c-common.c, c-gimplify.c,
c-incpath.c, cgraphunit.c, ddg.c, defaults.h, dwarf2out.c,
expmed.c, flags.h, gcc.c, gensupport.c, gimplify.c, global.c,
passes.c, reg-stack.c, target.h, toplev.c, tree-alias-ander.c,
tree-alias-common.c, tree-cfg.c, tree-complex.c, tree-dfa.c,
tree-eh.c, tree-mudflap.c, tree-mudflap.h, tree-outof-ssa.c,
tree-phinodes.c, tree-pretty-print.c, tree-ssa-alias.c,
tree-ssa-ccp.c, tree-ssa-live.c, tree-ssa-live.h,
tree-ssa-pre.c, tree.h, value-prof.h, varasm.c: Fix comment
formatting.
From-SVN: r82463
|
|
lang_hooks.foo.
* c-gimplify.c (c_genericize):
Replace calls via (*lang_hooks.foo) with lang_hooks.foo.
* c-parse.in <expr_no_commas>: Likewise.
<if_prefix>: Likewise.
<select_or_iter_stmt>: Likewise.
* expr.c (expand_var, expand_expr_real_1): Likewise.
* expr.h (expand_expr): Make it a static inline function.
Move prototype for expand_expr_real up before this.
* fold-const.c (fold_relational_hi_lo, fold_relational_const):
Likewise.
* gimplify.c (gimple_boolify, gimplify_addr_expr,
gimplify_asm_expr, gimplify_expr): Likewise.
* tree-cfg.c (dump_tree_cfg, dump_cfg_stats, tree_cfg2vcg,
dump_function_to_file): Likewise.
* tree-dfa.c (dump_immediate_uses, dump_dfa_stats): Likewise.
* tree-inline.c (remap_block, save_body, walk_tree): Likewise.
* tree-into-ssa.c (dump_tree_ssa): Likewise.
* tree-mudflap.c (mf_varname_tree, mf_file_function_line_tree):
Likewise.
* tree-optimize.c (execute_one_pass): Likewise.
* tree-pretty-print.c (dump_generic_bb_buff): Likewise.
* tree-ssa-alias.c (dump_alias_stats, dump_alias_info): Likewise.
objc/
* objc-act.c (objc_build_try_enter_fragment,
objc_build_try_epilogue, objc_build_catch_stmt,
objc_build_finally_prologue): Replace calls via (*lang_hooks.foo)
with lang_hooks.foo ().
From-SVN: r81907
|