aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
AgeCommit message (Collapse)AuthorFilesLines
2010-04-07tree-ssa-pre.c (my_rev_post_order_compute): Remove set but not used count ↵Jakub Jelinek1-2/+2
variable. * tree-ssa-pre.c (my_rev_post_order_compute): Remove set but not used count variable. * genemit.c (gen_expand, gen_split): Avoid set but not used warnings when operandN variables aren't used in the body of the expander or splitter. * tree-outof-ssa.c (FOR_EACH_ELIM_GRAPH_SUCC, FOR_EACH_ELIM_GRAPH_PRED): Avoid set but not used warnings. * tree-ssa-operands.h (FOR_EACH_SSA_TREE_OPERAND): Likewise. * tree-flow.h (FOR_EACH_IMM_USE_FAST, FOR_EACH_IMM_USE_STMT, FOR_EACH_IMM_USE_ON_STMT): Likewise. * tree.h (FOR_EACH_CONSTRUCTOR_ELT): Likewise. * tree.c (PROCESS_ARG): Likewise. fortran/ * parse.c (parse_derived, parse_enum): Avoid set but not used warning. java/ * expr.c (process_jvm_instruction): Avoid set but not used warning. * builtins.c (compareAndSwapInt_builtin, compareAndSwapLong_builtin, getVolatile_builtin): Likewise. libjava/ * exception.cc (_Jv_Throw): Avoid set but not used warning. * include/java-assert.h (JvAssertMessage, JvAssert): Use argument in sizeof to avoid set but not used warnings. libjava/classpath/ * native/jni/midi-alsa/gnu_javax_sound_midi_alsa_AlsaPortDevice.c (Java_gnu_javax_sound_midi_alsa_AlsaPortDevice_run_1receiver_1thread_1): Avoid set but not used warning. libiberty/ * regex.c (byte_re_match_2_internal): Avoid set but not used warning. gcc/testsuite/ * gcc.dg/builtin-choose-expr.c: Avoid set but not used warnings. * gcc.dg/trunc-1.c: Likewise. * gcc.dg/vla-9.c: Likewise. * gcc.dg/dfp/composite-type.c: Likewise. libffi/ * testsuite/libffi.call/err_bad_abi.c: Remove unused args variable. From-SVN: r158084
2010-04-07re PR debug/43516 ("-fcompare-debug failure" at -O2)Jakub Jelinek1-4/+22
PR debug/43516 * tree.c (MAX_INT_CACHED_PREC): Define. (nonstandard_integer_type_cache): New array. (build_nonstandard_integer_type): Cache results for precision <= MAX_INT_CACHED_PREC. From-SVN: r158062
2010-04-07re PR rtl-optimization/42617 (TARGET_MEM_REF and plain INDIRECT_REFs are not ↵Richard Guenther1-0/+3
handled by the RTL oracle) 2010-04-07 Richard Guenther <rguenther@suse.de> PR middle-end/42617 * emit-rtl.c (set_mem_attributes_minus_bitpos): Do not discard plain indirect references. * fold-const.c (operand_equal_p): Guard against NULL_TREE type. * tree.c (tree_nop_conversion): Likewise. From-SVN: r158045
2010-04-01re PR tree-optimization/43614 (ice in gimple_rhs_has_side_effects, at ↵Richard Guenther1-1/+5
gimple.c:2248) 2010-04-01 Richard Guenther <rguenther@suse.de> PR middle-end/43614 * tree-ssa-address.c (copy_mem_ref_info): Copy TREE_SIDE_EFFECTS and TREE_THIS_VOLATILE. (copy_ref_info): Likewise. * tree-ssa-operands.c (get_tmr_operands): Check TREE_THIS_VOLATILE. * tree.c (build6_stat): Ignore side-effects of all but arg5 for TARGET_MEM_REF. Set TREE_THIS_VOLATILE from arg5 of TARGET_MEM_REF. * gcc.c-torture/compile/pr43614.c: New testcase. From-SVN: r157913
2010-03-11re PR tree-optimization/43257 (IPA-SRA changes DECL_ASSEMBLER_NAME)Martin Jambor1-20/+28
2010-03-11 Martin Jambor <mjambor@suse.cz> PR tree-optimization/43257 * tree.c (assign_assembler_name_if_neeeded): New function. (free_lang_data_in_cgraph): Assembler name assignment moved to the above new function. * tree.h (assign_assembler_name_if_neeeded): Declare. * cgraphunit.c (cgraph_analyze_function): Create an assembler name for the function if needed. * testsuite/g++.dg/torture/pr43257.C: New test. From-SVN: r157393
2010-02-10re PR c/43007 (No longer folds (unsigned int) ((long long unsigned int) ↵Richard Guenther1-0/+8
spi_bias / 1008)) 2010-02-10 Richard Guenther <rguenther@suse.de> PR c/43007 * tree.c (get_unwidened): Handle constants. * convert.c (convert_to_integer): Handle TRUNC_DIV_EXPR. * gcc.c-torture/execute/20100209-1.c: New testcase. * gcc.dg/fold-div-3.c: Likewise. From-SVN: r156653
2010-01-21tree.h (TYPE_TRANSPARENT_UNION): Replace with ...Janis Johnson1-0/+12
* tree.h (TYPE_TRANSPARENT_UNION): Replace with ... (TYPE_TRANSPARENT_AGGR): this, for union and record. * calls.c (initialize argument_information): Handle it. * c-common.c (handle_transparent_union_attribute): Use new name. * c-decl.c (finish_struct): Ditto. * c-typeck.c (type_lists_compatible_p): Ditto. (convert_for_assignment): Use new name and also handle record. * function.c (aggregate_value_p): Handle it. (pass_by_reference): Ditto. (assign_parm_data_types): Ditto. * print-tree.c (print_node): Ditto. * lto-streamer-in.c (unpack_ts_type_value_fields): Ditto. * lto-streamer-out.c (pack_ts_type_value_fields): Ditto. * tree.c (first_field): New fn. gcc/cp/ * mangle.c (write_type): Mangle transparent record as member type. * semantics.c (begin_class_definition): Recognize decimal classes and set TYPE_TRANSPARENT_AGGR. Co-Authored-By: Jason Merrill <jason@redhat.com> From-SVN: r156106
2009-12-15tree.c (free_lang_data_in_binfo): Do not free BINFO_OFFSET and BINFO_VPTR_FIELD.Richard Guenther1-32/+10
2009-12-15 Richard Guenther <rguenther@suse.de> * tree.c (free_lang_data_in_binfo): Do not free BINFO_OFFSET and BINFO_VPTR_FIELD. (free_lang_data_in_type): Do not free TYPE_STUB_DECL if we generate debug information. (free_lang_data_in_decl): Do not free DECL_SIZE_UNIT, DECL_SIZE, DECL_FIELD_OFFSET and DECL_FCONTEXT. (free_lang_data): Do not disable debuginfo. * lto-streamer-out.c (write_symbol_vec): Deal with non-constant DECL_SIZE. (pack_ts_base_value_fields): Write types with false TREE_ASM_WRITTEN. (lto_output_ts_type_tree_pointers): Stream TYPE_STUB_DECL. * lto-streamer-in.c (lto_input_ts_type_tree_pointers): Stream TYPE_STUB_DECL. * dwarf2out.c (add_pure_or_virtual_attribute): Check for DECL_CONTEXT. (gen_type_die_for_member): Test for TYPE_STUB_DECL. * opts.c (decode_options): Do not disable var-tracking for lto. * doc/invoke.texi (-flto): Document -flto vs. -g experimental status. (-fwhopr): Document experimental status. lto/ * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET. (lto_post_options): Do not disable debuginfo. From-SVN: r155259
2009-12-12tree.c (need_assembler_name_p): Abstract decls do not need an assembler name.Richard Guenther1-0/+4
2009-12-12 Richard Guenther <rguenther@suse.de> * tree.c (need_assembler_name_p): Abstract decls do not need an assembler name. * dwarf2out.c (dwarf2out_abstract_function): Preserve DECL_ABSTRACT properly. From-SVN: r155189
2009-12-02re PR lto/42088 (flag_gtoggle in free_lang_data hides -fcompare-debug errors)Richard Guenther1-6/+2
2009-12-02 Richard Guenther <rguenther@suse.de> PR middle-end/42088 * tree.c (free_lang_data): Disable if not using LTO. From-SVN: r154918
2009-12-02re PR middle-end/42224 (32bit pointers to 32bit pointers abort on 64bit VMS ↵Ulrich Weigand1-43/+4
and S390X) gcc/ PR middle-end/42224 * tree.h (int_or_pointer_precision): Remove. * tree.c (int_or_pointer_precision): Remove. (integer_pow2p): Use TYPE_PRECISION instead. (tree_log2): Likewise. (tree_floor_log2): Likewise. (signed_or_unsigned_type_for): Likewise. * fold-const.c (fit_double_type): Likewise. * varasm.c (initializer_constant_valid_p): Likewise. gcc/testsuite/ PR middle-end/42224 * gcc.target/s390/pr42224.c: New test. From-SVN: r154908
2009-11-30tree.c (free_lang_data): Do not set debug_info_level to none if terse.Richard Guenther1-1/+1
2009-11-30 Richard Guenther <rguenther@suse.de> * tree.c (free_lang_data): Do not set debug_info_level to none if terse. From-SVN: r154781
2009-11-25Remove trailing white spaces.H.J. Lu1-65/+65
2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-24tree.h (union tree_ann_d): Don't declare.Michael Matz1-1/+2
* tree.h (union tree_ann_d): Don't declare. (tree_base): Remove ann field. (struct var_ann_d): Declare forward. (tree_result_decl, tree_parm_decl, tree_var_decl): Add ann field. (DECL_VAR_ANN_PTR): New macro. * tree-dfa.c (create_var_ann): Rewrite in terms of above macro, accept only VAR, PARM or RESULT decls. (create_tree_common_ann): Remove. (remove_referenced_var): Use DECL_VAR_ANN_PTR. * tree-eh.c (lookup_expr_eh_lp): Remove. * tree-flow-inline.h (var_ann, get_var_ann): Rewrite in terms of DECL_VAR_ANN_PTR. (ann_type, tree_common_ann, get_tree_common_ann): Remove. * tree-flow.h (enum tree_ann_type): Remove. (struct tree_ann_common_d): Remove. (struct var_ann_d): Remove common field. (union tree_ann_d): Remove. (tree_ann_t, tree_ann_common_t): Remove typedefs. (tree_common_ann, get_tree_common_ann, ann_type, create_tree_common_ann, lookup_expr_eh_lp): Don't declare. * tree-ssa.c (delete_tree_ssa): Use DECL_VAR_ANN_PTR. * tree.c (copy_node_stat): Use DECL_VAR_ANN_PTR. * builtins.c (expand_builtin_memcpy): Use currently_expanding_gimple_stmt instead of tree annotation. (expand_builtin_memset_args): Ditto. * cfgexpand.c (currently_expanding_gimple_stmt): Add global variable. (expand_call_stmt): Don't set tree annotation. (expand_gimple_basic_block): Set currently_expanding_gimple_stmt. * expr.c (expand_expr_real): Don't call lookup_expr_eh_lp. * gimple.h (currently_expanding_gimple_stmt): Declare. From-SVN: r154502
2009-11-19gimple.c (canonicalize_cond_expr_cond): Strip conversions around ↵Richard Guenther1-2/+5
truth-valued expressions. 2009-11-19 Richard Guenther <rguenther@suse.de> * gimple.c (canonicalize_cond_expr_cond): Strip conversions around truth-valued expressions. * tree.c (free_lang_data): Untangle check for LTO frontend. From-SVN: r154332
2009-11-19tree.c (need_assembler_name_p): Use cgraph_get_node instead of ↵Jakub Jelinek1-1/+1
cgraph_node_for_decl. * tree.c (need_assembler_name_p): Use cgraph_get_node instead of cgraph_node_for_decl. * cgraph.h (cgraph_node_for_decl): Remove prototype. * cgraph.c (cgraph_node_for_decl): Remove. (cgraph_get_node): Just return NULL if !cgraph_hash. From-SVN: r154329
2009-11-08cfgrtl.c (pass_free_cfg): Add pass name.Zbigniew Chamski1-1/+1
* cfgrtl.c (pass_free_cfg): Add pass name. * cgraphbuild.c (pass_build_cgraph_edges): Likewise. (pass_rebuild_cgraph_edges, pass_remove_cgraph_callee_edges): Likewise. * dce.c (pass_ud_rtl_dce, pass_fast_rtl_dce): Change pass name. * df-core.c (pass_df_initialize_no_opt): Likewise. * except.c (pass_rtl_eh): Likewise. * function.c (pass_init_function, pass_leaf_regs): Likewise. * gcse.c (pass_rtl_pre): Change pass name. * passes.c (pass_postreload): Add pass name. (make_pass_instance): Don't use duplicate-tracking logic for names starting with '*'. (next_pass_1): Assert that pass has a name. (register_one_dump_file): If there is an space in the name, skip past it. * predict.c (pass_strip_predict_hints): Add pass name. * reg-stack.c (pass_stack_regs): Likewise. * stack-ptr-mod.c (pass_stack_ptr_mod): Likewise. * tree-cfg.c (pass_warn_function_return, pass_warn_function_noreturn): Add pass name. * tree-dfa.c (pass_referenced_vars): Likewise. * tree-optimize.c (pass_cleanup_cfg_post_optimizing): Fix whitespace before comment. (pass_fixup_cfg): Add pass name, fix whitespace before comment. (pass_init_datastructures): Add pass name. * tree-ssa-loop.c (pass_record_bounds): Likewise. * tree-ssa.c (pass_early_warn_uninitialized, pass_late_warn_uninitialized): Likewise. * tree.c (pass_ipa_free_lang_data): Likewise. * doc/passes.texi (pass manager): Document how to disambiguate pass names. Co-Authored-By: Joern Rennecke <amylaar@spamcop.net> From-SVN: r154013
2009-11-07* tree.c (reconstruct_complex_type): Preserve attributes.Jason Merrill1-1/+2
From-SVN: r154007
2009-11-03re PR target/10127 (-fstack-check let's program crash)Eric Botcazou1-1/+2
PR target/10127 PR ada/20548 * expr.h (STACK_CHECK_PROBE_INTERVAL): Delete. (STACK_CHECK_PROBE_INTERVAL_EXP): New macro. (STACK_CHECK_MOVING_SP): Likewise. * system.h (STACK_CHECK_PROBE_INTERVAL): Poison it. * doc/tm.texi (Stack Checking): Delete STACK_CHECK_PROBE_INTERVAL. Document STACK_CHECK_PROBE_INTERVAL_EXP and STACK_CHECK_MOVING_SP. * doc/md.texi (Standard Pattern Names): Tweak entry of CHECK_STACK. Document PROBE_STACK. * explow.c (anti_adjust_stack_and_probe): New function. (allocate_dynamic_stack_space): Do not directly allocate space if STACK_CHECK_MOVING_SP, instead invoke above function. (emit_stack_probe): Handle probe_stack insn. (PROBE_INTERVAL): New macro. (STACK_GROW_OPTAB): Likewise. (STACK_GROW_OFF): Likewise. (probe_stack_range): Use Pmode and memory_address consistently. Fix loop condition in the small constant case. Rewrite in the general case to be immune to wraparounds. Make sure the address of probes is valid. Try to use [base + disp] addressing mode if possible. * ira.c (setup_eliminable_regset): Set frame_pointer_needed if stack checking is enabled and STACK_CHECK_MOVING_SP. * rtlanal.c (may_trap_p_1) <MEM>: If stack checking is enabled, return 1 for volatile references to the stack pointer. * tree.c (build_common_builtin_nodes): Do not set ECF_NOTHROW on __builtin_alloca if stack checking is enabled. * unwind-dw2.c (uw_identify_context): Take into account whether the context is that of a signal frame or not. * config/i386/linux.h (STACK_CHECK_MOVING_SP): Define to 1. * config/i386/linux64.h (STACK_CHECK_MOVING_SP): Likewise. From-SVN: r153877
2009-10-28tree.c (free_lang_data_in_type): Do not call get_alias_set.Richard Guenther1-20/+17
2009-10-28 Richard Guenther <rguenther@suse.de> * tree.c (free_lang_data_in_type): Do not call get_alias_set. (free_lang_data): Unconditionally compute alias sets for all standard integer types. Bail out if gate bailed out previously. Do not reset the types_compatible_p langhook. (gate_free_lang_data): Remove. (struct pass_ipa_free_lang_data): Enable unconditionally. * gimple.c (gimple_get_alias_set): Use the same alias-set for all pointer types. From-SVN: r153659
2009-10-26tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document.Ben Elliston1-11/+59
2009-10-26 Ben Elliston <bje@au.ibm.com> Michael Meissner <meissner@linux.vnet.ibm.com> Ulrich Weigand <uweigand@de.ibm.com> * doc/tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document. (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise. (TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise. * target.h (struct target_def): Add pointer_mode, address_mode, and valid_pointer_mode to addr_space substructure. * target-def.h (TARGET_ADDR_SPACE_POINTER_MODE): Define. (TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise. (TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise. (TARGET_ADDR_SPACE_HOOKS): Add them. * targhooks.c (target_default_pointer_address_modes_p): New function. * target.h (target_default_pointer_address_modes_p): Add prototype. * targhooks.c (default_addr_space_pointer_mode): New function. (default_addr_space_address_mode): Likewise. (default_addr_space_valid_pointer_mode): Likewise. * targhooks.h (default_addr_space_pointer_mode): Add prototype. (default_addr_space_address_mode): Likewise. (default_addr_space_valid_pointer_mode): Likewise. * output.h (default_valid_pointer_mode): Move to ... * targhooks.h (default_valid_pointer_mode): ... here. * varasm.c (default_valid_pointer_mode): Move to ... * targhooks.c (default_valid_pointer_mode): ... here. * varasm.c (output_constant): Use targetm.addr_space.valid_pointer_mode instead of targetm.valid_pointer_mode. * fold-const.c (fit_double_type): Use int_or_pointer_precision. * tree.c (integer_pow2p): Likewise. (tree_log2): Likewise. (tree_floor_log2): Likewise. (signed_or_unsigned_type_for): Support pointer type of different size. (int_or_pointer_precision): New function. * tree.h (int_or_pointer_precision): Add prototype. * stor-layout.c (layout_type): Set TYPE_PRECISION for offset types. * varasm.c (initializer_constant_valid_p): Use TYPE_PRECISION of incoming pointer type instead of POINTER_SIZE. * tree.c (build_pointer_type): Use appropriate pointer mode instead of ptr_mode. (build_reference_type): Likewise. * expr.c (store_expr): Likewise. (expand_expr_addr_expr): Likewise. * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * auto-inc-dec.c: Include "target.h". (try_merge): Use appropriate address mode instead of Pmode. (find_inc): Likewise. * combine.c (find_split_point): Likewise. * cselib.c (cselib_record_sets): Likewise. * dse.c (replace_inc_dec): Likewise. (canon_address): Likewise. * var-tracking.c (replace_expr_with_values): Likewise. (count_uses): Likewise. (add_uses): Likewise. (add_stores): Likewise. * emit-rtl.c: Include "target.h". (adjust_address_1): Use appropriate address mode instead of Pmode. (offset_address): Likewise. * explow.c (break_out_memory_refs): Likewise. (memory_address_addr_space): Likewise. (promote_mode): Likewise. * expr.c (move_by_pieces): Likewise. (emit_block_move_via_loop): Likewise. (store_by_pieces): Likewise. (store_by_pieces_1): Likewise. (expand_assignment): Likewise. (store_constructor): Likewise. (expand_expr_addr_expr): Likewise. (expand_expr_real_1): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * regcprop.c (kill_autoinc_value): Likewise. * regmove.c (try_auto_increment): Likewise. * reload.c (find_reloads): Likewise. (find_reloads_address): Likewise. (find_reloads_address_1): Likewise. * sched-deps.c: Include "target.h". (sched_analyze_1): Use appropriate address mode instead of Pmode. (sched_analyze_2): Likewise. * sel-sched-dump.c: Include "target.h". (debug_mem_addr_value): Use appropriate address mode instead of Pmode. * stor-layout.c (layout_type): Likewise. * tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise. (multiplier_allowed_in_address_p): Likewise. (get_address_cost): Likewise. * varasm.c (make_decl_rtl): Likewise. * expr.c (expand_assignment): Always convert offsets to appropriate address mode. (store_expr): Likewise. (store_constructor): Likewise. (expand_expr_real_1): Likewise. * reload.h (form_sum): Add MODE argument. * reload.c (form_sum): Add MODE argument, use it instead of Pmode. Update recursive calls. (subst_indexed_address): Update calls to form_sum. * tree-flow.h (addr_for_mem_ref): Add ADDRSPACE argument. * tree-ssa-address.c: Include "target.h". (templates): Replace by ... (mem_addr_template_list): ... this new vector. (TEMPL_IDX): Handle address space numbers. (gen_addr_rtx): Add address mode argument, use it instead of Pmode. (addr_for_mem_ref): Add ADDRSPACE argument. Use per-address-space instead of global cache. Update call to gen_addr_rtx. (valid_mem_ref_p): Update call to addr_for_mem_ref. * expr.c (expand_expr_real_1): Update call to addr_for_mem_ref. * rtl.h (convert_memory_address_addr_space): Add prototype. (convert_memory_address): Define as macro. * explow.c (convert_memory_address): Rename to ... (convert_memory_address_addr_space): ... this. Add ADDRSPACE argument. Use appropriate pointer and address modes instead of ptr_mode / Pmode. Update recursive calls. (memory_address_addr_space): Call convert_memory_address_addr_space. * expmed.c (make_tree): Likewise. * expr.c (expand_assignment): Likewise. (expand_expr_addr_expr_1): Likewise. Also, add ADDRSPACE argument. (expand_expr_addr_expr): Likewise. Also, update call. * alias.c (find_base_value): Guard pointer size optimizations. (find_base_term): Likewise. * rtlanal.c (nonzero_bits1): Likewise. (num_sign_bit_copies1): Likewise. * simplify-rtx.c (simplify_unary_operation_1): Likewise. * Makefile.in (tree-ssa-address.o): Add $(TARGET_H) dependency. (emit-rtl.o): Likewise. (auto-inc-dec.o): Likewise. (sched-deps.o): Likewise. Co-Authored-By: Michael Meissner <meissner@linux.vnet.ibm.com> Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com> From-SVN: r153573
2009-10-26extend.texi (Named Address Spaces): New section.Ben Elliston1-0/+2
2009-10-26 Ben Elliston <bje@au.ibm.com> Michael Meissner <meissner@linux.vnet.ibm.com> Ulrich Weigand <uweigand@de.ibm.com> * doc/extend.texi (Named Address Spaces): New section. * coretypes.h (addr_space_t): New type. (ADDR_SPACE_GENERIC): New define. (ADDR_SPACE_GENERIC_P): New macro. * doc/tm.texi (Named Address Spaces): New section. (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Document. (TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Document. (TARGET_ADDR_SPACE_SUBSET_P): Document. (TARGET_ADDR_SPACE_CONVERT): Document. * target.h (struct gcc_target): Add addr_space substructure. * target-def.h (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Define. (TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Likewise. (TARGET_ADDR_SPACE_SUBSET_P): Likewise. (TARGET_ADDR_SPACE_CONVERT): Likewise. (TARGET_ADDR_SPACE_HOOKS): Likewise. (TARGET_INITIALIZER): Initialize addr_space hooks. * targhooks.c (default_addr_space_legitimate_address_p): New function. (default_addr_space_legitimize_address): Likewise. (default_addr_space_subset_p): Likewise. (default_addr_space_convert): Likewise. * targhooks.h (default_addr_space_legitimate_address_p): Add prototype. (default_addr_space_legitimize_address): Likewise. (default_addr_space_subset_p): Likewise. (default_addr_space_convert): Likewise. * doc/rtl.texi (MEM_ADDR_SPACE): Document. * rtl.h (mem_attrs): Add ADDRSPACE memory attribute. (MEM_ADDR_SPACE): New macro. * emit-rtl.c (get_mem_attrs): Add ADDRSPACE argument and set address space memory attribute. (mem_attrs_htab_hash): Handle address space memory attribute. (mem_attrs_htab_eq): Likewise. (set_mem_attributes_minus_bitpos): Likewise. (set_mem_alias_set): Likewise. (set_mem_align): Likewise. (set_mem_expr): Likewise. (set_mem_offset): Likewise. (set_mem_size): Likewise. (adjust_address_1): Likewise. (offset_address): Likewise. (widen_memoy_address): Likewise. (get_spill_slot_decl): Likewise. (set_mem_attrs_for_spill): Likewise. (set_mem_addr_space): New function. * emit-rtl.h (set_mem_addr_space): Add prototype. * print-rtl.c (print_rtx): Print address space memory attribute. * expr.c (expand_assignment): Set address space memory attribute of generated MEM RTXes as appropriate. (expand_expr_real_1): Likewise. * cfgexpand.c (expand_debug_expr): Likewise. * tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise. * tree.h (struct tree_base): Add address_space bitfield. Reduce size of "spare" bitfield. (TYPE_ADDR_SPACE): New macro. (ENCODE_QUAL_ADDR_SPACE): Likewise. (DECODE_QUAL_ADDR_SPACE): Likewise. (CLEAR_QUAL_ADDR_SPACE): Likewise. (KEEP_QUAL_ADDR_SPACE): Likewise. (TYPE_QUALS): Encode type address space. (TYPE_QUALS_NO_ADDR_SPACE): New macro. * tree.c (set_type_quals): Set type address space. (build_array_type): Inherit array address space from element type. * print-tree.c (print_node_brief): Print type address space. (print_node): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * explow.c (memory_address): Rename to ... (memory_address_addr_space): ... this. Add ADDRSPACE argument. Use address-space aware variants of memory address routines. * recog.c (memory_address_p): Rename to ... (memory_address_addr_space_p): ... this. Add ADDSPACE argument. Use address-space aware variants of memory address routines. (offsettable_address_p): Rename to ... (offsettable_address_addr_space_p): ... this. Add ADDRSPACE argument. Use address-space aware variants of memory address routines. * reload.c (strict_memory_address_p): Rename to ... (strict_memory_address_addr_space_p): ... this. Add ADDSPACE argument. Use address-space aware variants of memory address routines. (maybe_memory_address_p): Rename to ... (maybe_memory_address_addr_space_p): ... this. Add ADDSPACE argument. Use address-space aware variants of memory address routines. * expr.h (memory_address_addr_space): Add prototype. (memory_address): Define as macro. * recog.h (memory_address_addr_space_p): Add prototype. (memory_address_p): Define as macro. (offsettable_address_addr_space_p): Add prototype. (offsettable_address_p): Define as macro. (strict_memory_address_addr_space_p): Add prototype. (strict_memory_address_p): Define as macro. * combine.c (find_split_point): Use address-space aware variants of memory address routines. * emit-rtl.c (operand_subword): Likewise. (change_address_1): Likewise. (adjust_address_1): Likewise. (offset_address): Likewise. * expr.c (emit_move_insn): Likewise. (expand_assignment): Likewise. (expand_expr_real_1): Likewise. * recog.c (verify_changes): Likewise. (general_operand): Likewise. (offsettable_memref_p): Likewise. (offsettable_nonstrict_memref_p): Likewise. (constrain_operands): Likewise. * reload.c (get_secondary_mem): Likewise. (find_reloads_toplev): Likewise. (find_reloads_address): Likewise. (find_reloads_subreg_address): Likewise. * reload1.c (reload): Likewise. * rtlhooks.c (gen_lowpart_if_possible): Likewise. * rtl.h (address_cost): Add ADDRSPACE argument. * rtlanal.c (address_cost): Add ADDRSPACE argument. Use address-space aware variant of memory address routines. * loop-invariant.c (create_new_invariant): Update address_cost call. * tree-ssa-loop-ivopts.c (computation_cost): Likewise. * fwprop.c (should_replace_address): Add ADDRSPACE argument. Use address-space aware variant of memory address routines. (propagate_rtx_1): Update call to should_replace_address. * tree-flow.h (multiplier_allowed_in_address_p): Add ADDRSPACE argument. * tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Add ADDRSPACE argument. Use per-address-space instead of global cache. Use address-space aware variant of memory address routines. (get_address_cost): Likewise. (get_computation_cost_at): Update calls. * tree-ssa-address.c (valid_mem_ref_p): Add ADDRSPACE argument. Use address-space aware variant of memory address routines. (create_mem_ref_raw): Update call to valid_mem_ref_p. (most_expensive_mult_to_index): Update call to multiplier_allowed_in_address_p. * dwarf2out.c (modified_type_die): Output DW_AT_address_class attribute to indicate named address spaces. * varasm.c (get_variable_section): DECLs in named address spaces cannot be "common". * reload.c (find_reloads_address): Do not use LEGITIMIZE_RELOAD_ADDRESS for addresses in a non-generic address space. * expr.c (emit_block_move_hints): Do not use libcalls for memory in non-generic address spaces. (clear_storage_hints): Likewise. (expand_assignment): Likewise. * fold-const.c (operand_equal_p): Expressions refering to different address spaces are not equivalent. * rtl.c (rtx_equal_p_cb): MEMs refering to different address spaces are not equivalent. (rtx_equal_p): Likewise. * cse.c (exp_equiv_p): Likewise. * jump.c (rtx_renumbered_equal_p): Likewise. * reload.c (operands_match_p): Likewise. * alias.c (nonoverlapping_memrefs_p): MEMs refering to different address spaces may alias. (true_dependence): Likewise. (canon_true_dependence): Likewise. (write_dependence_p): Likewise. * dse.c (canon_address): Handle named address spaces. * ifcvt.c (noce_try_cmove_arith): Likewise. * tree.def (ADDR_SPACE_CONVERT_EXPR): New tree code. * expr.c (expand_expr_real_2): Expand ADDR_SPACE_CONVERT_EXPR. * convert.c (convert_to_pointer): Generate ADDR_SPACE_CONVERT_EXPR to handle conversions between different address spaces. * fold-const.c (fold_convert_loc): Likewise. (fold_unary_loc): Handle ADDR_SPACE_CONVERT_EXPR. * tree-pretty-print.c (dump_generic_node): Likewise. * gimple-pretty-print.c (dump_unary_rhs): Likewise. * tree-cfg.c (verify_gimple_assign_unary): Likewise. * tree-inline.c (estimate_operator_cost): Likewise. * tree-ssa.c (useless_type_conversion_p): Conversions between pointers to different address spaces are not useless. Co-Authored-By: Michael Meissner <meissner@linux.vnet.ibm.com> Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com> From-SVN: r153572
2009-10-25re PR middle-end/41814 (ICE in jc1 during bootstrap of gcj)Richard Guenther1-5/+9
2009-10-25 Richard Guenther <rguenther@suse.de> PR middle-end/41814 * tree.c (find_decls_types_r): Deal with Java overloading BINFO_VIRTUALS for its own purpose. From-SVN: r153539
2009-10-15tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.Richard Guenther1-0/+4
2009-10-15 Richard Guenther <rguenther@suse.de> * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT. From-SVN: r152841
2009-10-14re PR preprocessor/41543 (BUILTINS_LOCATION wrong with -fpreprocessed)Jakub Jelinek1-2/+3
PR preprocessor/41543 * input.h (BUILTINS_LOCATION): Change to 1 from 2. Assert BUILTINS_LOCATION < RESERVED_LOCATION_COUNT. * tree.c: Include intl.h. (expand_location): Handle BUILTINS_LOCATION. * Makefile.in (tree.o): Depend on intl.h. * include/line-map.h (RESERVED_LOCATION_COUNT): Define. * line-map.c (linemap_init): Initialize highest_location and highest_line to RESERVED_LOCATION_COUNT-1 instead of 0. * gcc.dg/debug/dwarf2/pr41543.c: New test. From-SVN: r152761
2009-10-14re PR debug/41343 (sysdeps/ieee754/dbl-64/dosincos.c from glibc causes ↵Alexandre Oliva1-0/+4
excessive memory use) PR debug/41343 PR debug/41447 PR debug/41264 PR debug/41338 * tree.c (tree_node_structure_for_code): DEBUG_EXPR_DECL uses decl with rtl. (tree_code_size): Likewise. From-SVN: r152749
2009-10-12re PR debug/41343 (sysdeps/ieee754/dbl-64/dosincos.c from glibc causes ↵Alexandre Oliva1-2/+11
excessive memory use) gcc/ChangeLog: PR debug/41343 PR debug/41447 PR debug/41264 PR debug/41338 * tree.def (DEBUG_EXPR_DECL): New. * rtl.def (DEBUG_EXPR): New. * gengtype.c (adjust_field_rtx_def): Handle it. * tree-ssa.c (propagate_var_def_into_debug_stmts): Rename to... (insert_debug_temp_for_var_def): ... this. Drop support for moving. Take iterator for def stmt; insert debug stmt before it. Scan early for use count and kind in debug stmts. (propagate_defs_into_debug_stmts): Rename to... (insert_debug_temps_for_defs): ... this. Likewise. * tree.h (DEBUG_TEMP_UID): New. * tree.c (next_debug_decl_uid): New. (make_node_stat): Count debug decls separately. (copy_node_stat): Likewise. * cfgexpand.c (expand_debug_expr): Handle DEBUG_EXPR_DECL. * var-tracking.c (dv_is_decl_p): Recognize it. (VALUE_RECURSED_INTO): Apply to DEBUG_EXPRs too. (track_expr_p): Track expanded DEBUG_EXPR_DECLs. (vt_expand_loc_callback): Expand DEBUG_EXPRs. (emit_note_insn_var_location): Don't emit notes for DEBUG_EXPR_DECLs. * cselib.c (rtx_equal_for_cselib_p): Handle DEBUG_EXPR. (cselib_hash_rtx): Likewise. (cselib_expand_value_rtx_1): Use callback for DEBUG_EXPR. * tree-ssa-operands.c (get_expr_operands): Skip DEBUG_EXPR_DECLs in debug bind stmts. * emit-rtl.c (verify_rtx_sharing): Handle DEBUG_EXPR and VALUE. (copy_rtx_if_shared_1, reset_used_flags, set_used_flags): Likewise. * rtl.c (copy_rtx): Likewise. (rtx_equal_p_cb, rtx_equal_p): Handle DEBUG_EXPR. * print-rtl.c (print_rtx): Likewise. * sched-vis.c (print_value): Likewise. (print_insn): Handle DEBUG_EXPR_DECL. * tree-dump.c (dequeue_and_dump): Likewise. * tree-pretty-print.c (dump_decl_name, dump_generic_node): Likewise. * gimple-iterator (gsi_replace): Check for same lhs. (gsi_remove): Insert debug temps. * tree-ssa-loop-im.c (rewrite_reciprocal): Replace with same lhs. (move_computations_stmt): Drop explicit propagation into debug stmts. (rewrite_bittest): Likewise. Use gsi_remove for propagation. * tree-ssa-reassoc.c (rewrite_expr_tree, linearize_expr): Likewise. * tree-ssa-sink.c (statement_sink_location): Likewise. * tree-ssa-forwprop (forward_propagate_addr_expr): Likewise. * tree-ssanames.c (release_ssa_name): Adjust for rename. * tree-flow.h: Likewise. * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Don't mark debug temps without values. (eliminate_unnecessary_stmts): Don't discard just-inserted debug stmts. gcc/testsuite/ChangeLog: PR debug/41343 PR debug/41447 PR debug/41264 PR debug/41338 * gcc.dg/guality/pr41447-1.c: New. * gcc.dg/debug/pr41264-1.c: New. * gcc.dg/debug/pr41343-1.c: New. From-SVN: r152681
2009-10-08re PR middle-end/41573 (segfault in trunk related to strings)Michael Matz1-1/+2
PR middle-end/41573 * builtins.c (fold_builtin_isascii): Use fold_build2. (fold_builtin_isdigit): Ditto. * except.c (duplicate_eh_regions_1): Tolerate NULL labels. * tree-cfg.c (struct rus_data, remove_useless_stmts_warn_notreached, remove_useless_stmts_cond, remove_useless_stmts_tf, remove_useless_stmts_tc, remove_useless_stmts_bind, remove_useless_stmts_goto, remove_useless_stmts_label, remove_useless_stmts_1, remove_useless_stmts, pass_remove_useless_stmts): Remove. * tree-pass.h (pass_remove_useless_stmts): Don't declare. * passes.c (init_optimization_passes): Don't add pass_remove_useless_stmts. * tree-eh.c (lower_eh_constructs_2): Handle empty cleanups. * tree.c (free_lang_data_in_decl): Don't clear DECL_INITIAL of static constants. * lto-symtab.c (lto_symtab_register_decl): Accepts DECL_INITIAL for static constants. * lto-streamer-out.c (output_gimple_stmt): Handle GIMPLE_NOP. * lto-streamer-in.c (input_gimple_stmt): Handle GIMPLE_NOP. testsuite/ * gcc.dg/tree-ssa/foldstring-1.c: Use fre dump. * gcc.dg/tree-ssa/useless-1.c: Use gimple dump. * gcc.dg/pr41573.c: New test. From-SVN: r152563
2009-10-03Merge lto branch into trunk.Diego Novillo1-89/+135
From-SVN: r152434
2009-09-28except.h (struct eh_region_d): Add use_cxa_end_cleanup.Richard Henderson1-18/+15
* except.h (struct eh_region_d): Add use_cxa_end_cleanup. * except.c (gen_eh_region): Set it. (duplicate_eh_regions_1): Copy it. * tree-eh.c (lower_resx): Use it to determine which function to call to resume. * langhooks.h (struct lang_hooks): Add eh_use_cxa_end_cleanup. * langhooks-def.h (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New. * builtins.def (BUILT_IN_CXA_END_CLEANUP): New. * tree.c (build_common_builtin_nodes): Remove parameter. Build BUILT_IN_CXA_END_CLEANUP if necessary. * tree.h (build_common_builtin_nodes): Update decl. * c-common.c (c_define_builtins): Update call to build_common_builtin_nodes. gcc/ada/ * gcc-interface/utils.c (gnat_install_builtins): Update call to build_common_builtin_nodes. gcc/cp/ * cp-objcp-common.h (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New. gcc/fortran/ * f95-lang.c (gfc_init_builtin_functions): Update call to build_common_builtin_nodes. gcc/java/ * builtins.c (initialize_builtins): Update call to build_common_builtin_nodes. * lang.c (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New. From-SVN: r152241
2009-09-17re PR middle-end/41347 (ICE with -O3 or '-O2 -finline-functions')Michael Matz1-1/+1
PR middle-end/41347 * tree.c (build_type_attribute_qual_variant): Export. * tree.h (build_type_attribute_qual_variant): Declare. * tree-inline.c (remap_type_1): Use it to build variants with the original qualifiers and attributes. testsuite/ * gfortran.dg/pr41347.f90: New test. From-SVN: r151799
2009-09-14Squash commit of EH in gimpleRichard Henderson1-37/+81
From-SVN: r151696
2009-09-13langhooks-def.h (LANG_HOOKS_EH_RUNTIME_TYPE): Define.Richard Guenther1-0/+15
2009-09-13 Richard Guenther <rguenther@suse.de> Rafael Avila de Espindola <espindola@google.com> * langhooks-def.h (LANG_HOOKS_EH_RUNTIME_TYPE): Define. (LANG_HOOKS_EH_PERSONALITY): Likewise. (LANG_HOOKS_INITIALIZER): Adjust. (lhd_pass_through_t): Declare. * langhooks.h (struct lang_hooks): Add eh_runtime_type and eh_personality. * langhooks.c (lhd_pass_through_t): New function. * dwarf2out.c (output_call_frame_info, dwarf2out_do_cfi_startproc, dwarf2out_begin_prologue): Use personality from current_function_decl. * expr.h (get_personality_function): Declare. * expr.c (get_personality_function): New function. (build_personality_function): Likewise. * libfuncs.h (libfunc_index): Remove LTI_eh_personality. (eh_personality_libfunc): Remove. * optabs.c (build_libfunc_function): New function split out from ... (init_one_libfunc): ... here. * tree.h (DECL_FUNCTION_PERSONALITY): New. (tree_function_decl): Add personality. (lhd_gcc_personality): Declare. (build_personality_function): Likewise. * tree.c (gcc_eh_personality_decl): New. (lhd_gcc_personality): New function. * except.h (lang_eh_runtime_type): Remove. (enum eh_personality_kind): New. (build_personality_function): Declare. (function_needs_eh_personality): Declare. * except.c (lang_eh_runtime_type): Remove. (function_needs_eh_personality): New function. (add_type_for_runtime): Call lang_hooks.type_for_runtime instead. (sjlj_emit_function_enter, output_function_exception_table): Use personality from current_function_decl. * tree-eh.c (lower_eh_constructs): Set DECL_FUNCTION_PERSONALITY. * tree-inline.c (tree_can_inline_p): Do not inline across different EH personalities. (expand_call_inline): Likewise. Adjust the callers EH personality. (tree_function_versioning): Copy DECL_FUNCTION_PERSONALITY. * cgraph.c (cgraph_add_new_function): Set DECL_FUNCTION_PERSONALITY. * Makefile.in (cgraph.o): Add $(EXCEPT_H) dependency. (c-parser.o): Likewise * c-tree.h (c_eh_initialized_p): Remove. (c_maybe_initialize_eh): Likewise. * c-decl.c (finish_decl): Don't call c_maybe_initialize_eh. (finish_decl): Don't call c_maybe_initialize_eh. (c_eh_initialized_p): Remove. (c_maybe_initialize_eh): Likewise. * c-parser.c (c_parser_omp_construct): Likewise. (c_parse_file): Initialize exception handling. objc/ * objc-act.c (objc_eh_runtime_type): Export. (objc_init_exceptions): Remove. Move warning code ... (objc_begin_try_stmt): ... here (objc_build_throw_stmt): ... and here. (objc_eh_personality_decl): New. (objc_eh_personality): New function. * objc-act.h (objc_eh_runtime_type): Declare. (objc_eh_personality): Likewise. * objc-lang.c (LANG_HOOKS_EH_RUNTIME_TYPE): Define. (LANG_HOOKS_EH_PERSONALITY): Likewise. cp/ * except.c (init_exception_processing): Do not set lang_eh_runtime_type. (choose_personality_routine): Do not set eh_personality_decl, set pragma_java_exceptions. * cp-lang.c (LANG_HOOKS_EH_RUNTIME_TYPE): Define. (LANG_HOOKS_EH_PERSONALITY): Likewise. (cp_eh_personality_decl): New. (cp_eh_personality): Likewise. * Make-lang.in (cp-lang.o): Add $(EXPR_H) and $(EXCEPT_H) dependencies. java/ * decl.c (do_nothing): Remove. (java_init_decl_processing): Do not set lang_eh_runtime_type. * Make-lang.in (lang.o): Add $(EXCEPT_H) dependency. * lang.c (java_eh_personality): New. (java_eh_personality_decl): Likewise. (LANG_HOOKS_EH_PERSONALITY): Define. ada/ * gcc-interface/misc.c (gnat_init_gcc_eh): Do not set lang_eh_runtime_type. (LANG_HOOKS_EH_PERSONALITY): Define. (gnat_eh_personality_decl): New. (gnat_eh_personality): Likewise. * Make-lang.in (misc.o): Add gt-ada-misc.h dependency. * config-lang.in (gtfiles): Add misc.c. fortran/ * f95-lang.c (gfc_maybe_initialize_eh): Do not init eh_personality_libfunc. Co-Authored-By: Rafael Avila de Espindola <espindola@google.com> From-SVN: r151676
2009-09-10tree.c (chain_index): New fn.Jason Merrill1-0/+11
* tree.c (chain_index): New fn. * tree.h: Declare it. From-SVN: r151618
2009-09-10re PR middle-end/41254 (crashed compile Qt4 gui library)Richard Guenther1-63/+84
2009-09-10 Richard Guenther <rguenther@suse.de> PR middle-end/41254 * tree.c (struct free_lang_data_d): Add worklist member. (find_decls_types_r): Push onto the worklist instead of recursing. Handle TREE_BINFOs properly. (find_decls_types): New function wrapped around find_decls_types_r to process the worklist. (find_decls_types_in_eh_region): Use it. (find_decls_types_in_node): Likewise. (find_decls_types_in_var): Likewise. (free_lang_data_in_cgraph): Likewise. Free the worklist. * tree.h (RECORD_OR_UNION_TYPE_P): New. (AGGREGATE_TYPE_P): Adjust. From-SVN: r151590
2009-09-09tree.c (free_lang_data_in_type): Do not free the type variant chains.Richard Guenther1-11/+7
2009-09-09 Richard Guenther <rguenther@suse.de> * tree.c (free_lang_data_in_type): Do not free the type variant chains. (free_lang_data): Merge char_type_node with its properly signed variant. (pass_ipa_free): Collect after freeing language specific data. From-SVN: r151558
2009-09-08tree.c (tree_find_value): Remove.Jason Merrill1-12/+0
* tree.c (tree_find_value): Remove. * tree.h: Remove prototype. * varasm.c (assemble_external): Use value_member instead. From-SVN: r151534
2009-09-06re PR c++/41144 (ice for legal code with -O2 in get_alias_set)Richard Guenther1-26/+11
2009-09-06 Richard Guenther <rguenther@suse.de> PR middle-end/41144 * tree.c (build_array_type): Do not record types marked with structural equality in the canonical type hashtable. * g++.dg/torture/pr41144.C: New testcase. From-SVN: r151461
2009-09-03[multiple changes]Diego Novillo1-0/+793
2009-09-01 Diego Novillo <dnovillo@google.com> * c-lang.c (lang_hooks): Remove const qualifier. java/ChangeLog * lang.c (lang_hooks): Remove const qualifier. objc/ChangeLog * objc-lang.c (lang_hooks): Remove const qualifier. objcp/ChangeLog * objcp-lang.c (lang_hooks): Remove const qualifier. ada/ChangeLog * gcc-interface/misc.c (lang_hooks): Remove const qualifier. fortran/ChangeLog * f95-lang.c (lang_hooks): Remove const qualifier. cp/ChangeLog * cp-lang.c (lang_hooks): Remove const qualifier. 2009-09-01 Diego Novillo <dnovillo@google.com> * cgraph.c (cgraph_node_for_decl): New. * cgraph.h (cgraph_node_for_decl): Declare. * tree.c (host_integerp): Return 0 if T is NULL. 2009-09-01 Diego Novillo <dnovillo@google.com> * tree.h (struct alias_pair): Move from varasm.c. (alias_pairs): Likewise. (TYPE_MAXVAL): Define. (TYPE_MINVAL): Define. (iterative_hash_host_wide_int): Declare. (remove_unreachable_alias_pairs): Declare. * tree-pass.h (pass_ipa_free_lang_data): Declare. * diagnostic.c (default_diagnostic_starter): Make extern. (default_diagnostic_finalizer): Make extern. * diagnostic.h (default_diagnostic_starter): Declare. (default_diagnostic_finalizer): Declare. (default_tree_printer): Declare. * toplev.c (default_tree_printer): Make extern. 2009-09-01 Richard Guenther <rguenther@suse.de> Diego Novillo <dnovillo@google.com> * cgraph.c (cgraph_add_new_function): Remove gimplification. * cgraphunit.c (cgraph_expand_function): Do not emit associated thunks from here. (cgraph_emit_thunks): New. (cgraph_optimize): Call it. Return if any IPA pass finds an error. * varasm.c (finish_aliases_1): Ignore errorneous aliases used by thunks. 2009-09-01 Simon Baldwin <simonb@google.com> Rafael Espindola <espindola@google.com> Richard Guenther <rguenther@suse.de> Doug Kwan <dougkwan@google.com> Diego Novillo <dnovillo@google.com> * tree.c: Include tree-pass.h, langhooks-def.h, diagnostic.h, cgraph.h, timevar.h, except.h and debug.h. (free_lang_data_in_type): New. (need_assembler_name_p): New. (free_lang_data_in_block): New. (free_lang_data_in_decl): New. (struct free_lang_data_d): New. (add_tree_to_fld_list): New. (find_decls_types_r): New. (get_eh_types_for_runtime): New. (find_decls_types_in_eh_region): New. (find_decls_types_in_node): New. (find_decls_types_in_var): New. (free_lang_data_in_cgraph): New. (free_lang_data): New. (gate_free_lang_data): New. (pass_ipa_free_lang_data): New. 2009-09-01 Diego Novillo <dnovillo@google.com> * timevar.def (TV_IPA_FREE_LANG_DATA): Define. * langhooks.h (struct lang_hooks): Add field free_lang_data. (lang_hooks): Remove const qualifier. * ipa.c (cgraph_remove_unreachable_nodes): Call remove_unreachable_alias_pairs. * except.c (add_type_for_runtime): Check if TYPE has already been converted. (lookup_type_for_runtime): Likewise. (check_handled): Handle converted types. * varasm.c (remove_unreachable_alias_pairs): New. * gimple.c: Include demangle.h. (gimple_decl_printable_name): New. (gimple_fold_obj_type_ref): New. * gimple.h (gimple_decl_printable_name): Declare. (gimple_fold_obj_type_ref): Declare. * passes.c (init_optimization_passes): Add pass pass_ipa_free_lang_data. * langhooks-def.h (LANG_HOOKS_FREE_LANG_DATA): Define. (LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_FREE_LANG_DATA. testsuite/ChangeLog 2009-09-01 Diego Novillo <dnovillo@google.com> * gcc.dg/gomp/combined-1.c: Adjust expected pattern. * g++.dg/tree-prof/inline_mismatch_args.C: Likewise. * g++.dg/warn/unit-1.C: Likewise. * g++.dg/ipa/iinline-1.C: Likewise. * g++.dg/template/cond2.C: Adjust expected line location for the error. * g++.dg/template/pr35240.C: Likewise. cp/ChangeLog 2009-09-01 Doug Kwan <dougkwan@google.com> * tree.c (cp_fix_function_decl_p): New. (cp_free_lang_data): New. 2009-09-01 Diego Novillo <dnovillo@google.com> * Make-lang.in (decl2.o): Add dependency on $(POINTER_SET_H). * decl2.c: Include pointer-set.h. (collect_candidates_for_java_method_aliases): New. (cp_write_global_declarations): Call it. Add local variable CANDIDATES. If set, call build_java_method_aliases. (build_java_method_aliases): Add argument CANDIDATES. Use it to determine if FNDECL should get a hidden alias. * cp-objcp-common.h (LANG_HOOKS_FREE_LANG_DATA): Define. * cp-tree.h (cp_free_lang_data): Declare. 2009-09-03 Richard Guenther <rguenther@suse.de> * method.c (use_thunk): Use cgraph_finalize_function to hand off thunks to the cgraph. * semantics.c (emit_associated_thunks): Do not emit thunks for really extern functions. From-SVN: r151360
2009-09-01tree.c (tree_expr_size): New function.Richard Guenther1-0/+12
2009-09-01 Richard Guenther <rguenther@suse.de> * tree.c (tree_expr_size): New function. * tree.h (tree_expr_size): Declare. * rtlanal.c (rtx_addr_can_trap_p_1): Adjust comment. * builtins.c (fold_builtin_memory_op): Use tree_expr_size. * langhooks.c (lhd_expr_size): Remove. * langhooks.h (struct lang_hooks): Remove expr_size. * explow.c (expr_size): Use tree_expr_size. (int_expr_size): Likewise. * langhooks-def.h (lhd_expr_size): Remove. (LANG_HOOKS_EXPR_SIZE): Likewise. (LANG_HOOKS_INITIALIZER): Adjust. cp/ * cp-objcp-common.c (cp_expr_size): Use tree_expr_size. * cp-objcp-common.h (LANG_HOOKS_EXPR_SIZE): Do not define. From-SVN: r151261
2009-08-06re PR middle-end/40964 (ICE in insert_vi_for_tree)Richard Biener1-1/+1
2009-08-06 Richard Guenther <rguenther@suse.de> PR tree-optimization/40964 * tree.c (iterative_hash_host_wide_int): Export. * tree.h (iterative_hash_host_wide_int): Declare. * tree-ssa-structalias.c (heapvar_map): New struct. (heapvar_map_eq): New function. (heapvar_map_hash): Likewise. (heapvar_lookup): Adjust. (heapvar_insert): Likewise. (make_constraint_from_heapvar): Allow multiple heap variables per decl at different offsets. (init_alias_heapvars): Adjust. * gcc.c-torture/compile/pr40964.c: New testcase. From-SVN: r150517
2009-08-03tree.c (make_vector_type): Build a main variant first, get the canonical one ↵Richard Guenther1-13/+13
and then build the variant. 2009-08-03 Richard Guenther <rguenther@suse.de> * tree.c (make_vector_type): Build a main variant first, get the canonical one and then build the variant. * tree-ssa.c (useless_type_conversion_p_1): Handle fixed-point types. (useless_type_conversion_p): Conversions to pointers to incomplete record types are useless. From-SVN: r150370
2009-07-20re PR tree-optimization/40792 (internal error in com_mpi.c at -O3 for gcc 4.4.0)Jakub Jelinek1-1/+0
PR tree-optimization/40792 * tree.c (build_function_type_skip_args): Remove bogus assert. * gcc.dg/pr40792.c: New test. From-SVN: r149822
2009-07-16re PR c/40435 (Revision 148442 caused many regressions on trunk)Aldy Hernandez1-1/+3
2009-07-17 Aldy Hernandez <aldyh@redhat.com> Manuel López-Ibáñez <manu@gcc.gnu.org> PR 40435 * tree-complex.c, tree-loop-distribution.c, tree.c, tree.h, builtins.c, fold-const.c, omp-low.c, cgraphunit.c, tree-ssa-ccp.c, tree-ssa-dom.c, gimple-low.c, expr.c, tree-ssa-ifcombine.c, c-decl.c, stor-layout.c, tree-if-conv.c, c-typeck.c, gimplify.c, calls.c, tree-sra.c, tree-mudflap.c, tree-ssa-copy.c, tree-ssa-forwprop.c, c-convert.c, c-omp.c, varasm.c, tree-inline.c, c-common.c, c-common.h, gimple.c, tree-switch-conversion.c, gimple.h, tree-cfg.c, c-parser.c, convert.c: Add location argument to fold_{unary,binary,ternary}, fold_build[123], build_call_expr, build_size_arg, build_fold_addr_expr, build_call_array, non_lvalue, size_diffop, fold_build1_initializer, fold_build2_initializer, fold_build3_initializer, fold_build_call_array, fold_build_call_array_initializer, fold_single_bit_test, omit_one_operand, omit_two_operands, invert_truthvalue, fold_truth_not_expr, build_fold_indirect_ref, fold_indirect_ref, combine_comparisons, fold_builtin_*, fold_call_expr, build_range_check, maybe_fold_offset_to_address, round_up, round_down. objc/ * objc-act.c: Add location argument to all calls to build_fold_addr_expr. testsuite/ * gcc.dg/pr36902.c: Add column info. * g++.dg/gcov/gcov-2.C: Change count for definition. cp/ * typeck.c, init.c, class.c, method.c, rtti.c, except.c, error.c, tree.c, cp-gimplify.c, cxx-pretty-print.c, pt.c, semantics.c, call.c, cvt.c, mangle.c: Add location argument to fold_{unary,binary,ternary}, fold_build[123], build_call_expr, build_size_arg, build_fold_addr_expr, build_call_array, non_lvalue, size_diffop, fold_build1_initializer, fold_build2_initializer, fold_build3_initializer, fold_build_call_array, fold_build_call_array_initializer, fold_single_bit_test, omit_one_operand, omit_two_operands, invert_truthvalue, fold_truth_not_expr, build_fold_indirect_ref, fold_indirect_ref, combine_comparisons, fold_builtin_*, fold_call_expr, build_range_check, maybe_fold_offset_to_address, round_up, round_down. fortran/ * trans-expr.c, trans-array.c, trans-openmp.c, trans-stmt.c, trans.c, trans-io.c, trans-decl.c, trans-intrinsic.c: Add location argument to fold_{unary,binary,ternary}, fold_build[123], build_call_expr, build_size_arg, build_fold_addr_expr, build_call_array, non_lvalue, size_diffop, fold_build1_initializer, fold_build2_initializer, fold_build3_initializer, fold_build_call_array, fold_build_call_array_initializer, fold_single_bit_test, omit_one_operand, omit_two_operands, invert_truthvalue, fold_truth_not_expr, build_fold_indirect_ref, fold_indirect_ref, combine_comparisons, fold_builtin_*, fold_call_expr, build_range_check, maybe_fold_offset_to_address, round_up, round_down. Co-Authored-By: Manuel López-Ibáñez <manu@gcc.gnu.org> From-SVN: r149722
2009-07-07tree.c (set_expr_locus): Remove.Manuel López-Ibáñez1-12/+0
2009-07-07 Manuel López-Ibáñez <manu@gcc.gnu.org> * tree.c (set_expr_locus): Remove. * tree.h (EXPR_LOCUS,SET_EXPR_LOCUS,set_expr_locus): Remove. * c-typeck.c (c_finish_stmt_expr): Replace EXPR_LOCUS by EXPR_LOCATION. * gimplify.c (internal_get_tmp_var): Likewise. (gimplify_call_expr): Likewise. (gimplify_one_sizepos): Likewise. objc/ * objc-act.c (next_sjlj_build_catch_list): Replace EXPR_LOCUS by EXPR_LOCATION. cp/ * semantics.c (finalize_nrv_r): Replace EXPR_LOCUS by EXPR_LOCATION. ada/ * gcc-interface/trans.c (gnat_gimplify_expr): Replace EXPR_LOCUS by EXPR_LOCATION. From-SVN: r149350
2009-07-06tree.c: Include debug.h.Diego Novillo1-117/+261
* tree.c: Include debug.h. (initialize_tree_contains_struct): New. (init_ttree): Call it. (tree_node_structure_for_code): Factor out of ... (tree_node_structure): ... here. * treestruct.def (TS_PHI_NODE): Remove. (TS_GIMPLE_STATEMENT): Remove. From-SVN: r149290
2009-06-30cgraphunit.c (cgraph_finalize_compilation_unit): Call ↵Eric Botcazou1-5/+118
finalize_size_functions before further processing. * cgraphunit.c (cgraph_finalize_compilation_unit): Call finalize_size_functions before further processing. * stor-layout.c: Include cgraph.h, tree-inline.h and tree-dump.h. (variable_size): Call self_referential_size on size expressions that contain a PLACEHOLDER_EXPR. (size_functions): New static variable. (copy_self_referential_tree_r): New static function. (self_referential_size): Likewise. (finalize_size_functions): New global function. * tree.c: Include tree-inline.h. (push_without_duplicates): New static function. (find_placeholder_in_expr): New global function. (substitute_in_expr) <tcc_declaration>: Return the replacement object on equality. <tcc_expression>: Likewise. <tcc_vl_exp>: If the replacement object is a constant, try to inline the call in the expression. * tree.h (finalize_size_functions): Declare. (find_placeholder_in_expr): Likewise. (FIND_PLACEHOLDER_IN_EXPR): New macro. (substitute_placeholder_in_expr): Update comment. * tree-inline.c (remap_decl): Do not unshare trees if do_not_unshare is true. (copy_tree_body_r): Likewise. (copy_tree_body): New static function. (maybe_inline_call_in_expr): New global function. * tree-inline.h (struct copy_body_data): Add do_not_unshare field. (maybe_inline_call_in_expr): Declare. * Makefile.in (tree.o): Depend on TREE_INLINE_H. (stor-layout.o): Depend on CGRAPH_H, TREE_INLINE_H, TREE_DUMP_H and GIMPLE_H. ada/ * gcc-interface/decl.c: Include tree-inline.h. (annotate_value) <CALL_EXPR>: Try to inline the call in the expression. * gcc-interface/utils.c (max_size) <CALL_EXPR>: Likewise. * gcc-interface/utils2.c: Include tree-inline. (known_alignment) <CALL_EXPR>: Likewise. From-SVN: r149112
2009-06-29tree.c (process_call_operands): Propagate TREE_READONLY from the operands.Eric Botcazou1-26/+32
* tree.c (process_call_operands): Propagate TREE_READONLY from the operands. (PROCESS_ARG): Do not clear TREE_READONLY if CONSTANT_CLASS_P. (build3_stat): Propagate TREE_READONLY for COND_EXPR. From-SVN: r149060
2009-06-29re PR middle-end/38212 (restrict implementation causes wrong-code)Richard Guenther1-57/+2
2009-06-29 Richard Guenther <rguenther@suse.de> PR middle-end/38212 * alias.c (find_base_decl): Remove. (get_deref_alias_set_1): Remove restrict handling. * c-common.c (c_apply_type_quals_to_decl): Do not set DECL_POINTER_ALIAS_SET. * gimplify.c (find_single_pointer_decl_1): Remove. (find_single_pointer_decl): Likewise. (internal_get_tmp_var): Remove restrict handling. (gimple_regimplify_operands): Likewise. * omp-low.c (expand_omp_atomic_pipeline): Do not set DECL_POINTER_ALIAS_SET. Use ref-all pointers. * print-tree.c (print_node): Do not print DECL_POINTER_ALIAS_SET. * tree.c (restrict_base_for_decl): Remove. (init_ttree): Do not allocate it. (make_node_stat): Do not set DECL_POINTER_ALIAS_SET. Set LABEL_DECL_UID for label decls. (copy_node_stat): Do not copy restrict information. (decl_restrict_base_lookup): Remove. (decl_restrict_base_insert): Likewise. (print_restrict_base_statistics): Likewise. (dump_tree_statistics): Do not call print_restrict_base_statistics. * tree.h (DECL_POINTER_ALIAS_SET): Remove. (DECL_POINTER_ALIAS_SET_KNOWN_P): Likewise. (struct tree_decl_common): Rename pointer_alias_set to label_decl_uid. (LABEL_DECL_UID): Adjust. (DECL_BASED_ON_RESTRICT_P): Remove. (DECL_GET_RESTRICT_BASE): Likewise. (SET_DECL_RESTRICT_BASE): Likewise. (struct tree_decl_with_vis): Remove based_on_restrict_p flag. * config/i386/i386.c (ix86_gimplify_va_arg): Use ref-all pointers instead of DECL_POINTER_ALIAS_SET. * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Likewise. * config/s390/s390.c (s390_gimplify_va_arg): Likewise. * config/spu/spu.c (spu_gimplify_va_arg_expr): Likewise. * gcc.c-torture/execute/pr38212.c: New testcase. From-SVN: r149047
2009-06-26re PR c/39902 (x * 1.0DF gets wrong value)Janis Johnson1-8/+17
PR c/39902 * tree.c (real_zerop, real_onep, real_twop, real_minus_onep): Special-case decimal float constants. * gcc.dg/dfp/pr39902.c: New test. From-SVN: r148982