aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2008-08-06 19:20:54 +0000
committerH.J. Lu <hongjiu.lu@intel.com>2008-08-06 19:20:54 +0000
commit85d85ec604aadc129e880951faba857878f5bda4 (patch)
tree9c84078dad47331e299fc7c436daf9307750690f
parent2efcf03af55ed1d36e65a327f62b744b9bad7b46 (diff)
Merged with trunk at revision 138818.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/stack@138821 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog299
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/Makefile.in9
-rw-r--r--gcc/ada/ChangeLog188
-rw-r--r--gcc/ada/Makefile.rtl7
-rw-r--r--gcc/ada/adaint.c5
-rw-r--r--gcc/ada/exp_ch11.adb4
-rw-r--r--gcc/ada/exp_disp.adb12
-rw-r--r--gcc/ada/g-awk.adb79
-rw-r--r--gcc/ada/g-comlin.adb476
-rw-r--r--gcc/ada/g-comlin.ads50
-rw-r--r--gcc/ada/g-soccon-aix.ads208
-rw-r--r--gcc/ada/g-soccon-darwin.ads208
-rw-r--r--gcc/ada/g-soccon-freebsd.ads208
-rw-r--r--gcc/ada/g-soccon-hpux-ia64.ads208
-rw-r--r--gcc/ada/g-soccon-hpux.ads208
-rw-r--r--gcc/ada/g-soccon-irix.ads208
-rw-r--r--gcc/ada/g-soccon-linux-64.ads208
-rw-r--r--gcc/ada/g-soccon-linux-mips.ads197
-rw-r--r--gcc/ada/g-soccon-linux-ppc.ads208
-rw-r--r--gcc/ada/g-soccon-linux-x86.ads208
-rw-r--r--gcc/ada/g-soccon-lynxos.ads208
-rw-r--r--gcc/ada/g-soccon-mingw-64.ads220
-rw-r--r--gcc/ada/g-soccon-mingw.ads220
-rw-r--r--gcc/ada/g-soccon-rtems.ads196
-rw-r--r--gcc/ada/g-soccon-solaris-64.ads208
-rw-r--r--gcc/ada/g-soccon-solaris.ads208
-rw-r--r--gcc/ada/g-soccon-tru64.ads208
-rw-r--r--gcc/ada/g-soccon-vms.ads208
-rw-r--r--gcc/ada/g-soccon-vxworks.ads218
-rw-r--r--gcc/ada/g-soccon.ads215
-rw-r--r--gcc/ada/g-socket-dummy.adb34
-rw-r--r--gcc/ada/g-socket-dummy.ads39
-rw-r--r--gcc/ada/g-socket.adb1
-rw-r--r--gcc/ada/g-socket.ads17
-rw-r--r--gcc/ada/g-socthi-dummy.adb34
-rw-r--r--gcc/ada/g-socthi-dummy.ads39
-rw-r--r--gcc/ada/g-socthi-mingw.adb1
-rw-r--r--gcc/ada/g-socthi-vms.adb1
-rw-r--r--gcc/ada/g-socthi-vxworks.adb1
-rw-r--r--gcc/ada/g-socthi.adb1
-rw-r--r--gcc/ada/g-sothco-dummy.adb34
-rw-r--r--gcc/ada/g-sothco-dummy.ads39
-rw-r--r--gcc/ada/g-sothco.ads2
-rw-r--r--gcc/ada/g-sttsne-dummy.ads39
-rw-r--r--gcc/ada/g-sttsne-vxworks.adb1
-rw-r--r--gcc/ada/gcc-interface/Make-lang.in25
-rw-r--r--gcc/ada/gcc-interface/Makefile.in58
-rw-r--r--gcc/ada/gcc-interface/decl.c13
-rw-r--r--gcc/ada/gcc-interface/gigi.h14
-rw-r--r--gcc/ada/gcc-interface/utils2.c7
-rw-r--r--gcc/ada/gen-oscons.c1129
-rw-r--r--gcc/ada/gnat_ugn.texi26
-rw-r--r--gcc/ada/s-fileio.adb10
-rw-r--r--gcc/ada/s-stausa.adb18
-rw-r--r--gcc/ada/sem.adb2
-rw-r--r--gcc/ada/sem_ch12.adb16
-rw-r--r--gcc/ada/sem_ch3.adb57
-rw-r--r--gcc/ada/sem_ch8.adb13
-rw-r--r--gcc/ada/sem_res.adb19
-rw-r--r--gcc/ada/xnmake.adb19
-rw-r--r--gcc/builtins.c10
-rw-r--r--gcc/c-common.c193
-rw-r--r--gcc/c-common.h4
-rw-r--r--gcc/c-cppbuiltin.c6
-rw-r--r--gcc/c-typeck.c122
-rw-r--r--gcc/calls.c8
-rw-r--r--gcc/cfgexpand.c10
-rw-r--r--gcc/cgraph.c56
-rw-r--r--gcc/common.opt4
-rw-r--r--gcc/config.gcc4
-rw-r--r--gcc/config.in6
-rw-r--r--gcc/config/alpha/alpha.c92
-rw-r--r--gcc/config/arm/arm.c18
-rw-r--r--gcc/config/arm/arm.md10
-rw-r--r--gcc/config/avr/avr-protos.h10
-rw-r--r--gcc/config/avr/avr.c40
-rw-r--r--gcc/config/bfin/bfin.c42
-rw-r--r--gcc/config/crx/crx.c12
-rw-r--r--gcc/config/frv/frv-protos.h6
-rw-r--r--gcc/config/frv/frv.c86
-rw-r--r--gcc/config/h8300/h8300.c48
-rw-r--r--gcc/config/i386/i386.c20
-rw-r--r--gcc/config/i386/winnt.c6
-rw-r--r--gcc/config/ia64/ia64.c30
-rw-r--r--gcc/config/iq2000/iq2000.c8
-rw-r--r--gcc/config/m32c/m32c.c28
-rw-r--r--gcc/config/m68hc11/m68hc11.c70
-rw-r--r--gcc/config/mcore/mcore.c14
-rw-r--r--gcc/config/mips/mips.c82
-rw-r--r--gcc/config/mmix/mmix.c16
-rw-r--r--gcc/config/mn10300/mn10300.c22
-rw-r--r--gcc/config/pa/pa.c46
-rw-r--r--gcc/config/pa/pa.h14
-rw-r--r--gcc/config/rs6000/rs6000.c58
-rw-r--r--gcc/config/s390/s390.c296
-rw-r--r--gcc/config/s390/s390.h6
-rw-r--r--gcc/config/s390/s390.md4
-rw-r--r--gcc/config/score/score-protos.h4
-rw-r--r--gcc/config/score/score.c12
-rw-r--r--gcc/config/score/score3.c44
-rw-r--r--gcc/config/score/score3.h4
-rw-r--r--gcc/config/score/score7.c44
-rw-r--r--gcc/config/score/score7.h4
-rw-r--r--gcc/config/sh/sh.c168
-rw-r--r--gcc/config/sparc/sparc.c22
-rw-r--r--gcc/config/stormy16/stormy16.c34
-rw-r--r--gcc/config/xtensa/t-xtensa1
-rw-r--r--gcc/config/xtensa/xtensa.c89
-rwxr-xr-xgcc/configure47
-rw-r--r--gcc/configure.ac17
-rw-r--r--gcc/cp/ChangeLog20
-rw-r--r--gcc/cp/decl.c14
-rw-r--r--gcc/cp/tree.c3
-rw-r--r--gcc/cp/typeck.c122
-rw-r--r--gcc/diagnostic.c24
-rw-r--r--gcc/doc/cpp.texi4
-rw-r--r--gcc/doc/install.texi10
-rw-r--r--gcc/dwarf2asm.c74
-rw-r--r--gcc/dwarf2asm.h7
-rw-r--r--gcc/dwarf2out.c342
-rw-r--r--gcc/except.c110
-rw-r--r--gcc/expr.c34
-rw-r--r--gcc/fold-const.c28
-rw-r--r--gcc/function.c131
-rw-r--r--gcc/gengtype.c4
-rw-r--r--gcc/gimple.c16
-rw-r--r--gcc/gimplify.c42
-rw-r--r--gcc/haifa-sched.c75
-rw-r--r--gcc/ipa-cp.c12
-rw-r--r--gcc/jump.c20
-rw-r--r--gcc/matrix-reorg.c12
-rw-r--r--gcc/passes.c14
-rw-r--r--gcc/predict.c2
-rw-r--r--gcc/print-tree.c18
-rw-r--r--gcc/profile.c4
-rw-r--r--gcc/reload.c121
-rw-r--r--gcc/reorg.c12
-rw-r--r--gcc/sched-deps.c40
-rw-r--r--gcc/sched-int.h2
-rw-r--r--gcc/sched-rgn.c18
-rw-r--r--gcc/testsuite/ChangeLog75
-rw-r--r--gcc/testsuite/g++.dg/opt/pmf1.C76
-rw-r--r--gcc/testsuite/g++.dg/warn/pr26785.C10
-rw-r--r--gcc/testsuite/g++.dg/warn/pr8715.C11
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/thunk3.C2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20001226-1.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20080806-1.c33
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr35432.c11
-rw-r--r--gcc/testsuite/gcc.dg/Wcxx-compat-2.c50
-rw-r--r--gcc/testsuite/gcc.dg/intmax_t-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr8715.c13
-rw-r--r--gcc/testsuite/gcc.dg/sibcall-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/sibcall-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/tailcall-4.c16
-rw-r--r--gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-slp-34.c74
-rw-r--r--gcc/testsuite/gcc.target/i386/pr36613.c44
-rw-r--r--gcc/testsuite/gcc.target/ia64/20080802-1.c19
-rw-r--r--gcc/testsuite/gnat.dg/iface_test.adb28
-rw-r--r--gcc/testsuite/gnat.dg/iface_test.ads18
-rw-r--r--gcc/testsuite/gnat.dg/test_call.adb24
-rw-r--r--gcc/testsuite/lib/target-supports.exp2
-rw-r--r--gcc/toplev.h2
-rw-r--r--gcc/tree-dump.c18
-rw-r--r--gcc/tree-eh.c28
-rw-r--r--gcc/tree-inline.c190
-rw-r--r--gcc/tree-into-ssa.c40
-rw-r--r--gcc/tree-mudflap.c6
-rw-r--r--gcc/tree-predcom.c20
-rw-r--r--gcc/tree-pretty-print.c8
-rw-r--r--gcc/tree-ssa-structalias.c6
-rw-r--r--gcc/tree-ssa.c10
-rw-r--r--gcc/tree-tailcall.c2
-rw-r--r--gcc/tree-vect-transform.c17
-rw-r--r--gcc/tree-vrp.c12
-rw-r--r--gcc/tree.c50
-rw-r--r--gcc/value-prof.c12
-rw-r--r--libada/ChangeLog9
-rw-r--r--libada/Makefile.in4
-rw-r--r--libgcc/ChangeLog4
-rw-r--r--libgcc/config.host4
-rw-r--r--libstdc++-v3/ChangeLog36
-rw-r--r--libstdc++-v3/acinclude.m440
-rw-r--r--libstdc++-v3/config.h.in6
-rwxr-xr-xlibstdc++-v3/configure160
-rw-r--r--libstdc++-v3/include/bits/postypes.h9
-rw-r--r--libstdc++-v3/testsuite/18_support/bad_alloc/cons_virtual_derivation.cc3
-rw-r--r--libstdc++-v3/testsuite/18_support/bad_cast/cons_virtual_derivation.cc3
-rw-r--r--libstdc++-v3/testsuite/18_support/bad_exception/cons_virtual_derivation.cc3
-rw-r--r--libstdc++-v3/testsuite/18_support/bad_typeid/cons_virtual_derivation.cc3
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/logic_error/cons_virtual_derivation.cc3
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/runtime_error/cons_virtual_derivation.cc3
-rw-r--r--libstdc++-v3/testsuite/19_diagnostics/system_error/cons_virtual_derivation.cc3
-rw-r--r--libstdc++-v3/testsuite/20_util/bad_function_call/cons_virtual_derivation.cc3
-rw-r--r--libstdc++-v3/testsuite/27_io/ios_base/failure/cons_virtual_derivation.cc3
-rw-r--r--libstdc++-v3/testsuite/ext/concurrence_lock_error/cons_virtual_derivation.cc3
-rw-r--r--libstdc++-v3/testsuite/ext/concurrence_unlock_error/cons_virtual_derivation.cc3
-rw-r--r--libstdc++-v3/testsuite/ext/forced_exception_error/cons_virtual_derivation.cc3
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_api.h28
199 files changed, 4414 insertions, 7207 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7444d7e3c0f..f461410957e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,302 @@
+2008-08-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * c-common.c: Fix typo.
+ (c_common_reswords): Activate more C++ keyword warnings.
+
+ * matrix-reorg.c (compute_offset): Avoid C++ keywords.
+
+2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
+
+ PR 26785
+ * diagnostic.c (permerror_at): New.
+ * toplev.h (permerror_at): Declare.
+
+2008-08-06 Victor Kaplansky <victork@il.ibm.com>
+ Ira Rosen <irar@il.ibm.com>
+
+ * tree-vect-transform.c (vect_model_simple_cost): Return
+ immediately if stmt is pure SLP.
+ (vect_model_store_cost): Ditto.
+ (vect_model_load_cost): Ditto.
+ (vectorizable_store): Remove PURE_SLP check before call
+ to vect_model_store_cost.
+ (vect_model_store_cost): When checking whether stmt describe
+ strided access, add a check that it is not slp_node.
+
+2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
+
+ PR 8715
+ * c-common.c (warn_for_sign_compare): New. Handle separately the
+ case that 'constant' is zero.
+ * c-typeck.c (build_binary_op): Move code to c-common.c
+
+2008-08-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * config/alpha/alpha.c (alpha_preferred_reload_class,
+ alpha_secondary_reload, alpha_emit_set_const_1, function_value,
+ alpha_output_mi_thunk_osf): Avoid C++ keywords.
+ * config/arm/arm.c (output_move_vfp, output_move_neon): Likewise.
+ * config/arm/arm.md: Likewise.
+ * config/avr/avr-protos.h (preferred_reload_class,
+ test_hard_reg_class, avr_simplify_comparison_p,
+ out_shift_with_cnt, class_max_nregs): Likewise.
+ * config/avr/avr.c (class_max_nregs, avr_simplify_comparison_p,
+ output_movqi, output_movhi, output_movsisf, out_shift_with_cnt,
+ preferred_reload_class, test_hard_reg_class): Likewise.
+ * config/bfin/bfin.c (legitimize_pic_address, hard_regno_mode_ok,
+ bfin_memory_move_cost, bfin_secondary_reload,
+ bfin_output_mi_thunk): Likewise.
+ * config/crx/crx.c (crx_secondary_reload_class,
+ crx_memory_move_cost): Likewise.
+ * config/frv/frv-protos.h (frv_secondary_reload_class,
+ frv_class_likely_spilled_p, frv_class_max_nregs): Likewise.
+ * config/frv/frv.c (frv_override_options, frv_alloc_temp_reg,
+ frv_secondary_reload_class, frv_class_likely_spilled_p,
+ frv_class_max_nregs): Likewise.
+ * config/h8300/h8300.c (h8300_classify_operand,
+ h8300_unary_length, h8300_bitfield_length, h8300_asm_insn_count):
+ Likewise.
+ * config/i386/winnt.c (i386_pe_declare_function_type): Likewise.
+ * config/ia64/ia64.c (ia64_preferred_reload_class,
+ ia64_secondary_reload_class, ia64_output_mi_thunk): Likewise.
+ * config/iq2000/iq2000.c (gen_int_relational): Likewise.
+ * config/m32c/m32c.c (class_can_hold_mode, m32c_output_compare):
+ Likewise.
+ * config/m68hc11/m68hc11.c (preferred_reload_class,
+ m68hc11_memory_move_cost): Likewise.
+ * config/mcore/mcore.c (mcore_secondary_reload_class,
+ mcore_reload_class): Likewise.
+ * config/mips/mips.c (mips_hard_regno_mode_ok_p,
+ mips_class_max_nregs, mips_cannot_change_mode_class,
+ mips_preferred_reload_class, mips_secondary_reload_class,
+ mips_output_mi_thunk): Likewise.
+ * config/mmix/mmix.c (mmix_preferred_reload_class,
+ mmix_preferred_output_reload_class, mmix_secondary_reload_class):
+ Likewise.
+ * config/mn10300/mn10300.c (mn10300_secondary_reload_class):
+ Likewise.
+ * config/pa/pa.c (pa_secondary_reload, pa_combine_instructions,
+ pa_can_combine_p, pa_cannot_change_mode_class): Likewise.
+ * config/pa/pa.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise.
+ * config/rs6000/rs6000.c (paired_expand_vector_init,
+ rs6000_secondary_reload_class, rs6000_output_mi_thunk,
+ compare_section_name, rs6000_memory_move_cost): Likewise.
+ * config/s390/s390.c (s390_emit_compare_and_swap,
+ s390_preferred_reload_class, s390_secondary_reload,
+ legitimize_pic_address, legitimize_tls_address,
+ legitimize_reload_address, s390_expand_cs_hqi, s390_expand_atomic,
+ s390_class_max_nregs): Likewise.
+ * config/s390/s390.h (LEGITIMIZE_RELOAD_ADDRESS): Likewise.
+ * config/s390/s390.md: Likewise.
+ * config/score/score-protos.h (score_secondary_reload_class,
+ score_preferred_reload_class): Likewise.
+ * config/score/score.c (score_preferred_reload_class,
+ score_secondary_reload_class): Likewise.
+ * config/score/score3.c (score3_output_mi_thunk,
+ score3_preferred_reload_class, score3_secondary_reload_class,
+ score3_hard_regno_mode_ok): Likewise.
+ * config/score/score3.h (score3_preferred_reload_class,
+ score3_secondary_reload_class): Likewise.
+ * config/score/score7.c (score7_output_mi_thunk,
+ score7_preferred_reload_class, score7_secondary_reload_class,
+ score7_hard_regno_mode_ok): Likewise.
+ * config/score/score7.h (score7_preferred_reload_class,
+ score7_secondary_reload_class): Likewise.
+ * config/sh/sh.c (prepare_move_operands, output_far_jump,
+ output_branchy_insn, add_constant, gen_block_redirect,
+ sh_insn_length_adjustment, sh_cannot_change_mode_class,
+ sh_output_mi_thunk, replace_n_hard_rtx, sh_secondary_reload):
+ Likewise.
+ * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise.
+ * config/stormy16/stormy16.c (xstormy16_output_cbranch_hi,
+ xstormy16_output_cbranch_si, xstormy16_secondary_reload_class,
+ xstormy16_preferred_reload_class): Likewise.
+ * config/xtensa/xtensa.c (xtensa_expand_compare_and_swap,
+ xtensa_expand_atomic, override_options,
+ xtensa_preferred_reload_class, xtensa_secondary_reload_class):
+ Likewise.
+ * reorg.c (try_merge_delay_insns): Likewise.
+ * tree.c (merge_dllimport_decl_attributes): Likewise.
+
+ * config/frv/frv.c (frv_print_operand): Change isalpha to ISALPHA.
+
+2008-08-06 Michael Matz <matz@suse.de>
+
+ * Makefile.in (write_entries_to_file): Quote words.
+ * gengtype.c: (read_input_line): Skip over leading white-space.
+
+2008-08-06 Marc Gauthier <marc@tensilica.com>
+
+ * config.gcc: Match more processor names for Xtensa.
+ * configure.ac: Likewise.
+ * doc/install.texi (Specific): Likewise.
+ * configure: Regenerate.
+
+2008-08-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * builtins.c (expand_builtin_profile_func): Avoid C++ keywords.
+ * calls.c (avoid_likely_spilled_reg): Likewise.
+ * cfgexpand.c (gimple_assign_rhs_to_tree): Likewise.
+ * cgraph.c (cgraph_clone_edge, cgraph_clone_node): Likewise.
+ * config/i386/i386.c (ix86_expand_special_args_builtin,
+ ix86_secondary_reload): Likewise.
+ * except.c (struct eh_region, gen_eh_region_catch,
+ remove_unreachable_regions, duplicate_eh_regions,
+ assign_filter_values, build_post_landing_pads,
+ sjlj_find_directly_reachable_regions, remove_eh_handler,
+ reachable_next_level, foreach_reachable_handler,
+ can_throw_internal_1, can_throw_external_1,
+ collect_one_action_chain): Likewise.
+ * expr.c (expand_expr_real_1, vector_mode_valid_p): Likewise.
+ * fold-const.c (twoval_comparison_p, eval_subst): Likewise.
+ * function.c (update_temp_slot_address, instantiate_new_reg,
+ instantiate_virtual_regs_in_rtx,
+ instantiate_virtual_regs_in_insn): Likewise.
+ * gimple.c (extract_ops_from_tree, gimple_seq_copy): Likewise.
+ * gimplify.c (gimplify_call_expr, gimplify_init_constructor,
+ gimplify_cleanup_point_expr): Likewise.
+ * ipa-cp.c (ipcp_lattice_changed): Likewise.
+ * passes.c (next_pass_1): Likewise.
+ * print-tree.c (print_node_brief, print_node): Likewise.
+ * profile.c (branch_prob): Likewise.
+ * tree-dump.c (dump_register): Likewise.
+ * tree-eh.c (replace_goto_queue_cond_clause, lower_catch):
+ Likewise.
+ * tree-inline.c (remap_ssa_name, remap_type_1, remap_blocks,
+ copy_statement_list, remap_gimple_op_r, copy_tree_body_r,
+ copy_edges_for_bb, copy_cfg_body, copy_tree_r,
+ copy_arguments_for_versioning, copy_static_chain): Likewise.
+ * tree-into-ssa.c (names_replaced_by, add_to_repl_tbl,
+ add_new_name_mapping, register_new_name_mapping): Likewise.
+ * tree-mudflap.c (mf_xform_derefs): Likewise.
+ * tree-predcom.c (struct chain, dump_chain, replace_ref_with,
+ get_init_expr, combine_chains): Likewise.
+ * tree-pretty-print.c (dump_generic_node): Likewise.
+ * tree-ssa-structalias.c (create_variable_info_for): Likewise.
+ * tree-vrp.c (simplify_cond_using_ranges): Likewise.
+ * tree.c (substitute_in_expr, iterative_hash_expr): Likewise.
+ * value-prof.c (gimple_duplicate_stmt_histograms): Likewise.
+
+2008-08-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR middle-end/37010
+ * calls.c (expand_call): Use the biggest preferred stack
+ boundary.
+
+2008-08-06 Michael Matz <matz@suse.de>
+
+ PR target/36613
+ * reload.c (push_reload): Merge in,out,in_reg,out_reg members
+ for reused reload, instead of overwriting them.
+
+2008-08-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR middle-end/37009
+ * cfgexpand.c (expand_stack_alignment): Check parm_stack_boundary
+ for incoming stack boundary.
+
+ * function.c (assign_parm_find_entry_rtl): Update
+ parm_stack_boundary.
+
+ * function.h (rtl_data): Add parm_stack_boundary.
+
+ * config/i386/i386.c (ix86_finalize_stack_realign_flags): Check
+ parm_stack_boundary for incoming stack boundary.
+
+2008-08-06 Joseph Myers <joseph@codesourcery.com>
+
+ * jump.c (rtx_renumbered_equal_p): Do not call subreg_regno_offset
+ for unrepresentable subregs or treat them as equal to other regs
+ or subregs with the same register number.
+
+2008-08-06 Aldy Hernandez <aldyh@redhat.com>
+
+ PR middle-end/35432
+ * gimplify.c (gimplify_modify_expr): Do not optimize zero-sized types
+ if want_value.
+
+2008-08-06 Jan Hubicka <jh@suse.cz>
+
+ * predict.c (maybe_hot_frequency_p): When profile is absent, all
+ frequencies might be hot.
+
+2008-08-06 Andreas Krebbel <krebbel1@de.ibm.com>
+
+ * reload.c (find_reloads): Force constants into literal pool
+ also if they are wrapped in a SUBREG.
+
+2008-08-06 Maxim Kuvyrkov <maxim@codesourcery.com>
+
+ PR target/35659
+ * haifa-sched.c (sched_insn_is_legitimate_for_speculation_p): Move ...
+ * sched-deps.c (sched_insn_is_legitimate_for_speculation_p): ... here.
+ Don't allow predicated instructions for data speculation.
+ * sched-int.h (sched_insn_is_legitimate_for_speculation_p): Move
+ declaration.
+
+2008-08-06 Maxim Kuvyrkov <maxim@codesourcery.com>
+
+ * haifa-sched.c (extend_global): Split to extend_global_data and
+ extend_region_data. Update all uses.
+ (extend_all): Rename to extend_block_data.
+
+2008-08-06 Maxim Kuvyrkov <maxim@codesourcery.com>
+
+ * sched-rgn.c (new_ready): Check if instruction can be
+ speculatively scheduled before attempting speculation.
+ (debug_rgn_dependencies): Remove wrongful assert.
+
+2008-08-05 Bob Wilson <bob.wilson@acm.org>
+
+ * config/xtensa/t-xtensa: Remove dependency for gt-xtensa.h.
+
+2008-08-05 Bob Wilson <bob.wilson@acm.org>
+
+ * config/xtensa/xtensa.c (xtensa_va_start): Unshare valist.
+ (xtensa_gimplify_va_arg_expr): Unshare valist, orig_ndx, ndx, array,
+ va_size, and type_size.
+
+2008-08-04 Jason Merrill <jason@redhat.com>
+
+ PR c++/37016
+ * tree-ssa.c (useless_type_conversion_p_1): Call langhook
+ if TYPE_STRUCTURAL_EQUALITY_P is true for both types.
+
+2008-08-05 Richard Henderson <rth@redhat.com>
+
+ * configure.ac (HAVE_GAS_CFI_DIRECTIVE): Check .cfi_personality.
+ * configure: Rebuild.
+
+2008-08-05 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ PR tree-opt/37024
+ * tree-tailcall.c (process_assignment): Use gimple_assign_cast_p
+ instead of IS_CONVERT_EXPR_CODE_P for seeing if the assignment
+ is a conversion.
+
+2008-08-05 Richard Henderson <rth@redhat.com>
+
+ * Makefile.in (c-cppbuiltin.o): Depend on debug.h.
+ * c-cppbuiltin.c (c_cpp_builtins): Define __GCC_HAVE_DWARF2_CFI_ASM.
+ * doc/cpp.texi (__GCC_HAVE_DWARF2_CFI_ASM): Document it.
+ * common.opt (fdwarf2-cfi-asm): New.
+ * configure.ac (HAVE_GAS_CFI_DIRECTIVE): New.
+ * config.in, configure: Rebuild.
+ * dwarf2asm.c (dw2_asm_output_data_raw): New.
+ (dw2_asm_output_data_uleb128_raw, dw2_asm_output_data_sleb128_raw): New.
+ (dw2_force_const_mem): Externalize.
+ * dwarf2asm.h: Update.
+ * dwarf2out.c (dwarf2out_cfi_label): If flag_dwarf2_cfi_asm, don't
+ generate a real label.
+ (output_cfi_directive): New.
+ (add_fde_cfi): If flag_dwarf2_cfi_asm, use it.
+ (output_call_frame_info): Do nothing if flag_dwarf2_cfi_asm.
+ (dwarf2out_begin_prologue): Emit .cfi_startproc, .cfi_personality,
+ and .cfi_lsda.
+ (dwarf2out_end_epilogue): Emit .cfi_endproc.
+ (output_loc_operands_raw, output_loc_sequence_raw): New.
+ (output_cfa_loc_raw): New.
+
2008-08-05 Paul Brook <paul@codesourcery.com>
* doc/invoke.texi: Document new ARM -mfpu= and -mcpu= options.
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index b94e765ba0a..69a86636623 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20080805
+20080806
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 479277a567b..d5ee8c57be7 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -259,8 +259,8 @@ write_entries_to_file = $(shell rm -f $(2) || :) $(shell touch $(2)) \
$(foreach range, \
$(shell i=1; while test $$i -le $(words $(1)); do \
echo $$i; i=`expr $$i + $(write_entries_to_file_split)`; done), \
- $(shell echo $(wordlist $(range), \
- $(shell expr $(range) + $(write_entries_to_file_split) - 1), $(1)) \
+ $(shell echo "$(wordlist $(range), \
+ $(shell expr $(range) + $(write_entries_to_file_split) - 1), $(1))" \
| tr ' ' '\n' >> $(2)))
# --------
@@ -1870,8 +1870,9 @@ c-opts.o : c-opts.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$< $(OUTPUT_OPTION) @TARGET_SYSTEM_ROOT_DEFINE@
c-cppbuiltin.o : c-cppbuiltin.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
- $(TREE_H) version.h $(C_COMMON_H) $(C_PRAGMA_H) $(FLAGS_H) $(TOPLEV_H) \
- output.h except.h $(REAL_H) $(TARGET_H) $(TM_P_H) $(BASEVER)
+ $(TREE_H) version.h $(C_COMMON_H) $(C_PRAGMA_H) $(FLAGS_H) \
+ $(TOPLEV_H) output.h except.h $(REAL_H) $(TARGET_H) $(TM_P_H) \
+ $(BASEVER) debug.h
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) -DBASEVER=$(BASEVER_s) \
$< $(OUTPUT_OPTION)
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 761c5dad643..be092505283 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,191 @@
+2008-08-06 Samuel Tardieu <sam@rfc1149.net>
+
+ * gcc-interface/Make-lang.in: Use GCC_FOR_TARGET when dealing
+ with s-oscons-tmplt.i.
+
+2008-08-06 Samuel Tardieu <sam@rfc1149.net>
+
+ * gcc-interface/Make-lang.in (OSCONS_CPPFLAGS): Remove.
+
+2008-08-06 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch3.adb (Analyze_Component_Declaration): Protect against misuse
+ of incomplete type.
+
+ * sem_ch8.adb (Analyze_Object_Renaming): Diagnose properly a renaming
+ of a formal parameter of an incomplete type. Improve error message for
+ other improper uses of incomplete types.
+
+2008-08-06 Robert Dewar <dewar@adacore.com>
+
+ * gnat_ugn.texi: Clarify -gnato documentation
+
+2008-08-06 Thomas Quinot <quinot@adacore.com>
+
+ * gcc-interface/Makefile.in,
+ g-socthi-vxworks.adb, g-socthi-mingw.adb, g-sttsne-vxworks.adb,
+ g-socthi.adb, g-socket.adb, g-socket.ads, g-sothco.ads,
+ g-soccon-linux-x86.ads, g-soccon-vxworks.ads, g-soccon-mingw.ads,
+ g-soccon-hpux-ia64.ads, g-soccon-irix.ads, g-soccon-linux-64.ads,
+ g-soccon-aix.ads, g-soccon-solaris.ads, g-soccon-lynxos.ads,
+ g-soccon-vms.ads, g-soccon.ads, g-soccon-freebsd.ads,
+ g-soccon-linux-ppc.ads, g-soccon-tru64.ads, g-soccon-hpux.ads,
+ g-soccon-solaris-64.ads, gen-oscons.c, g-soccon-darwin.ads,
+ g-soccon-mingw-64.ads, g-soccon-linux-mips.ads, g-soccon-rtems.ads:
+ Remove GNAT.Sockets.Constants. This internal package is replaced by
+ System.OS_Constants.
+
+2008-08-06 Thomas Quinot <quinot@adacore.com>
+
+ * gcc-interface/Makefile.in, gcc-interface/Make-lang.in:
+ Remove obsolete targets referencing gen-soccon
+ When generating s-oscons.ads, use a file name that includes the
+ THREAD_KIND, to ensure that the (potentially different) version from a
+ previous build with a different threads flavour does not get reused.
+
+2008-08-06 Thomas Quinot <quinot@adacore.com>
+
+ * sem_res.adb: Minor reformatting
+
+ * s-fileio.adb (Open): When file open operation fails, raise Name_Error
+ only when the operating system reports a non-existing file or directory
+ (ENOENT), otherwise raise Name_Error.
+
+ * exp_ch11.adb: Minor reformatting
+
+2008-08-06 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch3.adb (Access_Subprogram_Declaration): If the return type is
+ incomplete, add the access_to_subprogram type to the list of private
+ dependents only if the incomplete type will be completed in the current
+ scope.
+ (Build_Discriminant_Constraints): If the type of the discriminant is
+ access_to_variable, reject a constraint that is access_to_constant.
+
+2008-08-06 Thomas Quinot <quinot@adacore.com>
+
+ * g-socket-dummy.adb, g-socket-dummy.ads, g-sothco-dummy.adb,
+ g-sothco-dummy.ads, g-socthi-dummy.adb, g-socthi-dummy.ads,
+ g-sttsne-dummy.ads: New files.
+
+ * gcc-interface/Makefile.in, Makefile.rtl: Use placeholder sources
+ with pragma Unimplemented_Unit for sockets packages on Nucleus.
+
+2008-08-06 Pascal Obry <obry@adacore.com>
+
+ * adaint.c: Another fix for ACL support on Windows.
+
+2008-08-06 Javier Miranda <miranda@adacore.com>
+
+ * exp_disp (Expand_Interface_Actuals): Adds missing support for
+ expansion of calls to subprograms using selected components.
+
+2008-08-06 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_res.adb (Resolve_Call): Use base type to determine whether a
+ dereference is needed because a subtype of an access_to_subprogram is
+ simply an access-subtype
+
+2008-08-06 Jerome Lambourg <lambourg@adacore.com>
+
+ * g-comlin.adb (Set_Command_Line): Now that aliases can contain
+ parameters, always specify the expected separator.
+
+2008-08-06 Thomas Quinot <quinot@adacore.com>
+
+ * xnmake.adb: Use new XUtil package for platform independent text
+ output.
+
+2008-08-06 Vincent Celier <celier@adacore.com>
+
+ * gnat_ugn.texi: Document compiler switch -gnateG
+
+2008-08-06 Quentin Ochem <ochem@adacore.com>
+
+ * s-stausa.adb (Fill_Stack): Fixed pragma assert and top pattern mark
+ in the case of an empty pattern size.
+ (Compute_Result): Do not do any computation in the case of an empty
+ pattern size.
+ (Report_Result): Fixed computation of the overflow guard.
+
+2008-08-06 Ed Schonberg <schonberg@adacore.com>
+
+ * g-awk.adb (Finalize): Do not use directly objects of the type in the
+ finalization routine to prevent elaboration order anomalies in new
+ finalization scheme.
+
+2008-08-06 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch3.adb (Find_Type_Name): protect against duplicate incomplete
+ declaration for the same type.
+
+2008-08-06 Thomas Quinot <quinot@adacore.com>
+
+ * sem.adb: Minor rewording (comment)
+
+2008-08-06 Jerome Lambourg <lambourg@adacore.com>
+
+ * g-comlin.adb (Define_Switch, Get_Switches): New.
+ (Can_Have_Parameter, Require_Parameter, Actual_Switch): New, used when
+ ungrouping switches.
+ (For_Each_Simple_Switch): Allow more control over parameters handling.
+ This generic method now allows ungrouping of switches with parameters
+ and switches with more than one letter after the prefix.
+ (Set_Command_Line): Take care of switches that are prefixed with a
+ switch handling parameters without delimiter (-gnatya and -gnaty3 for
+ example).
+ (Add_Switch, Remove_Switch): Handle parameters possibly present inside
+ a group, as in gnaty3aM80 (3 and 80 are parameters). Report status of
+ the operation.
+ (Start, Alias_Switches, Group_Switches): Take care of parameters
+ possibly present inside a group.
+
+ * g-comlin.ads (Define_Switch): New method used to define a list of
+ expected switches, that are necessary for correctly ungrouping switches
+ with more that one character after the prefix.
+ (Get_Switches): Method that builds a getopt string from the list of
+ switches as set previously by Define_Switch.
+ (Add_Switch, Remove_Switch): New versions of the methods, reporting the
+ status of the operation. Also allow the removal of switches with
+ parameters only.
+ (Command_Line_Configuration_Record): Maintain a list of expected
+ switches.
+
+2008-08-06 Doug Rupp <rupp@adacore.com>
+
+ * gcc-interface/decl.c (gnat_to_gnu_param): Force 32bit descriptor if
+ TARGET_MALLOC64 clear.
+
+ * gcc-interface/utils2.c (build_call_alloc_dealloc): Force 32bit malloc
+ if TARGET_MALLOC64 clear.
+
+ * gcc-interface/gigi.h (TARGET_ABI_OPEN_VMS): Move here from utils2.c
+ (TARGET_MALLC64): New macro. Default to clear.
+
+2008-08-06 Doug Rupp <rupp@adacore.com>
+
+ * gcc-interface/utils2.c (snames.h) Include
+ (TARGET_ABI_OPEN_VMS): Initialize.
+ (build_call_alloc_dealloc); [TARGET_ABI_OPEN_VMS] Allocate on 32bit heap
+ for Convention C.
+
+2008-08-06 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch3.adb (Process_Discriminants): diagnose redundant or improper
+ null exclusion in a discriminant declaration
+
+ * sem_ch8.adb (Analyze_Object_Renaming): diagnose null exclusion
+ indicators when type is not an access type.
+
+ * sem_ch12.adb (Formal_Object_Declaration): diagnose null exclusion
+ indicators when type is not an access type.
+
+2008-08-06 Javier Miranda <miranda@adacore.com>
+
+ * exp_disp (Expand_Interface_Conversion): Freeze the entity associated
+ with the target interface before expanding the code of the interface
+ conversion.
+
2008-08-05 Ed Schonberg <schonberg@adacore.com>
* freeze.adb:
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
index 994e46ac136..d5234c2b1ab 100644
--- a/gcc/ada/Makefile.rtl
+++ b/gcc/ada/Makefile.rtl
@@ -365,11 +365,6 @@ GNATRTL_NONTASKING_OBJS= \
g-sercom$(objext) \
g-sestin$(objext) \
g-sha1$(objext) \
- g-soccon$(objext) \
- g-socket$(objext) \
- g-socthi$(objext) \
- g-soliop$(objext) \
- g-sothco$(objext) \
g-souinf$(objext) \
g-speche$(objext) \
g-spchge$(objext) \
@@ -380,7 +375,6 @@ GNATRTL_NONTASKING_OBJS= \
g-sptavs$(objext) \
g-string$(objext) \
g-strspl$(objext) \
- g-sttsne$(objext) \
g-table$(objext) \
g-tasloc$(objext) \
g-timsta$(objext) \
@@ -609,4 +603,5 @@ GNATRTL_NONTASKING_OBJS= \
text_io$(objext) \
unchconv$(objext) \
unchdeal$(objext) \
+ $(GNATRTL_SOCKETS_OBJS) \
$(EXTRA_GNATRTL_NONTASKING_OBJS)
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
index 1edcac2199e..b7fdd08d252 100644
--- a/gcc/ada/adaint.c
+++ b/gcc/ada/adaint.c
@@ -1920,7 +1920,10 @@ __gnat_set_non_writable (char *name)
S2WSU (wname, name, GNAT_MAX_PATH_LEN + 2);
- __gnat_set_OWNER_ACL (wname, DENY_ACCESS, FILE_GENERIC_WRITE);
+ __gnat_set_OWNER_ACL
+ (wname, DENY_ACCESS,
+ FILE_WRITE_DATA | FILE_APPEND_DATA |
+ FILE_WRITE_PROPERTIES | FILE_WRITE_ATTRIBUTES);
SetFileAttributes
(wname, GetFileAttributes (wname) | FILE_ATTRIBUTE_READONLY);
#elif ! defined (__vxworks) && ! defined(__nucleus__)
diff --git a/gcc/ada/exp_ch11.adb b/gcc/ada/exp_ch11.adb
index 2cfde4df912..a8219fe7c9f 100644
--- a/gcc/ada/exp_ch11.adb
+++ b/gcc/ada/exp_ch11.adb
@@ -1386,7 +1386,7 @@ package body Exp_Ch11 is
-- Raise_Exception (exception-name'Identity, string);
- -- and there is nothing else to do
+ -- and there is nothing else to do.
if Present (Expression (N)) then
Rewrite (N,
@@ -1394,7 +1394,7 @@ package body Exp_Ch11 is
Name => New_Occurrence_Of (RTE (RE_Raise_Exception), Loc),
Parameter_Associations => New_List (
Make_Attribute_Reference (Loc,
- Prefix => Name (N),
+ Prefix => Name (N),
Attribute_Name => Name_Identity),
Expression (N))));
Analyze (N);
diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb
index 461edc75a3d..591150101fc 100644
--- a/gcc/ada/exp_disp.adb
+++ b/gcc/ada/exp_disp.adb
@@ -773,6 +773,11 @@ package body Exp_Disp is
Iface_Typ := Corresponding_Record_Type (Iface_Typ);
end if;
+ -- Freeze the entity associated with the target interface to have
+ -- available the attribute Access_Disp_Table.
+
+ Freeze_Before (N, Iface_Typ);
+
pragma Assert (not Is_Static
or else (not Is_Class_Wide_Type (Iface_Typ)
and then Is_Interface (Iface_Typ)));
@@ -1049,7 +1054,12 @@ package body Exp_Disp is
if Nkind (Name (Call_Node)) = N_Explicit_Dereference then
Subp := Etype (Name (Call_Node));
- -- Normal case
+ -- Call using selected component
+
+ elsif Nkind (Name (Call_Node)) = N_Selected_Component then
+ Subp := Entity (Selector_Name (Name (Call_Node)));
+
+ -- Call using direct name
else
Subp := Entity (Name (Call_Node));
diff --git a/gcc/ada/g-awk.adb b/gcc/ada/g-awk.adb
index 57045bf5661..0dee657b140 100644
--- a/gcc/ada/g-awk.adb
+++ b/gcc/ada/g-awk.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2000-2007, AdaCore --
+-- Copyright (C) 2000-2008, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -36,10 +36,6 @@ pragma Ada_95;
-- Default_Session (see below) do not work when compiling clients of this
-- package that instantiate generic units herein.
-pragma Style_Checks (All_Checks);
--- Turn off alpha ordering check for subprograms, since we cannot
--- Put Finalize and Initialize in alpha order (see comments).
-
with Ada.Exceptions;
with Ada.Text_IO;
with Ada.Strings.Unbounded;
@@ -56,6 +52,18 @@ package body GNAT.AWK is
use Ada;
use Ada.Strings.Unbounded;
+ -----------------------
+ -- Local subprograms --
+ -----------------------
+
+ -- The following two subprograms provide a functional interface to the
+ -- two special session variables, that are manipulated explicitly by
+ -- Finalize, but must be declared after Finalize to prevent static
+ -- elaboration warnings.
+
+ function Get_Def return Session_Data_Access;
+ procedure Set_Cur;
+
----------------
-- Split mode --
----------------
@@ -277,6 +285,24 @@ package body GNAT.AWK is
procedure Free is
new Unchecked_Deallocation (Session_Data, Session_Data_Access);
+ --------------
+ -- Finalize --
+ --------------
+
+ procedure Finalize (Session : in out Session_Type) is
+ begin
+ -- We release the session data only if it is not the default session
+
+ if Session.Data /= Get_Def then
+ Free (Session.Data);
+
+ -- Since we have closed the current session, set it to point now to
+ -- the default session.
+
+ Set_Cur;
+ end if;
+ end Finalize;
+
----------------
-- Initialize --
----------------
@@ -301,34 +327,9 @@ package body GNAT.AWK is
-- Session Variables --
-----------------------
- -- These must come after the body of Initialize, since they make
- -- implicit calls to Initialize at elaboration time.
-
Def_Session : Session_Type;
Cur_Session : Session_Type;
- --------------
- -- Finalize --
- --------------
-
- -- Note: Finalize must come after Initialize and the definition
- -- of the Def_Session and Cur_Session variables, since it references
- -- the latter.
-
- procedure Finalize (Session : in out Session_Type) is
- begin
- -- We release the session data only if it is not the default session
-
- if Session.Data /= Def_Session.Data then
- Free (Session.Data);
-
- -- Since we have closed the current session, set it to point now to
- -- the default session.
-
- Cur_Session.Data := Def_Session.Data;
- end if;
- end Finalize;
-
----------------------
-- Private Services --
----------------------
@@ -1480,6 +1481,24 @@ package body GNAT.AWK is
Split.Current_Line (Session.Data.Separators.all, Session);
end Split_Line;
+ -------------
+ -- Get_Def --
+ -------------
+
+ function Get_Def return Session_Data_Access is
+ begin
+ return Def_Session.Data;
+ end Get_Def;
+
+ -------------
+ -- Set_Cur --
+ -------------
+
+ procedure Set_Cur is
+ begin
+ Cur_Session.Data := Def_Session.Data;
+ end Set_Cur;
+
begin
-- We have declared two sessions but both should share the same data.
-- The current session must point to the default session as its initial
diff --git a/gcc/ada/g-comlin.adb b/gcc/ada/g-comlin.adb
index a3faf53040b..02a0f9a47a8 100644
--- a/gcc/ada/g-comlin.adb
+++ b/gcc/ada/g-comlin.adb
@@ -111,11 +111,22 @@ package body GNAT.Command_Line is
Str : String_Access);
-- Append a new element to Line
+ function Can_Have_Parameter (S : String) return Boolean;
+ -- Tell if S can have a parameter.
+
+ function Require_Parameter (S : String) return Boolean;
+ -- Tell if S requires a paramter.
+
+ function Actual_Switch (S : String) return String;
+ -- Remove any possible trailing '!', ':', '?' and '='
+
generic
- with procedure Callback (Simple_Switch : String);
+ with procedure Callback (Simple_Switch : String; Parameter : String);
procedure For_Each_Simple_Switch
- (Cmd : Command_Line;
- Switch : String);
+ (Cmd : Command_Line;
+ Switch : String;
+ Parameter : String := "";
+ Unalias : Boolean := True);
-- Breaks Switch into as simple switches as possible (expanding aliases and
-- ungrouping common prefixes when possible), and call Callback for each of
-- these.
@@ -1089,6 +1100,22 @@ package body GNAT.Command_Line is
Append (Config.Prefixes, new String'(Prefix));
end Define_Prefix;
+ -------------------
+ -- Define_Switch --
+ -------------------
+
+ procedure Define_Switch
+ (Config : in out Command_Line_Configuration;
+ Switch : String)
+ is
+ begin
+ if Config = null then
+ Config := new Command_Line_Configuration_Record;
+ end if;
+
+ Append (Config.Switches, new String'(Switch));
+ end Define_Switch;
+
--------------------
-- Define_Section --
--------------------
@@ -1105,6 +1132,35 @@ package body GNAT.Command_Line is
Append (Config.Sections, new String'(Section));
end Define_Section;
+ ------------------
+ -- Get_Switches --
+ ------------------
+
+ function Get_Switches
+ (Config : Command_Line_Configuration;
+ Switch_Char : Character)
+ return String
+ is
+ Ret : Ada.Strings.Unbounded.Unbounded_String;
+ use type Ada.Strings.Unbounded.Unbounded_String;
+ begin
+ if Config = null or else Config.Switches = null then
+ return "";
+ end if;
+
+ for J in Config.Switches'Range loop
+ if Config.Switches (J) (Config.Switches (J)'First) = Switch_Char then
+ Ret := Ret & " " &
+ Config.Switches (J)
+ (Config.Switches (J)'First + 1 .. Config.Switches (J)'Last);
+ else
+ Ret := Ret & " " & Config.Switches (J).all;
+ end if;
+ end loop;
+
+ return Ada.Strings.Unbounded.To_String (Ret);
+ end Get_Switches;
+
-----------------------
-- Set_Configuration --
-----------------------
@@ -1203,16 +1259,33 @@ package body GNAT.Command_Line is
if not Is_Section then
if Section = null then
- Add_Switch
- (Cmd, Sw,
- Parameter (Parser),
- Separator (Parser));
+ -- Workaround some weird cases: some switches may
+ -- expect parameters, but have the same value as
+ -- longer switches: -gnaty3 (-gnaty, parameter=3) and
+ -- -gnatya (-gnatya, no parameter).
+ -- So we are calling add_switch here with parameter
+ -- attached. This will be anyway correctly handled by
+ -- Add_Switch if -gnaty3 is actually furnished.
+ if Separator (Parser) = ASCII.NUL then
+ Add_Switch
+ (Cmd, Sw & Parameter (Parser), "");
+ else
+ Add_Switch
+ (Cmd, Sw, Parameter (Parser), Separator (Parser));
+ end if;
else
- Add_Switch
- (Cmd, Sw,
- Parameter (Parser),
- Separator (Parser),
- Section.all);
+ if Separator (Parser) = ASCII.NUL then
+ Add_Switch
+ (Cmd, Sw & Parameter (Parser), "",
+ Separator (Parser),
+ Section.all);
+ else
+ Add_Switch
+ (Cmd, Sw,
+ Parameter (Parser),
+ Separator (Parser),
+ Section.all);
+ end if;
end if;
end if;
end;
@@ -1222,13 +1295,19 @@ package body GNAT.Command_Line is
-- Add it with no parameter, if that's the way the user
-- wants it.
+ -- Specify the separator in all cases, as the switch might
+ -- need to be unaliased, and the alias might contain
+ -- switches with parameters.
if Section = null then
Add_Switch
- (Cmd, Switch_Char & Full_Switch (Parser));
+ (Cmd, Switch_Char & Full_Switch (Parser),
+ Separator => Separator (Parser));
else
Add_Switch
- (Cmd, Switch_Char & Full_Switch (Parser), Section.all);
+ (Cmd, Switch_Char & Full_Switch (Parser),
+ Separator => Separator (Parser),
+ Section => Section.all);
end if;
end;
end loop;
@@ -1250,14 +1329,165 @@ package body GNAT.Command_Line is
and then Type_Str (Index .. Index + Substring'Length - 1) = Substring;
end Looking_At;
+ ------------------------
+ -- Can_Have_Parameter --
+ ------------------------
+
+ function Can_Have_Parameter (S : String) return Boolean is
+ begin
+ if S'Length <= 1 then
+ return False;
+ end if;
+
+ case S (S'Last) is
+ when '!' | ':' | '?' | '=' =>
+ return True;
+ when others =>
+ return False;
+ end case;
+ end Can_Have_Parameter;
+
+ -----------------------
+ -- Require_Parameter --
+ -----------------------
+
+ function Require_Parameter (S : String) return Boolean is
+ begin
+ if S'Length <= 1 then
+ return False;
+ end if;
+
+ case S (S'Last) is
+ when '!' | ':' | '=' =>
+ return True;
+ when others =>
+ return False;
+ end case;
+ end Require_Parameter;
+
+ -------------------
+ -- Actual_Switch --
+ -------------------
+
+ function Actual_Switch (S : String) return String is
+ begin
+ if S'Length <= 1 then
+ return S;
+ end if;
+
+ case S (S'Last) is
+ when '!' | ':' | '?' | '=' =>
+ return S (S'First .. S'Last - 1);
+ when others =>
+ return S;
+ end case;
+ end Actual_Switch;
+
----------------------------
-- For_Each_Simple_Switch --
----------------------------
procedure For_Each_Simple_Switch
- (Cmd : Command_Line;
- Switch : String)
+ (Cmd : Command_Line;
+ Switch : String;
+ Parameter : String := "";
+ Unalias : Boolean := True)
is
+ function Group_Analysis
+ (Prefix : String;
+ Group : String) return Boolean;
+ -- Perform the analysis of a group of switches.
+
+ --------------------
+ -- Group_Analysis --
+ --------------------
+
+ function Group_Analysis
+ (Prefix : String;
+ Group : String) return Boolean
+ is
+ Idx : Natural := Group'First;
+ Found : Boolean;
+ begin
+ while Idx <= Group'Last loop
+ Found := False;
+
+ for S in Cmd.Config.Switches'Range loop
+ declare
+ Sw : constant String :=
+ Actual_Switch
+ (Cmd.Config.Switches (S).all);
+ Full : constant String :=
+ Prefix & Group (Idx .. Group'Last);
+ Last : Natural;
+ Param : Natural;
+
+ begin
+ if Sw'Length >= Prefix'Length
+ -- Verify that sw starts with Prefix
+ and then Looking_At (Sw, Sw'First, Prefix)
+ -- Verify that the group starts with sw
+ and then Looking_At (Full, Full'First, Sw)
+ then
+ Last := Idx + Sw'Length - Prefix'Length - 1;
+ Param := Last + 1;
+
+ if Can_Have_Parameter (Cmd.Config.Switches (S).all) then
+ -- Include potential parameter to the recursive call.
+ -- Only numbers are allowed.
+ while Last < Group'Last
+ and then Group (Last + 1) in '0' .. '9'
+ loop
+ Last := Last + 1;
+ end loop;
+ end if;
+
+ if not Require_Parameter (Cmd.Config.Switches (S).all)
+ or else Last >= Param
+ then
+ if Idx = Group'First
+ and then Last = Group'Last
+ and then Last < Param
+ then
+ -- The group only concerns a single switch. Do not
+ -- perform recursive call.
+
+ -- Note that we still perform a recursive call if
+ -- a parameter is detected in the switch, as this
+ -- is a way to correctly identify such a parameter
+ -- in aliases.
+ return False;
+ end if;
+
+ Found := True;
+
+ -- Recursive call, using the detected parameter if any
+ if Last >= Param then
+ For_Each_Simple_Switch
+ (Cmd,
+ Prefix & Group (Idx .. Param - 1),
+ Group (Param .. Last));
+ else
+ For_Each_Simple_Switch
+ (Cmd, Prefix & Group (Idx .. Last), "");
+ end if;
+
+ Idx := Last + 1;
+ exit;
+ end if;
+ end if;
+ end;
+ end loop;
+
+ if not Found then
+ For_Each_Simple_Switch (Cmd, Prefix & Group (Idx), "");
+ Idx := Idx + 1;
+ end if;
+ end loop;
+
+ return True;
+ end Group_Analysis;
+
begin
-- Are we adding a switch that can in fact be expanded through aliases ?
-- If yes, we add separately each of its expansion.
@@ -1267,13 +1497,16 @@ package body GNAT.Command_Line is
-- in which we do things here, the expansion of the alias will itself
-- be checked for a common prefix and further split into simple switches
- if Cmd.Config /= null
+ if Unalias
+ and then Cmd.Config /= null
and then Cmd.Config.Aliases /= null
then
for A in Cmd.Config.Aliases'Range loop
- if Cmd.Config.Aliases (A).all = Switch then
+ if Cmd.Config.Aliases (A).all = Switch
+ and then Parameter = ""
+ then
For_Each_Simple_Switch
- (Cmd, Cmd.Config.Expansions (A).all);
+ (Cmd, Cmd.Config.Expansions (A).all, "");
return;
end if;
end loop;
@@ -1291,19 +1524,31 @@ package body GNAT.Command_Line is
(Switch, Switch'First, Cmd.Config.Prefixes (P).all)
then
-- Alias expansion will be done recursively
+ if Cmd.Config.Switches = null then
+ for S in Switch'First + Cmd.Config.Prefixes (P)'Length
+ .. Switch'Last
+ loop
+ For_Each_Simple_Switch
+ (Cmd, Cmd.Config.Prefixes (P).all & Switch (S), "");
+ end loop;
- for S in Switch'First + Cmd.Config.Prefixes (P)'Length
- .. Switch'Last
- loop
- For_Each_Simple_Switch
- (Cmd, Cmd.Config.Prefixes (P).all & Switch (S));
- end loop;
- return;
+ return;
+
+ elsif Group_Analysis
+ (Cmd.Config.Prefixes (P).all,
+ Switch
+ (Switch'First + Cmd.Config.Prefixes (P)'Length
+ .. Switch'Last))
+ then
+ -- Recursive calls already done on each switch of the
+ -- group. Let's return to not call Callback.
+ return;
+ end if;
end if;
end loop;
end if;
- Callback (Switch);
+ Callback (Switch, Parameter);
end For_Each_Simple_Switch;
----------------
@@ -1317,7 +1562,25 @@ package body GNAT.Command_Line is
Separator : Character := ' ';
Section : String := "")
is
- procedure Add_Simple_Switch (Simple : String);
+ Success : Boolean;
+ pragma Unreferenced (Success);
+ begin
+ Add_Switch (Cmd, Switch, Parameter, Separator, Section, Success);
+ end Add_Switch;
+
+ ----------------
+ -- Add_Switch --
+ ----------------
+
+ procedure Add_Switch
+ (Cmd : in out Command_Line;
+ Switch : String;
+ Parameter : String := "";
+ Separator : Character := ' ';
+ Section : String := "";
+ Success : out Boolean)
+ is
+ procedure Add_Simple_Switch (Simple : String; Param : String);
-- Add a new switch that has had all its aliases expanded, and switches
-- ungrouped. We know there is no more aliases in Switches
@@ -1325,32 +1588,37 @@ package body GNAT.Command_Line is
-- Add_Simple_Switch --
-----------------------
- procedure Add_Simple_Switch (Simple : String) is
+ procedure Add_Simple_Switch (Simple : String; Param : String) is
begin
if Cmd.Expanded = null then
Cmd.Expanded := new Argument_List'(1 .. 1 => new String'(Simple));
- if Parameter = "" then
- Cmd.Params := new Argument_List'(1 .. 1 => null);
- else
+
+ if Param /= "" then
Cmd.Params := new Argument_List'
- (1 .. 1 => new String'(Separator & Parameter));
+ (1 .. 1 => new String'(Separator & Param));
+
+ else
+ Cmd.Params := new Argument_List'(1 .. 1 => null);
end if;
+
if Section = "" then
Cmd.Sections := new Argument_List'(1 .. 1 => null);
+
else
Cmd.Sections := new Argument_List'
(1 .. 1 => new String'(Section));
end if;
+
else
-- Do we already have this switch ?
for C in Cmd.Expanded'Range loop
if Cmd.Expanded (C).all = Simple
and then
- ((Cmd.Params (C) = null and then Parameter = "")
+ ((Cmd.Params (C) = null and then Param = "")
or else
(Cmd.Params (C) /= null
- and then Cmd.Params (C).all = Separator & Parameter))
+ and then Cmd.Params (C).all = Separator & Param))
and then
((Cmd.Sections (C) = null and then Section = "")
or else
@@ -1361,12 +1629,15 @@ package body GNAT.Command_Line is
end if;
end loop;
+ -- Inserting at least one switch
+ Success := True;
Append (Cmd.Expanded, new String'(Simple));
- if Parameter = "" then
- Append (Cmd.Params, null);
+ if Param /= "" then
+ Append (Cmd.Params, new String'(Separator & Param));
+
else
- Append (Cmd.Params, new String'(Separator & Parameter));
+ Append (Cmd.Params, null);
end if;
if Section = "" then
@@ -1383,7 +1654,8 @@ package body GNAT.Command_Line is
-- Start of processing for Add_Switch
begin
- Add_Simple_Switches (Cmd, Switch);
+ Success := False;
+ Add_Simple_Switches (Cmd, Switch, Parameter);
Free (Cmd.Coalesce);
end Add_Switch;
@@ -1436,20 +1708,40 @@ package body GNAT.Command_Line is
-------------------
procedure Remove_Switch
- (Cmd : in out Command_Line;
- Switch : String;
- Remove_All : Boolean := False;
- Section : String := "")
+ (Cmd : in out Command_Line;
+ Switch : String;
+ Remove_All : Boolean := False;
+ Has_Parameter : Boolean := False;
+ Section : String := "")
is
- procedure Remove_Simple_Switch (Simple : String);
+ Success : Boolean;
+ pragma Unreferenced (Success);
+ begin
+ Remove_Switch (Cmd, Switch, Remove_All, Has_Parameter, Section, Success);
+ end Remove_Switch;
+
+ -------------------
+ -- Remove_Switch --
+ -------------------
+
+ procedure Remove_Switch
+ (Cmd : in out Command_Line;
+ Switch : String;
+ Remove_All : Boolean := False;
+ Has_Parameter : Boolean := False;
+ Section : String := "";
+ Success : out Boolean)
+ is
+ procedure Remove_Simple_Switch (Simple : String; Param : String);
-- Removes a simple switch, with no aliasing or grouping
--------------------------
-- Remove_Simple_Switch --
--------------------------
- procedure Remove_Simple_Switch (Simple : String) is
+ procedure Remove_Simple_Switch (Simple : String; Param : String) is
C : Integer;
+ pragma Unreferenced (Param);
begin
if Cmd.Expanded /= null then
@@ -1462,10 +1754,12 @@ package body GNAT.Command_Line is
and then Section = "")
or else (Cmd.Sections (C) /= null
and then Section = Cmd.Sections (C).all))
+ and then (not Has_Parameter or else Cmd.Params (C) /= null)
then
Remove (Cmd.Expanded, C);
Remove (Cmd.Params, C);
Remove (Cmd.Sections, C);
+ Success := True;
if not Remove_All then
return;
@@ -1484,7 +1778,8 @@ package body GNAT.Command_Line is
-- Start of processing for Remove_Switch
begin
- Remove_Simple_Switches (Cmd, Switch);
+ Success := False;
+ Remove_Simple_Switches (Cmd, Switch, "", Unalias => not Has_Parameter);
Free (Cmd.Coalesce);
end Remove_Switch;
@@ -1498,14 +1793,14 @@ package body GNAT.Command_Line is
Parameter : String;
Section : String := "")
is
- procedure Remove_Simple_Switch (Simple : String);
+ procedure Remove_Simple_Switch (Simple : String; Param : String);
-- Removes a simple switch, with no aliasing or grouping
--------------------------
-- Remove_Simple_Switch --
--------------------------
- procedure Remove_Simple_Switch (Simple : String) is
+ procedure Remove_Simple_Switch (Simple : String; Param : String) is
C : Integer;
begin
@@ -1520,7 +1815,7 @@ package body GNAT.Command_Line is
(Cmd.Sections (C) /= null
and then Section = Cmd.Sections (C).all))
and then
- ((Cmd.Params (C) = null and then Parameter = "")
+ ((Cmd.Params (C) = null and then Param = "")
or else
(Cmd.Params (C) /= null
and then
@@ -1529,7 +1824,7 @@ package body GNAT.Command_Line is
Cmd.Params (C) (Cmd.Params (C)'First + 1
.. Cmd.Params (C)'Last) =
- Parameter))
+ Param))
then
Remove (Cmd.Expanded, C);
Remove (Cmd.Params, C);
@@ -1553,7 +1848,7 @@ package body GNAT.Command_Line is
-- Start of processing for Remove_Switch
begin
- Remove_Simple_Switches (Cmd, Switch);
+ Remove_Simple_Switches (Cmd, Switch, Parameter);
Free (Cmd.Coalesce);
end Remove_Switch;
@@ -1567,6 +1862,36 @@ package body GNAT.Command_Line is
Sections : Argument_List_Access;
Params : Argument_List_Access)
is
+ function Compatible_Parameter (Param : String_Access) return Boolean;
+ -- Tell if the parameter can be part of a group
+
+ --------------------------
+ -- Compatible_Parameter --
+ --------------------------
+
+ function Compatible_Parameter (Param : String_Access) return Boolean is
+ begin
+ if Param = null then
+ -- No parameter, OK
+ return True;
+
+ elsif Param (Param'First) /= ASCII.NUL then
+ -- We need parameters without separators...
+ return False;
+
+ else
+ -- We need number only parameters.
+ for J in Param'First + 1 .. Param'Last loop
+ if Param (J) not in '0' .. '9' then
+ return False;
+ end if;
+ end loop;
+
+ return True;
+ end if;
+
+ end Compatible_Parameter;
+
Group : Ada.Strings.Unbounded.Unbounded_String;
First : Natural;
use type Ada.Strings.Unbounded.Unbounded_String;
@@ -1584,7 +1909,7 @@ package body GNAT.Command_Line is
for C in Result'Range loop
if Result (C) /= null
- and then Params (C) = null -- ignored if has a parameter
+ and then Compatible_Parameter (Params (C))
and then Looking_At
(Result (C).all, Result (C)'First, Cmd.Config.Prefixes (P).all)
then
@@ -1602,7 +1927,14 @@ package body GNAT.Command_Line is
Group &
Result (C)
(Result (C)'First + Cmd.Config.Prefixes (P)'Length ..
- Result (C)'Last);
+ Result (C)'Last);
+
+ if Params (C) /= null then
+ Group := Group &
+ Params (C) (Params (C)'First + 1 .. Params (C)'Last);
+ Free (Params (C));
+ end if;
+
if First = 0 then
First := C;
end if;
@@ -1646,22 +1978,25 @@ package body GNAT.Command_Line is
Found : Boolean;
First : Natural;
- procedure Check_Cb (Switch : String);
+ procedure Check_Cb (Switch : String; Param : String);
-- Comment required ???
- procedure Remove_Cb (Switch : String);
+ procedure Remove_Cb (Switch : String; Param : String);
-- Comment required ???
--------------
-- Check_Cb --
--------------
- procedure Check_Cb (Switch : String) is
+ procedure Check_Cb (Switch : String; Param : String) is
begin
if Found then
for E in Result'Range loop
if Result (E) /= null
- and then Params (E) = null -- Ignore if has a param
+ and then
+ (Params (E) = null
+ or else Params (E) (Params (E)'First + 1
+ .. Params (E)'Last) = Param)
and then Result (E).all = Switch
then
return;
@@ -1676,14 +2011,21 @@ package body GNAT.Command_Line is
-- Remove_Cb --
---------------
- procedure Remove_Cb (Switch : String) is
+ procedure Remove_Cb (Switch : String; Param : String) is
begin
for E in Result'Range loop
- if Result (E) /= null and then Result (E).all = Switch then
+ if Result (E) /= null
+ and then
+ (Params (E) = null
+ or else Params (E) (Params (E)'First + 1
+ .. Params (E)'Last) = Param)
+ and then Result (E).all = Switch
+ then
if First > E then
First := E;
end if;
Free (Result (E));
+ Free (Params (E));
return;
end if;
end loop;
@@ -1820,11 +2162,20 @@ package body GNAT.Command_Line is
end if;
end loop;
+ Cmd.Coalesce_Params := new Argument_List (Cmd.Params'Range);
+ for E in Cmd.Params'Range loop
+ if Cmd.Params (E) = null then
+ Cmd.Coalesce_Params (E) := null;
+ else
+ Cmd.Coalesce_Params (E) := new String'(Cmd.Params (E).all);
+ end if;
+ end loop;
+
-- Not a clone, since we will not modify the parameters anyway
- Cmd.Coalesce_Params := Cmd.Params;
- Alias_Switches (Cmd, Cmd.Coalesce, Cmd.Params);
- Group_Switches (Cmd, Cmd.Coalesce, Cmd.Coalesce_Sections, Cmd.Params);
+ Alias_Switches (Cmd, Cmd.Coalesce, Cmd.Coalesce_Params);
+ Group_Switches
+ (Cmd, Cmd.Coalesce, Cmd.Coalesce_Sections, Cmd.Coalesce_Params);
end if;
if Expanded then
@@ -1841,6 +2192,7 @@ package body GNAT.Command_Line is
Iter.Current := Integer'Last;
else
Iter.Current := Iter.List'First;
+
while Iter.Current <= Iter.List'Last
and then Iter.List (Iter.Current) = null
loop
diff --git a/gcc/ada/g-comlin.ads b/gcc/ada/g-comlin.ads
index d92c157e3f1..738afe96a69 100644
--- a/gcc/ada/g-comlin.ads
+++ b/gcc/ada/g-comlin.ads
@@ -513,6 +513,14 @@ package GNAT.Command_Line is
-- characters whose order is irrelevant. In fact, this package will sort
-- them alphabetically.
+ procedure Define_Switch
+ (Config : in out Command_Line_Configuration;
+ Switch : String);
+ -- Indicates a new switch. The format of this switch follows the getopt
+ -- format (trailing ':', '?', etc for defining a switch with parameters).
+ -- The switches defined in the command_line_configuration object are used
+ -- when ungrouping switches with more that one character after the prefix.
+
procedure Define_Section
(Config : in out Command_Line_Configuration;
Section : String);
@@ -520,6 +528,13 @@ package GNAT.Command_Line is
-- section are ordered together, preceded by the section. They are placed
-- at the end of the command line (as in 'gnatmake somefile.adb -cargs -g')
+ function Get_Switches
+ (Config : Command_Line_Configuration;
+ Switch_Char : Character)
+ return String;
+ -- Get the switches list as expected by getopt. This list is built using
+ -- all switches defined previously via Define_Switch above.
+
procedure Free (Config : in out Command_Line_Configuration);
-- Free the memory used by Config
@@ -595,11 +610,22 @@ package GNAT.Command_Line is
-- added if not already present. For example, to add the -g switch into the
-- -cargs section, you need to call (Cmd, "-g", Section => "-cargs")
+ procedure Add_Switch
+ (Cmd : in out Command_Line;
+ Switch : String;
+ Parameter : String := "";
+ Separator : Character := ' ';
+ Section : String := "";
+ Success : out Boolean);
+ -- Same as above, returning the status of
+ -- the operation
+
procedure Remove_Switch
- (Cmd : in out Command_Line;
- Switch : String;
- Remove_All : Boolean := False;
- Section : String := "");
+ (Cmd : in out Command_Line;
+ Switch : String;
+ Remove_All : Boolean := False;
+ Has_Parameter : Boolean := False;
+ Section : String := "");
-- Remove Switch from the command line, and ungroup existing switches if
-- necessary.
--
@@ -610,6 +636,9 @@ package GNAT.Command_Line is
-- If Remove_All is True, then all matching switches are removed, otherwise
-- only the first matching one is removed.
--
+ -- if Has_Parameter is set to True, then only switches having a parameter
+ -- are removed.
+ --
-- If the switch belongs to a section, then this section should be
-- specified: Remove_Switch (Cmd_Line, "-g", Section => "-cargs") called
-- on the command line "-g -cargs -g" will result in "-g", while if
@@ -617,6 +646,16 @@ package GNAT.Command_Line is
-- If Remove_All is set, then both "-g" will be removed.
procedure Remove_Switch
+ (Cmd : in out Command_Line;
+ Switch : String;
+ Remove_All : Boolean := False;
+ Has_Parameter : Boolean := False;
+ Section : String := "";
+ Success : out Boolean);
+ -- Same as above, reporting the success of the operation (Success is False
+ -- if no switch was removed).
+
+ procedure Remove_Switch
(Cmd : in out Command_Line;
Switch : String;
Parameter : String;
@@ -774,6 +813,9 @@ private
Aliases : GNAT.OS_Lib.Argument_List_Access;
Expansions : GNAT.OS_Lib.Argument_List_Access;
-- The aliases. Both arrays have the same indices
+
+ Switches : GNAT.OS_Lib.Argument_List_Access;
+ -- List of expected switches. Used when expanding switch groups.
end record;
type Command_Line_Configuration is access Command_Line_Configuration_Record;
diff --git a/gcc/ada/g-soccon-aix.ads b/gcc/ada/g-soccon-aix.ads
deleted file mode 100644
index c0a1503f363..00000000000
--- a/gcc/ada/g-soccon-aix.ads
+++ /dev/null
@@ -1,208 +0,0 @@
-------------------------------------------------------------------------------
--- --
--- GNAT COMPILER COMPONENTS --
--- --
--- G N A T . S O C K E T S . C O N S T A N T S --
--- --
--- S p e c --
--- --
--- Copyright (C) 2000-2008, Free Software Foundation, Inc. --
--- --
--- GNAT is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
--- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
--- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
--- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
--- --
--- As a special exception, if other files instantiate generics from this --
--- unit, or you link this unit with other files to produce an executable, --
--- this unit does not by itself cause the resulting executable to be --
--- covered by the GNU General Public License. This exception does not --
--- however invalidate any other reasons why the executable file might be --
--- covered by the GNU Public License. --
--- --
--- GNAT was originally developed by the GNAT team at New York University. --
--- Extensive contributions were provided by Ada Core Technologies Inc. --
--- --
-------------------------------------------------------------------------------
-
--- This package provides target dependent definitions of constant for use
--- by the GNAT.Sockets package (g-socket.ads). This package should not be
--- directly with'ed by an applications program.
-
--- This is the version for powerpc-ibm-aix5.3.0.0
--- This file is generated automatically, do not modify it by hand! Instead,
--- make changes to gen-soccon.c and re-run it on each target.
-
-with Interfaces.C;
-package GNAT.Sockets.Constants is
-
- --------------
- -- Families --
- --------------
-
- AF_INET : constant := 2; -- IPv4 address family
- AF_INET6 : constant := 24; -- IPv6 address family
-
- -----------
- -- Modes --
- -----------
-
- SOCK_STREAM : constant := 1; -- Stream socket
- SOCK_DGRAM : constant := 2; -- Datagram socket
-
- -------------------
- -- Socket errors --
- -------------------
-
- EACCES : constant := 13; -- Permission denied
- EADDRINUSE : constant := 67; -- Address already in use
- EADDRNOTAVAIL : constant := 68; -- Cannot assign address
- EAFNOSUPPORT : constant := 66; -- Addr family not supported
- EALREADY : constant := 56; -- Operation in progress
- EBADF : constant := 9; -- Bad file descriptor
- ECONNABORTED : constant := 72; -- Connection aborted
- ECONNREFUSED : constant := 79; -- Connection refused
- ECONNRESET : constant := 73; -- Connection reset by peer
- EDESTADDRREQ : constant := 58; -- Destination addr required
- EFAULT : constant := 14; -- Bad address
- EHOSTDOWN : constant := 80; -- Host is down
- EHOSTUNREACH : constant := 81; -- No route to host
- EINPROGRESS : constant := 55; -- Operation now in progress
- EINTR : constant := 4; -- Interrupted system call
- EINVAL : constant := 22; -- Invalid argument
- EIO : constant := 5; -- Input output error
- EISCONN : constant := 75; -- Socket already connected
- ELOOP : constant := 85; -- Too many symbolic links
- EMFILE : constant := 24; -- Too many open files
- EMSGSIZE : constant := 59; -- Message too long
- ENAMETOOLONG : constant := 86; -- Name too long
- ENETDOWN : constant := 69; -- Network is down
- ENETRESET : constant := 71; -- Disconn. on network reset
- ENETUNREACH : constant := 70; -- Network is unreachable
- ENOBUFS : constant := 74; -- No buffer space available
- ENOPROTOOPT : constant := 61; -- Protocol not available
- ENOTCONN : constant := 76; -- Socket not connected
- ENOTSOCK : constant := 57; -- Operation on non socket
- EOPNOTSUPP : constant := 64; -- Operation not supported
- EPFNOSUPPORT : constant := 65; -- Unknown protocol family
- EPROTONOSUPPORT : constant := 62; -- Unknown protocol
- EPROTOTYPE : constant := 60; -- Unknown protocol type
- ESHUTDOWN : constant := 77; -- Cannot send once shutdown
- ESOCKTNOSUPPORT : constant := 63; -- Socket type not supported
- ETIMEDOUT : constant := 78; -- Connection timed out
- ETOOMANYREFS : constant := 115; -- Too many references
- EWOULDBLOCK : constant := 11; -- Operation would block
-
- -----------------
- -- Host errors --
- -----------------
-
- HOST_NOT_FOUND : constant := 1; -- Unknown host
- TRY_AGAIN : constant := 2; -- Host name lookup failure
- NO_DATA : constant := 4; -- No data record for name
- NO_RECOVERY : constant := 3; -- Non recoverable errors
-
- -------------------
- -- Control flags --
- -------------------
-
- FIONBIO : constant := -2147195266; -- Set/clear non-blocking io
- FIONREAD : constant := 1074030207; -- How many bytes to read
-
- --------------------
- -- Shutdown modes --
- --------------------
-
- SHUT_RD : constant := 0; -- No more recv
- SHUT_WR : constant := 1; -- No more send
- SHUT_RDWR : constant := 2; -- No more recv/send
-
- ---------------------
- -- Protocol levels --
- ---------------------
-
- SOL_SOCKET : constant := 65535; -- Options for socket level
- IPPROTO_IP : constant := 0; -- Dummy protocol for IP
- IPPROTO_UDP : constant := 17; -- UDP
- IPPROTO_TCP : constant := 6; -- TCP
-
- -------------------
- -- Request flags --
- -------------------
-
- MSG_OOB : constant := 1; -- Process out-of-band data
- MSG_PEEK : constant := 2; -- Peek at incoming data
- MSG_EOR : constant := 8; -- Send end of record
- MSG_WAITALL : constant := 64; -- Wait for full reception
- MSG_NOSIGNAL : constant := -1; -- No SIGPIPE on send
- MSG_Forced_Flags : constant := 0;
- -- Flags set on all send(2) calls
-
- --------------------
- -- Socket options --
- --------------------
-
- TCP_NODELAY : constant := 1; -- Do not coalesce packets
- SO_REUSEADDR : constant := 4; -- Bind reuse local address
- SO_REUSEPORT : constant := 512; -- Bind reuse port number
- SO_KEEPALIVE : constant := 8; -- Enable keep-alive msgs
- SO_LINGER : constant := 128; -- Defer close to flush data
- SO_BROADCAST : constant := 32; -- Can send broadcast msgs
- SO_SNDBUF : constant := 4097; -- Set/get send buffer size
- SO_RCVBUF : constant := 4098; -- Set/get recv buffer size
- SO_SNDTIMEO : constant := 4101; -- Emission timeout
- SO_RCVTIMEO : constant := 4102; -- Reception timeout
- SO_ERROR : constant := 4103; -- Get/clear error status
- IP_MULTICAST_IF : constant := 9; -- Set/get mcast interface
- IP_MULTICAST_TTL : constant := 10; -- Set/get multicast TTL
- IP_MULTICAST_LOOP : constant := 11; -- Set/get mcast loopback
- IP_ADD_MEMBERSHIP : constant := 12; -- Join a multicast group
- IP_DROP_MEMBERSHIP : constant := 13; -- Leave a multicast group
- IP_PKTINFO : constant := -1; -- Get datagram info
-
- -------------------
- -- System limits --
- -------------------
-
- IOV_MAX : constant := 16; -- Maximum writev iovcnt
-
- ----------------------
- -- Type definitions --
- ----------------------
-
- -- Sizes (in bytes) of the components of struct timeval
-
- SIZEOF_tv_sec : constant := 4; -- tv_sec
- SIZEOF_tv_usec : constant := 4; -- tv_usec
-
- -- Sizes of protocol specific address types (for sockaddr.sa_len)
-
- SIZEOF_sockaddr_in : constant := 16; -- struct sockaddr_in
- SIZEOF_sockaddr_in6 : constant := 28; -- struct sockaddr_in6
-
- -- Size of file descriptor sets
-
- SIZEOF_fd_set : constant := 8192; -- fd_set
-
- -- Fields of struct hostent
-
- subtype H_Addrtype_T is Interfaces.C.int;
- subtype H_Length_T is Interfaces.C.int;
-
- ----------------------------------------
- -- Properties of supported interfaces --
- ----------------------------------------
-
- Need_Netdb_Buffer : constant := 0; -- Need buffer for Netdb ops
- Has_Sockaddr_Len : constant := 0; -- Sockaddr has sa_len field
-
- Thread_Blocking_IO : constant Boolean := True;
- -- Set False for contexts where socket i/o are process blocking
-
-end GNAT.Sockets.Constants;
diff --git a/gcc/ada/g-soccon-darwin.ads b/gcc/ada/g-soccon-darwin.ads
deleted file mode 100644
index 7e7922405eb..00000000000
--- a/gcc/ada/g-soccon-darwin.ads
+++ /dev/null
@@ -1,208 +0,0 @@
-------------------------------------------------------------------------------
--- --
--- GNAT COMPILER COMPONENTS --
--- --
--- G N A T . S O C K E T S . C O N S T A N T S --
--- --
--- S p e c --
--- --
--- Copyright (C) 2000-2008, Free Software Foundation, Inc. --
--- --
--- GNAT is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
--- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
--- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
--- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
--- --
--- As a special exception, if other files instantiate generics from this --
--- unit, or you link this unit with other files to produce an executable, --
--- this unit does not by itself cause the resulting executable to be --
--- covered by the GNU General Public License. This exception does not --
--- however invalidate any other reasons why the executable file might be --
--- covered by the GNU Public License. --
--- --
--- GNAT was originally developed by the GNAT team at New York University. --
--- Extensive contributions were provided by Ada Core Technologies Inc. --
--- --
-------------------------------------------------------------------------------
-
--- This package provides target dependent definitions of constant for use
--- by the GNAT.Sockets package (g-socket.ads). This package should not be
--- directly with'ed by an applications program.
-
--- This is the version for i386-apple-darwin8.8.4
--- This file is generated automatically, do not modify it by hand! Instead,
--- make changes to gen-soccon.c and re-run it on each target.
-
-with Interfaces.C;
-package GNAT.Sockets.Constants is
-
- --------------
- -- Families --
- --------------
-
- AF_INET : constant := 2; -- IPv4 address family
- AF_INET6 : constant := 30; -- IPv6 address family
-
- -----------
- -- Modes --
- -----------
-
- SOCK_STREAM : constant := 1; -- Stream socket
- SOCK_DGRAM : constant := 2; -- Datagram socket
-
- -------------------
- -- Socket errors --
- -------------------
-
- EACCES : constant := 13; -- Permission denied
- EADDRINUSE : constant := 48; -- Address already in use
- EADDRNOTAVAIL : constant := 49; -- Cannot assign address
- EAFNOSUPPORT : constant := 47; -- Addr family not supported
- EALREADY : constant := 37; -- Operation in progress
- EBADF : constant := 9; -- Bad file descriptor
- ECONNABORTED : constant := 53; -- Connection aborted
- ECONNREFUSED : constant := 61; -- Connection refused
- ECONNRESET : constant := 54; -- Connection reset by peer
- EDESTADDRREQ : constant := 39; -- Destination addr required
- EFAULT : constant := 14; -- Bad address
- EHOSTDOWN : constant := 64; -- Host is down
- EHOSTUNREACH : constant := 65; -- No route to host
- EINPROGRESS : constant := 36; -- Operation now in progress
- EINTR : constant := 4; -- Interrupted system call
- EINVAL : constant := 22; -- Invalid argument
- EIO : constant := 5; -- Input output error
- EISCONN : constant := 56; -- Socket already connected
- ELOOP : constant := 62; -- Too many symbolic links
- EMFILE : constant := 24; -- Too many open files
- EMSGSIZE : constant := 40; -- Message too long
- ENAMETOOLONG : constant := 63; -- Name too long
- ENETDOWN : constant := 50; -- Network is down
- ENETRESET : constant := 52; -- Disconn. on network reset
- ENETUNREACH : constant := 51; -- Network is unreachable
- ENOBUFS : constant := 55; -- No buffer space available
- ENOPROTOOPT : constant := 42; -- Protocol not available
- ENOTCONN : constant := 57; -- Socket not connected
- ENOTSOCK : constant := 38; -- Operation on non socket
- EOPNOTSUPP : constant := 45; -- Operation not supported
- EPFNOSUPPORT : constant := 46; -- Unknown protocol family
- EPROTONOSUPPORT : constant := 43; -- Unknown protocol
- EPROTOTYPE : constant := 41; -- Unknown protocol type
- ESHUTDOWN : constant := 58; -- Cannot send once shutdown
- ESOCKTNOSUPPORT : constant := 44; -- Socket type not supported
- ETIMEDOUT : constant := 60; -- Connection timed out
- ETOOMANYREFS : constant := 59; -- Too many references
- EWOULDBLOCK : constant := 35; -- Operation would block
-
- -----------------
- -- Host errors --
- -----------------
-
- HOST_NOT_FOUND : constant := 1; -- Unknown host
- TRY_AGAIN : constant := 2; -- Host name lookup failure
- NO_DATA : constant := 4; -- No data record for name
- NO_RECOVERY : constant := 3; -- Non recoverable errors
-
- -------------------
- -- Control flags --
- -------------------
-
- FIONBIO : constant := -2147195266; -- Set/clear non-blocking io
- FIONREAD : constant := 1074030207; -- How many bytes to read
-
- --------------------
- -- Shutdown modes --
- --------------------
-
- SHUT_RD : constant := 0; -- No more recv
- SHUT_WR : constant := 1; -- No more send
- SHUT_RDWR : constant := 2; -- No more recv/send
-
- ---------------------
- -- Protocol levels --
- ---------------------
-
- SOL_SOCKET : constant := 65535; -- Options for socket level
- IPPROTO_IP : constant := 0; -- Dummy protocol for IP
- IPPROTO_UDP : constant := 17; -- UDP
- IPPROTO_TCP : constant := 6; -- TCP
-
- -------------------
- -- Request flags --
- -------------------
-
- MSG_OOB : constant := 1; -- Process out-of-band data
- MSG_PEEK : constant := 2; -- Peek at incoming data
- MSG_EOR : constant := 8; -- Send end of record
- MSG_WAITALL : constant := 64; -- Wait for full reception
- MSG_NOSIGNAL : constant := -1; -- No SIGPIPE on send
- MSG_Forced_Flags : constant := 0;
- -- Flags set on all send(2) calls
-
- --------------------
- -- Socket options --
- --------------------
-
- TCP_NODELAY : constant := 1; -- Do not coalesce packets
- SO_REUSEADDR : constant := 4; -- Bind reuse local address
- SO_REUSEPORT : constant := 512; -- Bind reuse port number
- SO_KEEPALIVE : constant := 8; -- Enable keep-alive msgs
- SO_LINGER : constant := 128; -- Defer close to flush data
- SO_BROADCAST : constant := 32; -- Can send broadcast msgs
- SO_SNDBUF : constant := 4097; -- Set/get send buffer size
- SO_RCVBUF : constant := 4098; -- Set/get recv buffer size
- SO_SNDTIMEO : constant := 4101; -- Emission timeout
- SO_RCVTIMEO : constant := 4102; -- Reception timeout
- SO_ERROR : constant := 4103; -- Get/clear error status
- IP_MULTICAST_IF : constant := 9; -- Set/get mcast interface
- IP_MULTICAST_TTL : constant := 10; -- Set/get multicast TTL
- IP_MULTICAST_LOOP : constant := 11; -- Set/get mcast loopback
- IP_ADD_MEMBERSHIP : constant := 12; -- Join a multicast group
- IP_DROP_MEMBERSHIP : constant := 13; -- Leave a multicast group
- IP_PKTINFO : constant := -1; -- Get datagram info
-
- -------------------
- -- System limits --
- -------------------
-
- IOV_MAX : constant := 1024; -- Maximum writev iovcnt
-
- ----------------------
- -- Type definitions --
- ----------------------
-
- -- Sizes (in bytes) of the components of struct timeval
-
- SIZEOF_tv_sec : constant := 4; -- tv_sec
- SIZEOF_tv_usec : constant := 4; -- tv_usec
-
- -- Sizes of protocol specific address types (for sockaddr.sa_len)
-
- SIZEOF_sockaddr_in : constant := 16; -- struct sockaddr_in
- SIZEOF_sockaddr_in6 : constant := 28; -- struct sockaddr_in6
-
- -- Size of file descriptor sets
-
- SIZEOF_fd_set : constant := 128; -- fd_set
-
- -- Fields of struct hostent
-
- subtype H_Addrtype_T is Interfaces.C.int;
- subtype H_Length_T is Interfaces.C.int;
-
- ----------------------------------------
- -- Properties of supported interfaces --
- ----------------------------------------
-
- Need_Netdb_Buffer : constant := 0; -- Need buffer for Netdb ops
- Has_Sockaddr_Len : constant := 0; -- Sockaddr has sa_len field
-
- Thread_Blocking_IO : constant Boolean := True;
- -- Set False for contexts where socket i/o are process blocking
-
-end GNAT.Sockets.Constants;
diff --git a/gcc/ada/g-soccon-freebsd.ads b/gcc/ada/g-soccon-freebsd.ads
deleted file mode 100644
index 8af0908ef97..00000000000
--- a/gcc/ada/g-soccon-freebsd.ads
+++ /dev/null
@@ -1,208 +0,0 @@
-------------------------------------------------------------------------------
--- --
--- GNAT COMPILER COMPONENTS --
--- --
--- G N A T . S O C K E T S . C O N S T A N T S --
--- --
--- S p e c --
--- --
--- Copyright (C) 2000-2008, Free Software Foundation, Inc. --
--- --
--- GNAT is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
--- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
--- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
--- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
--- --
--- As a special exception, if other files instantiate generics from this --
--- unit, or you link this unit with other files to produce an executable, --
--- this unit does not by itself cause the resulting executable to be --
--- covered by the GNU General Public License. This exception does not --
--- however invalidate any other reasons why the executable file might be --
--- covered by the GNU Public License. --
--- --
--- GNAT was originally developed by the GNAT team at New York University. --
--- Extensive contributions were provided by Ada Core Technologies Inc. --
--- --
-------------------------------------------------------------------------------
-
--- This package provides target dependent definitions of constant for use
--- by the GNAT.Sockets package (g-socket.ads). This package should not be
--- directly with'ed by an applications program.
-
--- This is the version for i386-unknown-freebsd6.2
--- This file is generated automatically, do not modify it by hand! Instead,
--- make changes to gen-soccon.c and re-run it on each target.
-
-with Interfaces.C;
-package GNAT.Sockets.Constants is
-
- --------------
- -- Families --
- --------------
-
- AF_INET : constant := 2; -- IPv4 address family
- AF_INET6 : constant := 28; -- IPv6 address family
-
- -----------
- -- Modes --
- -----------
-
- SOCK_STREAM : constant := 1; -- Stream socket
- SOCK_DGRAM : constant := 2; -- Datagram socket
-
- -------------------
- -- Socket errors --
- -------------------
-
- EACCES : constant := 13; -- Permission denied
- EADDRINUSE : constant := 48; -- Address already in use
- EADDRNOTAVAIL : constant := 49; -- Cannot assign address
- EAFNOSUPPORT : constant := 47; -- Addr family not supported
- EALREADY : constant := 37; -- Operation in progress
- EBADF : constant := 9; -- Bad file descriptor
- ECONNABORTED : constant := 53; -- Connection aborted
- ECONNREFUSED : constant := 61; -- Connection refused
- ECONNRESET : constant := 54; -- Connection reset by peer
- EDESTADDRREQ : constant := 39; -- Destination addr required
- EFAULT : constant := 14; -- Bad address
- EHOSTDOWN : constant := 64; -- Host is down
- EHOSTUNREACH : constant := 65; -- No route to host
- EINPROGRESS : constant := 36; -- Operation now in progress
- EINTR : constant := 4; -- Interrupted system call
- EINVAL : constant := 22; -- Invalid argument
- EIO : constant := 5; -- Input output error
- EISCONN : constant := 56; -- Socket already connected
- ELOOP : constant := 62; -- Too many symbolic links
- EMFILE : constant := 24; -- Too many open files
- EMSGSIZE : constant := 40; -- Message too long
- ENAMETOOLONG : constant := 63; -- Name too long
- ENETDOWN : constant := 50; -- Network is down
- ENETRESET : constant := 52; -- Disconn. on network reset
- ENETUNREACH : constant := 51; -- Network is unreachable
- ENOBUFS : constant := 55; -- No buffer space available
- ENOPROTOOPT : constant := 42; -- Protocol not available
- ENOTCONN : constant := 57; -- Socket not connected
- ENOTSOCK : constant := 38; -- Operation on non socket
- EOPNOTSUPP : constant := 45; -- Operation not supported
- EPFNOSUPPORT : constant := 46; -- Unknown protocol family
- EPROTONOSUPPORT : constant := 43; -- Unknown protocol
- EPROTOTYPE : constant := 41; -- Unknown protocol type
- ESHUTDOWN : constant := 58; -- Cannot send once shutdown
- ESOCKTNOSUPPORT : constant := 44; -- Socket type not supported
- ETIMEDOUT : constant := 60; -- Connection timed out
- ETOOMANYREFS : constant := 59; -- Too many references
- EWOULDBLOCK : constant := 35; -- Operation would block
-
- -----------------
- -- Host errors --
- -----------------
-
- HOST_NOT_FOUND : constant := 1; -- Unknown host
- TRY_AGAIN : constant := 2; -- Host name lookup failure
- NO_DATA : constant := 4; -- No data record for name
- NO_RECOVERY : constant := 3; -- Non recoverable errors
-
- -------------------
- -- Control flags --
- -------------------
-
- FIONBIO : constant := -2147195266; -- Set/clear non-blocking io
- FIONREAD : constant := 1074030207; -- How many bytes to read
-
- --------------------
- -- Shutdown modes --
- --------------------
-
- SHUT_RD : constant := 0; -- No more recv
- SHUT_WR : constant := 1; -- No more send
- SHUT_RDWR : constant := 2; -- No more recv/send
-
- ---------------------
- -- Protocol levels --
- ---------------------
-
- SOL_SOCKET : constant := 65535; -- Options for socket level
- IPPROTO_IP : constant := 0; -- Dummy protocol for IP
- IPPROTO_UDP : constant := 17; -- UDP
- IPPROTO_TCP : constant := 6; -- TCP
-
- -------------------
- -- Request flags --
- -------------------
-
- MSG_OOB : constant := 1; -- Process out-of-band data
- MSG_PEEK : constant := 2; -- Peek at incoming data
- MSG_EOR : constant := 8; -- Send end of record
- MSG_WAITALL : constant := 64; -- Wait for full reception
- MSG_NOSIGNAL : constant := 131072; -- No SIGPIPE on send
- MSG_Forced_Flags : constant := 0;
- -- Flags set on all send(2) calls
-
- --------------------
- -- Socket options --
- --------------------
-
- TCP_NODELAY : constant := 1; -- Do not coalesce packets
- SO_REUSEADDR : constant := 4; -- Bind reuse local address
- SO_REUSEPORT : constant := 512; -- Bind reuse port number
- SO_KEEPALIVE : constant := 8; -- Enable keep-alive msgs
- SO_LINGER : constant := 128; -- Defer close to flush data
- SO_BROADCAST : constant := 32; -- Can send broadcast msgs
- SO_SNDBUF : constant := 4097; -- Set/get send buffer size
- SO_RCVBUF : constant := 4098; -- Set/get recv buffer size
- SO_SNDTIMEO : constant := 4101; -- Emission timeout
- SO_RCVTIMEO : constant := 4102; -- Reception timeout
- SO_ERROR : constant := 4103; -- Get/clear error status
- IP_MULTICAST_IF : constant := 9; -- Set/get mcast interface
- IP_MULTICAST_TTL : constant := 10; -- Set/get multicast TTL
- IP_MULTICAST_LOOP : constant := 11; -- Set/get mcast loopback
- IP_ADD_MEMBERSHIP : constant := 12; -- Join a multicast group
- IP_DROP_MEMBERSHIP : constant := 13; -- Leave a multicast group
- IP_PKTINFO : constant := -1; -- Get datagram info
-
- -------------------
- -- System limits --
- -------------------
-
- IOV_MAX : constant := 1024; -- Maximum writev iovcnt
-
- ----------------------
- -- Type definitions --
- ----------------------
-
- -- Sizes (in bytes) of the components of struct timeval
-
- SIZEOF_tv_sec : constant := 4; -- tv_sec
- SIZEOF_tv_usec : constant := 4; -- tv_usec
-
- -- Sizes of protocol specific address types (for sockaddr.sa_len)
-
- SIZEOF_sockaddr_in : constant := 16; -- struct sockaddr_in
- SIZEOF_sockaddr_in6 : constant := 28; -- struct sockaddr_in6
-
- -- Size of file descriptor sets
-
- SIZEOF_fd_set : constant := 128; -- fd_set
-
- -- Fields of struct hostent
-
- subtype H_Addrtype_T is Interfaces.C.int;
- subtype H_Length_T is Interfaces.C.int;
-
- ----------------------------------------
- -- Properties of supported interfaces --
- ----------------------------------------
-
- Need_Netdb_Buffer : constant := 0; -- Need buffer for Netdb ops
- Has_Sockaddr_Len : constant := 1; -- Sockaddr has sa_len field
-
- Thread_Blocking_IO : constant Boolean := True;
- -- Set False for contexts where socket i/o are process blocking
-
-end GNAT.Sockets.Constants;
diff --git a/gcc/ada/g-soccon-hpux-ia64.ads b/gcc/ada/g-soccon-hpux-ia64.ads
deleted file mode 100644
index 4c364bd9532..00000000000
--- a/gcc/ada/g-soccon-hpux-ia64.ads
+++ /dev/null
@@ -1,208 +0,0 @@
-------------------------------------------------------------------------------
--- --
--- GNAT COMPILER COMPONENTS --
--- --
--- G N A T . S O C K E T S . C O N S T A N T S --
--- --
--- S p e c --
--- --
--- Copyright (C) 2000-2008, Free Software Foundation, Inc. --
--- --
--- GNAT is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
--- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
--- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
--- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
--- --
--- As a special exception, if other files instantiate generics from this --
--- unit, or you link this unit with other files to produce an executable, --
--- this unit does not by itself cause the resulting executable to be --
--- covered by the GNU General Public License. This exception does not --
--- however invalidate any other reasons why the executable file might be --
--- covered by the GNU Public License. --
--- --
--- GNAT was originally developed by the GNAT team at New York University. --
--- Extensive contributions were provided by Ada Core Technologies Inc. --
--- --
-------------------------------------------------------------------------------
-
--- This package provides target dependent definitions of constant for use
--- by the GNAT.Sockets package (g-socket.ads). This package should not be
--- directly with'ed by an applications program.
-
--- This is the version for ia64-hp-hpux11.23
--- This file is generated automatically, do not modify it by hand! Instead,
--- make changes to gen-soccon.c and re-run it on each target.
-
-with Interfaces.C;
-package GNAT.Sockets.Constants is
-
- --------------
- -- Families --
- --------------
-
- AF_INET : constant := 2; -- IPv4 address family
- AF_INET6 : constant := 22; -- IPv6 address family
-
- -----------
- -- Modes --
- -----------
-
- SOCK_STREAM : constant := 1; -- Stream socket
- SOCK_DGRAM : constant := 2; -- Datagram socket
-
- -------------------
- -- Socket errors --
- -------------------
-
- EACCES : constant := 13; -- Permission denied
- EADDRINUSE : constant := 226; -- Address already in use
- EADDRNOTAVAIL : constant := 227; -- Cannot assign address
- EAFNOSUPPORT : constant := 225; -- Addr family not supported
- EALREADY : constant := 244; -- Operation in progress
- EBADF : constant := 9; -- Bad file descriptor
- ECONNABORTED : constant := 231; -- Connection aborted
- ECONNREFUSED : constant := 239; -- Connection refused
- ECONNRESET : constant := 232; -- Connection reset by peer
- EDESTADDRREQ : constant := 217; -- Destination addr required
- EFAULT : constant := 14; -- Bad address
- EHOSTDOWN : constant := 241; -- Host is down
- EHOSTUNREACH : constant := 242; -- No route to host
- EINPROGRESS : constant := 245; -- Operation now in progress
- EINTR : constant := 4; -- Interrupted system call
- EINVAL : constant := 22; -- Invalid argument
- EIO : constant := 5; -- Input output error
- EISCONN : constant := 234; -- Socket already connected
- ELOOP : constant := 249; -- Too many symbolic links
- EMFILE : constant := 24; -- Too many open files
- EMSGSIZE : constant := 218; -- Message too long
- ENAMETOOLONG : constant := 248; -- Name too long
- ENETDOWN : constant := 228; -- Network is down
- ENETRESET : constant := 230; -- Disconn. on network reset
- ENETUNREACH : constant := 229; -- Network is unreachable
- ENOBUFS : constant := 233; -- No buffer space available
- ENOPROTOOPT : constant := 220; -- Protocol not available
- ENOTCONN : constant := 235; -- Socket not connected
- ENOTSOCK : constant := 216; -- Operation on non socket
- EOPNOTSUPP : constant := 223; -- Operation not supported
- EPFNOSUPPORT : constant := 224; -- Unknown protocol family
- EPROTONOSUPPORT : constant := 221; -- Unknown protocol
- EPROTOTYPE : constant := 219; -- Unknown protocol type
- ESHUTDOWN : constant := 236; -- Cannot send once shutdown
- ESOCKTNOSUPPORT : constant := 222; -- Socket type not supported
- ETIMEDOUT : constant := 238; -- Connection timed out
- ETOOMANYREFS : constant := 237; -- Too many references
- EWOULDBLOCK : constant := 246; -- Operation would block
-
- -----------------
- -- Host errors --
- -----------------
-
- HOST_NOT_FOUND : constant := 1; -- Unknown host
- TRY_AGAIN : constant := 2; -- Host name lookup failure
- NO_DATA : constant := 4; -- No data record for name
- NO_RECOVERY : constant := 3; -- Non recoverable errors
-
- -------------------
- -- Control flags --
- -------------------
-
- FIONBIO : constant := -2147195266; -- Set/clear non-blocking io
- FIONREAD : constant := 1074030207; -- How many bytes to read
-
- --------------------
- -- Shutdown modes --
- --------------------
-
- SHUT_RD : constant := 0; -- No more recv
- SHUT_WR : constant := 1; -- No more send
- SHUT_RDWR : constant := 2; -- No more recv/send
-
- ---------------------
- -- Protocol levels --
- ---------------------
-
- SOL_SOCKET : constant := 65535; -- Options for socket level
- IPPROTO_IP : constant := 0; -- Dummy protocol for IP
- IPPROTO_UDP : constant := 17; -- UDP
- IPPROTO_TCP : constant := 6; -- TCP
-
- -------------------
- -- Request flags --
- -------------------
-
- MSG_OOB : constant := 1; -- Process out-of-band data
- MSG_PEEK : constant := 2; -- Peek at incoming data
- MSG_EOR : constant := 8; -- Send end of record
- MSG_WAITALL : constant := 64; -- Wait for full reception
- MSG_NOSIGNAL : constant := -1; -- No SIGPIPE on send
- MSG_Forced_Flags : constant := 0;
- -- Flags set on all send(2) calls
-
- --------------------
- -- Socket options --
- --------------------
-
- TCP_NODELAY : constant := 1; -- Do not coalesce packets
- SO_REUSEADDR : constant := 4; -- Bind reuse local address
- SO_REUSEPORT : constant := 512; -- Bind reuse port number
- SO_KEEPALIVE : constant := 8; -- Enable keep-alive msgs
- SO_LINGER : constant := 128; -- Defer close to flush data
- SO_BROADCAST : constant := 32; -- Can send broadcast msgs
- SO_SNDBUF : constant := 4097; -- Set/get send buffer size
- SO_RCVBUF : constant := 4098; -- Set/get recv buffer size
- SO_SNDTIMEO : constant := 4101; -- Emission timeout
- SO_RCVTIMEO : constant := 4102; -- Reception timeout
- SO_ERROR : constant := 4103; -- Get/clear error status
- IP_MULTICAST_IF : constant := 2; -- Set/get mcast interface
- IP_MULTICAST_TTL : constant := 3; -- Set/get multicast TTL
- IP_MULTICAST_LOOP : constant := 4; -- Set/get mcast loopback
- IP_ADD_MEMBERSHIP : constant := 5; -- Join a multicast group
- IP_DROP_MEMBERSHIP : constant := 6; -- Leave a multicast group
- IP_PKTINFO : constant := -1; -- Get datagram info
-
- -------------------
- -- System limits --
- -------------------
-
- IOV_MAX : constant := 16; -- Maximum writev iovcnt
-
- ----------------------
- -- Type definitions --
- ----------------------
-
- -- Sizes (in bytes) of the components of struct timeval
-
- SIZEOF_tv_sec : constant := 8; -- tv_sec
- SIZEOF_tv_usec : constant := 8; -- tv_usec
-
- -- Sizes of protocol specific address types (for sockaddr.sa_len)
-
- SIZEOF_sockaddr_in : constant := 16; -- struct sockaddr_in
- SIZEOF_sockaddr_in6 : constant := 28; -- struct sockaddr_in6
-
- -- Size of file descriptor sets
-
- SIZEOF_fd_set : constant := 256; -- fd_set
-
- -- Fields of struct hostent
-
- subtype H_Addrtype_T is Interfaces.C.int;
- subtype H_Length_T is Interfaces.C.int;
-
- ----------------------------------------
- -- Properties of supported interfaces --
- ----------------------------------------
-
- Need_Netdb_Buffer : constant := 0; -- Need buffer for Netdb ops
- Has_Sockaddr_Len : constant := 0; -- Sockaddr has sa_len field
-
- Thread_Blocking_IO : constant Boolean := True;
- -- Set False for contexts where socket i/o are process blocking
-
-end GNAT.Sockets.Constants;
diff --git a/gcc/ada/g-soccon-hpux.ads b/gcc/ada/g-soccon-hpux.ads
deleted file mode 100644
index c49075def5a..00000000000
--- a/gcc/ada/g-soccon-hpux.ads
+++ /dev/null
@@ -1,208 +0,0 @@
-------------------------------------------------------------------------------
--- --
--- GNAT COMPILER COMPONENTS --
--- --
--- G N A T . S O C K E T S . C O N S T A N T S --
--- --
--- S p e c --
--- --
--- Copyright (C) 2000-2008, Free Software Foundation, Inc. --
--- --
--- GNAT is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
--- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
--- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
--- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
--- --
--- As a special exception, if other files instantiate generics from this --
--- unit, or you link this unit with other files to produce an executable, --
--- this unit does not by itself cause the resulting executable to be --
--- covered by the GNU General Public License. This exception does not --
--- however invalidate any other reasons why the executable file might be --
--- covered by the GNU Public License. --
--- --
--- GNAT was originally developed by the GNAT team at New York University. --
--- Extensive contributions were provided by Ada Core Technologies Inc. --
--- --
-------------------------------------------------------------------------------
-
--- This package provides target dependent definitions of constant for use
--- by the GNAT.Sockets package (g-socket.ads). This package should not be
--- directly with'ed by an applications program.
-
--- This is the version for hppa1.1-hp-hpux11.00
--- This file is generated automatically, do not modify it by hand! Instead,
--- make changes to gen-soccon.c and re-run it on each target.
-
-with Interfaces.C;
-package GNAT.Sockets.Constants is
-
- --------------
- -- Families --
- --------------
-
- AF_INET : constant := 2; -- IPv4 address family
- AF_INET6 : constant := -1; -- IPv6 address family
-
- -----------
- -- Modes --
- -----------
-
- SOCK_STREAM : constant := 1; -- Stream socket
- SOCK_DGRAM : constant := 2; -- Datagram socket
-
- -------------------
- -- Socket errors --
- -------------------
-
- EACCES : constant := 13; -- Permission denied
- EADDRINUSE : constant := 226; -- Address already in use
- EADDRNOTAVAIL : constant := 227; -- Cannot assign address
- EAFNOSUPPORT : constant := 225; -- Addr family not supported
- EALREADY : constant := 244; -- Operation in progress
- EBADF : constant := 9; -- Bad file descriptor
- ECONNABORTED : constant := 231; -- Connection aborted
- ECONNREFUSED : constant := 239; -- Connection refused
- ECONNRESET : constant := 232; -- Connection reset by peer
- EDESTADDRREQ : constant := 217; -- Destination addr required
- EFAULT : constant := 14; -- Bad address
- EHOSTDOWN : constant := 241; -- Host is down
- EHOSTUNREACH : constant := 242; -- No route to host
- EINPROGRESS : constant := 245; -- Operation now in progress
- EINTR : constant := 4; -- Interrupted system call
- EINVAL : constant := 22; -- Invalid argument
- EIO : constant := 5; -- Input output error
- EISCONN : constant := 234; -- Socket already connected
- ELOOP : constant := 249; -- Too many symbolic links
- EMFILE : constant := 24; -- Too many open files
- EMSGSIZE : constant := 218; -- Message too long
- ENAMETOOLONG : constant := 248; -- Name too long
- ENETDOWN : constant := 228; -- Network is down
- ENETRESET : constant := 230; -- Disconn. on network reset
- ENETUNREACH : constant := 229; -- Network is unreachable
- ENOBUFS : constant := 233; -- No buffer space available
- ENOPROTOOPT : constant := 220; -- Protocol not available
- ENOTCONN : constant := 235; -- Socket not connected
- ENOTSOCK : constant := 216; -- Operation on non socket
- EOPNOTSUPP : constant := 223; -- Operation not supported
- EPFNOSUPPORT : constant := 224; -- Unknown protocol family
- EPROTONOSUPPORT : constant := 221; -- Unknown protocol
- EPROTOTYPE : constant := 219; -- Unknown protocol type
- ESHUTDOWN : constant := 236; -- Cannot send once shutdown
- ESOCKTNOSUPPORT : constant := 222; -- Socket type not supported
- ETIMEDOUT : constant := 238; -- Connection timed out
- ETOOMANYREFS : constant := 237; -- Too many references
- EWOULDBLOCK : constant := 246; -- Operation would block
-
- -----------------
- -- Host errors --
- -----------------
-
- HOST_NOT_FOUND : constant := 1; -- Unknown host
- TRY_AGAIN : constant := 2; -- Host name lookup failure
- NO_DATA : constant := 4; -- No data record for name
- NO_RECOVERY : constant := 3; -- Non recoverable errors
-
- -------------------
- -- Control flags --
- -------------------
-
- FIONBIO : constant := -2147195266; -- Set/clear non-blocking io
- FIONREAD : constant := 1074030207; -- How many bytes to read
-
- --------------------
- -- Shutdown modes --
- --------------------
-
- SHUT_RD : constant := 0; -- No more recv
- SHUT_WR : constant := 1; -- No more send
- SHUT_RDWR : constant := 2; -- No more recv/send
-
- ---------------------
- -- Protocol levels --
- ---------------------
-
- SOL_SOCKET : constant := 65535; -- Options for socket level
- IPPROTO_IP : constant := 0; -- Dummy protocol for IP
- IPPROTO_UDP : constant := 17; -- UDP
- IPPROTO_TCP : constant := 6; -- TCP
-
- -------------------
- -- Request flags --
- -------------------
-
- MSG_OOB : constant := 1; -- Process out-of-band data
- MSG_PEEK : constant := 2; -- Peek at incoming data
- MSG_EOR : constant := 8; -- Send end of record
- MSG_WAITALL : constant := 64; -- Wait for full reception
- MSG_NOSIGNAL : constant := -1; -- No SIGPIPE on send
- MSG_Forced_Flags : constant := 0;
- -- Flags set on all send(2) calls
-
- --------------------
- -- Socket options --
- --------------------
-
- TCP_NODELAY : constant := 1; -- Do not coalesce packets
- SO_REUSEADDR : constant := 4; -- Bind reuse local address
- SO_REUSEPORT : constant := 512; -- Bind reuse port number
- SO_KEEPALIVE : constant := 8; -- Enable keep-alive msgs
- SO_LINGER : constant := 128; -- Defer close to flush data
- SO_BROADCAST : constant := 32; -- Can send broadcast msgs
- SO_SNDBUF : constant := 4097; -- Set/get send buffer size
- SO_RCVBUF : constant := 4098; -- Set/get recv buffer size
- SO_SNDTIMEO : constant := 4101; -- Emission timeout
- SO_RCVTIMEO : constant := 4102; -- Reception timeout
- SO_ERROR : constant := 4103; -- Get/clear error status
- IP_MULTICAST_IF : constant := 2; -- Set/get mcast interface
- IP_MULTICAST_TTL : constant := 3; -- Set/get multicast TTL
- IP_MULTICAST_LOOP : constant := 4; -- Set/get mcast loopback
- IP_ADD_MEMBERSHIP : constant := 5; -- Join a multicast group
- IP_DROP_MEMBERSHIP : constant := 6; -- Leave a multicast group
- IP_PKTINFO : constant := -1; -- Get datagram info
-
- -------------------
- -- System limits --
- -------------------
-
- IOV_MAX : constant := 16; -- Maximum writev iovcnt
-
- ----------------------
- -- Type definitions --
- ----------------------
-
- -- Sizes (in bytes) of the components of struct timeval
-
- SIZEOF_tv_sec : constant := 4; -- tv_sec
- SIZEOF_tv_usec : constant := 4; -- tv_usec
-
- -- Sizes of protocol specific address types (for sockaddr.sa_len)
-
- SIZEOF_sockaddr_in : constant := 16; -- struct sockaddr_in
- SIZEOF_sockaddr_in6 : constant := 0; -- struct sockaddr_in6
-
- -- Size of file descriptor sets
-
- SIZEOF_fd_set : constant := 256; -- fd_set
-
- -- Fields of struct hostent
-
- subtype H_Addrtype_T is Interfaces.C.int;
- subtype H_Length_T is Interfaces.C.int;
-
- ----------------------------------------
- -- Properties of supported interfaces --
- ----------------------------------------
-
- Need_Netdb_Buffer : constant := 0; -- Need buffer for Netdb ops
- Has_Sockaddr_Len : constant := 0; -- Sockaddr has sa_len field
-
- Thread_Blocking_IO : constant Boolean := True;
- -- Set False for contexts where socket i/o are process blocking
-
-end GNAT.Sockets.Constants;
diff --git a/gcc/ada/g-soccon-irix.ads b/gcc/ada/g-soccon-irix.ads
deleted file mode 100644
index 3952a599efe..00000000000
--- a/gcc/ada/g-soccon-irix.ads
+++ /dev/null
@@ -1,208 +0,0 @@
-------------------------------------------------------------------------------
--- --
--- GNAT COMPILER COMPONENTS --
--- --
--- G N A T . S O C K E T S . C O N S T A N T S --
--- --
--- S p e c --
--- --
--- Copyright (C) 2000-2008, Free Software Foundation, Inc. --
--- --
--- GNAT is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
--- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
--- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
--- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
--- --
--- As a special exception, if other files instantiate generics from this --
--- unit, or you link this unit with other files to produce an executable, --
--- this unit does not by itself cause the resulting executable to be --
--- covered by the GNU General Public License. This exception does not --
--- however invalidate any other reasons why the executable file might be --
--- covered by the GNU Public License. --
--- --
--- GNAT was originally developed by the GNAT team at New York University. --
--- Extensive contributions were provided by Ada Core Technologies Inc. --
--- --
-------------------------------------------------------------------------------
-
--- This package provides target dependent definitions of constant for use
--- by the GNAT.Sockets package (g-socket.ads). This package should not be
--- directly with'ed by an applications program.
-
--- This is the version for mips-sgi-irix6.5
--- This file is generated automatically, do not modify it by hand! Instead,
--- make changes to gen-soccon.c and re-run it on each target.
-
-with Interfaces.C;
-package GNAT.Sockets.Constants is
-
- --------------
- -- Families --
- --------------
-
- AF_INET : constant := 2; -- IPv4 address family
- AF_INET6 : constant := 24; -- IPv6 address family
-
- -----------
- -- Modes --
- -----------
-
- SOCK_STREAM : constant := 2; -- Stream socket
- SOCK_DGRAM : constant := 1; -- Datagram socket
-
- -------------------
- -- Socket errors --
- -------------------
-
- EACCES : constant := 13; -- Permission denied
- EADDRINUSE : constant := 125; -- Address already in use
- EADDRNOTAVAIL : constant := 126; -- Cannot assign address
- EAFNOSUPPORT : constant := 124; -- Addr family not supported
- EALREADY : constant := 149; -- Operation in progress
- EBADF : constant := 9; -- Bad file descriptor
- ECONNABORTED : constant := 130; -- Connection aborted
- ECONNREFUSED : constant := 146; -- Connection refused
- ECONNRESET : constant := 131; -- Connection reset by peer
- EDESTADDRREQ : constant := 96; -- Destination addr required
- EFAULT : constant := 14; -- Bad address
- EHOSTDOWN : constant := 147; -- Host is down
- EHOSTUNREACH : constant := 148; -- No route to host
- EINPROGRESS : constant := 150; -- Operation now in progress
- EINTR : constant := 4; -- Interrupted system call
- EINVAL : constant := 22; -- Invalid argument
- EIO : constant := 5; -- Input output error
- EISCONN : constant := 133; -- Socket already connected
- ELOOP : constant := 90; -- Too many symbolic links
- EMFILE : constant := 24; -- Too many open files
- EMSGSIZE : constant := 97; -- Message too long
- ENAMETOOLONG : constant := 78; -- Name too long
- ENETDOWN : constant := 127; -- Network is down
- ENETRESET : constant := 129; -- Disconn. on network reset
- ENETUNREACH : constant := 128; -- Network is unreachable
- ENOBUFS : constant := 132; -- No buffer space available
- ENOPROTOOPT : constant := 99; -- Protocol not available
- ENOTCONN : constant := 134; -- Socket not connected
- ENOTSOCK : constant := 95; -- Operation on non socket
- EOPNOTSUPP : constant := 122; -- Operation not supported
- EPFNOSUPPORT : constant := 123; -- Unknown protocol family
- EPROTONOSUPPORT : constant := 120; -- Unknown protocol
- EPROTOTYPE : constant := 98; -- Unknown protocol type
- ESHUTDOWN : constant := 143; -- Cannot send once shutdown
- ESOCKTNOSUPPORT : constant := 121; -- Socket type not supported
- ETIMEDOUT : constant := 145; -- Connection timed out
- ETOOMANYREFS : constant := 144; -- Too many references
- EWOULDBLOCK : constant := 11; -- Operation would block
-
- -----------------
- -- Host errors --
- -----------------
-
- HOST_NOT_FOUND : constant := 1; -- Unknown host
- TRY_AGAIN : constant := 2; -- Host name lookup failure
- NO_DATA : constant := 4; -- No data record for name
- NO_RECOVERY : constant := 3; -- Non recoverable errors
-
- -------------------
- -- Control flags --
- -------------------
-
- FIONBIO : constant := -2147195266; -- Set/clear non-blocking io
- FIONREAD : constant := 1074030207; -- How many bytes to read
-
- --------------------
- -- Shutdown modes --
- --------------------
-
- SHUT_RD : constant := 0; -- No more recv
- SHUT_WR : constant := 1; -- No more send
- SHUT_RDWR : constant := 2; -- No more recv/send
-
- ---------------------
- -- Protocol levels --
- ---------------------
-
- SOL_SOCKET : constant := 65535; -- Options for socket level
- IPPROTO_IP : constant := 0; -- Dummy protocol for IP
- IPPROTO_UDP : constant := 17; -- UDP
- IPPROTO_TCP : constant := 6; -- TCP
-
- -------------------
- -- Request flags --
- -------------------
-
- MSG_OOB : constant := 1; -- Process out-of-band data
- MSG_PEEK : constant := 2; -- Peek at incoming data
- MSG_EOR : constant := 8; -- Send end of record
- MSG_WAITALL : constant := 64; -- Wait for full reception
- MSG_NOSIGNAL : constant := -1; -- No SIGPIPE on send
- MSG_Forced_Flags : constant := 0;
- -- Flags set on all send(2) calls
-
- --------------------
- -- Socket options --
- --------------------
-
- TCP_NODELAY : constant := 1; -- Do not coalesce packets
- SO_REUSEADDR : constant := 4; -- Bind reuse local address
- SO_REUSEPORT : constant := 512; -- Bind reuse port number
- SO_KEEPALIVE : constant := 8; -- Enable keep-alive msgs
- SO_LINGER : constant := 128; -- Defer close to flush data
- SO_BROADCAST : constant := 32; -- Can send broadcast msgs
- SO_SNDBUF : constant := 4097; -- Set/get send buffer size
- SO_RCVBUF : constant := 4098; -- Set/get recv buffer size
- SO_SNDTIMEO : constant := 4101; -- Emission timeout
- SO_RCVTIMEO : constant := 4102; -- Reception timeout
- SO_ERROR : constant := 4103; -- Get/clear error status
- IP_MULTICAST_IF : constant := 20; -- Set/get mcast interface
- IP_MULTICAST_TTL : constant := 21; -- Set/get multicast TTL
- IP_MULTICAST_LOOP : constant := 22; -- Set/get mcast loopback
- IP_ADD_MEMBERSHIP : constant := 23; -- Join a multicast group
- IP_DROP_MEMBERSHIP : constant := 24; -- Leave a multicast group
- IP_PKTINFO : constant := -1; -- Get datagram info
-
- -------------------
- -- System limits --
- -------------------
-
- IOV_MAX : constant := 2147483647; -- Maximum writev iovcnt
-
- ----------------------
- -- Type definitions --
- ----------------------
-
- -- Sizes (in bytes) of the components of struct timeval
-
- SIZEOF_tv_sec : constant := 4; -- tv_sec
- SIZEOF_tv_usec : constant := 4; -- tv_usec
-
- -- Sizes of protocol specific address types (for sockaddr.sa_len)
-
- SIZEOF_sockaddr_in : constant := 16; -- struct sockaddr_in
- SIZEOF_sockaddr_in6 : constant := 32; -- struct sockaddr_in6
-
- -- Size of file descriptor sets
-
- SIZEOF_fd_set : constant := 128; -- fd_set
-
- -- Fields of struct hostent
-
- subtype H_Addrtype_T is Interfaces.C.int;
- subtype H_Length_T is Interfaces.C.int;
-
- ----------------------------------------
- -- Properties of supported interfaces --
- ----------------------------------------
-
- Need_Netdb_Buffer : constant := 1; -- Need buffer for Netdb ops
- Has_Sockaddr_Len : constant := 0; -- Sockaddr has sa_len field
-
- Thread_Blocking_IO : constant Boolean := True;
- -- Set False for contexts where socket i/o are process blocking
-
-end GNAT.Sockets.Constants;
diff --git a/gcc/ada/g-soccon-linux-64.ads b/gcc/ada/g-soccon-linux-64.ads
deleted file mode 100644
index 3d82b326ecf..00000000000
--- a/gcc/ada/g-soccon-linux-64.ads
+++ /dev/null
@@ -1,208 +0,0 @@
-------------------------------------------------------------------------------
--- --
--- GNAT COMPILER COMPONENTS --
--- --
--- G N A T . S O C K E T S . C O N S T A N T S --
--- --
--- S p e c --
--- --
--- Copyright (C) 2000-2008, Free Software Foundation, Inc. --
--- --
--- GNAT is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
--- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
--- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
--- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
--- --
--- As a special exception, if other files instantiate generics from this --
--- unit, or you link this unit with other files to produce an executable, --
--- this unit does not by itself cause the resulting executable to be --
--- covered by the GNU General Public License. This exception does not --
--- however invalidate any other reasons why the executable file might be --
--- covered by the GNU Public License. --
--- --
--- GNAT was originally developed by the GNAT team at New York University. --
--- Extensive contributions were provided by Ada Core Technologies Inc. --
--- --
-------------------------------------------------------------------------------
-
--- This package provides target dependent definitions of constant for use
--- by the GNAT.Sockets package (g-socket.ads). This package should not be
--- directly with'ed by an applications program.
-
--- This is the version for x86_64-pc-linux-gnu
--- This file is generated automatically, do not modify it by hand! Instead,
--- make changes to gen-soccon.c and re-run it on each target.
-
-with Interfaces.C;
-package GNAT.Sockets.Constants is
-
- --------------
- -- Families --
- --------------
-
- AF_INET : constant := 2; -- IPv4 address family
- AF_INET6 : constant := 10; -- IPv6 address family
-
- -----------
- -- Modes --
- -----------
-
- SOCK_STREAM : constant := 1; -- Stream socket
- SOCK_DGRAM : constant := 2; -- Datagram socket
-
- -------------------
- -- Socket errors --
- -------------------
-
- EACCES : constant := 13; -- Permission denied
- EADDRINUSE : constant := 98; -- Address already in use
- EADDRNOTAVAIL : constant := 99; -- Cannot assign address
- EAFNOSUPPORT : constant := 97; -- Addr family not supported
- EALREADY : constant := 114; -- Operation in progress
- EBADF : constant := 9; -- Bad file descriptor
- ECONNABORTED : constant := 103; -- Connection aborted
- ECONNREFUSED : constant := 111; -- Connection refused
- ECONNRESET : constant := 104; -- Connection reset by peer
- EDESTADDRREQ : constant := 89; -- Destination addr required
- EFAULT : constant := 14; -- Bad address
- EHOSTDOWN : constant := 112; -- Host is down
- EHOSTUNREACH : constant := 113; -- No route to host
- EINPROGRESS : constant := 115; -- Operation now in progress
- EINTR : constant := 4; -- Interrupted system call
- EINVAL : constant := 22; -- Invalid argument
- EIO : constant := 5; -- Input output error
- EISCONN : constant := 106; -- Socket already connected
- ELOOP : constant := 40; -- Too many symbolic links
- EMFILE : constant := 24; -- Too many open files
- EMSGSIZE : constant := 90; -- Message too long
- ENAMETOOLONG : constant := 36; -- Name too long
- ENETDOWN : constant := 100; -- Network is down
- ENETRESET : constant := 102; -- Disconn. on network reset
- ENETUNREACH : constant := 101; -- Network is unreachable
- ENOBUFS : constant := 105; -- No buffer space available
- ENOPROTOOPT : constant := 92; -- Protocol not available
- ENOTCONN : constant := 107; -- Socket not connected
- ENOTSOCK : constant := 88; -- Operation on non socket
- EOPNOTSUPP : constant := 95; -- Operation not supported
- EPFNOSUPPORT : constant := 96; -- Unknown protocol family
- EPROTONOSUPPORT : constant := 93; -- Unknown protocol
- EPROTOTYPE : constant := 91; -- Unknown protocol type
- ESHUTDOWN : constant := 108; -- Cannot send once shutdown
- ESOCKTNOSUPPORT : constant := 94; -- Socket type not supported
- ETIMEDOUT : constant := 110; -- Connection timed out
- ETOOMANYREFS : constant := 109; -- Too many references
- EWOULDBLOCK : constant := 11; -- Operation would block
-
- -----------------
- -- Host errors --
- -----------------
-
- HOST_NOT_FOUND : constant := 1; -- Unknown host
- TRY_AGAIN : constant := 2; -- Host name lookup failure
- NO_DATA : constant := 4; -- No data record for name
- NO_RECOVERY : constant := 3; -- Non recoverable errors
-
- -------------------
- -- Control flags --
- -------------------
-
- FIONBIO : constant := 21537; -- Set/clear non-blocking io
- FIONREAD : constant := 21531; -- How many bytes to read
-
- --------------------
- -- Shutdown modes --
- --------------------
-
- SHUT_RD : constant := 0; -- No more recv
- SHUT_WR : constant := 1; -- No more send
- SHUT_RDWR : constant := 2; -- No more recv/send
-
- ---------------------
- -- Protocol levels --
- ---------------------
-
- SOL_SOCKET : constant := 1; -- Options for socket level
- IPPROTO_IP : constant := 0; -- Dummy protocol for IP
- IPPROTO_UDP : constant := 17; -- UDP
- IPPROTO_TCP : constant := 6; -- TCP
-
- -------------------
- -- Request flags --
- -------------------
-
- MSG_OOB : constant := 1; -- Process out-of-band data
- MSG_PEEK : constant := 2; -- Peek at incoming data
- MSG_EOR : constant := 128; -- Send end of record
- MSG_WAITALL : constant := 256; -- Wait for full reception
- MSG_NOSIGNAL : constant := 16384; -- No SIGPIPE on send
- MSG_Forced_Flags : constant := MSG_NOSIGNAL;
- -- Flags set on all send(2) calls
-
- --------------------
- -- Socket options --
- --------------------
-
- TCP_NODELAY : constant := 1; -- Do not coalesce packets
- SO_REUSEADDR : constant := 2; -- Bind reuse local address
- SO_REUSEPORT : constant := -1; -- Bind reuse port number
- SO_KEEPALIVE : constant := 9; -- Enable keep-alive msgs
- SO_LINGER : constant := 13; -- Defer close to flush data
- SO_BROADCAST : constant := 6; -- Can send broadcast msgs
- SO_SNDBUF : constant := 7; -- Set/get send buffer size
- SO_RCVBUF : constant := 8; -- Set/get recv buffer size
- SO_SNDTIMEO : constant := 21; -- Emission timeout
- SO_RCVTIMEO : constant := 20; -- Reception timeout
- SO_ERROR : constant := 4; -- Get/clear error status
- IP_MULTICAST_IF : constant := 32; -- Set/get mcast interface
- IP_MULTICAST_TTL : constant := 33; -- Set/get multicast TTL
- IP_MULTICAST_LOOP : constant := 34; -- Set/get mcast loopback
- IP_ADD_MEMBERSHIP : constant := 35; -- Join a multicast group
- IP_DROP_MEMBERSHIP : constant := 36; -- Leave a multicast group
- IP_PKTINFO : constant := 8; -- Get datagram info
-
- -------------------
- -- System limits --
- -------------------
-
- IOV_MAX : constant := 2147483647; -- Maximum writev iovcnt
-
- ----------------------
- -- Type definitions --
- ----------------------
-
- -- Sizes (in bytes) of the components of struct timeval
-
- SIZEOF_tv_sec : constant := 8; -- tv_sec
- SIZEOF_tv_usec : constant := 8; -- tv_usec
-
- -- Sizes of protocol specific address types (for sockaddr.sa_len)
-
- SIZEOF_sockaddr_in : constant := 16; -- struct sockaddr_in
- SIZEOF_sockaddr_in6 : constant := 28; -- struct sockaddr_in6
-
- -- Size of file descriptor sets
-
- SIZEOF_fd_set : constant := 128; -- fd_set
-
- -- Fields of struct hostent
-
- subtype H_Addrtype_T is Interfaces.C.int;
- subtype H_Length_T is Interfaces.C.int;
-
- ----------------------------------------
- -- Properties of supported interfaces --
- ----------------------------------------
-
- Need_Netdb_Buffer : constant := 1; -- Need buffer for Netdb ops
- Has_Sockaddr_Len : constant := 0; -- Sockaddr has sa_len field
-
- Thread_Blocking_IO : constant Boolean := True;
- -- Set False for contexts where socket i/o are process blocking
-
-end GNAT.Sockets.Constants;
diff --git a/gcc/ada/g-soccon-linux-mips.ads b/gcc/ada/g-soccon-linux-mips.ads
deleted file mode 100644
index 0f8822e2a07..00000000000
--- a/gcc/ada/g-soccon-linux-mips.ads
+++ /dev/null
@@ -1,197 +0,0 @@
-------------------------------------------------------------------------------
--- --
--- GNAT COMPILER COMPONENTS --
--- --
--- G N A T . S O C K E T S . C O N S T A N T S --
--- --
--- S p e c --
--- --
--- Copyright (C) 2000-2008, Free Software Foundation, Inc. --
--- --
--- GNAT is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
--- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
--- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
--- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
--- --
--- As a special exception, if other files instantiate generics from this --
--- unit, or you link this unit with other files to produce an executable, --
--- this unit does not by itself cause the resulting executable to be --
--- covered by the GNU General Public License. This exception does not --
--- however invalidate any other reasons why the executable file might be --
--- covered by the GNU Public License. --
--- --
--- GNAT was originally developed by the GNAT team at New York University. --
--- Extensive contributions were provided by Ada Core Technologies Inc. --
--- --
-------------------------------------------------------------------------------
-
--- This package provides target dependent definitions of constant for use
--- by the GNAT.Sockets package (g-socket.ads). This package should not be
--- directly with'ed by an applications program.
-
--- This is the version for mips-linux, manually edited for the first shot
--- no mips hardware at hand
--- using http://www.gelato.unsw.edu.au/lxr/source/include/asm-mips/socket.h
--- in order to find different values.
--- This file is generated automatically, do not modify it by hand! Instead,
--- make changes to gen-soccon.c and re-run it on each target.
-
-package GNAT.Sockets.Constants is
-
- --------------
- -- Families --
- --------------
-
- AF_INET : constant := 2; -- IPv4 address family
- AF_INET6 : constant := 10; -- IPv6 address family
-
- -----------
- -- Modes --
- -----------
-
- SOCK_STREAM : constant := 1; -- Stream socket
- SOCK_DGRAM : constant := 2; -- Datagram socket
-
- -------------------
- -- Socket errors --
- -------------------
-
- EACCES : constant := 13; -- Permission denied
- EADDRINUSE : constant := 98; -- Address already in use
- EADDRNOTAVAIL : constant := 99; -- Cannot assign address
- EAFNOSUPPORT : constant := 97; -- Addr family not supported
- EALREADY : constant := 114; -- Operation in progress
- EBADF : constant := 9; -- Bad file descriptor
- ECONNABORTED : constant := 103; -- Connection aborted
- ECONNREFUSED : constant := 111; -- Connection refused
- ECONNRESET : constant := 104; -- Connection reset by peer
- EDESTADDRREQ : constant := 89; -- Destination addr required
- EFAULT : constant := 14; -- Bad address
- EHOSTDOWN : constant := 112; -- Host is down
- EHOSTUNREACH : constant := 113; -- No route to host
- EINPROGRESS : constant := 115; -- Operation now in progress
- EINTR : constant := 4; -- Interrupted system call
- EINVAL : constant := 22; -- Invalid argument
- EIO : constant := 5; -- Input output error
- EISCONN : constant := 106; -- Socket already connected
- ELOOP : constant := 40; -- Too many symbolic links
- EMFILE : constant := 24; -- Too many open files
- EMSGSIZE : constant := 90; -- Message too long
- ENAMETOOLONG : constant := 36; -- Name too long
- ENETDOWN : constant := 100; -- Network is down
- ENETRESET : constant := 102; -- Disconn. on network reset
- ENETUNREACH : constant := 101; -- Network is unreachable
- ENOBUFS : constant := 105; -- No buffer space available
- ENOPROTOOPT : constant := 92; -- Protocol not available
- ENOTCONN : constant := 107; -- Socket not connected
- ENOTSOCK : constant := 88; -- Operation on non socket
- EOPNOTSUPP : constant := 95; -- Operation not supported
- EPFNOSUPPORT : constant := 96; -- Unknown protocol family
- EPROTONOSUPPORT : constant := 93; -- Unknown protocol
- EPROTOTYPE : constant := 91; -- Unknown protocol type
- ESHUTDOWN : constant := 108; -- Cannot send once shutdown
- ESOCKTNOSUPPORT : constant := 94; -- Socket type not supported
- ETIMEDOUT : constant := 110; -- Connection timed out
- ETOOMANYREFS : constant := 109; -- Too many references
- EWOULDBLOCK : constant := 11; -- Operation would block
-
- -----------------
- -- Host errors --
- -----------------
-
- HOST_NOT_FOUND : constant := 1; -- Unknown host
- TRY_AGAIN : constant := 2; -- Host name lookup failure
- NO_DATA : constant := 4; -- No data record for name
- NO_RECOVERY : constant := 3; -- Non recoverable errors
-
- -------------------
- -- Control flags --
- -------------------
-
- FIONBIO : constant := 16#667e#; -- Set/clear non-blocking io
- FIONREAD : constant := 16#467f#; -- How many bytes to read
-
- --------------------
- -- Shutdown modes --
- --------------------
-
- SHUT_RD : constant := 0; -- No more recv
- SHUT_WR : constant := 1; -- No more send
- SHUT_RDWR : constant := 2; -- No more recv/send
-
- ---------------------
- -- Protocol levels --
- ---------------------
-
- SOL_SOCKET : constant := 1; -- Options for socket level
- IPPROTO_IP : constant := 0; -- Dummy protocol for IP
- IPPROTO_UDP : constant := 17; -- UDP
- IPPROTO_TCP : constant := 6; -- TCP
-
- -------------------
- -- Request flags --
- -------------------
-
- MSG_OOB : constant := 1; -- Process out-of-band data
- MSG_PEEK : constant := 2; -- Peek at incoming data
- MSG_EOR : constant := 128; -- Send end of record
- MSG_WAITALL : constant := 256; -- Wait for full reception
- MSG_NOSIGNAL : constant := 16384; -- No SIGPIPE on send
- MSG_Forced_Flags : constant := MSG_NOSIGNAL;
- -- Flags set on all send(2) calls
-
- --------------------
- -- Socket options --
- --------------------
-
- TCP_NODELAY : constant := 1; -- Do not coalesce packets
- SO_REUSEADDR : constant := 4; -- Bind reuse local address
- SO_KEEPALIVE : constant := 8; -- Enable keep-alive msgs
- SO_LINGER : constant := 16#80#; -- Defer close to flush data
- SO_BROADCAST : constant := 16#20#; -- Can send broadcast msgs
- SO_SNDBUF : constant := 16#1001#; -- Set/get send buffer size
- SO_RCVBUF : constant := 16#1002#; -- Set/get recv buffer size
- SO_SNDTIMEO : constant := 16#1005#; -- Emission timeout
- SO_RCVTIMEO : constant := 16#1006#; -- Reception timeout
- SO_ERROR : constant := 16#1007#; -- Get/clear error status
- IP_MULTICAST_IF : constant := 32; -- Set/get mcast interface
- IP_MULTICAST_TTL : constant := 33; -- Set/get multicast TTL
- IP_MULTICAST_LOOP : constant := 34; -- Set/get mcast loopback
- IP_ADD_MEMBERSHIP : constant := 35; -- Join a multicast group
- IP_DROP_MEMBERSHIP : constant := 36; -- Leave a multicast group
-
- -------------------
- -- System limits --
- -------------------
-
- IOV_MAX : constant := 2147483647; -- Maximum writev iovcnt
-
- ----------------------
- -- Type definitions --
- ----------------------
-
- -- Sizes (in bytes) of the components of struct timeval
-
- SIZEOF_tv_sec : constant := 4; -- tv_sec
- SIZEOF_tv_usec : constant := 4; -- tv_usec
-
- ----------------------------------------
- -- Properties of supported interfaces --
- ----------------------------------------
-
- Need_Netdb_Buffer : constant := 1; -- Need buffer for Netdb ops
-
- ----------------------
- -- Additional flags --
- ----------------------
-
- Thread_Blocking_IO : constant Boolean := True;
- -- Set False for contexts where socket i/o are process blocking
-
-end GNAT.Sockets.Constants;
diff --git a/gcc/ada/g-soccon-linux-ppc.ads b/gcc/ada/g-soccon-linux-ppc.ads
deleted file mode 100644
index 7a8c2e260b3..00000000000
--- a/gcc/ada/g-soccon-linux-ppc.ads
+++ /dev/null
@@ -1,208 +0,0 @@
-------------------------------------------------------------------------------
--- --
--- GNAT COMPILER COMPONENTS --
--- --
--- G N A T . S O C K E T S . C O N S T A N T S --
--- --
--- S p e c --
--- --
--- Copyright (C) 2000-2008, Free Software Foundation, Inc. --
--- --
--- GNAT is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
--- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
--- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
--- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
--- --
--- As a special exception, if other files instantiate generics from this --
--- unit, or you link this unit with other files to produce an executable, --
--- this unit does not by itself cause the resulting executable to be --
--- covered by the GNU General Public License. This exception does not --
--- however invalidate any other reasons why the executable file might be --
--- covered by the GNU Public License. --
--- --
--- GNAT was originally developed by the GNAT team at New York University. --
--- Extensive contributions were provided by Ada Core Technologies Inc. --
--- --
-------------------------------------------------------------------------------
-
--- This package provides target dependent definitions of constant for use
--- by the GNAT.Sockets package (g-socket.ads). This package should not be
--- directly with'ed by an applications program.
-
--- This is the version for ppc-unknown-linux-gnu
--- This file is generated automatically, do not modify it by hand! Instead,
--- make changes to gen-soccon.c and re-run it on each target.
-
-with Interfaces.C;
-package GNAT.Sockets.Constants is
-
- --------------
- -- Families --
- --------------
-
- AF_INET : constant := 2; -- IPv4 address family
- AF_INET6 : constant := 10; -- IPv6 address family
-
- -----------
- -- Modes --
- -----------
-
- SOCK_STREAM : constant := 1; -- Stream socket
- SOCK_DGRAM : constant := 2; -- Datagram socket
-
- -------------------
- -- Socket errors --
- -------------------
-
- EACCES : constant := 13; -- Permission denied
- EADDRINUSE : constant := 98; -- Address already in use
- EADDRNOTAVAIL : constant := 99; -- Cannot assign address
- EAFNOSUPPORT : constant := 97; -- Addr family not supported
- EALREADY : constant := 114; -- Operation in progress
- EBADF : constant := 9; -- Bad file descriptor
- ECONNABORTED : constant := 103; -- Connection aborted
- ECONNREFUSED : constant := 111; -- Connection refused
- ECONNRESET : constant := 104; -- Connection reset by peer
- EDESTADDRREQ : constant := 89; -- Destination addr required
- EFAULT : constant := 14; -- Bad address
- EHOSTDOWN : constant := 112; -- Host is down
- EHOSTUNREACH : constant := 113; -- No route to host
- EINPROGRESS : constant := 115; -- Operation now in progress
- EINTR : constant := 4; -- Interrupted system call
- EINVAL : constant := 22; -- Invalid argument
- EIO : constant := 5; -- Input output error
- EISCONN : constant := 106; -- Socket already connected
- ELOOP : constant := 40; -- Too many symbolic links
- EMFILE : constant := 24; -- Too many open files
- EMSGSIZE : constant := 90; -- Message too long
- ENAMETOOLONG : constant := 36; -- Name too long
- ENETDOWN : constant := 100; -- Network is down
- ENETRESET : constant := 102; -- Disconn. on network reset
- ENETUNREACH : constant := 101; -- Network is unreachable
- ENOBUFS : constant := 105; -- No buffer space available
- ENOPROTOOPT : constant := 92; -- Protocol not available
- ENOTCONN : constant := 107; -- Socket not connected
- ENOTSOCK : constant := 88; -- Operation on non socket
- EOPNOTSUPP : constant := 95; -- Operation not supported
- EPFNOSUPPORT : constant := 96; -- Unknown protocol family
- EPROTONOSUPPORT : constant := 93; -- Unknown protocol
- EPROTOTYPE : constant := 91; -- Unknown protocol type
- ESHUTDOWN : constant := 108; -- Cannot send once shutdown
- ESOCKTNOSUPPORT : constant := 94; -- Socket type not supported
- ETIMEDOUT : constant := 110; -- Connection timed out
- ETOOMANYREFS : constant := 109; -- Too many references
- EWOULDBLOCK : constant := 11; -- Operation would block
-
- -----------------
- -- Host errors --
- -----------------
-
- HOST_NOT_FOUND : constant := 1; -- Unknown host
- TRY_AGAIN : constant := 2; -- Host name lookup failure
- NO_DATA : constant := 4; -- No data record for name
- NO_RECOVERY : constant := 3; -- Non recoverable errors
-
- -------------------
- -- Control flags --
- -------------------
-
- FIONBIO : constant := -2147195266; -- Set/clear non-blocking io
- FIONREAD : constant := 1074030207; -- How many bytes to read
-
- --------------------
- -- Shutdown modes --
- --------------------
-
- SHUT_RD : constant := 0; -- No more recv
- SHUT_WR : constant := 1; -- No more send
- SHUT_RDWR : constant := 2; -- No more recv/send
-
- ---------------------
- -- Protocol levels --
- ---------------------
-
- SOL_SOCKET : constant := 1; -- Options for socket level
- IPPROTO_IP : constant := 0; -- Dummy protocol for IP
- IPPROTO_UDP : constant := 17; -- UDP
- IPPROTO_TCP : constant := 6; -- TCP
-
- -------------------
- -- Request flags --
- -------------------
-
- MSG_OOB : constant := 1; -- Process out-of-band data
- MSG_PEEK : constant := 2; -- Peek at incoming data
- MSG_EOR : constant := 128; -- Send end of record
- MSG_WAITALL : constant := 256; -- Wait for full reception
- MSG_NOSIGNAL : constant := 16384; -- No SIGPIPE on send
- MSG_Forced_Flags : constant := MSG_NOSIGNAL;
- -- Flags set on all send(2) calls
-
- --------------------
- -- Socket options --
- --------------------
-
- TCP_NODELAY : constant := 1; -- Do not coalesce packets
- SO_REUSEADDR : constant := 2; -- Bind reuse local address
- SO_REUSEPORT : constant := -1; -- Bind reuse port number
- SO_KEEPALIVE : constant := 9; -- Enable keep-alive msgs
- SO_LINGER : constant := 13; -- Defer close to flush data
- SO_BROADCAST : constant := 6; -- Can send broadcast msgs
- SO_SNDBUF : constant := 7; -- Set/get send buffer size
- SO_RCVBUF : constant := 8; -- Set/get recv buffer size
- SO_SNDTIMEO : constant := 19; -- Emission timeout
- SO_RCVTIMEO : constant := 18; -- Reception timeout
- SO_ERROR : constant := 4; -- Get/clear error status
- IP_MULTICAST_IF : constant := 32; -- Set/get mcast interface
- IP_MULTICAST_TTL : constant := 33; -- Set/get multicast TTL
- IP_MULTICAST_LOOP : constant := 34; -- Set/get mcast loopback
- IP_ADD_MEMBERSHIP : constant := 35; -- Join a multicast group
- IP_DROP_MEMBERSHIP : constant := 36; -- Leave a multicast group
- IP_PKTINFO : constant := 8; -- Get datagram info
-
- -------------------
- -- System limits --
- -------------------
-
- IOV_MAX : constant := 2147483647; -- Maximum writev iovcnt
-
- ----------------------
- -- Type definitions --
- ----------------------
-
- -- Sizes (in bytes) of the components of struct timeval
-
- SIZEOF_tv_sec : constant := 4; -- tv_sec
- SIZEOF_tv_usec : constant := 4; -- tv_usec
-
- -- Sizes of protocol specific address types (for sockaddr.sa_len)
-
- SIZEOF_sockaddr_in : constant := 16; -- struct sockaddr_in
- SIZEOF_sockaddr_in6 : constant := 28; -- struct sockaddr_in6
-
- -- Size of file descriptor sets
-
- SIZEOF_fd_set : constant := 128; -- fd_set
-
- -- Fields of struct hostent
-
- subtype H_Addrtype_T is Interfaces.C.int;
- subtype H_Length_T is Interfaces.C.int;
-
- ----------------------------------------
- -- Properties of supported interfaces --
- ----------------------------------------
-
- Need_Netdb_Buffer : constant := 1; -- Need buffer for Netdb ops
- Has_Sockaddr_Len : constant := 0; -- Sockaddr has sa_len field
-
- Thread_Blocking_IO : constant Boolean := True;
- -- Set False for contexts where socket i/o are process blocking
-
-end GNAT.Sockets.Constants;
diff --git a/gcc/ada/g-soccon-linux-x86.ads b/gcc/ada/g-soccon-linux-x86.ads
deleted file mode 100644
index ed2b8d9624d..00000000000
--- a/gcc/ada/g-soccon-linux-x86.ads
+++ /dev/null
@@ -1,208 +0,0 @@
-------------------------------------------------------------------------------
--- --
--- GNAT COMPILER COMPONENTS --
--- --
--- G N A T . S O C K E T S . C O N S T A N T S --
--- --
--- S p e c --
--- --
--- Copyright (C) 2000-2008, Free Software Foundation, Inc. --
--- --
--- GNAT is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
--- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
--- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
--- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
--- --
--- As a special exception, if other files instantiate generics from this --
--- unit, or you link this unit with other files to produce an executable, --
--- this unit does not by itself cause the resulting executable to be --
--- covered by the GNU General Public License. This exception does not --
--- however invalidate any other reasons why the executable file might be --
--- covered by the GNU Public License. --
--- --
--- GNAT was originally developed by the GNAT team at New York University. --
--- Extensive contributions were provided by Ada Core Technologies Inc. --
--- --
-------------------------------------------------------------------------------
-
--- This package provides target dependent definitions of constant for use
--- by the GNAT.Sockets package (g-socket.ads). This package should not be
--- directly with'ed by an applications program.
-
--- This is the version for i686-pc-linux-gnu
--- This file is generated automatically, do not modify it by hand! Instead,
--- make changes to gen-soccon.c and re-run it on each target.
-
-with Interfaces.C;
-package GNAT.Sockets.Constants is
-
- --------------
- -- Families --
- --------------
-
- AF_INET : constant := 2; -- IPv4 address family
- AF_INET6 : constant := 10; -- IPv6 address family
-
- -----------
- -- Modes --
- -----------
-
- SOCK_STREAM : constant := 1; -- Stream socket
- SOCK_DGRAM : constant := 2; -- Datagram socket
-
- -------------------
- -- Socket errors --
- -------------------
-
- EACCES : constant := 13; -- Permission denied
- EADDRINUSE : constant := 98; -- Address already in use
- EADDRNOTAVAIL : constant := 99; -- Cannot assign address
- EAFNOSUPPORT : constant := 97; -- Addr family not supported
- EALREADY : constant := 114; -- Operation in progress
- EBADF : constant := 9; -- Bad file descriptor
- ECONNABORTED : constant := 103; -- Connection aborted
- ECONNREFUSED : constant := 111; -- Connection refused
- ECONNRESET : constant := 104; -- Connection reset by peer
- EDESTADDRREQ : constant := 89; -- Destination addr required
- EFAULT : constant := 14; -- Bad address
- EHOSTDOWN : constant := 112; -- Host is down
- EHOSTUNREACH : constant := 113; -- No route to host
- EINPROGRESS : constant := 115; -- Operation now in progress
- EINTR : constant := 4; -- Interrupted system call
- EINVAL : constant := 22; -- Invalid argument
- EIO : constant := 5; -- Input output error
- EISCONN : constant := 106; -- Socket already connected
- ELOOP : constant := 40; -- Too many symbolic links
- EMFILE : constant := 24; -- Too many open files
- EMSGSIZE : constant := 90; -- Message too long
- ENAMETOOLONG : constant := 36; -- Name too long
- ENETDOWN : constant := 100; -- Network is down
- ENETRESET : constant := 102; -- Disconn. on network reset
- ENETUNREACH : constant := 101; -- Network is unreachable
- ENOBUFS : constant := 105; -- No buffer space available
- ENOPROTOOPT : constant := 92; -- Protocol not available
- ENOTCONN : constant := 107; -- Socket not connected
- ENOTSOCK : constant := 88; -- Operation on non socket
- EOPNOTSUPP : constant := 95; -- Operation not supported
- EPFNOSUPPORT : constant := 96; -- Unknown protocol family
- EPROTONOSUPPORT : constant := 93; -- Unknown protocol
- EPROTOTYPE : constant := 91; -- Unknown protocol type
- ESHUTDOWN : constant := 108; -- Cannot send once shutdown
- ESOCKTNOSUPPORT : constant := 94; -- Socket type not supported
- ETIMEDOUT : constant := 110; -- Connection timed out
- ETOOMANYREFS : constant := 109; -- Too many references
- EWOULDBLOCK : constant := 11; -- Operation would block
-
- -----------------
- -- Host errors --
- -----------------
-
- HOST_NOT_FOUND : constant := 1; -- Unknown host
- TRY_AGAIN : constant := 2; -- Host name lookup failure
- NO_DATA : constant := 4; -- No data record for name
- NO_RECOVERY : constant := 3; -- Non recoverable errors
-
- -------------------
- -- Control flags --
- -------------------
-
- FIONBIO : constant := 21537; -- Set/clear non-blocking io
- FIONREAD : constant := 21531; -- How many bytes to read
-
- --------------------
- -- Shutdown modes --
- --------------------
-
- SHUT_RD : constant := 0; -- No more recv
- SHUT_WR : constant := 1; -- No more send
- SHUT_RDWR : constant := 2; -- No more recv/send
-
- ---------------------
- -- Protocol levels --
- ---------------------
-
- SOL_SOCKET : constant := 1; -- Options for socket level
- IPPROTO_IP : constant := 0; -- Dummy protocol for IP
- IPPROTO_UDP : constant := 17; -- UDP
- IPPROTO_TCP : constant := 6; -- TCP
-
- -------------------
- -- Request flags --
- -------------------
-
- MSG_OOB : constant := 1; -- Process out-of-band data
- MSG_PEEK : constant := 2; -- Peek at incoming data
- MSG_EOR : constant := 128; -- Send end of record
- MSG_WAITALL : constant := 256; -- Wait for full reception
- MSG_NOSIGNAL : constant := 16384; -- No SIGPIPE on send
- MSG_Forced_Flags : constant := MSG_NOSIGNAL;
- -- Flags set on all send(2) calls
-
- --------------------
- -- Socket options --
- --------------------
-
- TCP_NODELAY : constant := 1; -- Do not coalesce packets
- SO_REUSEADDR : constant := 2; -- Bind reuse local address
- SO_REUSEPORT : constant := -1; -- Bind reuse port number
- SO_KEEPALIVE : constant := 9; -- Enable keep-alive msgs
- SO_LINGER : constant := 13; -- Defer close to flush data
- SO_BROADCAST : constant := 6; -- Can send broadcast msgs
- SO_SNDBUF : constant := 7; -- Set/get send buffer size
- SO_RCVBUF : constant := 8; -- Set/get recv buffer size
- SO_SNDTIMEO : constant := 21; -- Emission timeout
- SO_RCVTIMEO : constant := 20; -- Reception timeout
- SO_ERROR : constant := 4; -- Get/clear error status
- IP_MULTICAST_IF : constant := 32; -- Set/get mcast interface
- IP_MULTICAST_TTL : constant := 33; -- Set/get multicast TTL
- IP_MULTICAST_LOOP : constant := 34; -- Set/get mcast loopback
- IP_ADD_MEMBERSHIP : constant := 35; -- Join a multicast group
- IP_DROP_MEMBERSHIP : constant := 36; -- Leave a multicast group
- IP_PKTINFO : constant := 8; -- Get datagram info
-
- -------------------
- -- System limits --
- -------------------
-
- IOV_MAX : constant := 2147483647; -- Maximum writev iovcnt
-
- ----------------------
- -- Type definitions --
- ----------------------
-
- -- Sizes (in bytes) of the components of struct timeval
-
- SIZEOF_tv_sec : constant := 4; -- tv_sec
- SIZEOF_tv_usec : constant := 4; -- tv_usec
-
- -- Sizes of protocol specific address types (for sockaddr.sa_len)
-
- SIZEOF_sockaddr_in : constant := 16; -- struct sockaddr_in
- SIZEOF_sockaddr_in6 : constant := 28; -- struct sockaddr_in6
-
- -- Size of file descriptor sets
-
- SIZEOF_fd_set : constant := 128; -- fd_set
-
- -- Fields of struct hostent
-
- subtype H_Addrtype_T is Interfaces.C.int;
- subtype H_Length_T is Interfaces.C.int;
-
- ----------------------------------------
- -- Properties of supported interfaces --
- ----------------------------------------
-
- Need_Netdb_Buffer : constant := 1; -- Need buffer for Netdb ops
- Has_Sockaddr_Len : constant := 0; -- Sockaddr has sa_len field
-
- Thread_Blocking_IO : constant Boolean := True;
- -- Set False for contexts where socket i/o are process blocking
-
-end GNAT.Sockets.Constants;
diff --git a/gcc/ada/g-soccon-lynxos.ads b/gcc/ada/g-soccon-lynxos.ads
deleted file mode 100644
index 04c75bf63e4..00000000000
--- a/gcc/ada/g-soccon-lynxos.ads
+++ /dev/null
@@ -1,208 +0,0 @@
-------------------------------------------------------------------------------
--- --
--- GNAT COMPILER COMPONENTS --
--- --
--- G N A T . S O C K E T S . C O N S T A N T S --
--- --
--- S p e c --
--- --
--- Copyright (C) 2000-2008, Free Software Foundation, Inc. --
--- --
--- GNAT is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
--- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
--- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
--- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
--- --
--- As a special exception, if other files instantiate generics from this --
--- unit, or you link this unit with other files to produce an executable, --
--- this unit does not by itself cause the resulting executable to be --
--- covered by the GNU General Public License. This exception does not --
--- however invalidate any other reasons why the executable file might be --
--- covered by the GNU Public License. --
--- --
--- GNAT was originally developed by the GNAT team at New York University. --
--- Extensive contributions were provided by Ada Core Technologies Inc. --
--- --
-------------------------------------------------------------------------------
-
--- This package provides target dependent definitions of constant for use
--- by the GNAT.Sockets package (g-socket.ads). This package should not be
--- directly with'ed by an applications program.
-
--- This is the version for i386-elf-lynxos
--- This file is generated automatically, do not modify it by hand! Instead,
--- make changes to gen-soccon.c and re-run it on each target.
-
-with Interfaces.C;
-package GNAT.Sockets.Constants is
-
- --------------
- -- Families --
- --------------
-
- AF_INET : constant := 2; -- IPv4 address family
- AF_INET6 : constant := 28; -- IPv6 address family
-
- -----------
- -- Modes --
- -----------
-
- SOCK_STREAM : constant := 1; -- Stream socket
- SOCK_DGRAM : constant := 2; -- Datagram socket
-
- -------------------
- -- Socket errors --
- -------------------
-
- EACCES : constant := 13; -- Permission denied
- EADDRINUSE : constant := 98; -- Address already in use
- EADDRNOTAVAIL : constant := 99; -- Cannot assign address
- EAFNOSUPPORT : constant := 97; -- Addr family not supported
- EALREADY : constant := 114; -- Operation in progress
- EBADF : constant := 9; -- Bad file descriptor
- ECONNABORTED : constant := 103; -- Connection aborted
- ECONNREFUSED : constant := 111; -- Connection refused
- ECONNRESET : constant := 104; -- Connection reset by peer
- EDESTADDRREQ : constant := 89; -- Destination addr required
- EFAULT : constant := 14; -- Bad address
- EHOSTDOWN : constant := 112; -- Host is down
- EHOSTUNREACH : constant := 113; -- No route to host
- EINPROGRESS : constant := 115; -- Operation now in progress
- EINTR : constant := 4; -- Interrupted system call
- EINVAL : constant := 22; -- Invalid argument
- EIO : constant := 5; -- Input output error
- EISCONN : constant := 106; -- Socket already connected
- ELOOP : constant := 40; -- Too many symbolic links
- EMFILE : constant := 24; -- Too many open files
- EMSGSIZE : constant := 90; -- Message too long
- ENAMETOOLONG : constant := 36; -- Name too long
- ENETDOWN : constant := 100; -- Network is down
- ENETRESET : constant := 102; -- Disconn. on network reset
- ENETUNREACH : constant := 101; -- Network is unreachable
- ENOBUFS : constant := 105; -- No buffer space available
- ENOPROTOOPT : constant := 92; -- Protocol not available
- ENOTCONN : constant := 107; -- Socket not connected
- ENOTSOCK : constant := 88; -- Operation on non socket
- EOPNOTSUPP : constant := 95; -- Operation not supported
- EPFNOSUPPORT : constant := 96; -- Unknown protocol family
- EPROTONOSUPPORT : constant := 93; -- Unknown protocol
- EPROTOTYPE : constant := 91; -- Unknown protocol type
- ESHUTDOWN : constant := 108; -- Cannot send once shutdown
- ESOCKTNOSUPPORT : constant := 94; -- Socket type not supported
- ETIMEDOUT : constant := 110; -- Connection timed out
- ETOOMANYREFS : constant := 109; -- Too many references
- EWOULDBLOCK : constant := 11; -- Operation would block
-
- -----------------
- -- Host errors --
- -----------------
-
- HOST_NOT_FOUND : constant := 1; -- Unknown host
- TRY_AGAIN : constant := 2; -- Host name lookup failure
- NO_DATA : constant := 4; -- No data record for name
- NO_RECOVERY : constant := 3; -- Non recoverable errors
-
- -------------------
- -- Control flags --
- -------------------
-
- FIONBIO : constant := 21537; -- Set/clear non-blocking io
- FIONREAD : constant := 21531; -- How many bytes to read
-
- --------------------
- -- Shutdown modes --
- --------------------
-
- SHUT_RD : constant := 0; -- No more recv
- SHUT_WR : constant := 1; -- No more send
- SHUT_RDWR : constant := 2; -- No more recv/send
-
- ---------------------
- -- Protocol levels --
- ---------------------
-
- SOL_SOCKET : constant := 65535; -- Options for socket level
- IPPROTO_IP : constant := 0; -- Dummy protocol for IP
- IPPROTO_UDP : constant := 17; -- UDP
- IPPROTO_TCP : constant := 6; -- TCP
-
- -------------------
- -- Request flags --
- -------------------
-
- MSG_OOB : constant := 1; -- Process out-of-band data
- MSG_PEEK : constant := 2; -- Peek at incoming data
- MSG_EOR : constant := 128; -- Send end of record
- MSG_WAITALL : constant := 256; -- Wait for full reception
- MSG_NOSIGNAL : constant := -1; -- No SIGPIPE on send
- MSG_Forced_Flags : constant := 0;
- -- Flags set on all send(2) calls
-
- --------------------
- -- Socket options --
- --------------------
-
- TCP_NODELAY : constant := 1; -- Do not coalesce packets
- SO_REUSEADDR : constant := 4; -- Bind reuse local address
- SO_REUSEPORT : constant := 512; -- Bind reuse port number
- SO_KEEPALIVE : constant := 8; -- Enable keep-alive msgs
- SO_LINGER : constant := 128; -- Defer close to flush data
- SO_BROADCAST : constant := 32; -- Can send broadcast msgs
- SO_SNDBUF : constant := 4097; -- Set/get send buffer size
- SO_RCVBUF : constant := 4098; -- Set/get recv buffer size
- SO_SNDTIMEO : constant := 4101; -- Emission timeout
- SO_RCVTIMEO : constant := 4102; -- Reception timeout
- SO_ERROR : constant := 4103; -- Get/clear error status
- IP_MULTICAST_IF : constant := 9; -- Set/get mcast interface
- IP_MULTICAST_TTL : constant := 10; -- Set/get multicast TTL
- IP_MULTICAST_LOOP : constant := 11; -- Set/get mcast loopback
- IP_ADD_MEMBERSHIP : constant := 12; -- Join a multicast group
- IP_DROP_MEMBERSHIP : constant := 13; -- Leave a multicast group
- IP_PKTINFO : constant := -1; -- Get datagram info
-
- -------------------
- -- System limits --
- -------------------
-
- IOV_MAX : constant := 2147483647; -- Maximum writev iovcnt
-
- ----------------------
- -- Type definitions --
- ----------------------
-
- -- Sizes (in bytes) of the components of struct timeval
-
- SIZEOF_tv_sec : constant := 4; -- tv_sec
- SIZEOF_tv_usec : constant := 4; -- tv_usec
-
- -- Sizes of protocol specific address types (for sockaddr.sa_len)
-
- SIZEOF_sockaddr_in : constant := 16; -- struct sockaddr_in
- SIZEOF_sockaddr_in6 : constant := 28; -- struct sockaddr_in6
-
- -- Size of file descriptor sets
-
- SIZEOF_fd_set : constant := 512; -- fd_set
-
- -- Fields of struct hostent
-
- subtype H_Addrtype_T is Interfaces.C.int;
- subtype H_Length_T is Interfaces.C.int;
-
- ----------------------------------------
- -- Properties of supported interfaces --
- ----------------------------------------
-
- Need_Netdb_Buffer : constant := 1; -- Need buffer for Netdb ops
- Has_Sockaddr_Len : constant := 0; -- Sockaddr has sa_len field
-
- Thread_Blocking_IO : constant Boolean := True;
- -- Set False for contexts where socket i/o are process blocking
-
-end GNAT.Sockets.Constants;
diff --git a/gcc/ada/g-soccon-mingw-64.ads b/gcc/ada/g-soccon-mingw-64.ads
deleted file mode 100644
index cc84740b15f..00000000000
--- a/gcc/ada/g-soccon-mingw-64.ads
+++ /dev/null
@@ -1,220 +0,0 @@
-------------------------------------------------------------------------------
--- --
--- GNAT COMPILER COMPONENTS --
--- --
--- G N A T . S O C K E T S . C O N S T A N T S --
--- --
--- S p e c --
--- --
--- Copyright (C) 2000-2008, Free Software Foundation, Inc. --
--- --
--- GNAT is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
--- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
--- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
--- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
--- --
--- As a special exception, if other files instantiate generics from this --
--- unit, or you link this unit with other files to produce an executable, --
--- this unit does not by itself cause the resulting executable to be --
--- covered by the GNU General Public License. This exception does not --
--- however invalidate any other reasons why the executable file might be --
--- covered by the GNU Public License. --
--- --
--- GNAT was originally developed by the GNAT team at New York University. --
--- Extensive contributions were provided by Ada Core Technologies Inc. --
--- --
-------------------------------------------------------------------------------
-
--- This package provides target dependent definitions of constant for use
--- by the GNAT.Sockets package (g-socket.ads). This package should not be
--- directly with'ed by an applications program.
-
--- This is the version for x86_64-mingw32msv
--- This file is generated automatically, do not modify it by hand! Instead,
--- make changes to gen-soccon.c and re-run it on each target.
-
-with Interfaces.C;
-package GNAT.Sockets.Constants is
-
- --------------
- -- Families --
- --------------
-
- AF_INET : constant := 2; -- IPv4 address family
- AF_INET6 : constant := 23; -- IPv6 address family
-
- -----------
- -- Modes --
- -----------
-
- SOCK_STREAM : constant := 1; -- Stream socket
- SOCK_DGRAM : constant := 2; -- Datagram socket
-
- -------------------
- -- Socket errors --
- -------------------
-
- EACCES : constant := 10013; -- Permission denied
- EADDRINUSE : constant := 10048; -- Address already in use
- EADDRNOTAVAIL : constant := 10049; -- Cannot assign address
- EAFNOSUPPORT : constant := 10047; -- Addr family not supported
- EALREADY : constant := 10037; -- Operation in progress
- EBADF : constant := 10009; -- Bad file descriptor
- ECONNABORTED : constant := 10053; -- Connection aborted
- ECONNREFUSED : constant := 10061; -- Connection refused
- ECONNRESET : constant := 10054; -- Connection reset by peer
- EDESTADDRREQ : constant := 10039; -- Destination addr required
- EFAULT : constant := 10014; -- Bad address
- EHOSTDOWN : constant := 10064; -- Host is down
- EHOSTUNREACH : constant := 10065; -- No route to host
- EINPROGRESS : constant := 10036; -- Operation now in progress
- EINTR : constant := 10004; -- Interrupted system call
- EINVAL : constant := 10022; -- Invalid argument
- EIO : constant := 10101; -- Input output error
- EISCONN : constant := 10056; -- Socket already connected
- ELOOP : constant := 10062; -- Too many symbolic links
- EMFILE : constant := 10024; -- Too many open files
- EMSGSIZE : constant := 10040; -- Message too long
- ENAMETOOLONG : constant := 10063; -- Name too long
- ENETDOWN : constant := 10050; -- Network is down
- ENETRESET : constant := 10052; -- Disconn. on network reset
- ENETUNREACH : constant := 10051; -- Network is unreachable
- ENOBUFS : constant := 10055; -- No buffer space available
- ENOPROTOOPT : constant := 10042; -- Protocol not available
- ENOTCONN : constant := 10057; -- Socket not connected
- ENOTSOCK : constant := 10038; -- Operation on non socket
- EOPNOTSUPP : constant := 10045; -- Operation not supported
- EPFNOSUPPORT : constant := 10046; -- Unknown protocol family
- EPROTONOSUPPORT : constant := 10043; -- Unknown protocol
- EPROTOTYPE : constant := 10041; -- Unknown protocol type
- ESHUTDOWN : constant := 10058; -- Cannot send once shutdown
- ESOCKTNOSUPPORT : constant := 10044; -- Socket type not supported
- ETIMEDOUT : constant := 10060; -- Connection timed out
- ETOOMANYREFS : constant := 10059; -- Too many references
- EWOULDBLOCK : constant := 10035; -- Operation would block
-
- -----------------
- -- Host errors --
- -----------------
-
- HOST_NOT_FOUND : constant := 11001; -- Unknown host
- TRY_AGAIN : constant := 11002; -- Host name lookup failure
- NO_DATA : constant := 11004; -- No data record for name
- NO_RECOVERY : constant := 11003; -- Non recoverable errors
-
- -------------------
- -- Control flags --
- -------------------
-
- FIONBIO : constant := -2147195266; -- Set/clear non-blocking io
- FIONREAD : constant := 1074030207; -- How many bytes to read
-
- --------------------
- -- Shutdown modes --
- --------------------
-
- SHUT_RD : constant := 0; -- No more recv
- SHUT_WR : constant := 1; -- No more send
- SHUT_RDWR : constant := 2; -- No more recv/send
-
- ---------------------
- -- Protocol levels --
- ---------------------
-
- SOL_SOCKET : constant := 65535; -- Options for socket level
- IPPROTO_IP : constant := 0; -- Dummy protocol for IP
- IPPROTO_UDP : constant := 17; -- UDP
- IPPROTO_TCP : constant := 6; -- TCP
-
- -------------------
- -- Request flags --
- -------------------
-
- MSG_OOB : constant := 1; -- Process out-of-band data
- MSG_PEEK : constant := 2; -- Peek at incoming data
- MSG_EOR : constant := -1; -- Send end of record
- MSG_WAITALL : constant := 8; -- Wait for full reception
- MSG_NOSIGNAL : constant := -1; -- No SIGPIPE on send
- MSG_Forced_Flags : constant := 0;
- -- Flags set on all send(2) calls
-
- --------------------
- -- Socket options --
- --------------------
-
- TCP_NODELAY : constant := 1; -- Do not coalesce packets
- SO_REUSEADDR : constant := 4; -- Bind reuse local address
- SO_REUSEPORT : constant := -1; -- Bind reuse port number
- SO_KEEPALIVE : constant := 8; -- Enable keep-alive msgs
- SO_LINGER : constant := 128; -- Defer close to flush data
- SO_BROADCAST : constant := 32; -- Can send broadcast msgs
- SO_SNDBUF : constant := 4097; -- Set/get send buffer size
- SO_RCVBUF : constant := 4098; -- Set/get recv buffer size
- SO_SNDTIMEO : constant := 4101; -- Emission timeout
- SO_RCVTIMEO : constant := 4102; -- Reception timeout
- SO_ERROR : constant := 4103; -- Get/clear error status
- IP_MULTICAST_IF : constant := 9; -- Set/get mcast interface
- IP_MULTICAST_TTL : constant := 10; -- Set/get multicast TTL
- IP_MULTICAST_LOOP : constant := 11; -- Set/get mcast loopback
- IP_ADD_MEMBERSHIP : constant := 12; -- Join a multicast group
- IP_DROP_MEMBERSHIP : constant := 13; -- Leave a multicast group
- IP_PKTINFO : constant := 19; -- Get datagram info
-
- -------------------
- -- System limits --
- -------------------
-
- IOV_MAX : constant := 2147483647; -- Maximum writev iovcnt
-
- ----------------------
- -- Type definitions --
- ----------------------
-
- -- Sizes (in bytes) of the components of struct timeval
-
- SIZEOF_tv_sec : constant := 4; -- tv_sec
- SIZEOF_tv_usec : constant := 4; -- tv_usec
-
- -- Sizes of protocol specific address types (for sockaddr.sa_len)
-
- SIZEOF_sockaddr_in : constant := 16; -- struct sockaddr_in
- SIZEOF_sockaddr_in6 : constant := 28; -- struct sockaddr_in6
-
- -- Size of file descriptor sets
-
- SIZEOF_fd_set : constant := 8200; -- fd_set
-
- -- Fields of struct hostent
-
- subtype H_Addrtype_T is Interfaces.C.short;
- subtype H_Length_T is Interfaces.C.short;
-
- ----------------------------------------
- -- Properties of supported interfaces --
- ----------------------------------------
-
- Need_Netdb_Buffer : constant := 0; -- Need buffer for Netdb ops
- Has_Sockaddr_Len : constant := 0; -- Sockaddr has sa_len field
-
- Thread_Blocking_IO : constant Boolean := True;
- -- Set False for contexts where socket i/o are process blocking
-
- ------------------------------
- -- MinGW-specific constants --
- ------------------------------
-
- -- These constants may be used only within the MinGW version of
- -- GNAT.Sockets.Thin.
-
- WSASYSNOTREADY : constant := 10091; -- System not ready
- WSAVERNOTSUPPORTED : constant := 10092; -- Version not supported
- WSANOTINITIALISED : constant := 10093; -- Winsock not initialized
- WSAEDISCON : constant := 10101; -- Disconnected
-
-end GNAT.Sockets.Constants;
diff --git a/gcc/ada/g-soccon-mingw.ads b/gcc/ada/g-soccon-mingw.ads
deleted file mode 100644
index 732ef67e2e5..00000000000
--- a/gcc/ada/g-soccon-mingw.ads
+++ /dev/null
@@ -1,220 +0,0 @@
-------------------------------------------------------------------------------
--- --
--- GNAT COMPILER COMPONENTS --
--- --
--- G N A T . S O C K E T S . C O N S T A N T S --
--- --
--- S p e c --
--- --
--- Copyright (C) 2000-2008, Free Software Foundation, Inc. --
--- --
--- GNAT is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
--- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
--- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
--- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
--- --
--- As a special exception, if other files instantiate generics from this --
--- unit, or you link this unit with other files to produce an executable, --
--- this unit does not by itself cause the resulting executable to be --
--- covered by the GNU General Public License. This exception does not --
--- however invalidate any other reasons why the executable file might be --
--- covered by the GNU Public License. --
--- --
--- GNAT was originally developed by the GNAT team at New York University. --
--- Extensive contributions were provided by Ada Core Technologies Inc. --
--- --
-------------------------------------------------------------------------------
-
--- This package provides target dependent definitions of constant for use
--- by the GNAT.Sockets package (g-socket.ads). This package should not be
--- directly with'ed by an applications program.
-
--- This is the version for pentium-mingw32msv
--- This file is generated automatically, do not modify it by hand! Instead,
--- make changes to gen-soccon.c and re-run it on each target.
-
-with Interfaces.C;
-package GNAT.Sockets.Constants is
-
- --------------
- -- Families --
- --------------
-
- AF_INET : constant := 2; -- IPv4 address family
- AF_INET6 : constant := 23; -- IPv6 address family
-
- -----------
- -- Modes --
- -----------
-
- SOCK_STREAM : constant := 1; -- Stream socket
- SOCK_DGRAM : constant := 2; -- Datagram socket
-
- -------------------
- -- Socket errors --
- -------------------
-
- EACCES : constant := 10013; -- Permission denied
- EADDRINUSE : constant := 10048; -- Address already in use
- EADDRNOTAVAIL : constant := 10049; -- Cannot assign address
- EAFNOSUPPORT : constant := 10047; -- Addr family not supported
- EALREADY : constant := 10037; -- Operation in progress
- EBADF : constant := 10009; -- Bad file descriptor
- ECONNABORTED : constant := 10053; -- Connection aborted
- ECONNREFUSED : constant := 10061; -- Connection refused
- ECONNRESET : constant := 10054; -- Connection reset by peer
- EDESTADDRREQ : constant := 10039; -- Destination addr required
- EFAULT : constant := 10014; -- Bad address
- EHOSTDOWN : constant := 10064; -- Host is down
- EHOSTUNREACH : constant := 10065; -- No route to host
- EINPROGRESS : constant := 10036; -- Operation now in progress
- EINTR : constant := 10004; -- Interrupted system call
- EINVAL : constant := 10022; -- Invalid argument
- EIO : constant := 10101; -- Input output error
- EISCONN : constant := 10056; -- Socket already connected
- ELOOP : constant := 10062; -- Too many symbolic links
- EMFILE : constant := 10024; -- Too many open files
- EMSGSIZE : constant := 10040; -- Message too long
- ENAMETOOLONG : constant := 10063; -- Name too long
- ENETDOWN : constant := 10050; -- Network is down
- ENETRESET : constant := 10052; -- Disconn. on network reset
- ENETUNREACH : constant := 10051; -- Network is unreachable
- ENOBUFS : constant := 10055; -- No buffer space available
- ENOPROTOOPT : constant := 10042; -- Protocol not available
- ENOTCONN : constant := 10057; -- Socket not connected
- ENOTSOCK : constant := 10038; -- Operation on non socket
- EOPNOTSUPP : constant := 10045; -- Operation not supported
- EPFNOSUPPORT : constant := 10046; -- Unknown protocol family
- EPROTONOSUPPORT : constant := 10043; -- Unknown protocol
- EPROTOTYPE : constant := 10041; -- Unknown protocol type
- ESHUTDOWN : constant := 10058; -- Cannot send once shutdown
- ESOCKTNOSUPPORT : constant := 10044; -- Socket type not supported
- ETIMEDOUT : constant := 10060; -- Connection timed out
- ETOOMANYREFS : constant := 10059; -- Too many references
- EWOULDBLOCK : constant := 10035; -- Operation would block
-
- -----------------
- -- Host errors --
- -----------------
-
- HOST_NOT_FOUND : constant := 11001; -- Unknown host
- TRY_AGAIN : constant := 11002; -- Host name lookup failure
- NO_DATA : constant := 11004; -- No data record for name
- NO_RECOVERY : constant := 11003; -- Non recoverable errors
-
- -------------------
- -- Control flags --
- -------------------
-
- FIONBIO : constant := -2147195266; -- Set/clear non-blocking io
- FIONREAD : constant := 1074030207; -- How many bytes to read
-
- --------------------
- -- Shutdown modes --
- --------------------
-
- SHUT_RD : constant := 0; -- No more recv
- SHUT_WR : constant := 1; -- No more send
- SHUT_RDWR : constant := 2; -- No more recv/send
-
- ---------------------
- -- Protocol levels --
- ---------------------
-
- SOL_SOCKET : constant := 65535; -- Options for socket level
- IPPROTO_IP : constant := 0; -- Dummy protocol for IP
- IPPROTO_UDP : constant := 17; -- UDP
- IPPROTO_TCP : constant := 6; -- TCP
-
- -------------------
- -- Request flags --
- -------------------
-
- MSG_OOB : constant := 1; -- Process out-of-band data
- MSG_PEEK : constant := 2; -- Peek at incoming data
- MSG_EOR : constant := -1; -- Send end of record
- MSG_WAITALL : constant := 8; -- Wait for full reception
- MSG_NOSIGNAL : constant := -1; -- No SIGPIPE on send
- MSG_Forced_Flags : constant := 0;
- -- Flags set on all send(2) calls
-
- --------------------
- -- Socket options --
- --------------------
-
- TCP_NODELAY : constant := 1; -- Do not coalesce packets
- SO_REUSEADDR : constant := 4; -- Bind reuse local address
- SO_REUSEPORT : constant := -1; -- Bind reuse port number
- SO_KEEPALIVE : constant := 8; -- Enable keep-alive msgs
- SO_LINGER : constant := 128; -- Defer close to flush data
- SO_BROADCAST : constant := 32; -- Can send broadcast msgs
- SO_SNDBUF : constant := 4097; -- Set/get send buffer size
- SO_RCVBUF : constant := 4098; -- Set/get recv buffer size
- SO_SNDTIMEO : constant := 4101; -- Emission timeout
- SO_RCVTIMEO : constant := 4102; -- Reception timeout
- SO_ERROR : constant := 4103; -- Get/clear error status
- IP_MULTICAST_IF : constant := 9; -- Set/get mcast interface
- IP_MULTICAST_TTL : constant := 10; -- Set/get multicast TTL
- IP_MULTICAST_LOOP : constant := 11; -- Set/get mcast loopback
- IP_ADD_MEMBERSHIP : constant := 12; -- Join a multicast group
- IP_DROP_MEMBERSHIP : constant := 13; -- Leave a multicast group
- IP_PKTINFO : constant := 19; -- Get datagram info
-
- -------------------
- -- System limits --
- -------------------
-
- IOV_MAX : constant := 2147483647; -- Maximum writev iovcnt
-
- ----------------------
- -- Type definitions --
- ----------------------
-
- -- Sizes (in bytes) of the components of struct timeval
-
- SIZEOF_tv_sec : constant := 4; -- tv_sec
- SIZEOF_tv_usec : constant := 4; -- tv_usec
-
- -- Sizes of protocol specific address types (for sockaddr.sa_len)
-
- SIZEOF_sockaddr_in : constant := 16; -- struct sockaddr_in
- SIZEOF_sockaddr_in6 : constant := 28; -- struct sockaddr_in6
-
- -- Size of file descriptor sets
-
- SIZEOF_fd_set : constant := 4100; -- fd_set
-
- -- Fields of struct hostent
-
- subtype H_Addrtype_T is Interfaces.C.short;
- subtype H_Length_T is Interfaces.C.short;
-
- ----------------------------------------
- -- Properties of supported interfaces --
- ----------------------------------------
-
- Need_Netdb_Buffer : constant := 0; -- Need buffer for Netdb ops
- Has_Sockaddr_Len : constant := 0; -- Sockaddr has sa_len field
-
- Thread_Blocking_IO : constant Boolean := True;
- -- Set False for contexts where socket i/o are process blocking
-
- ------------------------------
- -- MinGW-specific constants --
- ------------------------------
-
- -- These constants may be used only within the MinGW version of
- -- GNAT.Sockets.Thin.
-
- WSASYSNOTREADY : constant := 10091; -- System not ready
- WSAVERNOTSUPPORTED : constant := 10092; -- Version not supported
- WSANOTINITIALISED : constant := 10093; -- Winsock not initialized
- WSAEDISCON : constant := 10101; -- Disconnected
-
-end GNAT.Sockets.Constants;
diff --git a/gcc/ada/g-soccon-rtems.ads b/gcc/ada/g-soccon-rtems.ads
deleted file mode 100644
index a404eec9b33..00000000000
--- a/gcc/ada/g-soccon-rtems.ads
+++ /dev/null
@@ -1,196 +0,0 @@
-------------------------------------------------------------------------------
--- --
--- GNAT COMPILER COMPONENTS --
--- --
--- G N A T . S O C K E T S . C O N S T A N T S --
--- --
--- S p e c --
--- --
--- Copyright (C) 2000-2008, Free Software Foundation, Inc. --
--- --
--- GNAT is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
--- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
--- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
--- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
--- --
--- As a special exception, if other files instantiate generics from this --
--- unit, or you link this unit with other files to produce an executable, --
--- this unit does not by itself cause the resulting executable to be --
--- covered by the GNU General Public License. This exception does not --
--- however invalidate any other reasons why the executable file might be --
--- covered by the GNU Public License. --
--- --
--- GNAT was originally developed by the GNAT team at New York University. --
--- Extensive contributions were provided by Ada Core Technologies Inc. --
--- --
-------------------------------------------------------------------------------
-
--- This package provides target dependent definitions of constant for use
--- by the GNAT.Sockets package (g-socket.ads). This package should not be
--- directly with'ed by an applications program.
-
--- This is the version for RTEMS
--- This file is generated automatically, do not modify it by hand! Instead,
--- make changes to gen-soccon.c and re-run it on each target.
-
-package GNAT.Sockets.Constants is
-
- --------------
- -- Families --
- --------------
-
- AF_INET : constant := 2; -- IPv4 address family
- AF_INET6 : constant := 28; -- IPv6 address family
-
- -----------
- -- Modes --
- -----------
-
- SOCK_STREAM : constant := 1; -- Stream socket
- SOCK_DGRAM : constant := 2; -- Datagram socket
-
- -------------------
- -- Socket errors --
- -------------------
-
- EACCES : constant := 13; -- Permission denied
- EADDRINUSE : constant := 112; -- Address already in use
- EADDRNOTAVAIL : constant := 125; -- Cannot assign address
- EAFNOSUPPORT : constant := 106; -- Addr family not supported
- EALREADY : constant := 120; -- Operation in progress
- EBADF : constant := 9; -- Bad file descriptor
- ECONNABORTED : constant := 113; -- Connection aborted
- ECONNREFUSED : constant := 111; -- Connection refused
- ECONNRESET : constant := 104; -- Connection reset by peer
- EDESTADDRREQ : constant := 121; -- Destination addr required
- EFAULT : constant := 14; -- Bad address
- EHOSTDOWN : constant := 117; -- Host is down
- EHOSTUNREACH : constant := 118; -- No route to host
- EINPROGRESS : constant := 119; -- Operation now in progress
- EINTR : constant := 4; -- Interrupted system call
- EINVAL : constant := 22; -- Invalid argument
- EIO : constant := 5; -- Input output error
- EISCONN : constant := 127; -- Socket already connected
- ELOOP : constant := 92; -- Too many symbolic links
- EMFILE : constant := 24; -- Too many open files
- EMSGSIZE : constant := 122; -- Message too long
- ENAMETOOLONG : constant := 91; -- Name too long
- ENETDOWN : constant := 115; -- Network is down
- ENETRESET : constant := 126; -- Disconn. on network reset
- ENETUNREACH : constant := 114; -- Network is unreachable
- ENOBUFS : constant := 105; -- No buffer space available
- ENOPROTOOPT : constant := 109; -- Protocol not available
- ENOTCONN : constant := 128; -- Socket not connected
- ENOTSOCK : constant := 108; -- Operation on non socket
- EOPNOTSUPP : constant := 95; -- Operation not supported
- EPFNOSUPPORT : constant := 96; -- Unknown protocol family
- EPROTONOSUPPORT : constant := 123; -- Unknown protocol
- EPROTOTYPE : constant := 107; -- Unknown protocol type
- ESHUTDOWN : constant := 110; -- Cannot send once shutdown
- ESOCKTNOSUPPORT : constant := 124; -- Socket type not supported
- ETIMEDOUT : constant := 116; -- Connection timed out
- ETOOMANYREFS : constant := 129; -- Too many references
- EWOULDBLOCK : constant := 11; -- Operation would block
-
- -----------------
- -- Host errors --
- -----------------
-
- HOST_NOT_FOUND : constant := 1; -- Unknown host
- TRY_AGAIN : constant := 2; -- Host name lookup failure
- NO_DATA : constant := 4; -- No data record for name
- NO_RECOVERY : constant := 3; -- Non recoverable errors
-
- -------------------
- -- Control flags --
- -------------------
-
- FIONBIO : constant := -2147195266; -- Set/clear non-blocking io
- FIONREAD : constant := 1074030207; -- How many bytes to read
-
- --------------------
- -- Shutdown modes --
- --------------------
-
- SHUT_RD : constant := 0; -- No more recv
- SHUT_WR : constant := 1; -- No more send
- SHUT_RDWR : constant := 2; -- No more recv/send
-
- ---------------------
- -- Protocol levels --
- ---------------------
-
- SOL_SOCKET : constant := 65535; -- Options for socket level
- IPPROTO_IP : constant := 0; -- Dummy protocol for IP
- IPPROTO_UDP : constant := 17; -- UDP
- IPPROTO_TCP : constant := 6; -- TCP
-
- -------------------
- -- Request flags --
- -------------------
-
- MSG_OOB : constant := 1; -- Process out-of-band data
- MSG_PEEK : constant := 2; -- Peek at incoming data
- MSG_EOR : constant := 8; -- Send end of record
- MSG_WAITALL : constant := 64; -- Wait for full reception
- MSG_NOSIGNAL : constant := -1; -- No SIGPIPE on send
- MSG_Forced_Flags : constant := 0;
- -- Flags set on all send(2) calls
-
- --------------------
- -- Socket options --
- --------------------
-
- TCP_NODELAY : constant := 1; -- Do not coalesce packets
- SO_REUSEADDR : constant := 4; -- Bind reuse local address
- SO_REUSEPORT : constant := -1; -- Bind reuse port number
- SO_KEEPALIVE : constant := 8; -- Enable keep-alive msgs
- SO_LINGER : constant := 128; -- Defer close to flush data
- SO_BROADCAST : constant := 32; -- Can send broadcast msgs
- SO_SNDBUF : constant := 4097; -- Set/get send buffer size
- SO_RCVBUF : constant := 4098; -- Set/get recv buffer size
- SO_SNDTIMEO : constant := 4101; -- Emission timeout
- SO_RCVTIMEO : constant := 4102; -- Reception timeout
- SO_ERROR : constant := 4103; -- Get/clear error status
- IP_MULTICAST_IF : constant := 9; -- Set/get mcast interface
- IP_MULTICAST_TTL : constant := 10; -- Set/get multicast TTL
- IP_MULTICAST_LOOP : constant := 11; -- Set/get mcast loopback
- IP_ADD_MEMBERSHIP : constant := 12; -- Join a multicast group
- IP_DROP_MEMBERSHIP : constant := 13; -- Leave a multicast group
- IP_PKTINFO : constant := -1; -- Get datagram info
-
- -------------------
- -- System limits --
- -------------------
-
- IOV_MAX : constant := 1024; -- Maximum writev iovcnt
-
- ----------------------
- -- Type definitions --
- ----------------------
-
- -- Sizes (in bytes) of the components of struct timeval
-
- SIZEOF_tv_sec : constant := 4; -- tv_sec
- SIZEOF_tv_usec : constant := 4; -- tv_usec
-
- ----------------------------------------
- -- Properties of supported interfaces --
- ----------------------------------------
-
- Need_Netdb_Buffer : constant := 1; -- Need buffer for Netdb ops
-
- ----------------------
- -- Additional flags --
- ----------------------
-
- Thread_Blocking_IO : constant Boolean := True;
- -- Set False for contexts where socket i/o are process blocking
-
-end GNAT.Sockets.Constants;
diff --git a/gcc/ada/g-soccon-solaris-64.ads b/gcc/ada/g-soccon-solaris-64.ads
deleted file mode 100644
index 2d5f2d98aff..00000000000
--- a/gcc/ada/g-soccon-solaris-64.ads
+++ /dev/null
@@ -1,208 +0,0 @@
-------------------------------------------------------------------------------
--- --
--- GNAT COMPILER COMPONENTS --
--- --
--- G N A T . S O C K E T S . C O N S T A N T S --
--- --
--- S p e c --
--- --
--- Copyright (C) 2000-2008, Free Software Foundation, Inc. --
--- --
--- GNAT is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
--- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
--- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
--- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
--- --
--- As a special exception, if other files instantiate generics from this --
--- unit, or you link this unit with other files to produce an executable, --
--- this unit does not by itself cause the resulting executable to be --
--- covered by the GNU General Public License. This exception does not --
--- however invalidate any other reasons why the executable file might be --
--- covered by the GNU Public License. --
--- --
--- GNAT was originally developed by the GNAT team at New York University. --
--- Extensive contributions were provided by Ada Core Technologies Inc. --
--- --
-------------------------------------------------------------------------------
-
--- This package provides target dependent definitions of constant for use
--- by the GNAT.Sockets package (g-socket.ads). This package should not be
--- directly with'ed by an applications program.
-
--- This is the version for sparc-sun-solaris2.8
--- This file is generated automatically, do not modify it by hand! Instead,
--- make changes to gen-soccon.c and re-run it on each target.
-
-with Interfaces.C;
-package GNAT.Sockets.Constants is
-
- --------------
- -- Families --
- --------------
-
- AF_INET : constant := 2; -- IPv4 address family
- AF_INET6 : constant := 26; -- IPv6 address family
-
- -----------
- -- Modes --
- -----------
-
- SOCK_STREAM : constant := 2; -- Stream socket
- SOCK_DGRAM : constant := 1; -- Datagram socket
-
- -------------------
- -- Socket errors --
- -------------------
-
- EACCES : constant := 13; -- Permission denied
- EADDRINUSE : constant := 125; -- Address already in use
- EADDRNOTAVAIL : constant := 126; -- Cannot assign address
- EAFNOSUPPORT : constant := 124; -- Addr family not supported
- EALREADY : constant := 149; -- Operation in progress
- EBADF : constant := 9; -- Bad file descriptor
- ECONNABORTED : constant := 130; -- Connection aborted
- ECONNREFUSED : constant := 146; -- Connection refused
- ECONNRESET : constant := 131; -- Connection reset by peer
- EDESTADDRREQ : constant := 96; -- Destination addr required
- EFAULT : constant := 14; -- Bad address
- EHOSTDOWN : constant := 147; -- Host is down
- EHOSTUNREACH : constant := 148; -- No route to host
- EINPROGRESS : constant := 150; -- Operation now in progress
- EINTR : constant := 4; -- Interrupted system call
- EINVAL : constant := 22; -- Invalid argument
- EIO : constant := 5; -- Input output error
- EISCONN : constant := 133; -- Socket already connected
- ELOOP : constant := 90; -- Too many symbolic links
- EMFILE : constant := 24; -- Too many open files
- EMSGSIZE : constant := 97; -- Message too long
- ENAMETOOLONG : constant := 78; -- Name too long
- ENETDOWN : constant := 127; -- Network is down
- ENETRESET : constant := 129; -- Disconn. on network reset
- ENETUNREACH : constant := 128; -- Network is unreachable
- ENOBUFS : constant := 132; -- No buffer space available
- ENOPROTOOPT : constant := 99; -- Protocol not available
- ENOTCONN : constant := 134; -- Socket not connected
- ENOTSOCK : constant := 95; -- Operation on non socket
- EOPNOTSUPP : constant := 122; -- Operation not supported
- EPFNOSUPPORT : constant := 123; -- Unknown protocol family
- EPROTONOSUPPORT : constant := 120; -- Unknown protocol
- EPROTOTYPE : constant := 98; -- Unknown protocol type
- ESHUTDOWN : constant := 143; -- Cannot send once shutdown
- ESOCKTNOSUPPORT : constant := 121; -- Socket type not supported
- ETIMEDOUT : constant := 145; -- Connection timed out
- ETOOMANYREFS : constant := 144; -- Too many references
- EWOULDBLOCK : constant := 11; -- Operation would block
-
- -----------------
- -- Host errors --
- -----------------
-
- HOST_NOT_FOUND : constant := 1; -- Unknown host
- TRY_AGAIN : constant := 2; -- Host name lookup failure
- NO_DATA : constant := 4; -- No data record for name
- NO_RECOVERY : constant := 3; -- Non recoverable errors
-
- -------------------
- -- Control flags --
- -------------------
-
- FIONBIO : constant := -2147195266; -- Set/clear non-blocking io
- FIONREAD : constant := 1074030207; -- How many bytes to read
-
- --------------------
- -- Shutdown modes --
- --------------------
-
- SHUT_RD : constant := 0; -- No more recv
- SHUT_WR : constant := 1; -- No more send
- SHUT_RDWR : constant := 2; -- No more recv/send
-
- ---------------------
- -- Protocol levels --
- ---------------------
-
- SOL_SOCKET : constant := 65535; -- Options for socket level
- IPPROTO_IP : constant := 0; -- Dummy protocol for IP
- IPPROTO_UDP : constant := 17; -- UDP
- IPPROTO_TCP : constant := 6; -- TCP
-
- -------------------
- -- Request flags --
- -------------------
-
- MSG_OOB : constant := 1; -- Process out-of-band data
- MSG_PEEK : constant := 2; -- Peek at incoming data
- MSG_EOR : constant := 8; -- Send end of record
- MSG_WAITALL : constant := 64; -- Wait for full reception
- MSG_NOSIGNAL : constant := -1; -- No SIGPIPE on send
- MSG_Forced_Flags : constant := 0;
- -- Flags set on all send(2) calls
-
- --------------------
- -- Socket options --
- --------------------
-
- TCP_NODELAY : constant := 1; -- Do not coalesce packets
- SO_REUSEADDR : constant := 4; -- Bind reuse local address
- SO_REUSEPORT : constant := -1; -- Bind reuse port number
- SO_KEEPALIVE : constant := 8; -- Enable keep-alive msgs
- SO_LINGER : constant := 128; -- Defer close to flush data
- SO_BROADCAST : constant := 32; -- Can send broadcast msgs
- SO_SNDBUF : constant := 4097; -- Set/get send buffer size
- SO_RCVBUF : constant := 4098; -- Set/get recv buffer size
- SO_SNDTIMEO : constant := 4101; -- Emission timeout
- SO_RCVTIMEO : constant := 4102; -- Reception timeout
- SO_ERROR : constant := 4103; -- Get/clear error status
- IP_MULTICAST_IF : constant := 16; -- Set/get mcast interface
- IP_MULTICAST_TTL : constant := 17; -- Set/get multicast TTL
- IP_MULTICAST_LOOP : constant := 18; -- Set/get mcast loopback
- IP_ADD_MEMBERSHIP : constant := 19; -- Join a multicast group
- IP_DROP_MEMBERSHIP : constant := 20; -- Leave a multicast group
- IP_PKTINFO : constant := -1; -- Get datagram info
-
- -------------------
- -- System limits --
- -------------------
-
- IOV_MAX : constant := 16; -- Maximum writev iovcnt
-
- ----------------------
- -- Type definitions --
- ----------------------
-
- -- Sizes (in bytes) of the components of struct timeval
-
- SIZEOF_tv_sec : constant := 4; -- tv_sec
- SIZEOF_tv_usec : constant := 4; -- tv_usec
-
- -- Sizes of protocol specific address types (for sockaddr.sa_len)
-
- SIZEOF_sockaddr_in : constant := 16; -- struct sockaddr_in
- SIZEOF_sockaddr_in6 : constant := 32; -- struct sockaddr_in6
-
- -- Size of file descriptor sets
-
- SIZEOF_fd_set : constant := 128; -- fd_set
-
- -- Fields of struct hostent
-
- subtype H_Addrtype_T is Interfaces.C.int;
- subtype H_Length_T is Interfaces.C.int;
-
- ----------------------------------------
- -- Properties of supported interfaces --
- ----------------------------------------
-
- Need_Netdb_Buffer : constant := 1; -- Need buffer for Netdb ops
- Has_Sockaddr_Len : constant := 0; -- Sockaddr has sa_len field
-
- Thread_Blocking_IO : constant Boolean := True;
- -- Set False for contexts where socket i/o are process blocking
-
-end GNAT.Sockets.Constants;
diff --git a/gcc/ada/g-soccon-solaris.ads b/gcc/ada/g-soccon-solaris.ads
deleted file mode 100644
index 2d5f2d98aff..00000000000
--- a/gcc/ada/g-soccon-solaris.ads
+++ /dev/null
@@ -1,208 +0,0 @@
-------------------------------------------------------------------------------
--- --
--- GNAT COMPILER COMPONENTS --
--- --
--- G N A T . S O C K E T S . C O N S T A N T S --
--- --
--- S p e c --
--- --
--- Copyright (C) 2000-2008, Free Software Foundation, Inc. --
--- --
--- GNAT is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
--- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
--- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
--- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
--- --
--- As a special exception, if other files instantiate generics from this --
--- unit, or you link this unit with other files to produce an executable, --
--- this unit does not by itself cause the resulting executable to be --
--- covered by the GNU General Public License. This exception does not --
--- however invalidate any other reasons why the executable file might be --
--- covered by the GNU Public License. --
--- --
--- GNAT was originally developed by the GNAT team at New York University. --
--- Extensive contributions were provided by Ada Core Technologies Inc. --
--- --
-------------------------------------------------------------------------------
-
--- This package provides target dependent definitions of constant for use
--- by the GNAT.Sockets package (g-socket.ads). This package should not be
--- directly with'ed by an applications program.
-
--- This is the version for sparc-sun-solaris2.8
--- This file is generated automatically, do not modify it by hand! Instead,
--- make changes to gen-soccon.c and re-run it on each target.
-
-with Interfaces.C;
-package GNAT.Sockets.Constants is
-
- --------------
- -- Families --
- --------------
-
- AF_INET : constant := 2; -- IPv4 address family
- AF_INET6 : constant := 26; -- IPv6 address family
-
- -----------
- -- Modes --
- -----------
-
- SOCK_STREAM : constant := 2; -- Stream socket
- SOCK_DGRAM : constant := 1; -- Datagram socket
-
- -------------------
- -- Socket errors --
- -------------------
-
- EACCES : constant := 13; -- Permission denied
- EADDRINUSE : constant := 125; -- Address already in use
- EADDRNOTAVAIL : constant := 126; -- Cannot assign address
- EAFNOSUPPORT : constant := 124; -- Addr family not supported
- EALREADY : constant := 149; -- Operation in progress
- EBADF : constant := 9; -- Bad file descriptor
- ECONNABORTED : constant := 130; -- Connection aborted
- ECONNREFUSED : constant := 146; -- Connection refused
- ECONNRESET : constant := 131; -- Connection reset by peer
- EDESTADDRREQ : constant := 96; -- Destination addr required
- EFAULT : constant := 14; -- Bad address
- EHOSTDOWN : constant := 147; -- Host is down
- EHOSTUNREACH : constant := 148; -- No route to host
- EINPROGRESS : constant := 150; -- Operation now in progress
- EINTR : constant := 4; -- Interrupted system call
- EINVAL : constant := 22; -- Invalid argument
- EIO : constant := 5; -- Input output error
- EISCONN : constant := 133; -- Socket already connected
- ELOOP : constant := 90; -- Too many symbolic links
- EMFILE : constant := 24; -- Too many open files
- EMSGSIZE : constant := 97; -- Message too long
- ENAMETOOLONG : constant := 78; -- Name too long
- ENETDOWN : constant := 127; -- Network is down
- ENETRESET : constant := 129; -- Disconn. on network reset
- ENETUNREACH : constant := 128; -- Network is unreachable
- ENOBUFS : constant := 132; -- No buffer space available
- ENOPROTOOPT : constant := 99; -- Protocol not available
- ENOTCONN : constant := 134; -- Socket not connected
- ENOTSOCK : constant := 95; -- Operation on non socket
- EOPNOTSUPP : constant := 122; -- Operation not supported
- EPFNOSUPPORT : constant := 123; -- Unknown protocol family
- EPROTONOSUPPORT : constant := 120; -- Unknown protocol
- EPROTOTYPE : constant := 98; -- Unknown protocol type
- ESHUTDOWN : constant := 143; -- Cannot send once shutdown
- ESOCKTNOSUPPORT : constant := 121; -- Socket type not supported
- ETIMEDOUT : constant := 145; -- Connection timed out
- ETOOMANYREFS : constant := 144; -- Too many references
- EWOULDBLOCK : constant := 11; -- Operation would block
-
- -----------------
- -- Host errors --
- -----------------
-
- HOST_NOT_FOUND : constant := 1; -- Unknown host
- TRY_AGAIN : constant := 2; -- Host name lookup failure
- NO_DATA : constant := 4; -- No data record for name
- NO_RECOVERY : constant := 3; -- Non recoverable errors
-
- -------------------
- -- Control flags --
- -------------------
-
- FIONBIO : constant := -2147195266; -- Set/clear non-blocking io
- FIONREAD : constant := 1074030207; -- How many bytes to read
-
- --------------------
- -- Shutdown modes --
- --------------------
-
- SHUT_RD : constant := 0; -- No more recv
- SHUT_WR : constant := 1; -- No more send
- SHUT_RDWR : constant := 2; -- No more recv/send
-
- ---------------------
- -- Protocol levels --
- ---------------------
-
- SOL_SOCKET : constant := 65535; -- Options for socket level
- IPPROTO_IP : constant := 0; -- Dummy protocol for IP
- IPPROTO_UDP : constant := 17; -- UDP
- IPPROTO_TCP : constant := 6; -- TCP
-
- -------------------
- -- Request flags --
- -------------------
-
- MSG_OOB : constant := 1; -- Process out-of-band data
- MSG_PEEK : constant := 2; -- Peek at incoming data
- MSG_EOR : constant := 8; -- Send end of record
- MSG_WAITALL : constant := 64; -- Wait for full reception
- MSG_NOSIGNAL : constant := -1; -- No SIGPIPE on send
- MSG_Forced_Flags : constant := 0;
- -- Flags set on all send(2) calls
-
- --------------------
- -- Socket options --
- --------------------
-
- TCP_NODELAY : constant := 1; -- Do not coalesce packets
- SO_REUSEADDR : constant := 4; -- Bind reuse local address
- SO_REUSEPORT : constant := -1; -- Bind reuse port number
- SO_KEEPALIVE : constant := 8; -- Enable keep-alive msgs
- SO_LINGER : constant := 128; -- Defer close to flush data
- SO_BROADCAST : constant := 32; -- Can send broadcast msgs
- SO_SNDBUF : constant := 4097; -- Set/get send buffer size
- SO_RCVBUF : constant := 4098; -- Set/get recv buffer size
- SO_SNDTIMEO : constant := 4101; -- Emission timeout
- SO_RCVTIMEO : constant := 4102; -- Reception timeout
- SO_ERROR : constant := 4103; -- Get/clear error status
- IP_MULTICAST_IF : constant := 16; -- Set/get mcast interface
- IP_MULTICAST_TTL : constant := 17; -- Set/get multicast TTL
- IP_MULTICAST_LOOP : constant := 18; -- Set/get mcast loopback
- IP_ADD_MEMBERSHIP : constant := 19; -- Join a multicast group
- IP_DROP_MEMBERSHIP : constant := 20; -- Leave a multicast group
- IP_PKTINFO : constant := -1; -- Get datagram info
-
- -------------------
- -- System limits --
- -------------------
-
- IOV_MAX : constant := 16; -- Maximum writev iovcnt
-
- ----------------------
- -- Type definitions --
- ----------------------
-
- -- Sizes (in bytes) of the components of struct timeval
-
- SIZEOF_tv_sec : constant := 4; -- tv_sec
- SIZEOF_tv_usec : constant := 4; -- tv_usec
-
- -- Sizes of protocol specific address types (for sockaddr.sa_len)
-
- SIZEOF_sockaddr_in : constant := 16; -- struct sockaddr_in
- SIZEOF_sockaddr_in6 : constant := 32; -- struct sockaddr_in6
-
- -- Size of file descriptor sets
-
- SIZEOF_fd_set : constant := 128; -- fd_set
-
- -- Fields of struct hostent
-
- subtype H_Addrtype_T is Interfaces.C.int;
- subtype H_Length_T is Interfaces.C.int;
-
- ----------------------------------------
- -- Properties of supported interfaces --
- ----------------------------------------
-
- Need_Netdb_Buffer : constant := 1; -- Need buffer for Netdb ops
- Has_Sockaddr_Len : constant := 0; -- Sockaddr has sa_len field
-
- Thread_Blocking_IO : constant Boolean := True;
- -- Set False for contexts where socket i/o are process blocking
-
-end GNAT.Sockets.Constants;
diff --git a/gcc/ada/g-soccon-tru64.ads b/gcc/ada/g-soccon-tru64.ads
deleted file mode 100644
index a14e6106d4a..00000000000
--- a/gcc/ada/g-soccon-tru64.ads
+++ /dev/null
@@ -1,208 +0,0 @@
-------------------------------------------------------------------------------
--- --
--- GNAT COMPILER COMPONENTS --
--- --
--- G N A T . S O C K E T S . C O N S T A N T S --
--- --
--- S p e c --
--- --
--- Copyright (C) 2000-2008, Free Software Foundation, Inc. --
--- --
--- GNAT is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
--- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
--- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
--- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
--- --
--- As a special exception, if other files instantiate generics from this --
--- unit, or you link this unit with other files to produce an executable, --
--- this unit does not by itself cause the resulting executable to be --
--- covered by the GNU General Public License. This exception does not --
--- however invalidate any other reasons why the executable file might be --
--- covered by the GNU Public License. --
--- --
--- GNAT was originally developed by the GNAT team at New York University. --
--- Extensive contributions were provided by Ada Core Technologies Inc. --
--- --
-------------------------------------------------------------------------------
-
--- This package provides target dependent definitions of constant for use
--- by the GNAT.Sockets package (g-socket.ads). This package should not be
--- directly with'ed by an applications program.
-
--- This is the version for alphaev56-dec-osf5.1
--- This file is generated automatically, do not modify it by hand! Instead,
--- make changes to gen-soccon.c and re-run it on each target.
-
-with Interfaces.C;
-package GNAT.Sockets.Constants is
-
- --------------
- -- Families --
- --------------
-
- AF_INET : constant := 2; -- IPv4 address family
- AF_INET6 : constant := 26; -- IPv6 address family
-
- -----------
- -- Modes --
- -----------
-
- SOCK_STREAM : constant := 1; -- Stream socket
- SOCK_DGRAM : constant := 2; -- Datagram socket
-
- -------------------
- -- Socket errors --
- -------------------
-
- EACCES : constant := 13; -- Permission denied
- EADDRINUSE : constant := 48; -- Address already in use
- EADDRNOTAVAIL : constant := 49; -- Cannot assign address
- EAFNOSUPPORT : constant := 47; -- Addr family not supported
- EALREADY : constant := 37; -- Operation in progress
- EBADF : constant := 9; -- Bad file descriptor
- ECONNABORTED : constant := 53; -- Connection aborted
- ECONNREFUSED : constant := 61; -- Connection refused
- ECONNRESET : constant := 54; -- Connection reset by peer
- EDESTADDRREQ : constant := 39; -- Destination addr required
- EFAULT : constant := 14; -- Bad address
- EHOSTDOWN : constant := 64; -- Host is down
- EHOSTUNREACH : constant := 65; -- No route to host
- EINPROGRESS : constant := 36; -- Operation now in progress
- EINTR : constant := 4; -- Interrupted system call
- EINVAL : constant := 22; -- Invalid argument
- EIO : constant := 5; -- Input output error
- EISCONN : constant := 56; -- Socket already connected
- ELOOP : constant := 62; -- Too many symbolic links
- EMFILE : constant := 24; -- Too many open files
- EMSGSIZE : constant := 40; -- Message too long
- ENAMETOOLONG : constant := 63; -- Name too long
- ENETDOWN : constant := 50; -- Network is down
- ENETRESET : constant := 52; -- Disconn. on network reset
- ENETUNREACH : constant := 51; -- Network is unreachable
- ENOBUFS : constant := 55; -- No buffer space available
- ENOPROTOOPT : constant := 42; -- Protocol not available
- ENOTCONN : constant := 57; -- Socket not connected
- ENOTSOCK : constant := 38; -- Operation on non socket
- EOPNOTSUPP : constant := 45; -- Operation not supported
- EPFNOSUPPORT : constant := 46; -- Unknown protocol family
- EPROTONOSUPPORT : constant := 43; -- Unknown protocol
- EPROTOTYPE : constant := 41; -- Unknown protocol type
- ESHUTDOWN : constant := 58; -- Cannot send once shutdown
- ESOCKTNOSUPPORT : constant := 44; -- Socket type not supported
- ETIMEDOUT : constant := 60; -- Connection timed out
- ETOOMANYREFS : constant := 59; -- Too many references
- EWOULDBLOCK : constant := 35; -- Operation would block
-
- -----------------
- -- Host errors --
- -----------------
-
- HOST_NOT_FOUND : constant := 1; -- Unknown host
- TRY_AGAIN : constant := 2; -- Host name lookup failure
- NO_DATA : constant := 4; -- No data record for name
- NO_RECOVERY : constant := 3; -- Non recoverable errors
-
- -------------------
- -- Control flags --
- -------------------
-
- FIONBIO : constant := -2147195266; -- Set/clear non-blocking io
- FIONREAD : constant := 1074030207; -- How many bytes to read
-
- --------------------
- -- Shutdown modes --
- --------------------
-
- SHUT_RD : constant := 0; -- No more recv
- SHUT_WR : constant := 1; -- No more send
- SHUT_RDWR : constant := 2; -- No more recv/send
-
- ---------------------
- -- Protocol levels --
- ---------------------
-
- SOL_SOCKET : constant := 65535; -- Options for socket level
- IPPROTO_IP : constant := 0; -- Dummy protocol for IP
- IPPROTO_UDP : constant := 17; -- UDP
- IPPROTO_TCP : constant := 6; -- TCP
-
- -------------------
- -- Request flags --
- -------------------
-
- MSG_OOB : constant := 1; -- Process out-of-band data
- MSG_PEEK : constant := 2; -- Peek at incoming data
- MSG_EOR : constant := 8; -- Send end of record
- MSG_WAITALL : constant := 64; -- Wait for full reception
- MSG_NOSIGNAL : constant := -1; -- No SIGPIPE on send
- MSG_Forced_Flags : constant := 0;
- -- Flags set on all send(2) calls
-
- --------------------
- -- Socket options --
- --------------------
-
- TCP_NODELAY : constant := 1; -- Do not coalesce packets
- SO_REUSEADDR : constant := 4; -- Bind reuse local address
- SO_REUSEPORT : constant := 512; -- Bind reuse port number
- SO_KEEPALIVE : constant := 8; -- Enable keep-alive msgs
- SO_LINGER : constant := 128; -- Defer close to flush data
- SO_BROADCAST : constant := 32; -- Can send broadcast msgs
- SO_SNDBUF : constant := 4097; -- Set/get send buffer size
- SO_RCVBUF : constant := 4098; -- Set/get recv buffer size
- SO_SNDTIMEO : constant := 4101; -- Emission timeout
- SO_RCVTIMEO : constant := 4102; -- Reception timeout
- SO_ERROR : constant := 4103; -- Get/clear error status
- IP_MULTICAST_IF : constant := 9; -- Set/get mcast interface
- IP_MULTICAST_TTL : constant := 10; -- Set/get multicast TTL
- IP_MULTICAST_LOOP : constant := 11; -- Set/get mcast loopback
- IP_ADD_MEMBERSHIP : constant := 12; -- Join a multicast group
- IP_DROP_MEMBERSHIP : constant := 13; -- Leave a multicast group
- IP_PKTINFO : constant := -1; -- Get datagram info
-
- -------------------
- -- System limits --
- -------------------
-
- IOV_MAX : constant := 1024; -- Maximum writev iovcnt
-
- ----------------------
- -- Type definitions --
- ----------------------
-
- -- Sizes (in bytes) of the components of struct timeval
-
- SIZEOF_tv_sec : constant := 4; -- tv_sec
- SIZEOF_tv_usec : constant := 4; -- tv_usec
-
- -- Sizes of protocol specific address types (for sockaddr.sa_len)
-
- SIZEOF_sockaddr_in : constant := 16; -- struct sockaddr_in
- SIZEOF_sockaddr_in6 : constant := 32; -- struct sockaddr_in6
-
- -- Size of file descriptor sets
-
- SIZEOF_fd_set : constant := 512; -- fd_set
-
- -- Fields of struct hostent
-
- subtype H_Addrtype_T is Interfaces.C.int;
- subtype H_Length_T is Interfaces.C.int;
-
- ----------------------------------------
- -- Properties of supported interfaces --
- ----------------------------------------
-
- Need_Netdb_Buffer : constant := 0; -- Need buffer for Netdb ops
- Has_Sockaddr_Len : constant := 0; -- Sockaddr has sa_len field
-
- Thread_Blocking_IO : constant Boolean := True;
- -- Set False for contexts where socket i/o are process blocking
-
-end GNAT.Sockets.Constants;
diff --git a/gcc/ada/g-soccon-vms.ads b/gcc/ada/g-soccon-vms.ads
deleted file mode 100644
index 072ee499c3c..00000000000
--- a/gcc/ada/g-soccon-vms.ads
+++ /dev/null
@@ -1,208 +0,0 @@
-------------------------------------------------------------------------------
--- --
--- GNAT COMPILER COMPONENTS --
--- --
--- G N A T . S O C K E T S . C O N S T A N T S --
--- --
--- S p e c --
--- --
--- Copyright (C) 2000-2008, Free Software Foundation, Inc. --
--- --
--- GNAT is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
--- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
--- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
--- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
--- --
--- As a special exception, if other files instantiate generics from this --
--- unit, or you link this unit with other files to produce an executable, --
--- this unit does not by itself cause the resulting executable to be --
--- covered by the GNU General Public License. This exception does not --
--- however invalidate any other reasons why the executable file might be --
--- covered by the GNU Public License. --
--- --
--- GNAT was originally developed by the GNAT team at New York University. --
--- Extensive contributions were provided by Ada Core Technologies Inc. --
--- --
-------------------------------------------------------------------------------
-
--- This package provides target dependent definitions of constant for use
--- by the GNAT.Sockets package (g-socket.ads). This package should not be
--- directly with'ed by an applications program.
-
--- This is the version for OpenVMS
--- This file is generated automatically, do not modify it by hand! Instead,
--- make changes to gen-soccon.c and re-run it on each target.
-
-with Interfaces.C;
-package GNAT.Sockets.Constants is
-
- --------------
- -- Families --
- --------------
-
- AF_INET : constant := 2; -- IPv4 address family
- AF_INET6 : constant := 26; -- IPv6 address family
-
- -----------
- -- Modes --
- -----------
-
- SOCK_STREAM : constant := 1; -- Stream socket
- SOCK_DGRAM : constant := 2; -- Datagram socket
-
- -------------------
- -- Socket errors --
- -------------------
-
- EACCES : constant := 13; -- Permission denied
- EADDRINUSE : constant := 48; -- Address already in use
- EADDRNOTAVAIL : constant := 49; -- Cannot assign address
- EAFNOSUPPORT : constant := 47; -- Addr family not supported
- EALREADY : constant := 37; -- Operation in progress
- EBADF : constant := 9; -- Bad file descriptor
- ECONNABORTED : constant := 53; -- Connection aborted
- ECONNREFUSED : constant := 61; -- Connection refused
- ECONNRESET : constant := 54; -- Connection reset by peer
- EDESTADDRREQ : constant := 39; -- Destination addr required
- EFAULT : constant := 14; -- Bad address
- EHOSTDOWN : constant := 64; -- Host is down
- EHOSTUNREACH : constant := 65; -- No route to host
- EINPROGRESS : constant := 36; -- Operation now in progress
- EINTR : constant := 4; -- Interrupted system call
- EINVAL : constant := 22; -- Invalid argument
- EIO : constant := 5; -- Input output error
- EISCONN : constant := 56; -- Socket already connected
- ELOOP : constant := 62; -- Too many symbolic links
- EMFILE : constant := 24; -- Too many open files
- EMSGSIZE : constant := 40; -- Message too long
- ENAMETOOLONG : constant := 63; -- Name too long
- ENETDOWN : constant := 50; -- Network is down
- ENETRESET : constant := 52; -- Disconn. on network reset
- ENETUNREACH : constant := 51; -- Network is unreachable
- ENOBUFS : constant := 55; -- No buffer space available
- ENOPROTOOPT : constant := 42; -- Protocol not available
- ENOTCONN : constant := 57; -- Socket not connected
- ENOTSOCK : constant := 38; -- Operation on non socket
- EOPNOTSUPP : constant := 45; -- Operation not supported
- EPFNOSUPPORT : constant := 46; -- Unknown protocol family
- EPROTONOSUPPORT : constant := 43; -- Unknown protocol
- EPROTOTYPE : constant := 41; -- Unknown protocol type
- ESHUTDOWN : constant := 58; -- Cannot send once shutdown
- ESOCKTNOSUPPORT : constant := 44; -- Socket type not supported
- ETIMEDOUT : constant := 60; -- Connection timed out
- ETOOMANYREFS : constant := 59; -- Too many references
- EWOULDBLOCK : constant := 35; -- Operation would block
-
- -----------------
- -- Host errors --
- -----------------
-
- HOST_NOT_FOUND : constant := 1; -- Unknown host
- TRY_AGAIN : constant := 2; -- Host name lookup failure
- NO_DATA : constant := 4; -- No data record for name
- NO_RECOVERY : constant := 3; -- Non recoverable errors
-
- -------------------
- -- Control flags --
- -------------------
-
- FIONBIO : constant := -2147195266; -- Set/clear non-blocking io
- FIONREAD : constant := 1074030207; -- How many bytes to read
-
- --------------------
- -- Shutdown modes --
- --------------------
-
- SHUT_RD : constant := 0; -- No more recv
- SHUT_WR : constant := 1; -- No more send
- SHUT_RDWR : constant := 2; -- No more recv/send
-
- ---------------------
- -- Protocol levels --
- ---------------------
-
- SOL_SOCKET : constant := 65535; -- Options for socket level
- IPPROTO_IP : constant := 0; -- Dummy protocol for IP
- IPPROTO_UDP : constant := 17; -- UDP
- IPPROTO_TCP : constant := 6; -- TCP
-
- -------------------
- -- Request flags --
- -------------------
-
- MSG_OOB : constant := 1; -- Process out-of-band data
- MSG_PEEK : constant := 2; -- Peek at incoming data
- MSG_EOR : constant := 8; -- Send end of record
- MSG_WAITALL : constant := 128; -- Wait for full reception
- MSG_NOSIGNAL : constant := -1; -- No SIGPIPE on send
- MSG_Forced_Flags : constant := 0;
- -- Flags set on all send(2) calls
-
- --------------------
- -- Socket options --
- --------------------
-
- TCP_NODELAY : constant := 1; -- Do not coalesce packets
- SO_REUSEADDR : constant := 4; -- Bind reuse local address
- SO_REUSEPORT : constant := 512; -- Bind reuse port number
- SO_KEEPALIVE : constant := 8; -- Enable keep-alive msgs
- SO_LINGER : constant := 128; -- Defer close to flush data
- SO_BROADCAST : constant := 32; -- Can send broadcast msgs
- SO_SNDBUF : constant := 4097; -- Set/get send buffer size
- SO_RCVBUF : constant := 4098; -- Set/get recv buffer size
- SO_SNDTIMEO : constant := 4101; -- Emission timeout
- SO_RCVTIMEO : constant := 4102; -- Reception timeout
- SO_ERROR : constant := 4103; -- Get/clear error status
- IP_MULTICAST_IF : constant := 9; -- Set/get mcast interface
- IP_MULTICAST_TTL : constant := 10; -- Set/get multicast TTL
- IP_MULTICAST_LOOP : constant := 11; -- Set/get mcast loopback
- IP_ADD_MEMBERSHIP : constant := 12; -- Join a multicast group
- IP_DROP_MEMBERSHIP : constant := 13; -- Leave a multicast group
- IP_PKTINFO : constant := -1; -- Get datagram info
-
- -------------------
- -- System limits --
- -------------------
-
- IOV_MAX : constant := 1024; -- Maximum writev iovcnt
-
- ----------------------
- -- Type definitions --
- ----------------------
-
- -- Sizes (in bytes) of the components of struct timeval
-
- SIZEOF_tv_sec : constant := 4; -- tv_sec
- SIZEOF_tv_usec : constant := 4; -- tv_usec
-
- -- Sizes of protocol specific address types (for sockaddr.sa_len)
-
- SIZEOF_sockaddr_in : constant := 16; -- struct sockaddr_in
- SIZEOF_sockaddr_in6 : constant := 28; -- struct sockaddr_in6
-
- -- Size of file descriptor sets
-
- SIZEOF_fd_set : constant := 512; -- fd_set
-
- -- Fields of struct hostent
-
- subtype H_Addrtype_T is Interfaces.C.int;
- subtype H_Length_T is Interfaces.C.int;
-
- ----------------------------------------
- -- Properties of supported interfaces --
- ----------------------------------------
-
- Need_Netdb_Buffer : constant := 1; -- Need buffer for Netdb ops
- Has_Sockaddr_Len : constant := 0; -- Sockaddr has sa_len field
-
- Thread_Blocking_IO : constant Boolean := True;
- -- Set False for contexts where socket i/o are process blocking
-
-end GNAT.Sockets.Constants;
diff --git a/gcc/ada/g-soccon-vxworks.ads b/gcc/ada/g-soccon-vxworks.ads
deleted file mode 100644
index 8af174351dc..00000000000
--- a/gcc/ada/g-soccon-vxworks.ads
+++ /dev/null
@@ -1,218 +0,0 @@
-------------------------------------------------------------------------------
--- --
--- GNAT COMPILER COMPONENTS --
--- --
--- G N A T . S O C K E T S . C O N S T A N T S --
--- --
--- S p e c --
--- --
--- Copyright (C) 2000-2008, Free Software Foundation, Inc. --
--- --
--- GNAT is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
--- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
--- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
--- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
--- --
--- As a special exception, if other files instantiate generics from this --
--- unit, or you link this unit with other files to produce an executable, --
--- this unit does not by itself cause the resulting executable to be --
--- covered by the GNU General Public License. This exception does not --
--- however invalidate any other reasons why the executable file might be --
--- covered by the GNU Public License. --
--- --
--- GNAT was originally developed by the GNAT team at New York University. --
--- Extensive contributions were provided by Ada Core Technologies Inc. --
--- --
-------------------------------------------------------------------------------
-
--- This package provides target dependent definitions of constant for use
--- by the GNAT.Sockets package (g-socket.ads). This package should not be
--- directly with'ed by an applications program.
-
--- This is the version for VxWorks
--- This file is generated automatically, do not modify it by hand! Instead,
--- make changes to gen-soccon.c and re-run it on each target.
-
-with Interfaces.C;
-package GNAT.Sockets.Constants is
-
- --------------
- -- Families --
- --------------
-
- AF_INET : constant := 2; -- IPv4 address family
- AF_INET6 : constant := 28; -- IPv6 address family
-
- -----------
- -- Modes --
- -----------
-
- SOCK_STREAM : constant := 1; -- Stream socket
- SOCK_DGRAM : constant := 2; -- Datagram socket
-
- -------------------
- -- Socket errors --
- -------------------
-
- EACCES : constant := 13; -- Permission denied
- EADDRINUSE : constant := 48; -- Address already in use
- EADDRNOTAVAIL : constant := 49; -- Cannot assign address
- EAFNOSUPPORT : constant := 47; -- Addr family not supported
- EALREADY : constant := 69; -- Operation in progress
- EBADF : constant := 9; -- Bad file descriptor
- ECONNABORTED : constant := 53; -- Connection aborted
- ECONNREFUSED : constant := 61; -- Connection refused
- ECONNRESET : constant := 54; -- Connection reset by peer
- EDESTADDRREQ : constant := 40; -- Destination addr required
- EFAULT : constant := 14; -- Bad address
- EHOSTDOWN : constant := 67; -- Host is down
- EHOSTUNREACH : constant := 65; -- No route to host
- EINPROGRESS : constant := 68; -- Operation now in progress
- EINTR : constant := 4; -- Interrupted system call
- EINVAL : constant := 22; -- Invalid argument
- EIO : constant := 5; -- Input output error
- EISCONN : constant := 56; -- Socket already connected
- ELOOP : constant := 64; -- Too many symbolic links
- EMFILE : constant := 24; -- Too many open files
- EMSGSIZE : constant := 36; -- Message too long
- ENAMETOOLONG : constant := 26; -- Name too long
- ENETDOWN : constant := 62; -- Network is down
- ENETRESET : constant := 52; -- Disconn. on network reset
- ENETUNREACH : constant := 51; -- Network is unreachable
- ENOBUFS : constant := 55; -- No buffer space available
- ENOPROTOOPT : constant := 42; -- Protocol not available
- ENOTCONN : constant := 57; -- Socket not connected
- ENOTSOCK : constant := 50; -- Operation on non socket
- EOPNOTSUPP : constant := 45; -- Operation not supported
- EPFNOSUPPORT : constant := 46; -- Unknown protocol family
- EPROTONOSUPPORT : constant := 43; -- Unknown protocol
- EPROTOTYPE : constant := 41; -- Unknown protocol type
- ESHUTDOWN : constant := 58; -- Cannot send once shutdown
- ESOCKTNOSUPPORT : constant := 44; -- Socket type not supported
- ETIMEDOUT : constant := 60; -- Connection timed out
- ETOOMANYREFS : constant := 59; -- Too many references
- EWOULDBLOCK : constant := 70; -- Operation would block
-
- -----------------
- -- Host errors --
- -----------------
-
- HOST_NOT_FOUND : constant := 1; -- Unknown host
- TRY_AGAIN : constant := 2; -- Host name lookup failure
- NO_DATA : constant := 4; -- No data record for name
- NO_RECOVERY : constant := 3; -- Non recoverable errors
-
- -------------------
- -- Control flags --
- -------------------
-
- FIONBIO : constant := 16; -- Set/clear non-blocking io
- FIONREAD : constant := 1; -- How many bytes to read
-
- --------------------
- -- Shutdown modes --
- --------------------
-
- SHUT_RD : constant := 0; -- No more recv
- SHUT_WR : constant := 1; -- No more send
- SHUT_RDWR : constant := 2; -- No more recv/send
-
- ---------------------
- -- Protocol levels --
- ---------------------
-
- SOL_SOCKET : constant := 65535; -- Options for socket level
- IPPROTO_IP : constant := 0; -- Dummy protocol for IP
- IPPROTO_UDP : constant := 17; -- UDP
- IPPROTO_TCP : constant := 6; -- TCP
-
- -------------------
- -- Request flags --
- -------------------
-
- MSG_OOB : constant := 1; -- Process out-of-band data
- MSG_PEEK : constant := 2; -- Peek at incoming data
- MSG_EOR : constant := 8; -- Send end of record
- MSG_WAITALL : constant := 64; -- Wait for full reception
- MSG_NOSIGNAL : constant := -1; -- No SIGPIPE on send
- MSG_Forced_Flags : constant := 0;
- -- Flags set on all send(2) calls
-
- --------------------
- -- Socket options --
- --------------------
-
- TCP_NODELAY : constant := 1; -- Do not coalesce packets
- SO_REUSEADDR : constant := 4; -- Bind reuse local address
- SO_REUSEPORT : constant := 512; -- Bind reuse port number
- SO_KEEPALIVE : constant := 8; -- Enable keep-alive msgs
- SO_LINGER : constant := 128; -- Defer close to flush data
- SO_BROADCAST : constant := 32; -- Can send broadcast msgs
- SO_SNDBUF : constant := 4097; -- Set/get send buffer size
- SO_RCVBUF : constant := 4098; -- Set/get recv buffer size
- SO_SNDTIMEO : constant := 4101; -- Emission timeout
- SO_RCVTIMEO : constant := 4102; -- Reception timeout
- SO_ERROR : constant := 4103; -- Get/clear error status
- IP_MULTICAST_IF : constant := 9; -- Set/get mcast interface
- IP_MULTICAST_TTL : constant := 10; -- Set/get multicast TTL
- IP_MULTICAST_LOOP : constant := 11; -- Set/get mcast loopback
- IP_ADD_MEMBERSHIP : constant := 12; -- Join a multicast group
- IP_DROP_MEMBERSHIP : constant := 13; -- Leave a multicast group
- IP_PKTINFO : constant := -1; -- Get datagram info
-
- -------------------
- -- System limits --
- -------------------
-
- IOV_MAX : constant := 2147483647; -- Maximum writev iovcnt
-
- ----------------------
- -- Type definitions --
- ----------------------
-
- -- Sizes (in bytes) of the components of struct timeval
-
- SIZEOF_tv_sec : constant := 4; -- tv_sec
- SIZEOF_tv_usec : constant := 4; -- tv_usec
-
- -- Sizes of protocol specific address types (for sockaddr.sa_len)
-
- SIZEOF_sockaddr_in : constant := 16; -- struct sockaddr_in
- SIZEOF_sockaddr_in6 : constant := 28; -- struct sockaddr_in6
-
- -- Size of file descriptor sets
-
- SIZEOF_fd_set : constant := 256; -- fd_set
-
- -- Fields of struct hostent
-
- subtype H_Addrtype_T is Interfaces.C.int;
- subtype H_Length_T is Interfaces.C.int;
-
- ----------------------------------------
- -- Properties of supported interfaces --
- ----------------------------------------
-
- Need_Netdb_Buffer : constant := 1; -- Need buffer for Netdb ops
- Has_Sockaddr_Len : constant := 1; -- Sockaddr has sa_len field
-
- Thread_Blocking_IO : constant Boolean := True;
- -- Set False for contexts where socket i/o are process blocking
-
- --------------------------------
- -- VxWorks-specific constants --
- --------------------------------
-
- -- These constants may be used only within the VxWorks version of
- -- GNAT.Sockets.Thin.
-
- OK : constant := 0; -- VxWorks generic success
- ERROR : constant := -1; -- VxWorks generic error
-
-end GNAT.Sockets.Constants;
diff --git a/gcc/ada/g-soccon.ads b/gcc/ada/g-soccon.ads
deleted file mode 100644
index b7f8fe4be77..00000000000
--- a/gcc/ada/g-soccon.ads
+++ /dev/null
@@ -1,215 +0,0 @@
-------------------------------------------------------------------------------
--- --
--- GNAT COMPILER COMPONENTS --
--- --
--- G N A T . S O C K E T S . C O N S T A N T S --
--- --
--- S p e c --
--- --
--- Copyright (C) 2000-2008, Free Software Foundation, Inc. --
--- --
--- GNAT is free software; you can redistribute it and/or modify it under --
--- terms of the GNU General Public License as published by the Free Soft- --
--- ware Foundation; either version 2, or (at your option) any later ver- --
--- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
--- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
--- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
--- for more details. You should have received a copy of the GNU General --
--- Public License distributed with GNAT; see file COPYING. If not, write --
--- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
--- Boston, MA 02110-1301, USA. --
--- --
--- As a special exception, if other files instantiate generics from this --
--- unit, or you link this unit with other files to produce an executable, --
--- this unit does not by itself cause the resulting executable to be --
--- covered by the GNU General Public License. This exception does not --
--- however invalidate any other reasons why the executable file might be --
--- covered by the GNU Public License. --
--- --
--- GNAT was originally developed by the GNAT team at New York University. --
--- Extensive contributions were provided by Ada Core Technologies Inc. --
--- --
-------------------------------------------------------------------------------
-
--- This package provides target dependent definitions of constant for use
--- by the GNAT.Sockets package (g-socket.ads). This package should not be
--- directly with'ed by an applications program.
-
--- WARNING! This file is a default version that must be replaced for
--- each platform by running gen-soccon.c which automatically generates
--- the appropriate target specific values.
-
--- The values below were computed from a i686-pc-linux-gnu environment,
--- but are for illustration purposes only. As noted above, part of a port
--- to a new target is to replace this file appropriately.
-
--- This file is generated automatically, do not modify it by hand! Instead,
--- make changes to gen-soccon.c and re-run it on each target.
-
-with Interfaces.C;
-package GNAT.Sockets.Constants is
-
- --------------
- -- Families --
- --------------
-
- AF_INET : constant := 2; -- IPv4 address family
- AF_INET6 : constant := 10; -- IPv6 address family
-
- -----------
- -- Modes --
- -----------
-
- SOCK_STREAM : constant := 1; -- Stream socket
- SOCK_DGRAM : constant := 2; -- Datagram socket
-
- -------------------
- -- Socket errors --
- -------------------
-
- EACCES : constant := 13; -- Permission denied
- EADDRINUSE : constant := 98; -- Address already in use
- EADDRNOTAVAIL : constant := 99; -- Cannot assign address
- EAFNOSUPPORT : constant := 97; -- Addr family not supported
- EALREADY : constant := 114; -- Operation in progress
- EBADF : constant := 9; -- Bad file descriptor
- ECONNABORTED : constant := 103; -- Connection aborted
- ECONNREFUSED : constant := 111; -- Connection refused
- ECONNRESET : constant := 104; -- Connection reset by peer
- EDESTADDRREQ : constant := 89; -- Destination addr required
- EFAULT : constant := 14; -- Bad address
- EHOSTDOWN : constant := 112; -- Host is down
- EHOSTUNREACH : constant := 113; -- No route to host
- EINPROGRESS : constant := 115; -- Operation now in progress
- EINTR : constant := 4; -- Interrupted system call
- EINVAL : constant := 22; -- Invalid argument
- EIO : constant := 5; -- Input output error
- EISCONN : constant := 106; -- Socket already connected
- ELOOP : constant := 40; -- Too many symbolic links
- EMFILE : constant := 24; -- Too many open files
- EMSGSIZE : constant := 90; -- Message too long
- ENAMETOOLONG : constant := 36; -- Name too long
- ENETDOWN : constant := 100; -- Network is down
- ENETRESET : constant := 102; -- Disconn. on network reset
- ENETUNREACH : constant := 101; -- Network is unreachable
- ENOBUFS : constant := 105; -- No buffer space available
- ENOPROTOOPT : constant := 92; -- Protocol not available
- ENOTCONN : constant := 107; -- Socket not connected
- ENOTSOCK : constant := 88; -- Operation on non socket
- EOPNOTSUPP : constant := 95; -- Operation not supported
- EPFNOSUPPORT : constant := 96; -- Unknown protocol family
- EPROTONOSUPPORT : constant := 93; -- Unknown protocol
- EPROTOTYPE : constant := 91; -- Unknown protocol type
- ESHUTDOWN : constant := 108; -- Cannot send once shutdown
- ESOCKTNOSUPPORT : constant := 94; -- Socket type not supported
- ETIMEDOUT : constant := 110; -- Connection timed out
- ETOOMANYREFS : constant := 109; -- Too many references
- EWOULDBLOCK : constant := 11; -- Operation would block
-
- -----------------
- -- Host errors --
- -----------------
-
- HOST_NOT_FOUND : constant := 1; -- Unknown host
- TRY_AGAIN : constant := 2; -- Host name lookup failure
- NO_DATA : constant := 4; -- No data record for name
- NO_RECOVERY : constant := 3; -- Non recoverable errors
-
- -------------------
- -- Control flags --
- -------------------
-
- FIONBIO : constant := 21537; -- Set/clear non-blocking io
- FIONREAD : constant := 21531; -- How many bytes to read
-
- --------------------
- -- Shutdown modes --
- --------------------
-
- SHUT_RD : constant := 0; -- No more recv
- SHUT_WR : constant := 1; -- No more send
- SHUT_RDWR : constant := 2; -- No more recv/send
-
- ---------------------
- -- Protocol levels --
- ---------------------
-
- SOL_SOCKET : constant := 1; -- Options for socket level
- IPPROTO_IP : constant := 0; -- Dummy protocol for IP
- IPPROTO_UDP : constant := 17; -- UDP
- IPPROTO_TCP : constant := 6; -- TCP
-
- -------------------
- -- Request flags --
- -------------------
-
- MSG_OOB : constant := 1; -- Process out-of-band data
- MSG_PEEK : constant := 2; -- Peek at incoming data
- MSG_EOR : constant := 128; -- Send end of record
- MSG_WAITALL : constant := 256; -- Wait for full reception
- MSG_NOSIGNAL : constant := 16384; -- No SIGPIPE on send
- MSG_Forced_Flags : constant := MSG_NOSIGNAL;
- -- Flags set on all send(2) calls
-
- --------------------
- -- Socket options --
- --------------------
-
- TCP_NODELAY : constant := 1; -- Do not coalesce packets
- SO_REUSEADDR : constant := 2; -- Bind reuse local address
- SO_REUSEPORT : constant := -1; -- Bind reuse port number
- SO_KEEPALIVE : constant := 9; -- Enable keep-alive msgs
- SO_LINGER : constant := 13; -- Defer close to flush data
- SO_BROADCAST : constant := 6; -- Can send broadcast msgs
- SO_SNDBUF : constant := 7; -- Set/get send buffer size
- SO_RCVBUF : constant := 8; -- Set/get recv buffer size
- SO_SNDTIMEO : constant := 21; -- Emission timeout
- SO_RCVTIMEO : constant := 20; -- Reception timeout
- SO_ERROR : constant := 4; -- Get/clear error status
- IP_MULTICAST_IF : constant := 32; -- Set/get mcast interface
- IP_MULTICAST_TTL : constant := 33; -- Set/get multicast TTL
- IP_MULTICAST_LOOP : constant := 34; -- Set/get mcast loopback
- IP_ADD_MEMBERSHIP : constant := 35; -- Join a multicast group
- IP_DROP_MEMBERSHIP : constant := 36; -- Leave a multicast group
- IP_PKTINFO : constant := 8; -- Get datagram info
-
- -------------------
- -- System limits --
- -------------------
-
- IOV_MAX : constant := 2147483647; -- Maximum writev iovcnt
-
- ----------------------
- -- Type definitions --
- ----------------------
-
- -- Sizes (in bytes) of the components of struct timeval
-
- SIZEOF_tv_sec : constant := 4; -- tv_sec
- SIZEOF_tv_usec : constant := 4; -- tv_usec
-
- -- Sizes of protocol specific address types (for sockaddr.sa_len)
-
- SIZEOF_sockaddr_in : constant := 16; -- struct sockaddr_in
- SIZEOF_sockaddr_in6 : constant := 28; -- struct sockaddr_in6
-
- -- Size of file descriptor sets
-
- SIZEOF_fd_set : constant := 128; -- fd_set
-
- -- Fields of struct hostent
-
- subtype H_Addrtype_T is Interfaces.C.int;
- subtype H_Length_T is Interfaces.C.int;
-
- ----------------------------------------
- -- Properties of supported interfaces --
- ----------------------------------------
-
- Need_Netdb_Buffer : constant := 1; -- Need buffer for Netdb ops
- Has_Sockaddr_Len : constant := 0; -- Sockaddr has sa_len field
-
- Thread_Blocking_IO : constant Boolean := True;
- -- Set False for contexts where socket i/o are process blocking
-
-end GNAT.Sockets.Constants;
diff --git a/gcc/ada/g-socket-dummy.adb b/gcc/ada/g-socket-dummy.adb
new file mode 100644
index 00000000000..14f392e71fa
--- /dev/null
+++ b/gcc/ada/g-socket-dummy.adb
@@ -0,0 +1,34 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT COMPILER COMPONENTS --
+-- --
+-- G N A T . S O C K E T S --
+-- --
+-- B o d y --
+-- --
+-- Copyright (C) 2001-2008, AdaCore --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 2, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
+-- for more details. You should have received a copy of the GNU General --
+-- Public License distributed with GNAT; see file COPYING. If not, write --
+-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
+-- Boston, MA 02110-1301, USA. --
+-- --
+-- As a special exception, if other files instantiate generics from this --
+-- unit, or you link this unit with other files to produce an executable, --
+-- this unit does not by itself cause the resulting executable to be --
+-- covered by the GNU General Public License. This exception does not --
+-- however invalidate any other reasons why the executable file might be --
+-- covered by the GNU Public License. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+pragma No_Body;
diff --git a/gcc/ada/g-socket-dummy.ads b/gcc/ada/g-socket-dummy.ads
new file mode 100644
index 00000000000..6536472ce00
--- /dev/null
+++ b/gcc/ada/g-socket-dummy.ads
@@ -0,0 +1,39 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT COMPILER COMPONENTS --
+-- --
+-- G N A T . S O C K E T S --
+-- --
+-- S p e c --
+-- --
+-- Copyright (C) 2001-2008, AdaCore --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 2, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
+-- for more details. You should have received a copy of the GNU General --
+-- Public License distributed with GNAT; see file COPYING. If not, write --
+-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
+-- Boston, MA 02110-1301, USA. --
+-- --
+-- As a special exception, if other files instantiate generics from this --
+-- unit, or you link this unit with other files to produce an executable, --
+-- this unit does not by itself cause the resulting executable to be --
+-- covered by the GNU General Public License. This exception does not --
+-- however invalidate any other reasons why the executable file might be --
+-- covered by the GNU Public License. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+-- This package is a placeholder for the sockets binding for platforms where
+-- it is not implemented.
+
+package GNAT.Sockets is
+ pragma Unimplemented_Unit;
+end GNAT.Sockets;
diff --git a/gcc/ada/g-socket.adb b/gcc/ada/g-socket.adb
index 4b399405a55..e1fc4099308 100644
--- a/gcc/ada/g-socket.adb
+++ b/gcc/ada/g-socket.adb
@@ -37,7 +37,6 @@ with Ada.Unchecked_Conversion;
with Interfaces.C.Strings;
-with GNAT.Sockets.Constants;
with GNAT.Sockets.Thin_Common; use GNAT.Sockets.Thin_Common;
with GNAT.Sockets.Thin; use GNAT.Sockets.Thin;
with GNAT.Sockets.Thin.Task_Safe_NetDB; use GNAT.Sockets.Thin.Task_Safe_NetDB;
diff --git a/gcc/ada/g-socket.ads b/gcc/ada/g-socket.ads
index 58255f0880e..5ec84056423 100644
--- a/gcc/ada/g-socket.ads
+++ b/gcc/ada/g-socket.ads
@@ -52,6 +52,8 @@ with Ada.Exceptions;
with Ada.Streams;
with Ada.Unchecked_Deallocation;
+with System.OS_Constants;
+
package GNAT.Sockets is
-- Sockets are designed to provide a consistent communication facility
@@ -367,6 +369,12 @@ package GNAT.Sockets is
-- Finalize;
-- end PingPong;
+ package Constants renames System.OS_Constants;
+ -- Renaming used to provide short-hand notations thoughout the sockets
+ -- binding. Note that System.OS_Constants is an internal unit, and the
+ -- entities declared therein are not meant for direct access by users,
+ -- including through this renaming.
+
procedure Initialize;
-- Initialize must be called before using any other socket routines.
-- Note that this operation is a no-op on UNIX platforms, but applications
@@ -404,9 +412,12 @@ package GNAT.Sockets is
-- structure. Moreover, negative values are not allowed to avoid system
-- incompatibilities.
- Immediate : constant := 0.0;
- Forever : constant := Duration (Integer'Last) * 1.0;
- -- Should be Duration 2 ** (Constants.SIZEOF_tv_sec * 8 - 1) - 1 ???
+ Immediate : constant Duration := 0.0;
+
+ Timeval_Forever : constant :=
+ 2.0 ** (Constants.SIZEOF_tv_sec * 8 - 1) - 1.0;
+ Forever : constant Duration :=
+ Duration'Min (Duration'Last, Timeval_Forever);
subtype Timeval_Duration is Duration range Immediate .. Forever;
diff --git a/gcc/ada/g-socthi-dummy.adb b/gcc/ada/g-socthi-dummy.adb
new file mode 100644
index 00000000000..5d366655b70
--- /dev/null
+++ b/gcc/ada/g-socthi-dummy.adb
@@ -0,0 +1,34 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT COMPILER COMPONENTS --
+-- --
+-- G N A T . S O C K E T S . T H I N --
+-- --
+-- B o d y --
+-- --
+-- Copyright (C) 2001-2008, AdaCore --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 2, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
+-- for more details. You should have received a copy of the GNU General --
+-- Public License distributed with GNAT; see file COPYING. If not, write --
+-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
+-- Boston, MA 02110-1301, USA. --
+-- --
+-- As a special exception, if other files instantiate generics from this --
+-- unit, or you link this unit with other files to produce an executable, --
+-- this unit does not by itself cause the resulting executable to be --
+-- covered by the GNU General Public License. This exception does not --
+-- however invalidate any other reasons why the executable file might be --
+-- covered by the GNU Public License. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+pragma No_Body;
diff --git a/gcc/ada/g-socthi-dummy.ads b/gcc/ada/g-socthi-dummy.ads
new file mode 100644
index 00000000000..ba87024de18
--- /dev/null
+++ b/gcc/ada/g-socthi-dummy.ads
@@ -0,0 +1,39 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT COMPILER COMPONENTS --
+-- --
+-- G N A T . S O C K E T S . T H I N --
+-- --
+-- S p e c --
+-- --
+-- Copyright (C) 2001-2008, AdaCore --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 2, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
+-- for more details. You should have received a copy of the GNU General --
+-- Public License distributed with GNAT; see file COPYING. If not, write --
+-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
+-- Boston, MA 02110-1301, USA. --
+-- --
+-- As a special exception, if other files instantiate generics from this --
+-- unit, or you link this unit with other files to produce an executable, --
+-- this unit does not by itself cause the resulting executable to be --
+-- covered by the GNU General Public License. This exception does not --
+-- however invalidate any other reasons why the executable file might be --
+-- covered by the GNU Public License. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+-- This package is a placeholder for the sockets binding for platforms where
+-- it is not implemented.
+
+package GNAT.Sockets.Thin is
+ pragma Unimplemented_Unit;
+end GNAT.Sockets.Thin;
diff --git a/gcc/ada/g-socthi-mingw.adb b/gcc/ada/g-socthi-mingw.adb
index ad99f9be4da..3e13641d34f 100644
--- a/gcc/ada/g-socthi-mingw.adb
+++ b/gcc/ada/g-socthi-mingw.adb
@@ -39,7 +39,6 @@
with Interfaces.C.Strings; use Interfaces.C.Strings;
with System; use System;
-with GNAT.Sockets.Constants;
package body GNAT.Sockets.Thin is
diff --git a/gcc/ada/g-socthi-vms.adb b/gcc/ada/g-socthi-vms.adb
index f71bb2387de..b94e0d0f4be 100644
--- a/gcc/ada/g-socthi-vms.adb
+++ b/gcc/ada/g-socthi-vms.adb
@@ -34,7 +34,6 @@
-- Temporary version for Alpha/VMS
with GNAT.OS_Lib; use GNAT.OS_Lib;
-with GNAT.Sockets.Constants;
with GNAT.Task_Lock;
with Interfaces.C; use Interfaces.C;
diff --git a/gcc/ada/g-socthi-vxworks.adb b/gcc/ada/g-socthi-vxworks.adb
index 0077e2777f5..1872b8b560f 100644
--- a/gcc/ada/g-socthi-vxworks.adb
+++ b/gcc/ada/g-socthi-vxworks.adb
@@ -38,7 +38,6 @@
-- This version is for VxWorks
with GNAT.OS_Lib; use GNAT.OS_Lib;
-with GNAT.Sockets.Constants;
with GNAT.Task_Lock;
with Interfaces.C; use Interfaces.C;
diff --git a/gcc/ada/g-socthi.adb b/gcc/ada/g-socthi.adb
index 19642aa893d..cc90c640a04 100644
--- a/gcc/ada/g-socthi.adb
+++ b/gcc/ada/g-socthi.adb
@@ -38,7 +38,6 @@
-- This is the default version
with GNAT.OS_Lib; use GNAT.OS_Lib;
-with GNAT.Sockets.Constants;
with GNAT.Task_Lock;
with Interfaces.C; use Interfaces.C;
diff --git a/gcc/ada/g-sothco-dummy.adb b/gcc/ada/g-sothco-dummy.adb
new file mode 100644
index 00000000000..c4b8e0bbd71
--- /dev/null
+++ b/gcc/ada/g-sothco-dummy.adb
@@ -0,0 +1,34 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT COMPILER COMPONENTS --
+-- --
+-- G N A T . S O C K E T S . T H I N _ C O M M O N --
+-- --
+-- B o d y --
+-- --
+-- Copyright (C) 2008, AdaCore --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 2, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
+-- for more details. You should have received a copy of the GNU General --
+-- Public License distributed with GNAT; see file COPYING. If not, write --
+-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
+-- Boston, MA 02110-1301, USA. --
+-- --
+-- As a special exception, if other files instantiate generics from this --
+-- unit, or you link this unit with other files to produce an executable, --
+-- this unit does not by itself cause the resulting executable to be --
+-- covered by the GNU General Public License. This exception does not --
+-- however invalidate any other reasons why the executable file might be --
+-- covered by the GNU Public License. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+pragma No_Body;
diff --git a/gcc/ada/g-sothco-dummy.ads b/gcc/ada/g-sothco-dummy.ads
new file mode 100644
index 00000000000..9970e9ee81c
--- /dev/null
+++ b/gcc/ada/g-sothco-dummy.ads
@@ -0,0 +1,39 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT COMPILER COMPONENTS --
+-- --
+-- G N A T . S O C K E T S . T H I N _ C O M M O N --
+-- --
+-- S p e c --
+-- --
+-- Copyright (C) 2008, AdaCore --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 2, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
+-- for more details. You should have received a copy of the GNU General --
+-- Public License distributed with GNAT; see file COPYING. If not, write --
+-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
+-- Boston, MA 02110-1301, USA. --
+-- --
+-- As a special exception, if other files instantiate generics from this --
+-- unit, or you link this unit with other files to produce an executable, --
+-- this unit does not by itself cause the resulting executable to be --
+-- covered by the GNU General Public License. This exception does not --
+-- however invalidate any other reasons why the executable file might be --
+-- covered by the GNU Public License. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+-- This package is a placeholder for the sockets binding for platforms where
+-- it is not implemented.
+
+package GNAT.Sockets.Thin_Common is
+ pragma Unimplemented_Unit;
+end GNAT.Sockets.Thin_Common;
diff --git a/gcc/ada/g-sothco.ads b/gcc/ada/g-sothco.ads
index fee37615fb4..5780c035414 100644
--- a/gcc/ada/g-sothco.ads
+++ b/gcc/ada/g-sothco.ads
@@ -40,8 +40,6 @@ with Interfaces.C;
with Interfaces.C.Pointers;
with Interfaces.C.Strings;
-with GNAT.Sockets.Constants;
-
package GNAT.Sockets.Thin_Common is
package C renames Interfaces.C;
diff --git a/gcc/ada/g-sttsne-dummy.ads b/gcc/ada/g-sttsne-dummy.ads
new file mode 100644
index 00000000000..789e61c367f
--- /dev/null
+++ b/gcc/ada/g-sttsne-dummy.ads
@@ -0,0 +1,39 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT COMPILER COMPONENTS --
+-- --
+-- G N A T . S O C K E T S . T H I N . T A S K _ S A F E _ N E T D B --
+-- --
+-- S p e c --
+-- --
+-- Copyright (C) 2007, AdaCore --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 2, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
+-- for more details. You should have received a copy of the GNU General --
+-- Public License distributed with GNAT; see file COPYING. If not, write --
+-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
+-- Boston, MA 02110-1301, USA. --
+-- --
+-- As a special exception, if other files instantiate generics from this --
+-- unit, or you link this unit with other files to produce an executable, --
+-- this unit does not by itself cause the resulting executable to be --
+-- covered by the GNU General Public License. This exception does not --
+-- however invalidate any other reasons why the executable file might be --
+-- covered by the GNU Public License. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- Extensive contributions were provided by Ada Core Technologies Inc. --
+-- --
+------------------------------------------------------------------------------
+
+-- This package is a placeholder for the sockets binding for platforms where
+-- it is not implemented.
+
+package GNAT.Sockets.Thin.Task_Safe_NetDB is
+ pragma Unimplemented_Unit;
+end GNAT.Sockets.Thin.Task_Safe_NetDB;
diff --git a/gcc/ada/g-sttsne-vxworks.adb b/gcc/ada/g-sttsne-vxworks.adb
index 7f14255e47d..161029d51be 100644
--- a/gcc/ada/g-sttsne-vxworks.adb
+++ b/gcc/ada/g-sttsne-vxworks.adb
@@ -36,7 +36,6 @@
with Ada.Unchecked_Conversion;
with Interfaces.C; use Interfaces.C;
-with GNAT.Sockets.Constants;
package body GNAT.Sockets.Thin.Task_Safe_NetDB is
diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in
index a0af9a4e015..9af841d2915 100644
--- a/gcc/ada/gcc-interface/Make-lang.in
+++ b/gcc/ada/gcc-interface/Make-lang.in
@@ -309,17 +309,6 @@ gnatbind$(exeext): ada/b_gnatb.o $(CONFIG_H) $(GNATBIND_OBJS)
gnat-cross: force
make $(GNAT1_ADA_OBJS) CC="gcc -B../stage1/" CFLAGS="-S -gnatp" \
$(FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) HOST_CFLAGS= HOST_CC=cc
-
-gen-soccon: force
- $(MAKE) -C ada $(FLAGS_TO_PASS) \
- GNATLIBFLAGS="$(GNATLIBFLAGS)" \
- GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
- TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
- THREAD_KIND="$(THREAD_KIND)" \
- TRACE="$(TRACE)" \
- LIBGNAT_OBJS=gen-soccon \
- gnatlib
-
# Build hooks:
@@ -934,8 +923,6 @@ ada/nmake.ads : ada/sinfo.ads ada/nmake.adt ada/xnmake.adb ada/nmake.adb ada/xu
$(CP) $^ ada/bldtools/nmake_s
(cd ada/bldtools/nmake_s && $(GNATMAKE) -q xnmake && ./xnmake -s ../../nmake.ads )
-OSCONS_CPPFLAGS=-DTHREAD_KIND_$(THREAD_KIND) s-oscons-tmplt.c
-
ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(subst -, ,$(host)))),)
OSCONS_CPP=../../../$(DECC) -E /comment=as_is -DNATIVE \
-DTARGET='""$(target)""' s-oscons-tmplt.c
@@ -946,22 +933,22 @@ OSCONS_EXTRACT=../../../$(DECC) -DNATIVE \
./s-oscons-tmplt.exe > s-oscons-tmplt.s
else
-OSCONS_CPP=../../../xgcc -B../../../ -E -C \
+OSCONS_CPP=$(GCC_FOR_TARGET) -E -C \
-DTARGET=\"$(target)\" s-oscons-tmplt.c > s-oscons-tmplt.i
-OSCONS_EXTRACT=../../../xgcc -S -B../../../ s-oscons-tmplt.i
+OSCONS_EXTRACT=$(GCC_FOR_TARGET) -S s-oscons-tmplt.i
endif
-ada/s-oscons.ads : ada/s-oscons-tmplt.c ada/gsocket.h ada/xoscons.adb ada/xutil.ads ada/xutil.adb
+ada/s-oscons-$(THREAD_KIND).ads : ada/s-oscons-tmplt.c ada/gsocket.h ada/xoscons.adb ada/xutil.ads ada/xutil.adb
-$(MKDIR) ada/bldtools/oscons
$(RM) $(addprefix ada/bldtools/oscons/,$(notdir $^))
$(CP) $^ ada/bldtools/oscons
- (cd ada/bldtools/oscons; gnatmake -q xoscons ; \
+ (cd ada/bldtools/oscons ; gnatmake -q xoscons ; \
$(RM) s-oscons-tmplt.i s-oscons-tmplt.s ; \
$(OSCONS_CPP) ; \
$(OSCONS_EXTRACT) ; \
./xoscons ; \
- $(RM) ../../s-oscons.ads ; \
- $(CP) s-oscons.ads ../../s-oscons.ads)
+ $(RM) ../../s-oscons-$(THREAD_KIND).ads ; \
+ $(CP) s-oscons.ads ../../s-oscons-$(THREAD_KIND).ads)
update-sources : ada/treeprs.ads ada/einfo.h ada/sinfo.h ada/nmake.adb \
ada/nmake.ads
diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index b40c4746c3a..49a32cc9171 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -364,6 +364,22 @@ PREFIX_REAL_OBJS = ../prefix.o \
../../libiberty/xstrdup.o \
../../libiberty/xexit.o
+# By default, build socket support units. On platforms that do not support
+# sockets, reset this variable to empty and add DUMMY_SOCKETS_TARGET_PAIRS
+# to LIBGNAT_TARGET_PAIRS.
+
+GNATRTL_SOCKETS_OBJS = g-socket$(objext) g-socthi$(objext) \
+ g-soliop$(objext) g-sothco$(objext) g-sttsne$(objext)
+
+DUMMY_SOCKETS_TARGET_PAIRS = \
+ g-socket.adb<g-socket-dummy.adb \
+ g-socket.ads<g-socket-dummy.ads \
+ g-socthi.adb<g-socthi-dummy.adb \
+ g-socthi.ads<g-socthi-dummy.ads \
+ g-sothco.adb<g-sothco-dummy.adb \
+ g-sothco.ads<g-sothco-dummy.ads \
+ g-sttsne.ads<g-sttsne-dummy.ads
+
LIB_VERSION = $(strip $(shell grep ' Library_Version :' $(fsrcpfx)gnatvsn.ads | sed -e 's/.*"\(.*\)".*/\1/'))
# $(filter-out PATTERN...,TEXT) removes all PATTERN words from TEXT.
@@ -389,7 +405,6 @@ ifeq ($(strip $(filter-out m68k% wrs vx%,$(targ))),)
s-taspri.ads<s-taspri-vxworks.ads \
s-tpopsp.adb<s-tpopsp-vxworks.adb \
s-vxwork.ads<s-vxwork-m68k.ads \
- g-soccon.ads<g-soccon-vxworks.ads \
g-socthi.ads<g-socthi-vxworks.ads \
g-socthi.adb<g-socthi-vxworks.adb \
g-stsifd.adb<g-stsifd-sockets.adb \
@@ -430,7 +445,6 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworks,$(targ))),)
s-taprop.adb<s-taprop-vxworks.adb \
s-taspri.ads<s-taspri-vxworks.ads \
s-vxwork.ads<s-vxwork-ppc.ads \
- g-soccon.ads<g-soccon-vxworks.ads \
g-socthi.ads<g-socthi-vxworks.ads \
g-socthi.adb<g-socthi-vxworks.adb \
g-stsifd.adb<g-stsifd-sockets.adb \
@@ -503,7 +517,6 @@ ifeq ($(strip $(filter-out powerpc% wrs vxworksae,$(targ))),)
s-taspri.ads<s-taspri-vxworks.ads \
s-tpopsp.adb<s-tpopsp-vxworks.adb \
s-vxwork.ads<s-vxwork-ppc.ads \
- g-soccon.ads<g-soccon-vxworks.ads \
g-socthi.ads<g-socthi-vxworks.ads \
g-socthi.adb<g-socthi-vxworks.adb \
g-stsifd.adb<g-stsifd-sockets.adb \
@@ -552,7 +565,6 @@ ifeq ($(strip $(filter-out sparc% wrs vx%,$(targ))),)
s-taspri.ads<s-taspri-vxworks.ads \
s-tpopsp.adb<s-tpopsp-vxworks.adb \
s-vxwork.ads<s-vxwork-sparcv9.ads \
- g-soccon.ads<g-soccon-vxworks.ads \
g-socthi.ads<g-socthi-vxworks.ads \
g-socthi.adb<g-socthi-vxworks.adb \
g-stsifd.adb<g-stsifd-sockets.adb \
@@ -587,7 +599,6 @@ ifeq ($(strip $(filter-out %86 wrs vxworks,$(targ))),)
s-taspri.ads<s-taspri-vxworks.ads \
s-vxwork.ads<s-vxwork-x86.ads \
g-bytswa.adb<g-bytswa-x86.adb \
- g-soccon.ads<g-soccon-vxworks.ads \
g-socthi.ads<g-socthi-vxworks.ads \
g-socthi.adb<g-socthi-vxworks.adb \
g-stsifd.adb<g-stsifd-sockets.adb \
@@ -657,7 +668,6 @@ ifeq ($(strip $(filter-out arm% coff wrs vx%,$(targ))),)
s-taspri.ads<s-taspri-vxworks.ads \
s-tpopsp.adb<s-tpopsp-vxworks.adb \
s-vxwork.ads<s-vxwork-arm.ads \
- g-soccon.ads<g-soccon-vxworks.ads \
g-socthi.ads<g-socthi-vxworks.ads \
g-socthi.adb<g-socthi-vxworks.adb \
g-stsifd.adb<g-stsifd-sockets.adb \
@@ -693,7 +703,6 @@ ifeq ($(strip $(filter-out mips% wrs vx%,$(targ))),)
s-taspri.ads<s-taspri-vxworks.ads \
s-tpopsp.adb<s-tpopsp-vxworks.adb \
s-vxwork.ads<s-vxwork-mips.ads \
- g-soccon.ads<g-soccon-vxworks.ads \
g-socthi.ads<g-socthi-vxworks.ads \
g-socthi.adb<g-socthi-vxworks.adb \
g-stsifd.adb<g-stsifd-sockets.adb \
@@ -723,7 +732,6 @@ ifeq ($(strip $(filter-out sparc% sun solaris%,$(targ))),)
s-tasinf.ads<s-tasinf-solaris.ads \
s-taspri.ads<s-taspri-solaris.ads \
s-tpopsp.adb<s-tpopsp-solaris.adb \
- g-soccon.ads<g-soccon-solaris.ads \
g-soliop.ads<g-soliop-solaris.ads \
system.ads<system-solaris-sparc.ads
@@ -739,7 +747,6 @@ ifeq ($(strip $(filter-out sparc% sun solaris%,$(targ))),)
s-tasinf.ads<s-tasinf-solaris.ads \
s-taspri.ads<s-taspri-solaris.ads \
s-tpopsp.adb<s-tpopsp-solaris.adb \
- g-soccon.ads<g-soccon-solaris-64.ads \
g-soliop.ads<g-soliop-solaris.ads \
system.ads<system-solaris-sparcv9.ads
@@ -771,7 +778,6 @@ ifeq ($(strip $(filter-out sparc% sun solaris%,$(targ))),)
s-taprop.adb<s-taprop-posix.adb \
s-taspri.ads<s-taspri-posix.ads \
s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
- g-soccon.ads<g-soccon-solaris.ads \
g-soliop.ads<g-soliop-solaris.ads \
system.ads<system-solaris-sparc.ads
@@ -799,7 +805,6 @@ ifeq ($(strip $(filter-out %86 solaris2%,$(arch) $(osys))),)
s-taspri.ads<s-taspri-solaris.ads \
s-tpopsp.adb<s-tpopsp-solaris.adb \
g-bytswa.adb<g-bytswa-x86.adb \
- g-soccon.ads<g-soccon-solaris.ads \
g-soliop.ads<g-soliop-solaris.ads \
system.ads<system-solaris-x86.ads
@@ -837,7 +842,6 @@ ifeq ($(strip $(filter-out %86 linux%,$(arch) $(osys))),)
a-extiti.ads<a-extiti-linux-marte.ads \
a-rttiev.adb<a-rttiev-linux-marte.adb \
a-rttiev.ads<a-rttiev-linux-marte.ads \
- g-soccon.ads<g-soccon-linux-x86-marte.ads \
s-osinte.adb<s-osinte-linux-marte.adb \
s-osinte.ads<s-osinte-linux-marte.ads \
s-taprop.adb<s-taprop-linux-marte.adb
@@ -848,7 +852,6 @@ ifeq ($(strip $(filter-out %86 linux%,$(arch) $(osys))),)
THREADSLIB = -lmarte
else
LIBGNAT_TARGET_PAIRS += \
- g-soccon.ads<g-soccon-linux-x86.ads \
s-linux.ads<s-linux.ads \
s-osinte.adb<s-osinte-posix.adb
@@ -889,7 +892,6 @@ ifeq ($(strip $(filter-out %86 kfreebsd%,$(arch) $(osys))),)
a-numaux.ads<a-numaux-x86.ads \
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
- g-soccon.ads<g-soccon-freebsd.ads \
s-osinte.adb<s-osinte-posix.adb \
s-osinte.ads<s-osinte-kfreebsd-gnu.ads \
s-osprim.adb<s-osprim-posix.adb \
@@ -918,7 +920,6 @@ ifeq ($(strip $(filter-out %86 freebsd%,$(arch) $(osys))),)
a-numaux.adb<a-numaux-x86.adb \
a-numaux.ads<a-numaux-x86.ads \
g-bytswa.adb<g-bytswa-x86.adb \
- g-soccon.ads<g-soccon-freebsd.ads \
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-osinte.adb<s-osinte-freebsd.adb \
@@ -1001,7 +1002,6 @@ ifeq ($(strip $(filter-out mips sgi irix%,$(targ))),)
s-taspri.ads<s-taspri-posix.ads \
s-tpopsp.adb<s-tpopsp-posix.adb \
s-traceb.adb<s-traceb-mastop.adb \
- g-soccon.ads<g-soccon-irix.ads \
system.ads<system-irix-n32.ads
THREADSLIB = -lpthread
@@ -1012,7 +1012,6 @@ ifeq ($(strip $(filter-out mips sgi irix%,$(targ))),)
s-mastop.adb<s-mastop-irix.adb \
s-osprim.adb<s-osprim-posix.adb \
s-traceb.adb<s-traceb-mastop.adb \
- g-soccon.ads<g-soccon-irix.ads \
system.ads<system-irix-o32.ads
endif
@@ -1039,7 +1038,6 @@ ifeq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),)
s-taprop.adb<s-taprop-hpux-dce.adb \
s-taspri.ads<s-taspri-hpux-dce.ads \
s-tpopsp.adb<s-tpopsp-posix.adb \
- g-soccon.ads<g-soccon-hpux.ads \
system.ads<system-hpux.ads
EH_MECHANISM=-gcc
@@ -1059,7 +1057,6 @@ ifeq ($(strip $(filter-out hppa% hp hpux11%,$(targ))),)
s-taprop.adb<s-taprop-posix.adb \
s-taspri.ads<s-taspri-posix.ads \
s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
- g-soccon.ads<g-soccon-hpux.ads \
system.ads<system-hpux.ads
TOOLS_TARGET_PAIRS = mlib-tgt-specific.adb<mlib-tgt-specific-hpux.adb
@@ -1085,7 +1082,6 @@ ifeq ($(strip $(filter-out ibm aix%,$(manu) $(osys))),)
s-taprop.adb<s-taprop-posix.adb \
s-taspri.ads<s-taspri-posix.ads \
s-tpopsp.adb<s-tpopsp-posix.adb \
- g-soccon.ads<g-soccon-aix.ads \
system.ads<system-aix.ads
THREADSLIB = -lpthreads
@@ -1109,7 +1105,6 @@ ifeq ($(strip $(filter-out lynxos,$(osys))),)
a-numaux.ads<a-numaux-x86.ads \
a-intnam.ads<a-intnam-lynxos.ads \
g-bytswa.adb<g-bytswa-x86.adb \
- g-soccon.ads<g-soccon-lynxos.ads \
g-sttsne.adb<g-sttsne-locking.adb \
g-sttsne.ads<g-sttsne-locking.ads \
s-inmaop.adb<s-inmaop-posix.adb \
@@ -1127,7 +1122,6 @@ ifeq ($(strip $(filter-out lynxos,$(osys))),)
else
LIBGNAT_TARGET_PAIRS = \
a-intnam.ads<a-intnam-lynxos.ads \
- g-soccon.ads<g-soccon-lynxos.ads \
g-sttsne.adb<g-sttsne-locking.adb \
g-sttsne.ads<g-sttsne-locking.ads \
s-inmaop.adb<s-inmaop-posix.adb \
@@ -1155,7 +1149,6 @@ ifeq ($(strip $(filter-out rtems%,$(osys))),)
s-taprop.adb<s-taprop-posix.adb \
s-taspri.ads<s-taspri-posix.ads \
s-tpopsp.adb<s-tpopsp-rtems.adb \
- g-soccon.ads<g-soccon-rtems.ads \
s-stchop.adb<s-stchop-rtems.adb
endif
@@ -1173,7 +1166,6 @@ ifeq ($(strip $(filter-out alpha% dec osf%,$(targ))),)
s-taspri.ads<s-taspri-tru64.ads \
s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
s-traceb.adb<s-traceb-mastop.adb \
- g-soccon.ads<g-soccon-tru64.ads \
system.ads<system-tru64.ads
TOOLS_TARGET_PAIRS=mlib-tgt-specific.adb<mlib-tgt-specific-tru64.adb
@@ -1244,7 +1236,6 @@ endif
a-intnam.ads<a-intnam-vms.ads \
a-numaux.ads<a-numaux-vms.ads \
g-expect.adb<g-expect-vms.adb \
- g-soccon.ads<g-soccon-vms.ads \
g-socthi.ads<g-socthi-vms.ads \
g-socthi.adb<g-socthi-vms.adb \
g-stsifd.adb<g-stsifd-sockets.adb \
@@ -1333,7 +1324,6 @@ ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
ifeq ($(strip $(filter-out rtx_w32 rtx_rtss,$(THREAD_KIND))),)
LIBGNAT_TARGET_PAIRS += \
- g-soccon.ads<g-soccon-mingw.ads \
s-intman.adb<s-intman-dummy.adb \
s-osinte.ads<s-osinte-rtx.ads \
s-osprim.adb<s-osprim-rtx.adb \
@@ -1367,11 +1357,9 @@ ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
ifeq ($(strip $(filter-out x86_64%,$(arch))),)
LIBGNAT_TARGET_PAIRS += \
- g-soccon.ads<g-soccon-mingw-64.ads \
system.ads<system-mingw-x86_64.ads
else
LIBGNAT_TARGET_PAIRS += \
- g-soccon.ads<g-soccon-mingw.ads \
system.ads<system-mingw.ads
endif
@@ -1402,7 +1390,6 @@ endif
ifeq ($(strip $(filter-out mips linux%,$(arch) $(osys))),)
LIBGNAT_TARGET_PAIRS = \
a-intnam.ads<a-intnam-linux.ads \
- g-soccon.ads<g-soccon-linux-mips.ads \
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-linux.ads<s-linux.ads \
@@ -1427,7 +1414,6 @@ endif
ifeq ($(strip $(filter-out mipsel linux%,$(arch) $(osys))),)
LIBGNAT_TARGET_PAIRS = \
a-intnam.ads<a-intnam-linux.ads \
- g-soccon.ads<g-soccon-linux-mips.ads \
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-linux.ads<s-linux.ads \
@@ -1452,7 +1438,6 @@ endif
ifeq ($(strip $(filter-out powerpc% linux%,$(arch) $(osys))),)
LIBGNAT_TARGET_PAIRS = \
a-intnam.ads<a-intnam-linux.ads \
- g-soccon.ads<g-soccon-linux-ppc.ads \
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-linux.ads<s-linux.ads \
@@ -1572,7 +1557,6 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(arch) $(osys))),)
LIBGNAT_TARGET_PAIRS = \
a-intnam.ads<a-intnam-linux.ads \
a-numaux.ads<a-numaux-libc-x86.ads \
- g-soccon.ads<g-soccon-linux-64.ads \
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-linux.ads<s-linux.ads \
@@ -1635,7 +1619,6 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
a-intnam.ads<a-intnam-linux.ads \
a-numaux.adb<a-numaux-x86.adb \
a-numaux.ads<a-numaux-x86.ads \
- g-soccon.ads<g-soccon-linux-64.ads \
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-linux.ads<s-linux.ads \
@@ -1675,7 +1658,6 @@ ifeq ($(strip $(filter-out darwin%,$(osys))),)
s-taprop.adb<s-taprop-posix.adb \
s-taspri.ads<s-taspri-posix.ads \
s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
- g-soccon.ads<g-soccon-darwin.ads \
a-numaux.ads<a-numaux-x86.ads \
a-numaux.adb<a-numaux-x86.adb \
system.ads<system-darwin-x86.ads
@@ -1690,7 +1672,6 @@ ifeq ($(strip $(filter-out darwin%,$(osys))),)
s-taprop.adb<s-taprop-posix.adb \
s-taspri.ads<s-taspri-posix.ads \
s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
- g-soccon.ads<g-soccon-darwin.ads \
a-numaux.ads<a-numaux-darwin.ads \
a-numaux.adb<a-numaux-darwin.adb \
system.ads<system-darwin-ppc.ads
@@ -1950,7 +1931,7 @@ install-gnatlib: ../stamp-gnatlib-$(RTSDIR)
$(RTSDIR)/$(word 1,$(subst <, ,$(PAIR)));)
# Copy generated target dependent sources
$(RM) $(RTSDIR)/s-oscons.ads
- (cd $(RTSDIR); $(LN_S) ../s-oscons.ads s-oscons.ads)
+ (cd $(RTSDIR); $(LN_S) ../s-oscons-$(THREAD_KIND).ads s-oscons.ads)
$(RM) ../stamp-gnatlib-$(RTSDIR)
touch ../stamp-gnatlib1-$(RTSDIR)
@@ -2270,11 +2251,6 @@ raise-gcc.o : raise-gcc.c raise.h
raise.o : raise.c raise.h
vx_stack_info.o : vx_stack_info.c
-gen-soccon: gen-soccon.c gsocket.h
- $(CC) $(ALL_CFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
- -UIN_GCC -DTARGET=\"$(target_alias)\" \
- $< $(OUTPUT_OPTION)
-
cio.o : cio.c
$(CC) -c $(ALL_CFLAGS) $(ADA_CFLAGS) \
$(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index c9e90457803..a136f96bcc8 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -4842,7 +4842,13 @@ gnat_to_gnu_param (Entity_Id gnat_param, Mechanism_Type mech,
= TREE_TYPE (TREE_TYPE (TYPE_FIELDS (TREE_TYPE (gnu_param_type))));
/* VMS descriptors are themselves passed by reference. */
- if (mech == By_Descriptor)
+ if (mech == By_Short_Descriptor ||
+ (mech == By_Descriptor && TARGET_ABI_OPEN_VMS && !TARGET_MALLOC64))
+ gnu_param_type
+ = build_pointer_type (build_vms_descriptor32 (gnu_param_type,
+ Mechanism (gnat_param),
+ gnat_subprog));
+ else if (mech == By_Descriptor)
{
/* Build both a 32-bit and 64-bit descriptor, one of which will be
chosen in fill_vms_descriptor. */
@@ -4855,11 +4861,6 @@ gnat_to_gnu_param (Entity_Id gnat_param, Mechanism_Type mech,
Mechanism (gnat_param),
gnat_subprog));
}
- else if (mech == By_Short_Descriptor)
- gnu_param_type
- = build_pointer_type (build_vms_descriptor32 (gnu_param_type,
- Mechanism (gnat_param),
- gnat_subprog));
/* Arrays are passed as pointers to element type for foreign conventions. */
else if (foreign
diff --git a/gcc/ada/gcc-interface/gigi.h b/gcc/ada/gcc-interface/gigi.h
index 1b3fa24137c..e1c2fe923c9 100644
--- a/gcc/ada/gcc-interface/gigi.h
+++ b/gcc/ada/gcc-interface/gigi.h
@@ -913,3 +913,17 @@ extern Nat get_words_be (void);
extern Nat get_bytes_be (void);
extern Nat get_bits_be (void);
extern Nat get_strict_alignment (void);
+
+/* Let code know whether we are targetting VMS without need of
+ intrusive preprocessor directives. */
+#ifndef TARGET_ABI_OPEN_VMS
+#define TARGET_ABI_OPEN_VMS 0
+#endif
+
+/* VMS macro set by default, when clear forces 32bit mallocs and 32bit
+ Descriptors. Always used in combination with TARGET_ABI_OPEN_VMS
+ so no effect on non-VMS systems. */
+#ifndef TARGET_MALLOC64
+#define TARGET_MALLOC64 0
+#endif
+
diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c
index 89fb5f0f419..0462426251f 100644
--- a/gcc/ada/gcc-interface/utils2.c
+++ b/gcc/ada/gcc-interface/utils2.c
@@ -45,6 +45,7 @@
#include "einfo.h"
#include "ada-tree.h"
#include "gigi.h"
+#include "snames.h"
static tree find_common_type (tree, tree);
static bool contains_save_expr_p (tree);
@@ -1950,7 +1951,11 @@ build_call_alloc_dealloc (tree gnu_obj, tree gnu_size, unsigned align,
/* If the allocator size is 32bits but the pointer size is 64bits then
allocate 32bit memory (sometimes necessary on 64bit VMS). Otherwise
default to standard malloc. */
- if (UI_To_Int (Esize (Etype (gnat_node))) == 32 && POINTER_SIZE == 64)
+ if (TARGET_ABI_OPEN_VMS &&
+ (!TARGET_MALLOC64 ||
+ (POINTER_SIZE == 64
+ && (UI_To_Int (Esize (Etype (gnat_node))) == 32
+ || Convention (Etype (gnat_node)) == Convention_C))))
return build_call_1_expr (malloc32_decl, gnu_size);
else
return build_call_1_expr (malloc_decl, gnu_size);
diff --git a/gcc/ada/gen-oscons.c b/gcc/ada/gen-oscons.c
deleted file mode 100644
index 594964b7f9a..00000000000
--- a/gcc/ada/gen-oscons.c
+++ /dev/null
@@ -1,1129 +0,0 @@
-/****************************************************************************
- * *
- * GNAT SYSTEM UTILITIES *
- * *
- * G E N - O S C O N *
- * *
- * Copyright (C) 2004-2008, Free Software Foundation, Inc. *
- * *
- * GNAT is free software; you can redistribute it and/or modify it under *
- * terms of the GNU General Public License as published by the Free Soft- *
- * ware Foundation; either version 2, or (at your option) any later ver- *
- * sion. GNAT is distributed in the hope that it will be useful, but WITH- *
- * OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
- * for more details. You should have received a copy of the GNU General *
- * Public License distributed with GNAT; see file COPYING. If not, write *
- * to the Free Software Foundation, 51 Franklin Street, Fifth Floor, *
- * Boston, MA 02110-1301, USA. *
- * *
- * GNAT was originally developed by the GNAT team at New York University. *
- * Extensive contributions were provided by Ada Core Technologies Inc. *
- * *
- ****************************************************************************/
-
-/* This program generates s-oscons.ads */
-
-/*
- * To build using DEC C:
- *
- * CC/DEFINE="TARGET=""OpenVMS""" gen-oscon
- * LINK gen-oscon
- * RUN gen-oscon
- *
- * Note: OpenVMS versions older than 8.3 provide an incorrect value in
- * the DEC C header files for MSG_WAITALL. To generate the VMS version
- * of s-oscons.ads, gen-oscon should be run on an 8.3 or later machine.
- */
-
-#ifndef TARGET
-# error Please define TARGET
-#endif
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <limits.h>
-#include <fcntl.h>
-
-#if !defined (__vxworks) && !defined (__VMS)
-# include <termios.h>
-#endif
-
-#include "gsocket.h"
-
-typedef enum { NUM, TXT } kind_t;
-
-struct line {
- char *text;
- char *value;
- char *comment;
- kind_t kind;
- struct line *next;
-};
-
-struct line *first = NULL, *last = NULL;
-
-#define TXT(_text) add_line(_text, NULL, NULL, TXT);
-/* Plain text */
-
-#define _NL TXT("")
-/* Empty line */
-
-#define itoad(n) f_itoa ("%d", (n))
-#define itoax(n) f_itoa ("16#%08x#", (n))
-
-#define CND(name,comment) add_line(#name, itoad (name), comment, NUM);
-/* Constant (decimal) */
-
-#define CNX(name,comment) add_line(#name, itoax (name), comment, NUM);
-/* Constant (hexadecimal) */
-
-#define CN_(name,comment) add_line(#name, name, comment, TXT);
-/* Constant (generic) */
-
-#define STR(p) STR1(p)
-#define STR1(p) #p
-
-void output (void);
-/* Generate output spec */
-
-char *f_itoa (char *, int);
-/* int to string */
-
-void add_line (char *, char*, char*, kind_t);
-
-#ifdef __MINGW32__
-unsigned int _CRT_fmode = _O_BINARY;
-#endif
-
-int
-main (void) {
-
-TXT("------------------------------------------------------------------------------")
-TXT("-- --")
-TXT("-- GNAT COMPILER COMPONENTS --")
-TXT("-- --")
-TXT("-- S Y S T E M . O S _ C O N S T A N T S --")
-TXT("-- --")
-TXT("-- S p e c --")
-TXT("-- --")
-TXT("-- Copyright (C) 2000-2008, Free Software Foundation, Inc. --")
-TXT("-- --")
-TXT("-- GNAT is free software; you can redistribute it and/or modify it under --")
-TXT("-- terms of the GNU General Public License as published by the Free Soft- --")
-TXT("-- ware Foundation; either version 2, or (at your option) any later ver- --")
-TXT("-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --")
-TXT("-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --")
-TXT("-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --")
-TXT("-- for more details. You should have received a copy of the GNU General --")
-TXT("-- Public License distributed with GNAT; see file COPYING. If not, write --")
-TXT("-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --")
-TXT("-- Boston, MA 02110-1301, USA. --")
-TXT("-- --")
-TXT("-- As a special exception, if other files instantiate generics from this --")
-TXT("-- unit, or you link this unit with other files to produce an executable, --")
-TXT("-- this unit does not by itself cause the resulting executable to be --")
-TXT("-- covered by the GNU General Public License. This exception does not --")
-TXT("-- however invalidate any other reasons why the executable file might be --")
-TXT("-- covered by the GNU Public License. --")
-TXT("-- --")
-TXT("-- GNAT was originally developed by the GNAT team at New York University. --")
-TXT("-- Extensive contributions were provided by Ada Core Technologies Inc. --")
-TXT("-- --")
-TXT("------------------------------------------------------------------------------")
-_NL
-TXT("-- This package provides target dependent definitions of constant for use")
-TXT("-- by the GNAT runtime library. This package should not be directly with'd")
-TXT("-- by an application program.")
-_NL
-TXT("-- This is the version for " TARGET)
-TXT("-- This file is generated automatically, do not modify it by hand! Instead,")
-TXT("-- make changes to gen-oscon.c and re-run it on each target.")
-_NL
-TXT("with Interfaces.C;")
-TXT("package System.OS_Constants is")
-_NL
-TXT(" pragma Pure;")
-_NL
-TXT(" ---------------------")
-TXT(" -- File open modes --")
-TXT(" ---------------------")
-_NL
-
-#ifndef O_RDWR
-# define O_RDWR -1
-#endif
-CND(O_RDWR, "Read/write")
-
-#ifndef O_NOCTTY
-# define O_NOCTTY -1
-#endif
-CND(O_NOCTTY, "Don't change ctrl tty")
-
-#ifndef O_NDELAY
-# define O_NDELAY -1
-#endif
-CND(O_NDELAY, "Nonblocking")
-
-_NL
-TXT(" ----------------------")
-TXT(" -- Fcntl operations --")
-TXT(" ----------------------")
-_NL
-
-#ifndef F_GETFL
-# define F_GETFL -1
-#endif
-CND(F_GETFL, "Get flags")
-
-#ifndef F_SETFL
-# define F_SETFL -1
-#endif
-CND(F_SETFL, "Set flags")
-
-_NL
-TXT(" -----------------")
-TXT(" -- Fcntl flags --")
-TXT(" -----------------")
-_NL
-
-#ifndef FNDELAY
-# define FNDELAY -1
-#endif
-CND(FNDELAY, "Nonblocking")
-
-#if !defined(__vxworks) && !defined(__VMS)
-
-_NL
-TXT(" ----------------------")
-TXT(" -- Termical control --")
-TXT(" ----------------------")
-_NL
-
-#ifndef TCSANOW
-# define TCSANOW -1
-#endif
-CND(TCSANOW, "Immediate")
-
-#ifndef TCIFLUSH
-# define TCIFLUSH -1
-#endif
-CND(TCIFLUSH, "Flush input")
-
-#ifndef CLOCAL
-# define CLOCAL -1
-#endif
-CND(CLOCAL, "Local")
-
-#ifndef CRTSCTS
-# define CRTSCTS -1
-#endif
-CND(CRTSCTS, "Hardware flow control")
-
-#ifndef CREAD
-# define CREAD -1
-#endif
-CND(CREAD, "Read")
-
-#ifndef CS5
-# define CS5 -1
-#endif
-CND(CS5, "5 data bits")
-
-#ifndef CS6
-# define CS6 -1
-#endif
-CND(CS6, "6 data bits")
-
-#ifndef CS7
-# define CS7 -1
-#endif
-CND(CS7, "7 data bits")
-
-#ifndef CS8
-# define CS8 -1
-#endif
-CND(CS8, "8 data bits")
-
-#ifndef CSTOPB
-# define CSTOPB -1
-#endif
-CND(CSTOPB, "2 stop bits")
-
-#ifndef PARENB
-# define PARENB -1
-#endif
-CND(PARENB, "Parity enable")
-
-#ifndef PARODD
-# define PARODD -1
-#endif
-CND(PARODD, "Parity odd")
-
-#ifndef B0
-# define B0 -1
-#endif
-CND(B0, "0 bps")
-
-#ifndef B50
-# define B50 -1
-#endif
-CND(B50, "50 bps")
-
-#ifndef B75
-# define B75 -1
-#endif
-CND(B75, "75 bps")
-
-#ifndef B110
-# define B110 -1
-#endif
-CND(B110, "110 bps")
-
-#ifndef B134
-# define B134 -1
-#endif
-CND(B134, "134 bps")
-
-#ifndef B150
-# define B150 -1
-#endif
-CND(B150, "150 bps")
-
-#ifndef B200
-# define B200 -1
-#endif
-CND(B200, "200 bps")
-
-#ifndef B300
-# define B300 -1
-#endif
-CND(B300, "300 bps")
-
-#ifndef B600
-# define B600 -1
-#endif
-CND(B600, "600 bps")
-
-#ifndef B1200
-# define B1200 -1
-#endif
-CND(B1200, "1200 bps")
-
-#ifndef B1800
-# define B1800 -1
-#endif
-CND(B1800, "1800 bps")
-
-#ifndef B2400
-# define B2400 -1
-#endif
-CND(B2400, "2400 bps")
-
-#ifndef B4800
-# define B4800 -1
-#endif
-CND(B4800, "4800 bps")
-
-#ifndef B9600
-# define B9600 -1
-#endif
-CND(B9600, "9600 bps")
-
-#ifndef B19200
-# define B19200 -1
-#endif
-CND(B19200, "19200 bps")
-
-#ifndef B38400
-# define B38400 -1
-#endif
-CND(B38400, "38400 bps")
-
-#ifndef B57600
-# define B57600 -1
-#endif
-CND(B57600, "57600 bps")
-
-#ifndef B115200
-# define B115200 -1
-#endif
-CND(B115200, "115200 bps")
-
-#ifndef B230400
-# define B230400 -1
-#endif
-CND(B230400, "230400 bps")
-
-#ifndef B460800
-# define B460800 -1
-#endif
-CND(B460800, "460800 bps")
-
-#ifndef B500000
-# define B500000 -1
-#endif
-CND(B500000, "500000 bps")
-
-#ifndef B576000
-# define B576000 -1
-#endif
-CND(B576000, "576000 bps")
-
-#ifndef B921600
-# define B921600 -1
-#endif
-CND(B921600, "921600 bps")
-
-#ifndef B1000000
-# define B1000000 -1
-#endif
-CND(B1000000, "1000000 bps")
-
-#ifndef B1152000
-# define B1152000 -1
-#endif
-CND(B1152000, "1152000 bps")
-
-#ifndef B1500000
-# define B1500000 -1
-#endif
-CND(B1500000, "1500000 bps")
-
-#ifndef B2000000
-# define B2000000 -1
-#endif
-CND(B2000000, "2000000 bps")
-
-#ifndef B2500000
-# define B2500000 -1
-#endif
-CND(B2500000, "2500000 bps")
-
-#ifndef B3000000
-# define B3000000 -1
-#endif
-CND(B3000000, "3000000 bps")
-
-#ifndef B3500000
-# define B3500000 -1
-#endif
-CND(B3500000, "3500000 bps")
-
-#ifndef B4000000
-# define B4000000 -1
-#endif
-CND(B4000000, "4000000 bps")
-
-_NL
-TXT(" ---------------------------------")
-TXT(" -- Terminal control characters --")
-TXT(" ---------------------------------")
-_NL
-
-#ifndef VINTR
-# define VINTR -1
-#endif
-CND(VINTR, "Interrupt")
-
-#ifndef VQUIT
-# define VQUIT -1
-#endif
-CND(VQUIT, "Quit")
-
-#ifndef VERASE
-# define VERASE -1
-#endif
-CND(VERASE, "Erase")
-
-#ifndef VKILL
-# define VKILL -1
-#endif
-CND(VKILL, "Kill")
-
-#ifndef VEOF
-# define VEOF -1
-#endif
-CND(VEOF, "EOF")
-
-#ifndef VTIME
-# define VTIME -1
-#endif
-CND(VTIME, "Read timeout")
-
-#ifndef VMIN
-# define VMIN -1
-#endif
-CND(VMIN, "Read min chars")
-
-#ifndef VSWTC
-# define VSWTC -1
-#endif
-CND(VSWTC, "Switch")
-
-#ifndef VSTART
-# define VSTART -1
-#endif
-CND(VSTART, "Flow control start")
-
-#ifndef VSTOP
-# define VSTOP -1
-#endif
-CND(VSTOP, "Flow control stop")
-
-#ifndef VSUSP
-# define VSUSP -1
-#endif
-CND(VSUSP, "Suspend")
-
-#ifndef VEOL
-# define VEOL -1
-#endif
-CND(VEOL, "EOL")
-
-#ifndef VREPRINT
-# define VREPRINT -1
-#endif
-CND(VREPRINT, "Reprint unread")
-
-#ifndef VDISCARD
-# define VDISCARD -1
-#endif
-CND(VDISCARD, "Discard pending")
-
-#ifndef VWERASE
-# define VWERASE -1
-#endif
-CND(VWERASE, "Word erase")
-
-#ifndef VLNEXT
-# define VLNEXT -1
-#endif
-CND(VLNEXT, "Literal next")
-
-#ifndef VEOL2
-# define VEOL2 -1
-#endif
-CND(VEOL2, "Alternative EOL")
-
-#endif /* !defined(__vxworks) && !defined(__VMS) */
-
-_NL
-TXT(" --------------")
-TXT(" -- Families --")
-TXT(" --------------")
-_NL
-
-#ifndef AF_INET
-# define AF_INET -1
-#endif
-CND(AF_INET, "IPv4 address family")
-
-#ifndef AF_INET6
-# define AF_INET6 -1
-#else
-# define HAVE_AF_INET6 1
-#endif
-CND(AF_INET6, "IPv6 address family")
-_NL
-TXT(" ------------------")
-TXT(" -- Socket modes --")
-TXT(" ------------------")
-_NL
-
-#ifndef SOCK_STREAM
-# define SOCK_STREAM -1
-#endif
-CND(SOCK_STREAM, "Stream socket")
-
-#ifndef SOCK_DGRAM
-# define SOCK_DGRAM -1
-#endif
-CND(SOCK_DGRAM, "Datagram socket")
-_NL
-TXT(" ------------------")
-TXT(" -- Errno values --")
-TXT(" ------------------")
-_NL
-
-#ifndef EACCES
-# define EACCES -1
-#endif
-CND(EACCES, "Permission denied")
-
-#ifndef EADDRINUSE
-# define EADDRINUSE -1
-#endif
-CND(EADDRINUSE, "Address already in use")
-
-#ifndef EADDRNOTAVAIL
-# define EADDRNOTAVAIL -1
-#endif
-CND(EADDRNOTAVAIL, "Cannot assign address")
-
-#ifndef EAFNOSUPPORT
-# define EAFNOSUPPORT -1
-#endif
-CND(EAFNOSUPPORT, "Addr family not supported")
-
-#ifndef EAGAIN
-# define EAGAIN -1
-#endif
-CND(EAGAIN, "Try again")
-
-#ifndef EALREADY
-# define EALREADY -1
-#endif
-CND(EALREADY, "Operation in progress")
-
-#ifndef EBADF
-# define EBADF -1
-#endif
-CND(EBADF, "Bad file descriptor")
-
-#ifndef ECONNABORTED
-# define ECONNABORTED -1
-#endif
-CND(ECONNABORTED, "Connection aborted")
-
-#ifndef ECONNREFUSED
-# define ECONNREFUSED -1
-#endif
-CND(ECONNREFUSED, "Connection refused")
-
-#ifndef ECONNRESET
-# define ECONNRESET -1
-#endif
-CND(ECONNRESET, "Connection reset by peer")
-
-#ifndef EDESTADDRREQ
-# define EDESTADDRREQ -1
-#endif
-CND(EDESTADDRREQ, "Destination addr required")
-
-#ifndef EFAULT
-# define EFAULT -1
-#endif
-CND(EFAULT, "Bad address")
-
-#ifndef EHOSTDOWN
-# define EHOSTDOWN -1
-#endif
-CND(EHOSTDOWN, "Host is down")
-
-#ifndef EHOSTUNREACH
-# define EHOSTUNREACH -1
-#endif
-CND(EHOSTUNREACH, "No route to host")
-
-#ifndef EINPROGRESS
-# define EINPROGRESS -1
-#endif
-CND(EINPROGRESS, "Operation now in progress")
-
-#ifndef EINTR
-# define EINTR -1
-#endif
-CND(EINTR, "Interrupted system call")
-
-#ifndef EINVAL
-# define EINVAL -1
-#endif
-CND(EINVAL, "Invalid argument")
-
-#ifndef EIO
-# define EIO -1
-#endif
-CND(EIO, "Input output error")
-
-#ifndef EISCONN
-# define EISCONN -1
-#endif
-CND(EISCONN, "Socket already connected")
-
-#ifndef ELOOP
-# define ELOOP -1
-#endif
-CND(ELOOP, "Too many symbolic links")
-
-#ifndef EMFILE
-# define EMFILE -1
-#endif
-CND(EMFILE, "Too many open files")
-
-#ifndef EMSGSIZE
-# define EMSGSIZE -1
-#endif
-CND(EMSGSIZE, "Message too long")
-
-#ifndef ENAMETOOLONG
-# define ENAMETOOLONG -1
-#endif
-CND(ENAMETOOLONG, "Name too long")
-
-#ifndef ENETDOWN
-# define ENETDOWN -1
-#endif
-CND(ENETDOWN, "Network is down")
-
-#ifndef ENETRESET
-# define ENETRESET -1
-#endif
-CND(ENETRESET, "Disconn. on network reset")
-
-#ifndef ENETUNREACH
-# define ENETUNREACH -1
-#endif
-CND(ENETUNREACH, "Network is unreachable")
-
-#ifndef ENOBUFS
-# define ENOBUFS -1
-#endif
-CND(ENOBUFS, "No buffer space available")
-
-#ifndef ENOENT
-# define ENOENT -1
-#endif
-CND(ENOENT, "File not found")
-
-#ifndef ENOMEM
-# define ENOMEM -1
-#endif
-CND(ENOMEM, "Out of memory")
-
-#ifndef ENOPROTOOPT
-# define ENOPROTOOPT -1
-#endif
-CND(ENOPROTOOPT, "Protocol not available")
-
-#ifndef ENOTCONN
-# define ENOTCONN -1
-#endif
-CND(ENOTCONN, "Socket not connected")
-
-#ifndef ENOTSOCK
-# define ENOTSOCK -1
-#endif
-CND(ENOTSOCK, "Operation on non socket")
-
-#ifndef EOPNOTSUPP
-# define EOPNOTSUPP -1
-#endif
-CND(EOPNOTSUPP, "Operation not supported")
-
-#ifndef EPFNOSUPPORT
-# define EPFNOSUPPORT -1
-#endif
-CND(EPFNOSUPPORT, "Unknown protocol family")
-
-#ifndef EPROTONOSUPPORT
-# define EPROTONOSUPPORT -1
-#endif
-CND(EPROTONOSUPPORT, "Unknown protocol")
-
-#ifndef EPROTOTYPE
-# define EPROTOTYPE -1
-#endif
-CND(EPROTOTYPE, "Unknown protocol type")
-
-#ifndef ESHUTDOWN
-# define ESHUTDOWN -1
-#endif
-CND(ESHUTDOWN, "Cannot send once shutdown")
-
-#ifndef ESOCKTNOSUPPORT
-# define ESOCKTNOSUPPORT -1
-#endif
-CND(ESOCKTNOSUPPORT, "Socket type not supported")
-
-#ifndef ETIMEDOUT
-# define ETIMEDOUT -1
-#endif
-CND(ETIMEDOUT, "Connection timed out")
-
-#ifndef ETOOMANYREFS
-# define ETOOMANYREFS -1
-#endif
-CND(ETOOMANYREFS, "Too many references")
-
-#ifndef EWOULDBLOCK
-# define EWOULDBLOCK -1
-#endif
-CND(EWOULDBLOCK, "Operation would block")
-_NL
-TXT(" -----------------")
-TXT(" -- Host errors --")
-TXT(" -----------------")
-_NL
-
-#ifndef HOST_NOT_FOUND
-# define HOST_NOT_FOUND -1
-#endif
-CND(HOST_NOT_FOUND, "Unknown host")
-
-#ifndef TRY_AGAIN
-# define TRY_AGAIN -1
-#endif
-CND(TRY_AGAIN, "Host name lookup failure")
-
-#ifndef NO_DATA
-# define NO_DATA -1
-#endif
-CND(NO_DATA, "No data record for name")
-
-#ifndef NO_RECOVERY
-# define NO_RECOVERY -1
-#endif
-CND(NO_RECOVERY, "Non recoverable errors")
-_NL
-TXT(" ----------------------")
-TXT(" -- Ioctl operatings --")
-TXT(" ----------------------")
-_NL
-
-#ifndef FIONBIO
-# define FIONBIO -1
-#endif
-CND(FIONBIO, "Set/clear non-blocking io")
-
-#ifndef FIONREAD
-# define FIONREAD -1
-#endif
-CND(FIONREAD, "How many bytes to read")
-_NL
-TXT(" --------------------")
-TXT(" -- Shutdown modes --")
-TXT(" --------------------")
-_NL
-
-#ifndef SHUT_RD
-# define SHUT_RD -1
-#endif
-CND(SHUT_RD, "No more recv")
-
-#ifndef SHUT_WR
-# define SHUT_WR -1
-#endif
-CND(SHUT_WR, "No more send")
-
-#ifndef SHUT_RDWR
-# define SHUT_RDWR -1
-#endif
-CND(SHUT_RDWR, "No more recv/send")
-_NL
-TXT(" ---------------------")
-TXT(" -- Protocol levels --")
-TXT(" ---------------------")
-_NL
-
-#ifndef SOL_SOCKET
-# define SOL_SOCKET -1
-#endif
-CND(SOL_SOCKET, "Options for socket level")
-
-#ifndef IPPROTO_IP
-# define IPPROTO_IP -1
-#endif
-CND(IPPROTO_IP, "Dummy protocol for IP")
-
-#ifndef IPPROTO_UDP
-# define IPPROTO_UDP -1
-#endif
-CND(IPPROTO_UDP, "UDP")
-
-#ifndef IPPROTO_TCP
-# define IPPROTO_TCP -1
-#endif
-CND(IPPROTO_TCP, "TCP")
-_NL
-TXT(" -------------------")
-TXT(" -- Request flags --")
-TXT(" -------------------")
-_NL
-
-#ifndef MSG_OOB
-# define MSG_OOB -1
-#endif
-CND(MSG_OOB, "Process out-of-band data")
-
-#ifndef MSG_PEEK
-# define MSG_PEEK -1
-#endif
-CND(MSG_PEEK, "Peek at incoming data")
-
-#ifndef MSG_EOR
-# define MSG_EOR -1
-#endif
-CND(MSG_EOR, "Send end of record")
-
-#ifndef MSG_WAITALL
-# define MSG_WAITALL -1
-#endif
-CND(MSG_WAITALL, "Wait for full reception")
-
-#ifndef MSG_NOSIGNAL
-# define MSG_NOSIGNAL -1
-#endif
-CND(MSG_NOSIGNAL, "No SIGPIPE on send")
-
-#ifdef __linux__
-# define MSG_Forced_Flags "MSG_NOSIGNAL"
-#else
-# define MSG_Forced_Flags "0"
-#endif
-CN_(MSG_Forced_Flags, "")
-TXT(" -- Flags set on all send(2) calls")
-
-_NL
-TXT(" --------------------")
-TXT(" -- Socket options --")
-TXT(" --------------------")
-_NL
-
-#ifndef TCP_NODELAY
-# define TCP_NODELAY -1
-#endif
-CND(TCP_NODELAY, "Do not coalesce packets")
-
-#ifndef SO_REUSEADDR
-# define SO_REUSEADDR -1
-#endif
-CND(SO_REUSEADDR, "Bind reuse local address")
-
-#ifndef SO_REUSEPORT
-# define SO_REUSEPORT -1
-#endif
-CND(SO_REUSEPORT, "Bind reuse port number")
-
-#ifndef SO_KEEPALIVE
-# define SO_KEEPALIVE -1
-#endif
-CND(SO_KEEPALIVE, "Enable keep-alive msgs")
-
-#ifndef SO_LINGER
-# define SO_LINGER -1
-#endif
-CND(SO_LINGER, "Defer close to flush data")
-
-#ifndef SO_BROADCAST
-# define SO_BROADCAST -1
-#endif
-CND(SO_BROADCAST, "Can send broadcast msgs")
-
-#ifndef SO_SNDBUF
-# define SO_SNDBUF -1
-#endif
-CND(SO_SNDBUF, "Set/get send buffer size")
-
-#ifndef SO_RCVBUF
-# define SO_RCVBUF -1
-#endif
-CND(SO_RCVBUF, "Set/get recv buffer size")
-
-#ifndef SO_SNDTIMEO
-# define SO_SNDTIMEO -1
-#endif
-CND(SO_SNDTIMEO, "Emission timeout")
-
-#ifndef SO_RCVTIMEO
-# define SO_RCVTIMEO -1
-#endif
-CND(SO_RCVTIMEO, "Reception timeout")
-
-#ifndef SO_ERROR
-# define SO_ERROR -1
-#endif
-CND(SO_ERROR, "Get/clear error status")
-
-#ifndef IP_MULTICAST_IF
-# define IP_MULTICAST_IF -1
-#endif
-CND(IP_MULTICAST_IF, "Set/get mcast interface")
-
-#ifndef IP_MULTICAST_TTL
-# define IP_MULTICAST_TTL -1
-#endif
-CND(IP_MULTICAST_TTL, "Set/get multicast TTL")
-
-#ifndef IP_MULTICAST_LOOP
-# define IP_MULTICAST_LOOP -1
-#endif
-CND(IP_MULTICAST_LOOP, "Set/get mcast loopback")
-
-#ifndef IP_ADD_MEMBERSHIP
-# define IP_ADD_MEMBERSHIP -1
-#endif
-CND(IP_ADD_MEMBERSHIP, "Join a multicast group")
-
-#ifndef IP_DROP_MEMBERSHIP
-# define IP_DROP_MEMBERSHIP -1
-#endif
-CND(IP_DROP_MEMBERSHIP, "Leave a multicast group")
-
-#ifndef IP_PKTINFO
-# define IP_PKTINFO -1
-#endif
-CND(IP_PKTINFO, "Get datagram info")
-
-_NL
-TXT(" -------------------")
-TXT(" -- System limits --")
-TXT(" -------------------")
-_NL
-
-#ifndef IOV_MAX
-# define IOV_MAX INT_MAX
-#endif
-CND(IOV_MAX, "Maximum writev iovcnt")
-
-_NL
-TXT(" ----------------------")
-TXT(" -- Type definitions --")
-TXT(" ----------------------")
-_NL
-
-{
- struct timeval tv;
-TXT(" -- Sizes (in bytes) of the components of struct timeval")
-_NL
-#define SIZEOF_tv_sec (sizeof tv.tv_sec)
-CND(SIZEOF_tv_sec, "tv_sec")
-#define SIZEOF_tv_usec (sizeof tv.tv_usec)
-CND(SIZEOF_tv_usec, "tv_usec")
-}
-_NL
-TXT(" -- Sizes of protocol specific address types (for sockaddr.sa_len)")
-_NL
-#define SIZEOF_sockaddr_in (sizeof (struct sockaddr_in))
-CND(SIZEOF_sockaddr_in, "struct sockaddr_in")
-#ifdef HAVE_AF_INET6
-# define SIZEOF_sockaddr_in6 (sizeof (struct sockaddr_in6))
-#else
-# define SIZEOF_sockaddr_in6 0
-#endif
-CND(SIZEOF_sockaddr_in6, "struct sockaddr_in6")
-_NL
-TXT(" -- Size of file descriptor sets")
-_NL
-#define SIZEOF_fd_set (sizeof (fd_set))
-CND(SIZEOF_fd_set, "fd_set");
-_NL
-TXT(" -- Fields of struct hostent")
-_NL
-#ifdef __MINGW32__
-# define h_addrtype_t "short"
-# define h_length_t "short"
-#else
-# define h_addrtype_t "int"
-# define h_length_t "int"
-#endif
-TXT(" subtype H_Addrtype_T is Interfaces.C." h_addrtype_t ";")
-TXT(" subtype H_Length_T is Interfaces.C." h_length_t ";")
-_NL
-TXT(" ----------------------------------------")
-TXT(" -- Properties of supported interfaces --")
-TXT(" ----------------------------------------")
-_NL
-
-CND(Need_Netdb_Buffer, "Need buffer for Netdb ops")
-CND(Has_Sockaddr_Len, "Sockaddr has sa_len field")
-_NL
-TXT(" Thread_Blocking_IO : constant Boolean := True;")
-TXT(" -- Set False for contexts where socket i/o are process blocking")
-
-#ifdef __vxworks
-_NL
-TXT(" --------------------------------")
-TXT(" -- VxWorks-specific constants --")
-TXT(" --------------------------------")
-_NL
-TXT(" -- These constants may be used only within the VxWorks version of")
-TXT(" -- GNAT.Sockets.Thin.")
-_NL
-
-CND(OK, "VxWorks generic success")
-CND(ERROR, "VxWorks generic error")
-#endif
-
-#ifdef __MINGW32__
-_NL
-TXT(" ------------------------------")
-TXT(" -- MinGW-specific constants --")
-TXT(" ------------------------------")
-_NL
-TXT(" -- These constants may be used only within the MinGW version of")
-TXT(" -- GNAT.Sockets.Thin.")
-_NL
-
-CND(WSASYSNOTREADY, "System not ready")
-CND(WSAVERNOTSUPPORTED, "Version not supported")
-CND(WSANOTINITIALISED, "Winsock not initialized")
-CND(WSAEDISCON, "Disconnected")
-#endif
-
-_NL
-TXT("end System.OS_Constants;")
-
- output ();
- return 0;
-}
-
-void
-output (void) {
- int text_max = 0, value_max = 0, l;
- struct line *p;
- char fmt[64];
-#define UPD_MAX(x) do { \
- l = strlen (p->x); \
- if (l > x ## _max) x ## _max = l; \
-} while (0)
-
- for (p = first; p != NULL; p = p->next) {
- if (p->value != NULL) {
- UPD_MAX(text);
- if (p->kind == NUM)
- UPD_MAX(value);
- }
- }
- sprintf (fmt, " %%-%ds : constant := %%%ds;%%s%%s\n",
- text_max, value_max);
-
- for (p = first; p != NULL; p = p->next) {
- if (p->value == NULL) {
- printf ("%s\n", p->text);
- } else {
- char *comment_sep = (strlen (p->comment) > 0)
- ? " -- " : "";
- printf (fmt, p->text, p->value, comment_sep, p->comment);
- }
- }
-}
-
-char *
-f_itoa (char *fmt, int n) {
- char buf[32], *ret;
- sprintf (buf, fmt, n);
- ret = malloc (strlen (buf) + 1);
- if (ret != NULL)
- strcpy (ret, buf);
- return ret;
-}
-
-void
-add_line (char *_text, char *_value, char *_comment, kind_t _kind) {
- struct line *l = (struct line *) malloc (sizeof (struct line));
-
- l->text = _text;
- l->value = _value;
- l->comment = _comment;
- l->kind = _kind;
- l->next = NULL;
-
- if (last == NULL)
- first = last = l;
- else {
- last->next = l;
- last = l;
- }
-}
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index a0da8a40db8..3c5d287acef 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -3904,6 +3904,10 @@ Defines a symbol, associated with @var{value}, for preprocessing.
@cindex @option{-gnatef} (@command{gcc})
Display full source path name in brief error messages.
+@item -gnateG
+@cindex @option{-gnateG} (@command{gcc})
+Save result of preprocessing in a text file.
+
@item -gnatem=@var{path}
@cindex @option{-gnatem} (@command{gcc})
Specify a mapping file
@@ -6254,11 +6258,11 @@ the true value of the result of an operation may be outside the base
range of the result type. The following example shows the distinction:
@smallexample @c ada
-X1 : Integer := Integer'Last;
-X2 : Integer range 1 .. 5 := 5;
-X3 : Integer := Integer'Last;
-X4 : Integer range 1 .. 5 := 5;
-F : Float := 2.0E+20;
+X1 : Integer := "Integer'Last";
+X2 : Integer range 1 .. 5 := "5";
+X3 : Integer := "Integer'Last";
+X4 : Integer range 1 .. 5 := "5";
+F : Float := "2.0E+20";
@dots{}
X1 := X1 + 1;
X2 := X2 + 1;
@@ -6267,6 +6271,13 @@ X4 := Integer (F);
@end smallexample
@noindent
+Note that if explicit values are assigned at compile time, the compiler may
+be able to detect overflow at compile time, in which case no run-time check
+is required, and the setting of -gnato is irrelevant. That's why the assigned
+values in the above fragment are in quotes, the meaning is "assign a value
+not known to the compiler that happens to be equal to ...". The remaining
+discussion assumes that the compiler cannot detect the values at compile time.
+
Here the first addition results in a value that is outside the base range
of Integer, and hence requires an overflow check for detection of the
constraint error. Thus the first assignment to @code{X1} raises a
@@ -7202,6 +7213,11 @@ symbol with the same name either in a definition file or specified with a
@noindent
This switch is similar to switch @option{^-D^/ASSOCIATE^} of @code{gnatprep}.
+@item -gnateG
+When integrated preprocessing is performed and the preprocessor modifies
+the source text, write the result of this preprocessing into a file
+<source>^.prep^_prep^.
+
@end table
@node Code Generation Control
diff --git a/gcc/ada/s-fileio.adb b/gcc/ada/s-fileio.adb
index 41419b5f793..79b718eadce 100644
--- a/gcc/ada/s-fileio.adb
+++ b/gcc/ada/s-fileio.adb
@@ -33,10 +33,13 @@
with Ada.Finalization; use Ada.Finalization;
with Ada.IO_Exceptions; use Ada.IO_Exceptions;
+with Interfaces.C;
with Interfaces.C_Streams; use Interfaces.C_Streams;
with System.CRTL;
with System.Case_Util; use System.Case_Util;
+with System.OS_Constants;
+with System.OS_Lib;
with System.Soft_Links;
with Ada.Unchecked_Deallocation;
@@ -47,6 +50,7 @@ package body System.File_IO is
package SSL renames System.Soft_Links;
+ use type Interfaces.C.int;
use type System.CRTL.size_t;
----------------------
@@ -984,7 +988,11 @@ package body System.File_IO is
Stream := fopen (Namestr'Address, Fopstr'Address, Encoding);
if Stream = NULL_Stream then
- if not Tempfile and then file_exists (Namestr'Address) = 0 then
+ -- Raise Name_Error if trying to open a non-existent file.
+ -- Otherwise raise Use_Error. Should we raise Device_Error for
+ -- ENOSPC???
+
+ if System.OS_Lib.Errno = System.OS_Constants.ENOENT then
raise Name_Error;
else
raise Use_Error;
diff --git a/gcc/ada/s-stausa.adb b/gcc/ada/s-stausa.adb
index d9b972d8b28..ff5f86e1668 100644
--- a/gcc/ada/s-stausa.adb
+++ b/gcc/ada/s-stausa.adb
@@ -298,7 +298,7 @@ package body System.Stack_Usage is
To_Stack_Address (Stack (Top_Slot_Index_In (Stack))'Address);
else
Analyzer.Bottom_Pattern_Mark := To_Stack_Address (Stack'Address);
- Analyzer.Bottom_Pattern_Mark := To_Stack_Address (Stack'Address);
+ Analyzer.Top_Pattern_Mark := To_Stack_Address (Stack'Address);
end if;
-- If Arr has been packed, the following assertion must be true (we
@@ -306,7 +306,8 @@ package body System.Stack_Usage is
-- Min (Analyzer.Inner_Pattern_Mark, Analyzer.Outer_Pattern_Mark)):
pragma Assert
- (Analyzer.Pattern_Size =
+ (Analyzer.Pattern_Size = 0 or else
+ Analyzer.Pattern_Size =
Stack_Size
(Analyzer.Top_Pattern_Mark, Analyzer.Bottom_Pattern_Mark));
end;
@@ -381,6 +382,10 @@ package body System.Stack_Usage is
begin
Analyzer.Topmost_Touched_Mark := Analyzer.Bottom_Pattern_Mark;
+ if Analyzer.Pattern_Size = 0 then
+ return;
+ end if;
+
-- Look backward from the topmost possible end of the marked stack to
-- the bottom of it. The first index not equals to the patterns marks
-- the beginning of the used stack.
@@ -559,20 +564,23 @@ package body System.Stack_Usage is
Min_Measure => 0,
Max_Measure => 0);
+ Overflow_Guard : constant Integer :=
+ Analyzer.Stack_Size
+ - Stack_Size (Analyzer.Top_Pattern_Mark, Analyzer.Bottom_Of_Stack);
+
begin
if Analyzer.Pattern_Size = 0 then
-- If we have that result, it means that we didn't do any computation
-- at all. In other words, we used at least everything (and possibly
-- more).
- Result.Min_Measure := Analyzer.Stack_Size;
+ Result.Min_Measure := Analyzer.Stack_Size - Overflow_Guard;
Result.Max_Measure := Analyzer.Stack_Size;
else
Result.Min_Measure := Stack_Size
(Analyzer.Topmost_Touched_Mark,
Analyzer.Bottom_Of_Stack);
- Result.Max_Measure := Result.Min_Measure +
- (Analyzer.Stack_Size - Analyzer.Pattern_Size);
+ Result.Max_Measure := Result.Min_Measure + Overflow_Guard;
end if;
if Analyzer.Result_Id in Result_Array'Range then
diff --git a/gcc/ada/sem.adb b/gcc/ada/sem.adb
index 6b93ab449f1..20ac16eb8ad 100644
--- a/gcc/ada/sem.adb
+++ b/gcc/ada/sem.adb
@@ -1341,7 +1341,7 @@ package body Sem is
-- Compile predefined units with GNAT_Mode set to True, to properly
-- process the categorization stuff. However, do not set set GNAT_Mode
-- to True for the renamings units (Text_IO, IO_Exceptions, Direct_IO,
- -- Sequential_IO) as this would prevent pragma System_Extend to be
+ -- Sequential_IO) as this would prevent pragma Extend_System from being
-- taken into account, for example when Text_IO is renaming DEC.Text_IO.
-- Cleaner might be to do the kludge at the point of excluding the
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index 82b47aa17a6..30628b6864a 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -1812,12 +1812,16 @@ package body Sem_Ch12 is
-- Verify that there is no redundant null exclusion.
- if Null_Exclusion_Present (N)
- and then Can_Never_Be_Null (T)
- then
- Error_Msg_NE
- ("`NOT NULL` not allowed (& already excludes null)",
- N, T);
+ if Null_Exclusion_Present (N) then
+ if not Is_Access_Type (T) then
+ Error_Msg_N
+ ("null exclusion can only apply to an access type", N);
+
+ elsif Can_Never_Be_Null (T) then
+ Error_Msg_NE
+ ("`NOT NULL` not allowed (& already excludes null)",
+ N, T);
+ end if;
end if;
-- Ada 2005 (AI-423): Formal object with an access definition
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 8a44655edf9..18538c878be 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -1179,8 +1179,13 @@ package body Sem_Ch3 is
end loop;
end if;
+ -- If the return type is incomplete, this is legal as long as the
+ -- type is declared in the current scope and will be completed in
+ -- it (rather than being part of limited view).
+
if Ekind (Etype (Desig_Type)) = E_Incomplete_Type
and then not Has_Delayed_Freeze (Desig_Type)
+ and then In_Open_Scopes (Scope (Etype (Desig_Type)))
then
Append_Elmt (Desig_Type, Private_Dependents (Etype (Desig_Type)));
Set_Has_Delayed_Freeze (Desig_Type);
@@ -1662,6 +1667,7 @@ package body Sem_Ch3 is
if Ada_Version >= Ada_05
and then Ekind (T) = E_Anonymous_Access_Type
+ and then Etype (E) /= Any_Type
then
-- Check RM 3.9.2(9): "if the expected type for an expression is
-- an anonymous access-to-specific tagged type, then the object
@@ -2567,7 +2573,7 @@ package body Sem_Ch3 is
and then Is_Access_Constant (Etype (E))
then
Error_Msg_N
- ("object that is an access to variable cannot be initialized " &
+ ("access to variable cannot be initialized " &
"with an access-to-constant expression", E);
end if;
@@ -4624,11 +4630,21 @@ package body Sem_Ch3 is
Has_Private_Component (Derived_Type));
Conditional_Delay (Derived_Type, Subt);
- -- Ada 2005 (AI-231). Set the null-exclusion attribute
+ -- Ada 2005 (AI-231): Set the null-exclusion attribute, and verify
+ -- that it is not redundant.
- if Null_Exclusion_Present (Type_Definition (N))
- or else Can_Never_Be_Null (Parent_Type)
- then
+ if Null_Exclusion_Present (Type_Definition (N)) then
+ Set_Can_Never_Be_Null (Derived_Type);
+
+ if Can_Never_Be_Null (Parent_Type)
+ and then False
+ then
+ Error_Msg_NE
+ ("`NOT NULL` not allowed (& already excludes null)",
+ N, Parent_Type);
+ end if;
+
+ elsif Can_Never_Be_Null (Parent_Type) then
Set_Can_Never_Be_Null (Derived_Type);
end if;
@@ -7612,6 +7628,15 @@ package body Sem_Ch3 is
(Designated_Type (Etype (Discr_Expr (J))))
then
Wrong_Type (Discr_Expr (J), Etype (Discr));
+
+ elsif Is_Access_Type (Etype (Discr))
+ and then not Is_Access_Constant (Etype (Discr))
+ and then Is_Access_Type (Etype (Discr_Expr (J)))
+ and then Is_Access_Constant (Etype (Discr_Expr (J)))
+ then
+ Error_Msg_NE
+ ("constraint for discriminant& must be access to variable",
+ Def, Discr);
end if;
end if;
@@ -12897,6 +12922,12 @@ package body Sem_Ch3 is
end;
end if;
+ if Null_Exclusion_Present (Def)
+ and then not Is_Access_Type (Parent_Type)
+ then
+ Error_Msg_N ("null exclusion can only apply to an access type", N);
+ end if;
+
Build_Derived_Type (N, Parent_Type, T, Is_Completion);
-- AI-419: The parent type of an explicitly limited derived type must
@@ -13194,6 +13225,13 @@ package body Sem_Ch3 is
Set_Scope (Id, Current_Scope);
New_Id := Id;
+ -- If this is a repeated incomplete declaration, no further
+ -- checks are possible.
+
+ if Nkind (N) = N_Incomplete_Type_Declaration then
+ return Prev;
+ end if;
+
-- Case of full declaration of incomplete type
elsif Ekind (Prev) = E_Incomplete_Type then
@@ -15352,6 +15390,15 @@ package body Sem_Ch3 is
Create_Null_Excluding_Itype
(T => Discr_Type,
Related_Nod => Discr));
+
+ -- Check for improper null exclusion if the type is otherwise
+ -- legal for a discriminant.
+
+ elsif Null_Exclusion_Present (Discr)
+ and then Is_Discrete_Type (Discr_Type)
+ then
+ Error_Msg_N
+ ("null exclusion can only apply to an access type", Discr);
end if;
-- Ada 2005 (AI-402): access discriminants of nonlimited types
diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb
index 9a19b2a8b1e..c52f5ad7dcb 100644
--- a/gcc/ada/sem_ch8.adb
+++ b/gcc/ada/sem_ch8.adb
@@ -832,7 +832,10 @@ package body Sem_Ch8 is
if Nkind (Nam) = N_Explicit_Dereference
and then Ekind (Etype (T2)) = E_Incomplete_Type
then
- Error_Msg_N ("invalid use of incomplete type", Id);
+ Error_Msg_NE ("invalid use of incomplete type&", Id, T2);
+ return;
+ elsif Ekind (Etype (T)) = E_Incomplete_Type then
+ Error_Msg_NE ("invalid use of incomplete type&", Id, T);
return;
end if;
@@ -889,7 +892,15 @@ package body Sem_Ch8 is
Error_Msg_NE
("`NOT NULL` not allowed (type of& already excludes null)",
N, Nam_Ent);
+
end if;
+
+ elsif Has_Null_Exclusion (N)
+ and then No (Access_Definition (N))
+ and then Can_Never_Be_Null (T)
+ then
+ Error_Msg_NE
+ ("`NOT NULL` not allowed (& already excludes null)", N, T);
end if;
end;
end if;
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index b0d46ae72b0..21369ae725e 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -4696,14 +4696,15 @@ package body Sem_Res is
end loop;
end if;
- if Ekind (Etype (Nam)) = E_Access_Subprogram_Type
- and then Ekind (Typ) /= E_Access_Subprogram_Type
+ if Is_Access_Subprogram_Type (Base_Type (Etype (Nam)))
+ and then not Is_Access_Subprogram_Type (Base_Type (Typ))
and then Nkind (Subp) /= N_Explicit_Dereference
and then Present (Parameter_Associations (N))
then
- -- The prefix is a parameterless function call that returns an
- -- access to subprogram. If parameters are present in the current
- -- call add an explicit dereference.
+ -- The prefix is a parameterless function call that returns an access
+ -- to subprogram. If parameters are present in the current call, add
+ -- add an explicit dereference. We use the base type here because
+ -- within an instance these may be subtypes.
-- The dereference is added either in Analyze_Call or here. Should
-- be consolidated ???
@@ -4768,8 +4769,8 @@ package body Sem_Res is
Error_Msg_N ("entry call required in select statement", N);
-- Ada 2005 (AI-345): If a procedure_call_statement is used
- -- for a procedure_or_entry_call, the procedure_name or pro-
- -- cedure_prefix of the procedure_call_statement shall denote
+ -- for a procedure_or_entry_call, the procedure_name or
+ -- procedure_prefix of the procedure_call_statement shall denote
-- an entry renamed by a procedure, or (a view of) a primitive
-- subprogram of a limited interface whose first parameter is
-- a controlling parameter.
@@ -4783,8 +4784,8 @@ package body Sem_Res is
end if;
end if;
- -- Check that this is not a call to a protected procedure or
- -- entry from within a protected function.
+ -- Check that this is not a call to a protected procedure or entry from
+ -- within a protected function.
if Ekind (Current_Scope) = E_Function
and then Ekind (Scope (Current_Scope)) = E_Protected_Type
diff --git a/gcc/ada/xnmake.adb b/gcc/ada/xnmake.adb
index 2596d73b7c3..e218d674773 100644
--- a/gcc/ada/xnmake.adb
+++ b/gcc/ada/xnmake.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -58,6 +58,8 @@ with Ada.Text_IO; use Ada.Text_IO;
with GNAT.Spitbol; use GNAT.Spitbol;
with GNAT.Spitbol.Patterns; use GNAT.Spitbol.Patterns;
+with XUtil;
+
procedure XNmake is
Err : exception;
@@ -137,8 +139,8 @@ procedure XNmake is
V_Elist_Id : constant VString := V ("Elist_Id");
V_Boolean : constant VString := V ("Boolean");
- procedure Put_Line (F : Sfile; S : String);
- procedure Put_Line (F : Sfile; S : VString);
+ procedure Put_Line (F : Sfile; S : String) renames XUtil.Put_Line;
+ procedure Put_Line (F : Sfile; S : VString) renames XUtil.Put_Line;
-- Local version of Put_Line ensures Unix style line endings
procedure WriteS (S : String);
@@ -199,17 +201,6 @@ procedure XNmake is
end if;
end WriteS;
- procedure Put_Line (F : Sfile; S : String) is
- begin
- String'Write (Stream (F), S);
- Character'Write (Stream (F), ASCII.LF);
- end Put_Line;
-
- procedure Put_Line (F : Sfile; S : VString) is
- begin
- Put_Line (F, To_String (S));
- end Put_Line;
-
-- Start of processing for XNmake
begin
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 953fb7bddc6..088c916a9c1 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -5576,18 +5576,18 @@ expand_builtin_sprintf (tree exp, rtx target, enum machine_mode mode)
static rtx
expand_builtin_profile_func (bool exitp)
{
- rtx this, which;
+ rtx this_rtx, which;
- this = DECL_RTL (current_function_decl);
- gcc_assert (MEM_P (this));
- this = XEXP (this, 0);
+ this_rtx = DECL_RTL (current_function_decl);
+ gcc_assert (MEM_P (this_rtx));
+ this_rtx = XEXP (this_rtx, 0);
if (exitp)
which = profile_function_exit_libfunc;
else
which = profile_function_entry_libfunc;
- emit_library_call (which, LCT_NORMAL, VOIDmode, 2, this, Pmode,
+ emit_library_call (which, LCT_NORMAL, VOIDmode, 2, this_rtx, Pmode,
expand_builtin_return_addr (BUILT_IN_RETURN_ADDRESS,
0),
Pmode);
diff --git a/gcc/c-common.c b/gcc/c-common.c
index dac29ea2c7e..da3dc3bc48b 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -598,7 +598,7 @@ static int resort_field_decl_cmp (const void *, const void *);
If -fno-asm is used, D_ASM is added to the mask. If
-fno-gnu-keywords is used, D_EXT is added. If -fno-asm and C in
C89 mode, D_EXT89 is added for both -fno-asm and -fno-gnu-keywords.
- In C with -Wcxx-compat, we warn if D_CXXWARN is set. */
+ In C with -Wc++-compat, we warn if D_CXXWARN is set. */
const struct c_common_resword c_common_reswords[] =
{
@@ -668,41 +668,41 @@ const struct c_common_resword c_common_reswords[] =
{ "bool", RID_BOOL, D_CXXONLY },
{ "break", RID_BREAK, 0 },
{ "case", RID_CASE, 0 },
- { "catch", RID_CATCH, D_CXX_OBJC },
+ { "catch", RID_CATCH, D_CXX_OBJC | D_CXXWARN },
{ "char", RID_CHAR, 0 },
- { "char16_t", RID_CHAR16, D_CXXONLY | D_CXX0X },
- { "char32_t", RID_CHAR32, D_CXXONLY | D_CXX0X },
- { "class", RID_CLASS, D_CXX_OBJC },
+ { "char16_t", RID_CHAR16, D_CXXONLY | D_CXX0X | D_CXXWARN },
+ { "char32_t", RID_CHAR32, D_CXXONLY | D_CXX0X | D_CXXWARN },
+ { "class", RID_CLASS, D_CXX_OBJC | D_CXXWARN },
{ "const", RID_CONST, 0 },
{ "const_cast", RID_CONSTCAST, D_CXXONLY | D_CXXWARN },
{ "continue", RID_CONTINUE, 0 },
- { "decltype", RID_DECLTYPE, D_CXXONLY | D_CXX0X },
+ { "decltype", RID_DECLTYPE, D_CXXONLY | D_CXX0X | D_CXXWARN },
{ "default", RID_DEFAULT, 0 },
- { "delete", RID_DELETE, D_CXXONLY },
+ { "delete", RID_DELETE, D_CXXONLY | D_CXXWARN },
{ "do", RID_DO, 0 },
{ "double", RID_DOUBLE, 0 },
{ "dynamic_cast", RID_DYNCAST, D_CXXONLY | D_CXXWARN },
{ "else", RID_ELSE, 0 },
{ "enum", RID_ENUM, 0 },
- { "explicit", RID_EXPLICIT, D_CXXONLY },
- { "export", RID_EXPORT, D_CXXONLY },
+ { "explicit", RID_EXPLICIT, D_CXXONLY | D_CXXWARN },
+ { "export", RID_EXPORT, D_CXXONLY | D_CXXWARN },
{ "extern", RID_EXTERN, 0 },
- { "false", RID_FALSE, D_CXXONLY },
+ { "false", RID_FALSE, D_CXXONLY | D_CXXWARN },
{ "float", RID_FLOAT, 0 },
{ "for", RID_FOR, 0 },
- { "friend", RID_FRIEND, D_CXXONLY },
+ { "friend", RID_FRIEND, D_CXXONLY | D_CXXWARN },
{ "goto", RID_GOTO, 0 },
{ "if", RID_IF, 0 },
{ "inline", RID_INLINE, D_EXT89 },
{ "int", RID_INT, 0 },
{ "long", RID_LONG, 0 },
{ "mutable", RID_MUTABLE, D_CXXONLY | D_CXXWARN },
- { "namespace", RID_NAMESPACE, D_CXXONLY },
- { "new", RID_NEW, D_CXXONLY },
- { "operator", RID_OPERATOR, D_CXXONLY },
- { "private", RID_PRIVATE, D_CXX_OBJC },
- { "protected", RID_PROTECTED, D_CXX_OBJC },
- { "public", RID_PUBLIC, D_CXX_OBJC },
+ { "namespace", RID_NAMESPACE, D_CXXONLY | D_CXXWARN },
+ { "new", RID_NEW, D_CXXONLY | D_CXXWARN },
+ { "operator", RID_OPERATOR, D_CXXONLY | D_CXXWARN },
+ { "private", RID_PRIVATE, D_CXX_OBJC | D_CXXWARN },
+ { "protected", RID_PROTECTED, D_CXX_OBJC | D_CXXWARN },
+ { "public", RID_PUBLIC, D_CXX_OBJC | D_CXXWARN },
{ "register", RID_REGISTER, 0 },
{ "reinterpret_cast", RID_REINTCAST, D_CXXONLY | D_CXXWARN },
{ "restrict", RID_RESTRICT, D_CONLY | D_C99 },
@@ -715,19 +715,19 @@ const struct c_common_resword c_common_reswords[] =
{ "static_cast", RID_STATCAST, D_CXXONLY | D_CXXWARN },
{ "struct", RID_STRUCT, 0 },
{ "switch", RID_SWITCH, 0 },
- { "template", RID_TEMPLATE, D_CXXONLY },
- { "this", RID_THIS, D_CXXONLY },
- { "throw", RID_THROW, D_CXX_OBJC },
- { "true", RID_TRUE, D_CXXONLY },
- { "try", RID_TRY, D_CXX_OBJC },
+ { "template", RID_TEMPLATE, D_CXXONLY | D_CXXWARN },
+ { "this", RID_THIS, D_CXXONLY | D_CXXWARN },
+ { "throw", RID_THROW, D_CXX_OBJC | D_CXXWARN },
+ { "true", RID_TRUE, D_CXXONLY | D_CXXWARN },
+ { "try", RID_TRY, D_CXX_OBJC | D_CXXWARN },
{ "typedef", RID_TYPEDEF, 0 },
- { "typename", RID_TYPENAME, D_CXXONLY },
- { "typeid", RID_TYPEID, D_CXXONLY },
+ { "typename", RID_TYPENAME, D_CXXONLY | D_CXXWARN },
+ { "typeid", RID_TYPEID, D_CXXONLY | D_CXXWARN },
{ "typeof", RID_TYPEOF, D_ASM | D_EXT },
{ "union", RID_UNION, 0 },
{ "unsigned", RID_UNSIGNED, 0 },
- { "using", RID_USING, D_CXXONLY },
- { "virtual", RID_VIRTUAL, D_CXXONLY },
+ { "using", RID_USING, D_CXXONLY | D_CXXWARN },
+ { "virtual", RID_VIRTUAL, D_CXXONLY | D_CXXWARN },
{ "void", RID_VOID, 0 },
{ "volatile", RID_VOLATILE, 0 },
{ "wchar_t", RID_WCHAR, D_CXXONLY },
@@ -8202,4 +8202,145 @@ warn_for_div_by_zero (tree divisor)
warning (OPT_Wdiv_by_zero, "division by zero");
}
+/* Subroutine of build_binary_op. Give warnings for comparisons
+ between signed and unsigned quantities that may fail. Do the
+ checking based on the original operand trees ORIG_OP0 and ORIG_OP1,
+ so that casts will be considered, but default promotions won't
+ be.
+
+ The arguments of this function map directly to local variables
+ of build_binary_op. */
+
+void
+warn_for_sign_compare (tree orig_op0, tree orig_op1,
+ tree op0, tree op1,
+ tree result_type, enum tree_code resultcode)
+{
+ int op0_signed = !TYPE_UNSIGNED (TREE_TYPE (orig_op0));
+ int op1_signed = !TYPE_UNSIGNED (TREE_TYPE (orig_op1));
+ int unsignedp0, unsignedp1;
+
+ /* In C++, check for comparison of different enum types. */
+ if (c_dialect_cxx()
+ && TREE_CODE (TREE_TYPE (orig_op0)) == ENUMERAL_TYPE
+ && TREE_CODE (TREE_TYPE (orig_op1)) == ENUMERAL_TYPE
+ && TYPE_MAIN_VARIANT (TREE_TYPE (orig_op0))
+ != TYPE_MAIN_VARIANT (TREE_TYPE (orig_op1)))
+ {
+ warning (OPT_Wsign_compare, "comparison between types %qT and %qT",
+ TREE_TYPE (orig_op0), TREE_TYPE (orig_op1));
+ }
+
+ /* Do not warn if the comparison is being done in a signed type,
+ since the signed type will only be chosen if it can represent
+ all the values of the unsigned type. */
+ if (!TYPE_UNSIGNED (result_type))
+ /* OK */;
+ /* Do not warn if both operands are unsigned. */
+ else if (op0_signed == op1_signed)
+ /* OK */;
+ else
+ {
+ tree sop, uop;
+ bool ovf;
+
+ if (op0_signed)
+ sop = orig_op0, uop = orig_op1;
+ else
+ sop = orig_op1, uop = orig_op0;
+
+ STRIP_TYPE_NOPS (sop);
+ STRIP_TYPE_NOPS (uop);
+
+ /* Do not warn if the signed quantity is an unsuffixed integer
+ literal (or some static constant expression involving such
+ literals or a conditional expression involving such literals)
+ and it is non-negative. */
+ if (tree_expr_nonnegative_warnv_p (sop, &ovf))
+ /* OK */;
+ /* Do not warn if the comparison is an equality operation, the
+ unsigned quantity is an integral constant, and it would fit
+ in the result if the result were signed. */
+ else if (TREE_CODE (uop) == INTEGER_CST
+ && (resultcode == EQ_EXPR || resultcode == NE_EXPR)
+ && int_fits_type_p (uop, c_common_signed_type (result_type)))
+ /* OK */;
+ /* In C, do not warn if the unsigned quantity is an enumeration
+ constant and its maximum value would fit in the result if the
+ result were signed. */
+ else if (!c_dialect_cxx() && TREE_CODE (uop) == INTEGER_CST
+ && TREE_CODE (TREE_TYPE (uop)) == ENUMERAL_TYPE
+ && int_fits_type_p (TYPE_MAX_VALUE (TREE_TYPE (uop)),
+ c_common_signed_type (result_type)))
+ /* OK */;
+ else
+ warning (OPT_Wsign_compare,
+ "comparison between signed and unsigned integer expressions");
+ }
+
+ /* Warn if two unsigned values are being compared in a size larger
+ than their original size, and one (and only one) is the result of
+ a `~' operator. This comparison will always fail.
+
+ Also warn if one operand is a constant, and the constant does not
+ have all bits set that are set in the ~ operand when it is
+ extended. */
+
+ op0 = get_narrower (op0, &unsignedp0);
+ op1 = get_narrower (op1, &unsignedp1);
+
+ if ((TREE_CODE (op0) == BIT_NOT_EXPR)
+ ^ (TREE_CODE (op1) == BIT_NOT_EXPR))
+ {
+ if (TREE_CODE (op0) == BIT_NOT_EXPR)
+ op0 = get_narrower (TREE_OPERAND (op0, 0), &unsignedp0);
+ if (TREE_CODE (op1) == BIT_NOT_EXPR)
+ op1 = get_narrower (TREE_OPERAND (op1, 0), &unsignedp1);
+
+ if (host_integerp (op0, 0) || host_integerp (op1, 0))
+ {
+ tree primop;
+ HOST_WIDE_INT constant, mask;
+ int unsignedp;
+ unsigned int bits;
+
+ if (host_integerp (op0, 0))
+ {
+ primop = op1;
+ unsignedp = unsignedp1;
+ constant = tree_low_cst (op0, 0);
+ }
+ else
+ {
+ primop = op0;
+ unsignedp = unsignedp0;
+ constant = tree_low_cst (op1, 0);
+ }
+
+ bits = TYPE_PRECISION (TREE_TYPE (primop));
+ if (bits < TYPE_PRECISION (result_type)
+ && bits < HOST_BITS_PER_LONG && unsignedp)
+ {
+ mask = (~ (HOST_WIDE_INT) 0) << bits;
+ if ((mask & constant) != mask)
+ {
+ if (constant == 0)
+ warning (OPT_Wsign_compare,
+ "promoted ~unsigned is always non-zero");
+ else
+ warning (OPT_Wsign_compare,
+ "comparison of promoted ~unsigned with constant");
+ }
+ }
+ }
+ else if (unsignedp0 && unsignedp1
+ && (TYPE_PRECISION (TREE_TYPE (op0))
+ < TYPE_PRECISION (result_type))
+ && (TYPE_PRECISION (TREE_TYPE (op1))
+ < TYPE_PRECISION (result_type)))
+ warning (OPT_Wsign_compare,
+ "comparison of promoted ~unsigned with unsigned");
+ }
+}
+
#include "gt-c-common.h"
diff --git a/gcc/c-common.h b/gcc/c-common.h
index f600751f0c0..0f2a359c16f 100644
--- a/gcc/c-common.h
+++ b/gcc/c-common.h
@@ -928,6 +928,10 @@ extern void warn_about_parentheses (enum tree_code, enum tree_code,
enum tree_code);
extern void warn_for_unused_label (tree label);
extern void warn_for_div_by_zero (tree divisor);
+extern void warn_for_sign_compare (tree orig_op0, tree orig_op1,
+ tree op0, tree op1,
+ tree result_type,
+ enum tree_code resultcode);
/* In c-gimplify.c */
extern void c_genericize (tree);
diff --git a/gcc/c-cppbuiltin.c b/gcc/c-cppbuiltin.c
index 2d951fe450c..01f92155fd6 100644
--- a/gcc/c-cppbuiltin.c
+++ b/gcc/c-cppbuiltin.c
@@ -30,6 +30,7 @@ along with GCC; see the file COPYING3. If not see
#include "c-pragma.h"
#include "output.h"
#include "except.h" /* For USING_SJLJ_EXCEPTIONS. */
+#include "debug.h" /* For dwarf2out_do_frame. */
#include "toplev.h"
#include "tm_p.h" /* Target prototypes. */
#include "target.h"
@@ -691,6 +692,11 @@ c_cpp_builtins (cpp_reader *pfile)
cpp_define (pfile, "__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16");
#endif
+#ifdef DWARF2_UNWIND_INFO
+ if (flag_dwarf2_cfi_asm && dwarf2out_do_frame ())
+ cpp_define (pfile, "__GCC_HAVE_DWARF2_CFI_ASM");
+#endif
+
/* Make the choice of ObjC runtime visible to source code. */
if (c_dialect_objc () && flag_next_runtime)
cpp_define (pfile, "__NEXT_RUNTIME__");
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 4756e256f38..bacff90be02 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -8372,124 +8372,10 @@ build_binary_op (enum tree_code code, tree orig_op0, tree orig_op1,
converted = 1;
resultcode = xresultcode;
- if (warn_sign_compare && skip_evaluation == 0)
- {
- int op0_signed = !TYPE_UNSIGNED (TREE_TYPE (orig_op0));
- int op1_signed = !TYPE_UNSIGNED (TREE_TYPE (orig_op1));
- int unsignedp0, unsignedp1;
- tree primop0 = get_narrower (op0, &unsignedp0);
- tree primop1 = get_narrower (op1, &unsignedp1);
-
- xop0 = orig_op0;
- xop1 = orig_op1;
- STRIP_TYPE_NOPS (xop0);
- STRIP_TYPE_NOPS (xop1);
-
- /* Give warnings for comparisons between signed and unsigned
- quantities that may fail.
-
- Do the checking based on the original operand trees, so that
- casts will be considered, but default promotions won't be.
-
- Do not warn if the comparison is being done in a signed type,
- since the signed type will only be chosen if it can represent
- all the values of the unsigned type. */
- if (!TYPE_UNSIGNED (result_type))
- /* OK */;
- /* Do not warn if both operands are the same signedness. */
- else if (op0_signed == op1_signed)
- /* OK */;
- else
- {
- tree sop, uop;
- bool ovf;
-
- if (op0_signed)
- sop = xop0, uop = xop1;
- else
- sop = xop1, uop = xop0;
-
- /* Do not warn if the signed quantity is an
- unsuffixed integer literal (or some static
- constant expression involving such literals or a
- conditional expression involving such literals)
- and it is non-negative. */
- if (tree_expr_nonnegative_warnv_p (sop, &ovf))
- /* OK */;
- /* Do not warn if the comparison is an equality operation,
- the unsigned quantity is an integral constant, and it
- would fit in the result if the result were signed. */
- else if (TREE_CODE (uop) == INTEGER_CST
- && (resultcode == EQ_EXPR || resultcode == NE_EXPR)
- && int_fits_type_p
- (uop, c_common_signed_type (result_type)))
- /* OK */;
- /* Do not warn if the unsigned quantity is an enumeration
- constant and its maximum value would fit in the result
- if the result were signed. */
- else if (TREE_CODE (uop) == INTEGER_CST
- && TREE_CODE (TREE_TYPE (uop)) == ENUMERAL_TYPE
- && int_fits_type_p
- (TYPE_MAX_VALUE (TREE_TYPE (uop)),
- c_common_signed_type (result_type)))
- /* OK */;
- else
- warning (OPT_Wsign_compare, "comparison between signed and unsigned");
- }
-
- /* Warn if two unsigned values are being compared in a size
- larger than their original size, and one (and only one) is the
- result of a `~' operator. This comparison will always fail.
-
- Also warn if one operand is a constant, and the constant
- does not have all bits set that are set in the ~ operand
- when it is extended. */
-
- if ((TREE_CODE (primop0) == BIT_NOT_EXPR)
- != (TREE_CODE (primop1) == BIT_NOT_EXPR))
- {
- if (TREE_CODE (primop0) == BIT_NOT_EXPR)
- primop0 = get_narrower (TREE_OPERAND (primop0, 0),
- &unsignedp0);
- else
- primop1 = get_narrower (TREE_OPERAND (primop1, 0),
- &unsignedp1);
-
- if (host_integerp (primop0, 0) || host_integerp (primop1, 0))
- {
- tree primop;
- HOST_WIDE_INT constant, mask;
- int unsignedp, bits;
-
- if (host_integerp (primop0, 0))
- {
- primop = primop1;
- unsignedp = unsignedp1;
- constant = tree_low_cst (primop0, 0);
- }
- else
- {
- primop = primop0;
- unsignedp = unsignedp0;
- constant = tree_low_cst (primop1, 0);
- }
-
- bits = TYPE_PRECISION (TREE_TYPE (primop));
- if (bits < TYPE_PRECISION (result_type)
- && bits < HOST_BITS_PER_WIDE_INT && unsignedp)
- {
- mask = (~(HOST_WIDE_INT) 0) << bits;
- if ((mask & constant) != mask)
- warning (OPT_Wsign_compare, "comparison of promoted ~unsigned with constant");
- }
- }
- else if (unsignedp0 && unsignedp1
- && (TYPE_PRECISION (TREE_TYPE (primop0))
- < TYPE_PRECISION (result_type))
- && (TYPE_PRECISION (TREE_TYPE (primop1))
- < TYPE_PRECISION (result_type)))
- warning (OPT_Wsign_compare, "comparison of promoted ~unsigned with unsigned");
- }
+ if (warn_sign_compare && !skip_evaluation)
+ {
+ warn_for_sign_compare (orig_op0, orig_op1, op0, op1,
+ result_type, resultcode);
}
}
}
diff --git a/gcc/calls.c b/gcc/calls.c
index 146f251d510..27aaaee6eff 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -1877,7 +1877,7 @@ shift_return_value (enum machine_mode mode, bool left_p, rtx value)
static rtx
avoid_likely_spilled_reg (rtx x)
{
- rtx new;
+ rtx new_rtx;
if (REG_P (x)
&& HARD_REGISTER_P (x)
@@ -1888,10 +1888,10 @@ avoid_likely_spilled_reg (rtx x)
and the whole point of this function is to avoid
using the hard register directly in such a situation. */
generating_concat_p = 0;
- new = gen_reg_rtx (GET_MODE (x));
+ new_rtx = gen_reg_rtx (GET_MODE (x));
generating_concat_p = 1;
- emit_move_insn (new, x);
- return new;
+ emit_move_insn (new_rtx, x);
+ return new_rtx;
}
return x;
}
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 8d1e5d2e3e8..296d74858b4 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -50,20 +50,20 @@ tree
gimple_assign_rhs_to_tree (gimple stmt)
{
tree t;
- enum gimple_rhs_class class;
+ enum gimple_rhs_class grhs_class;
- class = get_gimple_rhs_class (gimple_expr_code (stmt));
+ grhs_class = get_gimple_rhs_class (gimple_expr_code (stmt));
- if (class == GIMPLE_BINARY_RHS)
+ if (grhs_class == GIMPLE_BINARY_RHS)
t = build2 (gimple_assign_rhs_code (stmt),
TREE_TYPE (gimple_assign_lhs (stmt)),
gimple_assign_rhs1 (stmt),
gimple_assign_rhs2 (stmt));
- else if (class == GIMPLE_UNARY_RHS)
+ else if (grhs_class == GIMPLE_UNARY_RHS)
t = build1 (gimple_assign_rhs_code (stmt),
TREE_TYPE (gimple_assign_lhs (stmt)),
gimple_assign_rhs1 (stmt));
- else if (class == GIMPLE_SINGLE_RHS)
+ else if (grhs_class == GIMPLE_SINGLE_RHS)
t = gimple_assign_rhs1 (stmt);
else
gcc_unreachable ();
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index b5564b679d4..37ad9f1606f 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -1159,25 +1159,25 @@ cgraph_clone_edge (struct cgraph_edge *e, struct cgraph_node *n,
gimple call_stmt, gcov_type count_scale, int freq_scale,
int loop_nest, bool update_original)
{
- struct cgraph_edge *new;
+ struct cgraph_edge *new_edge;
gcov_type count = e->count * count_scale / REG_BR_PROB_BASE;
gcov_type freq = e->frequency * (gcov_type) freq_scale / CGRAPH_FREQ_BASE;
if (freq > CGRAPH_FREQ_MAX)
freq = CGRAPH_FREQ_MAX;
- new = cgraph_create_edge (n, e->callee, call_stmt, count, freq,
+ new_edge = cgraph_create_edge (n, e->callee, call_stmt, count, freq,
e->loop_nest + loop_nest);
- new->inline_failed = e->inline_failed;
- new->indirect_call = e->indirect_call;
+ new_edge->inline_failed = e->inline_failed;
+ new_edge->indirect_call = e->indirect_call;
if (update_original)
{
- e->count -= new->count;
+ e->count -= new_edge->count;
if (e->count < 0)
e->count = 0;
}
- cgraph_call_edge_duplication_hooks (e, new);
- return new;
+ cgraph_call_edge_duplication_hooks (e, new_edge);
+ return new_edge;
}
/* Create node representing clone of N executed COUNT times. Decrease
@@ -1190,25 +1190,25 @@ struct cgraph_node *
cgraph_clone_node (struct cgraph_node *n, gcov_type count, int freq,
int loop_nest, bool update_original)
{
- struct cgraph_node *new = cgraph_create_node ();
+ struct cgraph_node *new_node = cgraph_create_node ();
struct cgraph_edge *e;
gcov_type count_scale;
- new->decl = n->decl;
- new->origin = n->origin;
- if (new->origin)
+ new_node->decl = n->decl;
+ new_node->origin = n->origin;
+ if (new_node->origin)
{
- new->next_nested = new->origin->nested;
- new->origin->nested = new;
+ new_node->next_nested = new_node->origin->nested;
+ new_node->origin->nested = new_node;
}
- new->analyzed = n->analyzed;
- new->local = n->local;
- new->global = n->global;
- new->rtl = n->rtl;
- new->master_clone = n->master_clone;
- new->count = count;
+ new_node->analyzed = n->analyzed;
+ new_node->local = n->local;
+ new_node->global = n->global;
+ new_node->rtl = n->rtl;
+ new_node->master_clone = n->master_clone;
+ new_node->count = count;
if (n->count)
- count_scale = new->count * REG_BR_PROB_BASE / n->count;
+ count_scale = new_node->count * REG_BR_PROB_BASE / n->count;
else
count_scale = 0;
if (update_original)
@@ -1219,17 +1219,17 @@ cgraph_clone_node (struct cgraph_node *n, gcov_type count, int freq,
}
for (e = n->callees;e; e=e->next_callee)
- cgraph_clone_edge (e, new, e->call_stmt, count_scale, freq, loop_nest,
+ cgraph_clone_edge (e, new_node, e->call_stmt, count_scale, freq, loop_nest,
update_original);
- new->next_clone = n->next_clone;
- new->prev_clone = n;
- n->next_clone = new;
- if (new->next_clone)
- new->next_clone->prev_clone = new;
+ new_node->next_clone = n->next_clone;
+ new_node->prev_clone = n;
+ n->next_clone = new_node;
+ if (new_node->next_clone)
+ new_node->next_clone->prev_clone = new_node;
- cgraph_call_node_duplication_hooks (n, new);
- return new;
+ cgraph_call_node_duplication_hooks (n, new_node);
+ return new_node;
}
/* Return true if N is an master_clone, (see cgraph_master_clone). */
diff --git a/gcc/common.opt b/gcc/common.opt
index 08f95c228e6..02bdef25588 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -459,6 +459,10 @@ fdump-unnumbered
Common Report Var(flag_dump_unnumbered) VarExists
Suppress output of instruction numbers, line number notes and addresses in debugging dumps
+fdwarf2-cfi-asm
+Common Report Var(flag_dwarf2_cfi_asm) Init(HAVE_GAS_CFI_DIRECTIVE)
+Enable CFI tables via GAS assembler directives.
+
fearly-inlining
Common Report Var(flag_early_inlining) Init(1) Optimization
Perform early inlining
diff --git a/gcc/config.gcc b/gcc/config.gcc
index a2aa4242f80..c3275471169 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -2348,11 +2348,11 @@ xstormy16-*-elf)
tmake_file="stormy16/t-stormy16"
extra_parts="crtbegin.o crtend.o"
;;
-xtensa-*-elf*)
+xtensa*-*-elf*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h xtensa/elf.h"
tmake_file="xtensa/t-xtensa xtensa/t-elf"
;;
-xtensa-*-linux*)
+xtensa*-*-linux*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h xtensa/linux.h"
tmake_file="${tmake_file} xtensa/t-xtensa xtensa/t-linux"
;;
diff --git a/gcc/config.in b/gcc/config.in
index b4261d9d9e5..47ec2ab2fe2 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -821,6 +821,12 @@
#endif
+/* Define 0/1 if your assembler supports CFI directives. */
+#ifndef USED_FOR_TARGET
+#undef HAVE_GAS_CFI_DIRECTIVE
+#endif
+
+
/* Define if your assembler uses the new HImode fild and fist notation. */
#ifndef USED_FOR_TARGET
#undef HAVE_GAS_FILDS_FISTS
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index e2835acd3b7..cba9370f629 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -1506,43 +1506,43 @@ get_unaligned_offset (rtx addr, HOST_WIDE_INT ofs)
/* On the Alpha, all (non-symbolic) constants except zero go into
a floating-point register via memory. Note that we cannot
- return anything that is not a subset of CLASS, and that some
+ return anything that is not a subset of RCLASS, and that some
symbolic constants cannot be dropped to memory. */
enum reg_class
-alpha_preferred_reload_class(rtx x, enum reg_class class)
+alpha_preferred_reload_class(rtx x, enum reg_class rclass)
{
/* Zero is present in any register class. */
if (x == CONST0_RTX (GET_MODE (x)))
- return class;
+ return rclass;
/* These sorts of constants we can easily drop to memory. */
if (GET_CODE (x) == CONST_INT
|| GET_CODE (x) == CONST_DOUBLE
|| GET_CODE (x) == CONST_VECTOR)
{
- if (class == FLOAT_REGS)
+ if (rclass == FLOAT_REGS)
return NO_REGS;
- if (class == ALL_REGS)
+ if (rclass == ALL_REGS)
return GENERAL_REGS;
- return class;
+ return rclass;
}
/* All other kinds of constants should not (and in the case of HIGH
cannot) be dropped to memory -- instead we use a GENERAL_REGS
secondary reload. */
if (CONSTANT_P (x))
- return (class == ALL_REGS ? GENERAL_REGS : class);
+ return (rclass == ALL_REGS ? GENERAL_REGS : rclass);
- return class;
+ return rclass;
}
/* Inform reload about cases where moving X with a mode MODE to a register in
- CLASS requires an extra scratch or immediate register. Return the class
+ RCLASS requires an extra scratch or immediate register. Return the class
needed for the immediate register. */
static enum reg_class
-alpha_secondary_reload (bool in_p, rtx x, enum reg_class class,
+alpha_secondary_reload (bool in_p, rtx x, enum reg_class rclass,
enum machine_mode mode, secondary_reload_info *sri)
{
/* Loading and storing HImode or QImode values to and from memory
@@ -1564,7 +1564,7 @@ alpha_secondary_reload (bool in_p, rtx x, enum reg_class class,
/* We also cannot do integral arithmetic into FP regs, as might result
from register elimination into a DImode fp register. */
- if (class == FLOAT_REGS)
+ if (rclass == FLOAT_REGS)
{
if (MEM_P (x) && GET_CODE (XEXP (x, 0)) == AND)
return GENERAL_REGS;
@@ -1644,7 +1644,7 @@ static rtx
alpha_emit_set_const_1 (rtx target, enum machine_mode mode,
HOST_WIDE_INT c, int n, bool no_output)
{
- HOST_WIDE_INT new;
+ HOST_WIDE_INT new_const;
int i, bits;
/* Use a pseudo if highly optimizing and still generating RTL. */
rtx subtarget
@@ -1743,15 +1743,15 @@ alpha_emit_set_const_1 (rtx target, enum machine_mode mode,
/* First, see if minus some low bits, we've an easy load of
high bits. */
- new = ((c & 0xffff) ^ 0x8000) - 0x8000;
- if (new != 0)
+ new_const = ((c & 0xffff) ^ 0x8000) - 0x8000;
+ if (new_const != 0)
{
- temp = alpha_emit_set_const (subtarget, mode, c - new, i, no_output);
+ temp = alpha_emit_set_const (subtarget, mode, c - new_const, i, no_output);
if (temp)
{
if (no_output)
return temp;
- return expand_binop (mode, add_optab, temp, GEN_INT (new),
+ return expand_binop (mode, add_optab, temp, GEN_INT (new_const),
target, 0, OPTAB_WIDEN);
}
}
@@ -1778,12 +1778,12 @@ alpha_emit_set_const_1 (rtx target, enum machine_mode mode,
if (bits > 0)
for (; bits > 0; bits--)
{
- new = c >> bits;
- temp = alpha_emit_set_const (subtarget, mode, new, i, no_output);
+ new_const = c >> bits;
+ temp = alpha_emit_set_const (subtarget, mode, new_const, i, no_output);
if (!temp && c < 0)
{
- new = (unsigned HOST_WIDE_INT)c >> bits;
- temp = alpha_emit_set_const (subtarget, mode, new,
+ new_const = (unsigned HOST_WIDE_INT)c >> bits;
+ temp = alpha_emit_set_const (subtarget, mode, new_const,
i, no_output);
}
if (temp)
@@ -1806,12 +1806,12 @@ alpha_emit_set_const_1 (rtx target, enum machine_mode mode,
if (bits > 0)
for (; bits > 0; bits--)
{
- new = c << bits;
- temp = alpha_emit_set_const (subtarget, mode, new, i, no_output);
+ new_const = c << bits;
+ temp = alpha_emit_set_const (subtarget, mode, new_const, i, no_output);
if (!temp)
{
- new = (c << bits) | (((HOST_WIDE_INT) 1 << bits) - 1);
- temp = alpha_emit_set_const (subtarget, mode, new,
+ new_const = (c << bits) | (((HOST_WIDE_INT) 1 << bits) - 1);
+ temp = alpha_emit_set_const (subtarget, mode, new_const,
i, no_output);
}
if (temp)
@@ -1832,12 +1832,12 @@ alpha_emit_set_const_1 (rtx target, enum machine_mode mode,
if (bits > 0)
for (; bits > 0; bits--)
{
- new = c << bits;
- temp = alpha_emit_set_const (subtarget, mode, new, i, no_output);
+ new_const = c << bits;
+ temp = alpha_emit_set_const (subtarget, mode, new_const, i, no_output);
if (!temp)
{
- new = (c << bits) | (((HOST_WIDE_INT) 1 << bits) - 1);
- temp = alpha_emit_set_const (subtarget, mode, new,
+ new_const = (c << bits) | (((HOST_WIDE_INT) 1 << bits) - 1);
+ temp = alpha_emit_set_const (subtarget, mode, new_const,
i, no_output);
}
if (temp)
@@ -1855,25 +1855,25 @@ alpha_emit_set_const_1 (rtx target, enum machine_mode mode,
constant except that all bytes that are 0 are changed to be 0xff. If we
can, then we can do a ZAPNOT to obtain the desired constant. */
- new = c;
+ new_const = c;
for (i = 0; i < 64; i += 8)
- if ((new & ((HOST_WIDE_INT) 0xff << i)) == 0)
- new |= (HOST_WIDE_INT) 0xff << i;
+ if ((new_const & ((HOST_WIDE_INT) 0xff << i)) == 0)
+ new_const |= (HOST_WIDE_INT) 0xff << i;
/* We are only called for SImode and DImode. If this is SImode, ensure that
we are sign extended to a full word. */
if (mode == SImode)
- new = ((new & 0xffffffff) ^ 0x80000000) - 0x80000000;
+ new_const = ((new_const & 0xffffffff) ^ 0x80000000) - 0x80000000;
- if (new != c)
+ if (new_const != c)
{
- temp = alpha_emit_set_const (subtarget, mode, new, n - 1, no_output);
+ temp = alpha_emit_set_const (subtarget, mode, new_const, n - 1, no_output);
if (temp)
{
if (no_output)
return temp;
- return expand_binop (mode, and_optab, temp, GEN_INT (c | ~ new),
+ return expand_binop (mode, and_optab, temp, GEN_INT (c | ~ new_const),
target, 0, OPTAB_WIDEN);
}
}
@@ -5708,15 +5708,15 @@ function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED,
enum machine_mode mode)
{
unsigned int regnum, dummy;
- enum mode_class class;
+ enum mode_class mclass;
gcc_assert (!valtype || !alpha_return_in_memory (valtype, func));
if (valtype)
mode = TYPE_MODE (valtype);
- class = GET_MODE_CLASS (mode);
- switch (class)
+ mclass = GET_MODE_CLASS (mode);
+ switch (mclass)
{
case MODE_INT:
PROMOTE_MODE (mode, dummy, valtype);
@@ -8261,7 +8261,7 @@ alpha_output_mi_thunk_osf (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
tree function)
{
HOST_WIDE_INT hi, lo;
- rtx this, insn, funexp;
+ rtx this_rtx, insn, funexp;
/* We always require a valid GP. */
emit_insn (gen_prologue_ldgp ());
@@ -8270,9 +8270,9 @@ alpha_output_mi_thunk_osf (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
/* Find the "this" pointer. If the function returns a structure,
the structure return pointer is in $16. */
if (aggregate_value_p (TREE_TYPE (TREE_TYPE (function)), function))
- this = gen_rtx_REG (Pmode, 17);
+ this_rtx = gen_rtx_REG (Pmode, 17);
else
- this = gen_rtx_REG (Pmode, 16);
+ this_rtx = gen_rtx_REG (Pmode, 16);
/* Add DELTA. When possible we use ldah+lda. Otherwise load the
entire constant for the add. */
@@ -8281,15 +8281,15 @@ alpha_output_mi_thunk_osf (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
if (hi + lo == delta)
{
if (hi)
- emit_insn (gen_adddi3 (this, this, GEN_INT (hi)));
+ emit_insn (gen_adddi3 (this_rtx, this_rtx, GEN_INT (hi)));
if (lo)
- emit_insn (gen_adddi3 (this, this, GEN_INT (lo)));
+ emit_insn (gen_adddi3 (this_rtx, this_rtx, GEN_INT (lo)));
}
else
{
rtx tmp = alpha_emit_set_long_const (gen_rtx_REG (Pmode, 0),
delta, -(delta < 0));
- emit_insn (gen_adddi3 (this, this, tmp));
+ emit_insn (gen_adddi3 (this_rtx, this_rtx, tmp));
}
/* Add a delta stored in the vtable at VCALL_OFFSET. */
@@ -8298,7 +8298,7 @@ alpha_output_mi_thunk_osf (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
rtx tmp, tmp2;
tmp = gen_rtx_REG (Pmode, 0);
- emit_move_insn (tmp, gen_rtx_MEM (Pmode, this));
+ emit_move_insn (tmp, gen_rtx_MEM (Pmode, this_rtx));
lo = ((vcall_offset & 0xffff) ^ 0x8000) - 0x8000;
hi = (((vcall_offset - lo) & 0xffffffff) ^ 0x80000000) - 0x80000000;
@@ -8320,7 +8320,7 @@ alpha_output_mi_thunk_osf (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
tmp2 = tmp;
emit_move_insn (tmp, gen_rtx_MEM (Pmode, tmp2));
- emit_insn (gen_adddi3 (this, this, tmp));
+ emit_insn (gen_adddi3 (this_rtx, this_rtx, tmp));
}
/* Generate a tail call to the target function. */
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index f449d087e2b..7d1840a6836 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -10283,7 +10283,7 @@ output_move_vfp (rtx *operands)
int load = REG_P (operands[0]);
int dp = GET_MODE_SIZE (GET_MODE (operands[0])) == 8;
int integer_p = GET_MODE_CLASS (GET_MODE (operands[0])) == MODE_INT;
- const char *template;
+ const char *templ;
char buff[50];
enum machine_mode mode;
@@ -10306,25 +10306,25 @@ output_move_vfp (rtx *operands)
switch (GET_CODE (addr))
{
case PRE_DEC:
- template = "f%smdb%c%%?\t%%0!, {%%%s1}%s";
+ templ = "f%smdb%c%%?\t%%0!, {%%%s1}%s";
ops[0] = XEXP (addr, 0);
ops[1] = reg;
break;
case POST_INC:
- template = "f%smia%c%%?\t%%0!, {%%%s1}%s";
+ templ = "f%smia%c%%?\t%%0!, {%%%s1}%s";
ops[0] = XEXP (addr, 0);
ops[1] = reg;
break;
default:
- template = "f%s%c%%?\t%%%s0, %%1%s";
+ templ = "f%s%c%%?\t%%%s0, %%1%s";
ops[0] = reg;
ops[1] = mem;
break;
}
- sprintf (buff, template,
+ sprintf (buff, templ,
load ? "ld" : "st",
dp ? 'd' : 's',
dp ? "P" : "",
@@ -10365,7 +10365,7 @@ output_move_neon (rtx *operands)
{
rtx reg, mem, addr, ops[2];
int regno, load = REG_P (operands[0]);
- const char *template;
+ const char *templ;
char buff[50];
enum machine_mode mode;
@@ -10392,7 +10392,7 @@ output_move_neon (rtx *operands)
switch (GET_CODE (addr))
{
case POST_INC:
- template = "v%smia%%?\t%%0!, %%h1";
+ templ = "v%smia%%?\t%%0!, %%h1";
ops[0] = XEXP (addr, 0);
ops[1] = reg;
break;
@@ -10435,12 +10435,12 @@ output_move_neon (rtx *operands)
}
default:
- template = "v%smia%%?\t%%m0, %%h1";
+ templ = "v%smia%%?\t%%m0, %%h1";
ops[0] = mem;
ops[1] = reg;
}
- sprintf (buff, template, load ? "ld" : "st");
+ sprintf (buff, templ, load ? "ld" : "st");
output_asm_insn (buff, ops);
return "";
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index 9cd6e7262a2..5b514451c5d 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -5286,12 +5286,12 @@
&& GET_CODE (base = XEXP (base, 0)) == REG))
&& REGNO_POINTER_ALIGN (REGNO (base)) >= 32)
{
- rtx new;
+ rtx new_rtx;
- new = widen_memory_access (operands[1], SImode,
- ((INTVAL (offset) & ~3)
- - INTVAL (offset)));
- emit_insn (gen_movsi (reg, new));
+ new_rtx = widen_memory_access (operands[1], SImode,
+ ((INTVAL (offset) & ~3)
+ - INTVAL (offset)));
+ emit_insn (gen_movsi (reg, new_rtx));
if (((INTVAL (offset) & 2) != 0)
^ (BYTES_BIG_ENDIAN ? 1 : 0))
{
diff --git a/gcc/config/avr/avr-protos.h b/gcc/config/avr/avr-protos.h
index 7665555fd84..bcf81d9afc5 100644
--- a/gcc/config/avr/avr-protos.h
+++ b/gcc/config/avr/avr-protos.h
@@ -94,7 +94,7 @@ extern void avr_output_bld (rtx operands[], int bit_nr);
extern void avr_output_addr_vec_elt (FILE *stream, int value);
extern const char *avr_out_sbxx_branch (rtx insn, rtx operands[]);
-extern enum reg_class preferred_reload_class (rtx x, enum reg_class class);
+extern enum reg_class preferred_reload_class (rtx x, enum reg_class rclass);
extern int extra_constraint_Q (rtx x);
extern rtx legitimize_address (rtx x, rtx oldx, enum machine_mode mode);
extern int adjust_insn_length (rtx insn, int len);
@@ -111,21 +111,21 @@ extern int reg_unused_after (rtx insn, rtx reg);
extern int _reg_unused_after (rtx insn, rtx reg);
extern int avr_jump_mode (rtx x, rtx insn);
extern int byte_immediate_operand (rtx op, enum machine_mode mode);
-extern int test_hard_reg_class (enum reg_class class, rtx x);
+extern int test_hard_reg_class (enum reg_class rclass, rtx x);
extern int jump_over_one_insn_p (rtx insn, rtx dest);
extern int avr_hard_regno_mode_ok (int regno, enum machine_mode mode);
extern void final_prescan_insn (rtx insn, rtx *operand, int num_operands);
extern int avr_simplify_comparison_p (enum machine_mode mode,
- RTX_CODE operator, rtx x);
+ RTX_CODE op, rtx x);
extern RTX_CODE avr_normalize_condition (RTX_CODE condition);
extern int compare_eq_p (rtx insn);
-extern void out_shift_with_cnt (const char *template, rtx insn,
+extern void out_shift_with_cnt (const char *templ, rtx insn,
rtx operands[], int *len, int t_len);
#endif /* RTX_CODE */
#ifdef HAVE_MACHINE_MODES
-extern int class_max_nregs (enum reg_class class, enum machine_mode mode);
+extern int class_max_nregs (enum reg_class rclass, enum machine_mode mode);
#endif /* HAVE_MACHINE_MODES */
#ifdef REAL_VALUE_TYPE
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c
index 84625d81f8a..1b1650f0f37 100644
--- a/gcc/config/avr/avr.c
+++ b/gcc/config/avr/avr.c
@@ -1403,7 +1403,7 @@ notice_update_cc (rtx body ATTRIBUTE_UNUSED, rtx insn)
class CLASS needed to hold a value of mode MODE. */
int
-class_max_nregs (enum reg_class class ATTRIBUTE_UNUSED,enum machine_mode mode)
+class_max_nregs (enum reg_class rclass ATTRIBUTE_UNUSED,enum machine_mode mode)
{
return ((GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1) / UNITS_PER_WORD);
}
@@ -1566,14 +1566,14 @@ final_prescan_insn (rtx insn, rtx *operand ATTRIBUTE_UNUSED,
/* Return 0 if undefined, 1 if always true or always false. */
int
-avr_simplify_comparison_p (enum machine_mode mode, RTX_CODE operator, rtx x)
+avr_simplify_comparison_p (enum machine_mode mode, RTX_CODE op, rtx x)
{
unsigned int max = (mode == QImode ? 0xff :
mode == HImode ? 0xffff :
mode == SImode ? 0xffffffff : 0);
- if (max && operator && GET_CODE (x) == CONST_INT)
+ if (max && op && GET_CODE (x) == CONST_INT)
{
- if (unsigned_condition (operator) != operator)
+ if (unsigned_condition (op) != op)
max >>= 1;
if (max != (INTVAL (x) & max)
@@ -1743,15 +1743,15 @@ output_movqi (rtx insn, rtx operands[], int *l)
}
else if (GET_CODE (dest) == MEM)
{
- const char *template;
+ const char *templ;
if (src == const0_rtx)
operands[1] = zero_reg_rtx;
- template = out_movqi_mr_r (insn, operands, real_l);
+ templ = out_movqi_mr_r (insn, operands, real_l);
if (!real_l)
- output_asm_insn (template, operands);
+ output_asm_insn (templ, operands);
operands[1] = src;
}
@@ -1893,15 +1893,15 @@ output_movhi (rtx insn, rtx operands[], int *l)
}
else if (GET_CODE (dest) == MEM)
{
- const char *template;
+ const char *templ;
if (src == const0_rtx)
operands[1] = zero_reg_rtx;
- template = out_movhi_mr_r (insn, operands, real_l);
+ templ = out_movhi_mr_r (insn, operands, real_l);
if (!real_l)
- output_asm_insn (template, operands);
+ output_asm_insn (templ, operands);
operands[1] = src;
return "";
@@ -2581,15 +2581,15 @@ output_movsisf(rtx insn, rtx operands[], int *l)
}
else if (GET_CODE (dest) == MEM)
{
- const char *template;
+ const char *templ;
if (src == const0_rtx)
operands[1] = zero_reg_rtx;
- template = out_movsi_mr_r (insn, operands, real_l);
+ templ = out_movsi_mr_r (insn, operands, real_l);
if (!real_l)
- output_asm_insn (template, operands);
+ output_asm_insn (templ, operands);
operands[1] = src;
return "";
@@ -2930,7 +2930,7 @@ out_tstsi (rtx insn, int *l)
carefully hand-optimized in ?sh??i3_out. */
void
-out_shift_with_cnt (const char *template, rtx insn, rtx operands[],
+out_shift_with_cnt (const char *templ, rtx insn, rtx operands[],
int *len, int t_len)
{
rtx op[10];
@@ -2975,7 +2975,7 @@ out_shift_with_cnt (const char *template, rtx insn, rtx operands[],
else
{
while (count-- > 0)
- output_asm_insn (template, op);
+ output_asm_insn (templ, op);
}
return;
@@ -3056,7 +3056,7 @@ out_shift_with_cnt (const char *template, rtx insn, rtx operands[],
else
{
strcat (str, "\n1:\t");
- strcat (str, template);
+ strcat (str, templ);
strcat (str, second_label ? "\n2:\t" : "\n\t");
strcat (str, use_zero_reg ? AS1 (lsr,%3) : AS1 (dec,%3));
strcat (str, CR_TAB);
@@ -5735,19 +5735,19 @@ avr_function_value (const_tree type,
in class CLASS. */
enum reg_class
-preferred_reload_class (rtx x ATTRIBUTE_UNUSED, enum reg_class class)
+preferred_reload_class (rtx x ATTRIBUTE_UNUSED, enum reg_class rclass)
{
- return class;
+ return rclass;
}
int
-test_hard_reg_class (enum reg_class class, rtx x)
+test_hard_reg_class (enum reg_class rclass, rtx x)
{
int regno = true_regnum (x);
if (regno < 0)
return 0;
- if (TEST_HARD_REG_CLASS (class, regno))
+ if (TEST_HARD_REG_CLASS (rclass, regno))
return 1;
return 0;
diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index 843726067b6..8fda5c01d8e 100644
--- a/gcc/config/bfin/bfin.c
+++ b/gcc/config/bfin/bfin.c
@@ -279,7 +279,7 @@ static rtx
legitimize_pic_address (rtx orig, rtx reg, rtx picreg)
{
rtx addr = orig;
- rtx new = orig;
+ rtx new_rtx = orig;
if (GET_CODE (addr) == SYMBOL_REF || GET_CODE (addr) == LABEL_REF)
{
@@ -301,9 +301,9 @@ legitimize_pic_address (rtx orig, rtx reg, rtx picreg)
}
tmp = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), unspec);
- new = gen_const_mem (Pmode, gen_rtx_PLUS (Pmode, picreg, tmp));
+ new_rtx = gen_const_mem (Pmode, gen_rtx_PLUS (Pmode, picreg, tmp));
- emit_move_insn (reg, new);
+ emit_move_insn (reg, new_rtx);
if (picreg == pic_offset_table_rtx)
crtl->uses_pic_offset_table = 1;
return reg;
@@ -348,7 +348,7 @@ legitimize_pic_address (rtx orig, rtx reg, rtx picreg)
return gen_rtx_PLUS (Pmode, base, addr);
}
- return new;
+ return new_rtx;
}
/* Stack frame layout. */
@@ -2156,14 +2156,14 @@ int
hard_regno_mode_ok (int regno, enum machine_mode mode)
{
/* Allow only dregs to store value of mode HI or QI */
- enum reg_class class = REGNO_REG_CLASS (regno);
+ enum reg_class rclass = REGNO_REG_CLASS (regno);
if (mode == CCmode)
return 0;
if (mode == V2HImode)
return D_REGNO_P (regno);
- if (class == CCREGS)
+ if (rclass == CCREGS)
return mode == BImode;
if (mode == PDImode || mode == V2PDImode)
return regno == REG_A0 || regno == REG_A1;
@@ -2232,24 +2232,24 @@ bfin_register_move_cost (enum machine_mode mode,
int
bfin_memory_move_cost (enum machine_mode mode ATTRIBUTE_UNUSED,
- enum reg_class class,
+ enum reg_class rclass,
int in ATTRIBUTE_UNUSED)
{
/* Make memory accesses slightly more expensive than any register-register
move. Also, penalize non-DP registers, since they need secondary
reloads to load and store. */
- if (! reg_class_subset_p (class, DPREGS))
+ if (! reg_class_subset_p (rclass, DPREGS))
return 10;
return 8;
}
/* Inform reload about cases where moving X with a mode MODE to a register in
- CLASS requires an extra scratch register. Return the class needed for the
+ RCLASS requires an extra scratch register. Return the class needed for the
scratch register. */
static enum reg_class
-bfin_secondary_reload (bool in_p, rtx x, enum reg_class class,
+bfin_secondary_reload (bool in_p, rtx x, enum reg_class rclass,
enum machine_mode mode, secondary_reload_info *sri)
{
/* If we have HImode or QImode, we can only use DREGS as secondary registers;
@@ -2280,11 +2280,11 @@ bfin_secondary_reload (bool in_p, rtx x, enum reg_class class,
rtx op2 = XEXP (x, 1);
int large_constant_p = ! satisfies_constraint_Ks7 (op2);
- if (class == PREGS || class == PREGS_CLOBBERED)
+ if (rclass == PREGS || rclass == PREGS_CLOBBERED)
return NO_REGS;
/* If destination is a DREG, we can do this without a scratch register
if the constant is valid for an add instruction. */
- if ((class == DREGS || class == DPREGS)
+ if ((rclass == DREGS || rclass == DPREGS)
&& ! large_constant_p)
return NO_REGS;
/* Reloading to anything other than a DREG? Use a PREG scratch
@@ -2297,11 +2297,11 @@ bfin_secondary_reload (bool in_p, rtx x, enum reg_class class,
AREGS are an exception; they can only move to or from another register
in AREGS or one in DREGS. They can also be assigned the constant 0. */
if (x_class == AREGS || x_class == EVEN_AREGS || x_class == ODD_AREGS)
- return (class == DREGS || class == AREGS || class == EVEN_AREGS
- || class == ODD_AREGS
+ return (rclass == DREGS || rclass == AREGS || rclass == EVEN_AREGS
+ || rclass == ODD_AREGS
? NO_REGS : DREGS);
- if (class == AREGS || class == EVEN_AREGS || class == ODD_AREGS)
+ if (rclass == AREGS || rclass == EVEN_AREGS || rclass == ODD_AREGS)
{
if (code == MEM)
{
@@ -2318,15 +2318,15 @@ bfin_secondary_reload (bool in_p, rtx x, enum reg_class class,
}
/* CCREGS can only be moved from/to DREGS. */
- if (class == CCREGS && x_class != DREGS)
+ if (rclass == CCREGS && x_class != DREGS)
return DREGS;
- if (x_class == CCREGS && class != DREGS)
+ if (x_class == CCREGS && rclass != DREGS)
return DREGS;
/* All registers other than AREGS can load arbitrary constants. The only
case that remains is MEM. */
if (code == MEM)
- if (! reg_class_subset_p (class, default_class))
+ if (! reg_class_subset_p (rclass, default_class))
return default_class;
return NO_REGS;
@@ -5127,12 +5127,12 @@ bfin_output_mi_thunk (FILE *file ATTRIBUTE_UNUSED,
{
rtx xops[3];
/* The this parameter is passed as the first argument. */
- rtx this = gen_rtx_REG (Pmode, REG_R0);
+ rtx this_rtx = gen_rtx_REG (Pmode, REG_R0);
/* Adjust the this parameter by a fixed constant. */
if (delta)
{
- xops[1] = this;
+ xops[1] = this_rtx;
if (delta >= -64 && delta <= 63)
{
xops[0] = GEN_INT (delta);
@@ -5175,7 +5175,7 @@ bfin_output_mi_thunk (FILE *file ATTRIBUTE_UNUSED,
output_asm_insn ("%h1 = %h0; %d1 = %d0; %2 = %2 + %1", xops);
xops[0] = gen_rtx_MEM (Pmode, p2tmp);
}
- xops[2] = this;
+ xops[2] = this_rtx;
output_asm_insn ("%1 = %0; %2 = %2 + %1;", xops);
}
diff --git a/gcc/config/crx/crx.c b/gcc/config/crx/crx.c
index 9e8c3a97cf1..2f4aa6f176b 100644
--- a/gcc/config/crx/crx.c
+++ b/gcc/config/crx/crx.c
@@ -371,11 +371,11 @@ crx_regno_reg_class (int regno)
/* Transfer between HILO_REGS and memory via secondary reloading. */
enum reg_class
-crx_secondary_reload_class (enum reg_class class,
+crx_secondary_reload_class (enum reg_class rclass,
enum machine_mode mode ATTRIBUTE_UNUSED,
rtx x ATTRIBUTE_UNUSED)
{
- if (reg_classes_intersect_p (class, HILO_REGS)
+ if (reg_classes_intersect_p (rclass, HILO_REGS)
&& true_regnum (x) == -1)
return GENERAL_REGS;
@@ -839,22 +839,22 @@ crx_address_cost (rtx addr)
}
/* Return the cost of moving data of mode MODE between a register of class
- * CLASS and memory; IN is zero if the value is to be written to memory,
+ * RCLASS and memory; IN is zero if the value is to be written to memory,
* nonzero if it is to be read in. This cost is relative to those in
* REGISTER_MOVE_COST. */
int
crx_memory_move_cost (enum machine_mode mode,
- enum reg_class class ATTRIBUTE_UNUSED,
+ enum reg_class rclass ATTRIBUTE_UNUSED,
int in ATTRIBUTE_UNUSED)
{
/* One LD or ST takes twice the time of a simple reg-reg move */
- if (reg_classes_intersect_p (class, GENERAL_REGS))
+ if (reg_classes_intersect_p (rclass, GENERAL_REGS))
{
/* printf ("GENERAL_REGS LD/ST = %d\n", 4 * HARD_REGNO_NREGS (0, mode));*/
return 4 * HARD_REGNO_NREGS (0, mode);
}
- else if (reg_classes_intersect_p (class, HILO_REGS))
+ else if (reg_classes_intersect_p (rclass, HILO_REGS))
{
/* HILO to memory and vice versa */
/* printf ("HILO_REGS %s = %d\n", in ? "LD" : "ST",
diff --git a/gcc/config/frv/frv-protos.h b/gcc/config/frv/frv-protos.h
index dd41fc27767..8d6b29bc7cf 100644
--- a/gcc/config/frv/frv-protos.h
+++ b/gcc/config/frv/frv-protos.h
@@ -104,13 +104,13 @@ extern void frv_ifcvt_modify_cancel (ce_if_block_t *);
extern int frv_trampoline_size (void);
extern void frv_initialize_trampoline (rtx, rtx, rtx);
extern enum reg_class frv_secondary_reload_class
- (enum reg_class class,
+ (enum reg_class rclass,
enum machine_mode mode,
rtx x, int);
-extern int frv_class_likely_spilled_p (enum reg_class class);
+extern int frv_class_likely_spilled_p (enum reg_class rclass);
extern int frv_hard_regno_mode_ok (int, enum machine_mode);
extern int frv_hard_regno_nregs (int, enum machine_mode);
-extern int frv_class_max_nregs (enum reg_class class,
+extern int frv_class_max_nregs (enum reg_class rclass,
enum machine_mode mode);
extern int frv_legitimate_constant_p (rtx);
extern enum machine_mode frv_select_cc_mode (enum rtx_code, rtx, rtx);
diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c
index 07e8eaae928..7fa2e22f094 100644
--- a/gcc/config/frv/frv.c
+++ b/gcc/config/frv/frv.c
@@ -651,83 +651,83 @@ frv_override_options (void)
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
{
- enum reg_class class;
+ enum reg_class rclass;
if (GPR_P (regno))
{
int gpr_reg = regno - GPR_FIRST;
if (gpr_reg == GR8_REG)
- class = GR8_REGS;
+ rclass = GR8_REGS;
else if (gpr_reg == GR9_REG)
- class = GR9_REGS;
+ rclass = GR9_REGS;
else if (gpr_reg == GR14_REG)
- class = FDPIC_FPTR_REGS;
+ rclass = FDPIC_FPTR_REGS;
else if (gpr_reg == FDPIC_REGNO)
- class = FDPIC_REGS;
+ rclass = FDPIC_REGS;
else if ((gpr_reg & 3) == 0)
- class = QUAD_REGS;
+ rclass = QUAD_REGS;
else if ((gpr_reg & 1) == 0)
- class = EVEN_REGS;
+ rclass = EVEN_REGS;
else
- class = GPR_REGS;
+ rclass = GPR_REGS;
}
else if (FPR_P (regno))
{
int fpr_reg = regno - GPR_FIRST;
if ((fpr_reg & 3) == 0)
- class = QUAD_FPR_REGS;
+ rclass = QUAD_FPR_REGS;
else if ((fpr_reg & 1) == 0)
- class = FEVEN_REGS;
+ rclass = FEVEN_REGS;
else
- class = FPR_REGS;
+ rclass = FPR_REGS;
}
else if (regno == LR_REGNO)
- class = LR_REG;
+ rclass = LR_REG;
else if (regno == LCR_REGNO)
- class = LCR_REG;
+ rclass = LCR_REG;
else if (ICC_P (regno))
- class = ICC_REGS;
+ rclass = ICC_REGS;
else if (FCC_P (regno))
- class = FCC_REGS;
+ rclass = FCC_REGS;
else if (ICR_P (regno))
- class = ICR_REGS;
+ rclass = ICR_REGS;
else if (FCR_P (regno))
- class = FCR_REGS;
+ rclass = FCR_REGS;
else if (ACC_P (regno))
{
int r = regno - ACC_FIRST;
if ((r & 3) == 0)
- class = QUAD_ACC_REGS;
+ rclass = QUAD_ACC_REGS;
else if ((r & 1) == 0)
- class = EVEN_ACC_REGS;
+ rclass = EVEN_ACC_REGS;
else
- class = ACC_REGS;
+ rclass = ACC_REGS;
}
else if (ACCG_P (regno))
- class = ACCG_REGS;
+ rclass = ACCG_REGS;
else
- class = NO_REGS;
+ rclass = NO_REGS;
- regno_reg_class[regno] = class;
+ regno_reg_class[regno] = rclass;
}
/* Check for small data option */
@@ -1539,14 +1539,14 @@ frv_function_prologue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED)
static rtx
frv_alloc_temp_reg (
frv_tmp_reg_t *info, /* which registers are available */
- enum reg_class class, /* register class desired */
+ enum reg_class rclass, /* register class desired */
enum machine_mode mode, /* mode to allocate register with */
int mark_as_used, /* register not available after allocation */
int no_abort) /* return NULL instead of aborting */
{
- int regno = info->next_reg[ (int)class ];
+ int regno = info->next_reg[ (int)rclass ];
int orig_regno = regno;
- HARD_REG_SET *reg_in_class = &reg_class_contents[ (int)class ];
+ HARD_REG_SET *reg_in_class = &reg_class_contents[ (int)rclass ];
int i, nr;
for (;;)
@@ -1565,7 +1565,7 @@ frv_alloc_temp_reg (
}
nr = HARD_REGNO_NREGS (regno, mode);
- info->next_reg[ (int)class ] = regno + nr;
+ info->next_reg[ (int)rclass ] = regno + nr;
if (mark_as_used)
for (i = 0; i < nr; i++)
@@ -2777,7 +2777,7 @@ frv_print_operand (FILE * file, rtx x, int code)
HOST_WIDE_INT value;
int offset;
- if (code != 0 && !isalpha (code))
+ if (code != 0 && !ISALPHA (code))
value = 0;
else if (GET_CODE (x) == CONST_INT)
@@ -6300,11 +6300,11 @@ frv_initialize_trampoline (rtx addr, rtx fnaddr, rtx static_chain)
You should define these macros to indicate to the reload phase that it may
need to allocate at least one register for a reload in addition to the
register to contain the data. Specifically, if copying X to a register
- CLASS in MODE requires an intermediate register, you should define
+ RCLASS in MODE requires an intermediate register, you should define
`SECONDARY_INPUT_RELOAD_CLASS' to return the largest register class all of
whose registers can be used as intermediate registers or scratch registers.
- If copying a register CLASS in MODE to X requires an intermediate or scratch
+ If copying a register RCLASS in MODE to X requires an intermediate or scratch
register, `SECONDARY_OUTPUT_RELOAD_CLASS' should be defined to return the
largest register class required. If the requirements for input and output
reloads are the same, the macro `SECONDARY_RELOAD_CLASS' should be used
@@ -6312,7 +6312,7 @@ frv_initialize_trampoline (rtx addr, rtx fnaddr, rtx static_chain)
The values returned by these macros are often `GENERAL_REGS'. Return
`NO_REGS' if no spare register is needed; i.e., if X can be directly copied
- to or from a register of CLASS in MODE without requiring a scratch register.
+ to or from a register of RCLASS in MODE without requiring a scratch register.
Do not define this macro if it would always return `NO_REGS'.
If a scratch register is required (either with or without an intermediate
@@ -6323,7 +6323,7 @@ frv_initialize_trampoline (rtx addr, rtx fnaddr, rtx static_chain)
Define constraints for the reload register and scratch register that contain
a single register class. If the original reload register (whose class is
- CLASS) can meet the constraint given in the pattern, the value returned by
+ RCLASS) can meet the constraint given in the pattern, the value returned by
these macros is used for the class of the scratch register. Otherwise, two
additional reload registers are required. Their classes are obtained from
the constraints in the insn pattern.
@@ -6341,14 +6341,14 @@ frv_initialize_trampoline (rtx addr, rtx fnaddr, rtx static_chain)
This case often occurs between floating-point and general registers. */
enum reg_class
-frv_secondary_reload_class (enum reg_class class,
+frv_secondary_reload_class (enum reg_class rclass,
enum machine_mode mode ATTRIBUTE_UNUSED,
rtx x,
int in_p ATTRIBUTE_UNUSED)
{
enum reg_class ret;
- switch (class)
+ switch (rclass)
{
default:
ret = NO_REGS;
@@ -6405,10 +6405,10 @@ frv_secondary_reload_class (enum reg_class class,
/* A C expression whose value is nonzero if pseudos that have been assigned to
- registers of class CLASS would likely be spilled because registers of CLASS
+ registers of class RCLASS would likely be spilled because registers of RCLASS
are needed for spill registers.
- The default value of this macro returns 1 if CLASS has exactly one register
+ The default value of this macro returns 1 if RCLASS has exactly one register
and zero otherwise. On most machines, this default should be used. Only
define this macro to some other expression if pseudo allocated by
`local-alloc.c' end up in memory because their hard registers were needed
@@ -6420,9 +6420,9 @@ frv_secondary_reload_class (enum reg_class class,
register allocation. */
int
-frv_class_likely_spilled_p (enum reg_class class)
+frv_class_likely_spilled_p (enum reg_class rclass)
{
- switch (class)
+ switch (rclass)
{
default:
break;
@@ -6686,11 +6686,11 @@ frv_hard_regno_nregs (int regno, enum machine_mode mode)
/* A C expression for the maximum number of consecutive registers of
- class CLASS needed to hold a value of mode MODE.
+ class RCLASS needed to hold a value of mode MODE.
This is closely related to the macro `HARD_REGNO_NREGS'. In fact, the value
- of the macro `CLASS_MAX_NREGS (CLASS, MODE)' should be the maximum value of
- `HARD_REGNO_NREGS (REGNO, MODE)' for all REGNO values in the class CLASS.
+ of the macro `CLASS_MAX_NREGS (RCLASS, MODE)' should be the maximum value of
+ `HARD_REGNO_NREGS (REGNO, MODE)' for all REGNO values in the class RCLASS.
This macro helps control the handling of multiple-word values in
the reload pass.
@@ -6698,9 +6698,9 @@ frv_hard_regno_nregs (int regno, enum machine_mode mode)
This declaration is required. */
int
-frv_class_max_nregs (enum reg_class class, enum machine_mode mode)
+frv_class_max_nregs (enum reg_class rclass, enum machine_mode mode)
{
- if (class == ACCG_REGS)
+ if (rclass == ACCG_REGS)
/* An N-byte value requires N accumulator guards. */
return GET_MODE_SIZE (mode);
else
diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c
index 86790699f13..3d9c0fb7efb 100644
--- a/gcc/config/h8300/h8300.c
+++ b/gcc/config/h8300/h8300.c
@@ -2147,21 +2147,21 @@ h8300_displacement_length (rtx addr, int size)
return h8300_constant_length (offset);
}
-/* Store the class of operand OP in *CLASS and return the length of any
- extra operand fields. SIZE is the number of bytes in OP. CLASS
+/* Store the class of operand OP in *OPCLASS and return the length of any
+ extra operand fields. SIZE is the number of bytes in OP. OPCLASS
can be null if only the length is needed. */
static unsigned int
-h8300_classify_operand (rtx op, int size, enum h8300_operand_class *class)
+h8300_classify_operand (rtx op, int size, enum h8300_operand_class *opclass)
{
enum h8300_operand_class dummy;
- if (class == 0)
- class = &dummy;
+ if (opclass == 0)
+ opclass = &dummy;
if (CONSTANT_P (op))
{
- *class = H8OP_IMMEDIATE;
+ *opclass = H8OP_IMMEDIATE;
/* Byte-sized immediates are stored in the opcode fields. */
if (size == 1)
@@ -2182,27 +2182,27 @@ h8300_classify_operand (rtx op, int size, enum h8300_operand_class *class)
op = XEXP (op, 0);
if (CONSTANT_P (op))
{
- *class = H8OP_MEM_ABSOLUTE;
+ *opclass = H8OP_MEM_ABSOLUTE;
return h8300_constant_length (op);
}
else if (GET_CODE (op) == PLUS && CONSTANT_P (XEXP (op, 1)))
{
- *class = H8OP_MEM_COMPLEX;
+ *opclass = H8OP_MEM_COMPLEX;
return h8300_displacement_length (op, size);
}
else if (GET_RTX_CLASS (GET_CODE (op)) == RTX_AUTOINC)
{
- *class = H8OP_MEM_COMPLEX;
+ *opclass = H8OP_MEM_COMPLEX;
return 0;
}
else if (register_operand (op, VOIDmode))
{
- *class = H8OP_MEM_BASE;
+ *opclass = H8OP_MEM_BASE;
return 0;
}
}
gcc_assert (register_operand (op, VOIDmode));
- *class = H8OP_REGISTER;
+ *opclass = H8OP_REGISTER;
return 0;
}
@@ -2228,12 +2228,12 @@ h8300_length_from_table (rtx op1, rtx op2, const h8300_length_table *table)
unsigned int
h8300_unary_length (rtx op)
{
- enum h8300_operand_class class;
+ enum h8300_operand_class opclass;
unsigned int size, operand_length;
size = GET_MODE_SIZE (GET_MODE (op));
- operand_length = h8300_classify_operand (op, size, &class);
- switch (class)
+ operand_length = h8300_classify_operand (op, size, &opclass);
+ switch (opclass)
{
case H8OP_REGISTER:
return 2;
@@ -2257,13 +2257,13 @@ h8300_unary_length (rtx op)
static unsigned int
h8300_short_immediate_length (rtx op)
{
- enum h8300_operand_class class;
+ enum h8300_operand_class opclass;
unsigned int size, operand_length;
size = GET_MODE_SIZE (GET_MODE (op));
- operand_length = h8300_classify_operand (op, size, &class);
+ operand_length = h8300_classify_operand (op, size, &opclass);
- switch (class)
+ switch (opclass)
{
case H8OP_REGISTER:
return 2;
@@ -2283,7 +2283,7 @@ h8300_short_immediate_length (rtx op)
static unsigned int
h8300_bitfield_length (rtx op, rtx op2)
{
- enum h8300_operand_class class;
+ enum h8300_operand_class opclass;
unsigned int size, operand_length;
if (GET_CODE (op) == REG)
@@ -2291,9 +2291,9 @@ h8300_bitfield_length (rtx op, rtx op2)
gcc_assert (GET_CODE (op) != REG);
size = GET_MODE_SIZE (GET_MODE (op));
- operand_length = h8300_classify_operand (op, size, &class);
+ operand_length = h8300_classify_operand (op, size, &opclass);
- switch (class)
+ switch (opclass)
{
case H8OP_MEM_BASE:
case H8OP_MEM_ABSOLUTE:
@@ -4526,15 +4526,15 @@ output_a_shift (rtx *operands)
}
}
-/* Count the number of assembly instructions in a string TEMPLATE. */
+/* Count the number of assembly instructions in a string TEMPL. */
static unsigned int
-h8300_asm_insn_count (const char *template)
+h8300_asm_insn_count (const char *templ)
{
unsigned int count = 1;
- for (; *template; template++)
- if (*template == '\n')
+ for (; *templ; templ++)
+ if (*templ == '\n')
count++;
return count;
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 8670837984d..2d89f4ff7c0 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -22440,7 +22440,7 @@ ix86_expand_special_args_builtin (const struct builtin_description *d,
bool last_arg_constant = false;
const struct insn_data *insn_p = &insn_data[icode];
enum machine_mode tmode = insn_p->operand[0].mode;
- enum { load, store } class;
+ enum { load, store } klass;
switch ((enum ix86_special_builtin_type) d->flag)
{
@@ -22452,7 +22452,7 @@ ix86_expand_special_args_builtin (const struct builtin_description *d,
case V4SF_FTYPE_PCFLOAT:
case V2DF_FTYPE_PCDOUBLE:
nargs = 1;
- class = load;
+ klass = load;
memory = 0;
break;
case VOID_FTYPE_PV2SF_V4SF:
@@ -22463,14 +22463,14 @@ ix86_expand_special_args_builtin (const struct builtin_description *d,
case VOID_FTYPE_PDI_DI:
case VOID_FTYPE_PINT_INT:
nargs = 1;
- class = store;
+ klass = store;
/* Reserve memory operand for target. */
memory = ARRAY_SIZE (args);
break;
case V4SF_FTYPE_V4SF_PCV2SF:
case V2DF_FTYPE_V2DF_PCDOUBLE:
nargs = 2;
- class = load;
+ klass = load;
memory = 1;
break;
default:
@@ -22479,7 +22479,7 @@ ix86_expand_special_args_builtin (const struct builtin_description *d,
gcc_assert (nargs <= ARRAY_SIZE (args));
- if (class == store)
+ if (klass == store)
{
arg = CALL_EXPR_ARG (exp, 0);
op = expand_normal (arg);
@@ -22556,7 +22556,7 @@ ix86_expand_special_args_builtin (const struct builtin_description *d,
if (! pat)
return 0;
emit_insn (pat);
- return class == store ? 0 : target;
+ return klass == store ? 0 : target;
}
/* Return the integer constant in ARG. Constrain it to be in the range
@@ -23423,16 +23423,16 @@ ix86_preferred_output_reload_class (rtx x, enum reg_class regclass)
}
static enum reg_class
-ix86_secondary_reload (bool in_p, rtx x, enum reg_class class,
+ix86_secondary_reload (bool in_p, rtx x, enum reg_class rclass,
enum machine_mode mode,
secondary_reload_info *sri ATTRIBUTE_UNUSED)
{
/* QImode spills from non-QI registers require
intermediate register on 32bit targets. */
if (!in_p && mode == QImode && !TARGET_64BIT
- && (class == GENERAL_REGS
- || class == LEGACY_REGS
- || class == INDEX_REGS))
+ && (rclass == GENERAL_REGS
+ || rclass == LEGACY_REGS
+ || rclass == INDEX_REGS))
{
int regno;
diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c
index 7fdd89471a8..8ef79058a7d 100644
--- a/gcc/config/i386/winnt.c
+++ b/gcc/config/i386/winnt.c
@@ -531,16 +531,16 @@ i386_pe_asm_output_aligned_decl_common (FILE *stream, tree decl,
/* Mark a function appropriately. This should only be called for
functions for which we are not emitting COFF debugging information.
FILE is the assembler output file, NAME is the name of the
- function, and PUBLIC is nonzero if the function is globally
+ function, and PUB is nonzero if the function is globally
visible. */
void
-i386_pe_declare_function_type (FILE *file, const char *name, int public)
+i386_pe_declare_function_type (FILE *file, const char *name, int pub)
{
fprintf (file, "\t.def\t");
assemble_name (file, name);
fprintf (file, ";\t.scl\t%d;\t.type\t%d;\t.endef\n",
- public ? (int) C_EXT : (int) C_STAT,
+ pub ? (int) C_EXT : (int) C_STAT,
(int) DT_FCN << N_BTSHFT);
}
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index c07b21d9d53..e8a853bb256 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -4958,13 +4958,13 @@ ia64_register_move_cost (enum machine_mode mode, enum reg_class from,
return 2;
}
-/* Implement PREFERRED_RELOAD_CLASS. Place additional restrictions on CLASS
+/* Implement PREFERRED_RELOAD_CLASS. Place additional restrictions on RCLASS
to use when copying X into that class. */
enum reg_class
-ia64_preferred_reload_class (rtx x, enum reg_class class)
+ia64_preferred_reload_class (rtx x, enum reg_class rclass)
{
- switch (class)
+ switch (rclass)
{
case FR_REGS:
case FP_REGS:
@@ -4989,16 +4989,16 @@ ia64_preferred_reload_class (rtx x, enum reg_class class)
break;
}
- return class;
+ return rclass;
}
/* This function returns the register class required for a secondary
- register when copying between one of the registers in CLASS, and X,
+ register when copying between one of the registers in RCLASS, and X,
using MODE. A return value of NO_REGS means that no secondary register
is required. */
enum reg_class
-ia64_secondary_reload_class (enum reg_class class,
+ia64_secondary_reload_class (enum reg_class rclass,
enum machine_mode mode ATTRIBUTE_UNUSED, rtx x)
{
int regno = -1;
@@ -5006,7 +5006,7 @@ ia64_secondary_reload_class (enum reg_class class,
if (GET_CODE (x) == REG || GET_CODE (x) == SUBREG)
regno = true_regnum (x);
- switch (class)
+ switch (rclass)
{
case BR_REGS:
case AR_M_REGS:
@@ -9571,7 +9571,7 @@ ia64_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
HOST_WIDE_INT delta, HOST_WIDE_INT vcall_offset,
tree function)
{
- rtx this, insn, funexp;
+ rtx this_rtx, insn, funexp;
unsigned int this_parmno;
unsigned int this_regno;
rtx delta_rtx;
@@ -9600,7 +9600,7 @@ ia64_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
if (!TARGET_REG_NAMES)
reg_names[this_regno] = ia64_reg_numbers[this_parmno];
- this = gen_rtx_REG (Pmode, this_regno);
+ this_rtx = gen_rtx_REG (Pmode, this_regno);
/* Apply the constant offset, if required. */
delta_rtx = GEN_INT (delta);
@@ -9610,11 +9610,11 @@ ia64_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
REG_POINTER (tmp) = 1;
if (delta && satisfies_constraint_I (delta_rtx))
{
- emit_insn (gen_ptr_extend_plus_imm (this, tmp, delta_rtx));
+ emit_insn (gen_ptr_extend_plus_imm (this_rtx, tmp, delta_rtx));
delta = 0;
}
else
- emit_insn (gen_ptr_extend (this, tmp));
+ emit_insn (gen_ptr_extend (this_rtx, tmp));
}
if (delta)
{
@@ -9624,7 +9624,7 @@ ia64_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
emit_move_insn (tmp, delta_rtx);
delta_rtx = tmp;
}
- emit_insn (gen_adddi3 (this, this, delta_rtx));
+ emit_insn (gen_adddi3 (this_rtx, this_rtx, delta_rtx));
}
/* Apply the offset from the vtable, if required. */
@@ -9637,7 +9637,7 @@ ia64_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
{
rtx t = gen_rtx_REG (ptr_mode, 2);
REG_POINTER (t) = 1;
- emit_move_insn (t, gen_rtx_MEM (ptr_mode, this));
+ emit_move_insn (t, gen_rtx_MEM (ptr_mode, this_rtx));
if (satisfies_constraint_I (vcall_offset_rtx))
{
emit_insn (gen_ptr_extend_plus_imm (tmp, t, vcall_offset_rtx));
@@ -9647,7 +9647,7 @@ ia64_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
emit_insn (gen_ptr_extend (tmp, t));
}
else
- emit_move_insn (tmp, gen_rtx_MEM (Pmode, this));
+ emit_move_insn (tmp, gen_rtx_MEM (Pmode, this_rtx));
if (vcall_offset)
{
@@ -9665,7 +9665,7 @@ ia64_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
else
emit_move_insn (tmp, gen_rtx_MEM (Pmode, tmp));
- emit_insn (gen_adddi3 (this, this, tmp));
+ emit_insn (gen_adddi3 (this_rtx, this_rtx, tmp));
}
/* Generate a tail call to the target function. */
diff --git a/gcc/config/iq2000/iq2000.c b/gcc/config/iq2000/iq2000.c
index b66a485dbb1..06c187bc451 100644
--- a/gcc/config/iq2000/iq2000.c
+++ b/gcc/config/iq2000/iq2000.c
@@ -937,15 +937,15 @@ gen_int_relational (enum rtx_code test_code, rtx result, rtx cmp0, rtx cmp1,
{
if (p_info->const_add != 0)
{
- HOST_WIDE_INT new = INTVAL (cmp1) + p_info->const_add;
+ HOST_WIDE_INT new_const = INTVAL (cmp1) + p_info->const_add;
/* If modification of cmp1 caused overflow,
we would get the wrong answer if we follow the usual path;
thus, x > 0xffffffffU would turn into x > 0U. */
if ((p_info->unsignedp
- ? (unsigned HOST_WIDE_INT) new >
+ ? (unsigned HOST_WIDE_INT) new_const >
(unsigned HOST_WIDE_INT) INTVAL (cmp1)
- : new > INTVAL (cmp1))
+ : new_const > INTVAL (cmp1))
!= (p_info->const_add > 0))
{
/* This test is always true, but if INVERT is true then
@@ -955,7 +955,7 @@ gen_int_relational (enum rtx_code test_code, rtx result, rtx cmp0, rtx cmp1,
return result;
}
else
- cmp1 = GEN_INT (new);
+ cmp1 = GEN_INT (new_const);
}
}
diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c
index 0e03c9e6bf2..dcd5b374f93 100644
--- a/gcc/config/m32c/m32c.c
+++ b/gcc/config/m32c/m32c.c
@@ -340,36 +340,36 @@ classes_intersect (int class1, int class2)
/* Used by m32c_register_move_cost to determine if a move is
impossibly expensive. */
static int
-class_can_hold_mode (int class, enum machine_mode mode)
+class_can_hold_mode (int rclass, enum machine_mode mode)
{
/* Cache the results: 0=untested 1=no 2=yes */
static char results[LIM_REG_CLASSES][MAX_MACHINE_MODE];
- if (results[class][mode] == 0)
+ if (results[rclass][mode] == 0)
{
int r, n, i;
- results[class][mode] = 1;
+ results[rclass][mode] = 1;
for (r = 0; r < FIRST_PSEUDO_REGISTER; r++)
- if (class_contents[class][0] & (1 << r)
+ if (class_contents[rclass][0] & (1 << r)
&& HARD_REGNO_MODE_OK (r, mode))
{
int ok = 1;
n = HARD_REGNO_NREGS (r, mode);
for (i = 1; i < n; i++)
- if (!(class_contents[class][0] & (1 << (r + i))))
+ if (!(class_contents[rclass][0] & (1 << (r + i))))
ok = 0;
if (ok)
{
- results[class][mode] = 2;
+ results[rclass][mode] = 2;
break;
}
}
}
#if DEBUG0
fprintf (stderr, "class %s can hold %s? %s\n",
- class_names[class], mode_name[mode],
- (results[class][mode] == 2) ? "yes" : "no");
+ class_names[rclass], mode_name[mode],
+ (results[rclass][mode] == 2) ? "yes" : "no");
#endif
- return results[class][mode] == 2;
+ return results[rclass][mode] == 2;
}
/* Run-time Target Specification. */
@@ -4298,22 +4298,22 @@ m32c_compare_redundant (rtx cmp, rtx *operands)
char *
m32c_output_compare (rtx insn, rtx *operands)
{
- static char template[] = ";cmp.b\t%1,%0";
+ static char templ[] = ";cmp.b\t%1,%0";
/* ^ 5 */
- template[5] = " bwll"[GET_MODE_SIZE(GET_MODE(operands[0]))];
+ templ[5] = " bwll"[GET_MODE_SIZE(GET_MODE(operands[0]))];
if (m32c_compare_redundant (insn, operands))
{
#if DEBUG_CMP
fprintf(stderr, "cbranch: cmp not needed\n");
#endif
- return template;
+ return templ;
}
#if DEBUG_CMP
- fprintf(stderr, "cbranch: cmp needed: `%s'\n", template);
+ fprintf(stderr, "cbranch: cmp needed: `%s'\n", templ);
#endif
- return template + 1;
+ return templ + 1;
}
#undef TARGET_ENCODE_SECTION_INFO
diff --git a/gcc/config/m68hc11/m68hc11.c b/gcc/config/m68hc11/m68hc11.c
index 314feb183a6..a52739be67e 100644
--- a/gcc/config/m68hc11/m68hc11.c
+++ b/gcc/config/m68hc11/m68hc11.c
@@ -435,7 +435,7 @@ m68hc11_hard_regno_rename_ok (int reg1, int reg2)
}
enum reg_class
-preferred_reload_class (rtx operand, enum reg_class class)
+preferred_reload_class (rtx operand, enum reg_class rclass)
{
enum machine_mode mode;
@@ -443,97 +443,97 @@ preferred_reload_class (rtx operand, enum reg_class class)
if (debug_m6811)
{
- printf ("Preferred reload: (class=%s): ", reg_class_names[class]);
+ printf ("Preferred reload: (class=%s): ", reg_class_names[rclass]);
}
- if (class == D_OR_A_OR_S_REGS && SP_REG_P (operand))
+ if (rclass == D_OR_A_OR_S_REGS && SP_REG_P (operand))
return m68hc11_base_reg_class;
- if (class >= S_REGS && (GET_CODE (operand) == MEM
+ if (rclass >= S_REGS && (GET_CODE (operand) == MEM
|| GET_CODE (operand) == CONST_INT))
{
/* S_REGS class must not be used. The movhi template does not
work to move a memory to a soft register.
Restrict to a hard reg. */
- switch (class)
+ switch (rclass)
{
default:
case G_REGS:
case D_OR_A_OR_S_REGS:
- class = A_OR_D_REGS;
+ rclass = A_OR_D_REGS;
break;
case A_OR_S_REGS:
- class = A_REGS;
+ rclass = A_REGS;
break;
case D_OR_SP_OR_S_REGS:
- class = D_OR_SP_REGS;
+ rclass = D_OR_SP_REGS;
break;
case D_OR_Y_OR_S_REGS:
- class = D_OR_Y_REGS;
+ rclass = D_OR_Y_REGS;
break;
case D_OR_X_OR_S_REGS:
- class = D_OR_X_REGS;
+ rclass = D_OR_X_REGS;
break;
case SP_OR_S_REGS:
- class = SP_REGS;
+ rclass = SP_REGS;
break;
case Y_OR_S_REGS:
- class = Y_REGS;
+ rclass = Y_REGS;
break;
case X_OR_S_REGS:
- class = X_REGS;
+ rclass = X_REGS;
break;
case D_OR_S_REGS:
- class = D_REGS;
+ rclass = D_REGS;
}
}
- else if (class == Y_REGS && GET_CODE (operand) == MEM)
+ else if (rclass == Y_REGS && GET_CODE (operand) == MEM)
{
- class = Y_REGS;
+ rclass = Y_REGS;
}
- else if (class == A_OR_D_REGS && GET_MODE_SIZE (mode) == 4)
+ else if (rclass == A_OR_D_REGS && GET_MODE_SIZE (mode) == 4)
{
- class = D_OR_X_REGS;
+ rclass = D_OR_X_REGS;
}
- else if (class >= S_REGS && S_REG_P (operand))
+ else if (rclass >= S_REGS && S_REG_P (operand))
{
- switch (class)
+ switch (rclass)
{
default:
case G_REGS:
case D_OR_A_OR_S_REGS:
- class = A_OR_D_REGS;
+ rclass = A_OR_D_REGS;
break;
case A_OR_S_REGS:
- class = A_REGS;
+ rclass = A_REGS;
break;
case D_OR_SP_OR_S_REGS:
- class = D_OR_SP_REGS;
+ rclass = D_OR_SP_REGS;
break;
case D_OR_Y_OR_S_REGS:
- class = D_OR_Y_REGS;
+ rclass = D_OR_Y_REGS;
break;
case D_OR_X_OR_S_REGS:
- class = D_OR_X_REGS;
+ rclass = D_OR_X_REGS;
break;
case SP_OR_S_REGS:
- class = SP_REGS;
+ rclass = SP_REGS;
break;
case Y_OR_S_REGS:
- class = Y_REGS;
+ rclass = Y_REGS;
break;
case X_OR_S_REGS:
- class = X_REGS;
+ rclass = X_REGS;
break;
case D_OR_S_REGS:
- class = D_REGS;
+ rclass = D_REGS;
}
}
- else if (class >= S_REGS)
+ else if (rclass >= S_REGS)
{
if (debug_m6811)
{
- printf ("Class = %s for: ", reg_class_names[class]);
+ printf ("Class = %s for: ", reg_class_names[rclass]);
fflush (stdout);
debug_rtx (operand);
}
@@ -541,12 +541,12 @@ preferred_reload_class (rtx operand, enum reg_class class)
if (debug_m6811)
{
- printf (" => class=%s\n", reg_class_names[class]);
+ printf (" => class=%s\n", reg_class_names[rclass]);
fflush (stdout);
debug_rtx (operand);
}
- return class;
+ return rclass;
}
/* Return 1 if the operand is a valid indexed addressing mode.
@@ -5097,10 +5097,10 @@ m68hc11_init_libfuncs (void)
/* Cost of moving memory. */
int
-m68hc11_memory_move_cost (enum machine_mode mode, enum reg_class class,
+m68hc11_memory_move_cost (enum machine_mode mode, enum reg_class rclass,
int in ATTRIBUTE_UNUSED)
{
- if (class <= H_REGS && class > NO_REGS)
+ if (rclass <= H_REGS && rclass > NO_REGS)
{
if (GET_MODE_SIZE (mode) <= 2)
return COSTS_N_INSNS (1) + (reload_completed | reload_in_progress);
diff --git a/gcc/config/mcore/mcore.c b/gcc/config/mcore/mcore.c
index 227f7dcd8e8..b80f59f476c 100644
--- a/gcc/config/mcore/mcore.c
+++ b/gcc/config/mcore/mcore.c
@@ -2602,30 +2602,30 @@ mcore_r15_operand_p (rtx x)
}
}
-/* Implement SECONDARY_RELOAD_CLASS. If CLASS contains r15, and we can't
+/* Implement SECONDARY_RELOAD_CLASS. If RCLASS contains r15, and we can't
directly move X into it, use r1-r14 as a temporary. */
enum reg_class
-mcore_secondary_reload_class (enum reg_class class,
+mcore_secondary_reload_class (enum reg_class rclass,
enum machine_mode mode ATTRIBUTE_UNUSED, rtx x)
{
- if (TEST_HARD_REG_BIT (reg_class_contents[class], 15)
+ if (TEST_HARD_REG_BIT (reg_class_contents[rclass], 15)
&& !mcore_r15_operand_p (x))
return LRW_REGS;
return NO_REGS;
}
/* Return the reg_class to use when reloading the rtx X into the class
- CLASS. If X is too complex to move directly into r15, prefer to
+ RCLASS. If X is too complex to move directly into r15, prefer to
use LRW_REGS instead. */
enum reg_class
-mcore_reload_class (rtx x, enum reg_class class)
+mcore_reload_class (rtx x, enum reg_class rclass)
{
- if (reg_class_subset_p (LRW_REGS, class) && !mcore_r15_operand_p (x))
+ if (reg_class_subset_p (LRW_REGS, rclass) && !mcore_r15_operand_p (x))
return LRW_REGS;
- return class;
+ return rclass;
}
/* Tell me if a pair of reg/subreg rtx's actually refer to the same
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index c4006c2f616..925a5b7fffc 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -8952,7 +8952,7 @@ static bool
mips_hard_regno_mode_ok_p (unsigned int regno, enum machine_mode mode)
{
unsigned int size;
- enum mode_class class;
+ enum mode_class mclass;
if (mode == CCV2mode)
return (ISA_HAS_8CC
@@ -8975,7 +8975,7 @@ mips_hard_regno_mode_ok_p (unsigned int regno, enum machine_mode mode)
}
size = GET_MODE_SIZE (mode);
- class = GET_MODE_CLASS (mode);
+ mclass = GET_MODE_CLASS (mode);
if (GP_REG_P (regno))
return ((regno - GP_REG_FIRST) & 1) == 0 || size <= UNITS_PER_WORD;
@@ -8996,16 +8996,16 @@ mips_hard_regno_mode_ok_p (unsigned int regno, enum machine_mode mode)
|| mode == DImode))
return true;
- if (class == MODE_FLOAT
- || class == MODE_COMPLEX_FLOAT
- || class == MODE_VECTOR_FLOAT)
+ if (mclass == MODE_FLOAT
+ || mclass == MODE_COMPLEX_FLOAT
+ || mclass == MODE_VECTOR_FLOAT)
return size <= UNITS_PER_FPVALUE;
/* Allow integer modes that fit into a single register. We need
to put integers into FPRs when using instructions like CVT
and TRUNC. There's no point allowing sizes smaller than a word,
because the FPU has no appropriate load/store instructions. */
- if (class == MODE_INT)
+ if (mclass == MODE_INT)
return size >= MIN_UNITS_PER_WORD && size <= UNITS_PER_FPREG;
}
@@ -9039,7 +9039,7 @@ mips_hard_regno_mode_ok_p (unsigned int regno, enum machine_mode mode)
}
if (ALL_COP_REG_P (regno))
- return class == MODE_INT && size <= UNITS_PER_WORD;
+ return mclass == MODE_INT && size <= UNITS_PER_WORD;
if (regno == GOT_VERSION_REGNUM)
return mode == SImode;
@@ -9068,13 +9068,13 @@ mips_hard_regno_nregs (int regno, enum machine_mode mode)
in mips_hard_regno_nregs. */
int
-mips_class_max_nregs (enum reg_class class, enum machine_mode mode)
+mips_class_max_nregs (enum reg_class rclass, enum machine_mode mode)
{
int size;
HARD_REG_SET left;
size = 0x8000;
- COPY_HARD_REG_SET (left, reg_class_contents[(int) class]);
+ COPY_HARD_REG_SET (left, reg_class_contents[(int) rclass]);
if (hard_reg_set_intersect_p (left, reg_class_contents[(int) ST_REGS]))
{
size = MIN (size, 4);
@@ -9095,7 +9095,7 @@ mips_class_max_nregs (enum reg_class class, enum machine_mode mode)
bool
mips_cannot_change_mode_class (enum machine_mode from ATTRIBUTE_UNUSED,
enum machine_mode to ATTRIBUTE_UNUSED,
- enum reg_class class)
+ enum reg_class rclass)
{
/* There are several problems with changing the modes of values
in floating-point registers:
@@ -9118,7 +9118,7 @@ mips_cannot_change_mode_class (enum machine_mode from ATTRIBUTE_UNUSED,
not ask it to treat the value as having a different format.
We therefore disallow all mode changes involving FPRs. */
- return reg_classes_intersect_p (FP_REGS, class);
+ return reg_classes_intersect_p (FP_REGS, rclass);
}
/* Return true if moves in mode MODE can use the FPU's mov.fmt instruction. */
@@ -9157,22 +9157,22 @@ mips_modes_tieable_p (enum machine_mode mode1, enum machine_mode mode2)
/* Implement PREFERRED_RELOAD_CLASS. */
enum reg_class
-mips_preferred_reload_class (rtx x, enum reg_class class)
+mips_preferred_reload_class (rtx x, enum reg_class rclass)
{
- if (mips_dangerous_for_la25_p (x) && reg_class_subset_p (LEA_REGS, class))
+ if (mips_dangerous_for_la25_p (x) && reg_class_subset_p (LEA_REGS, rclass))
return LEA_REGS;
- if (reg_class_subset_p (FP_REGS, class)
+ if (reg_class_subset_p (FP_REGS, rclass)
&& mips_mode_ok_for_mov_fmt_p (GET_MODE (x)))
return FP_REGS;
- if (reg_class_subset_p (GR_REGS, class))
- class = GR_REGS;
+ if (reg_class_subset_p (GR_REGS, rclass))
+ rclass = GR_REGS;
- if (TARGET_MIPS16 && reg_class_subset_p (M16_REGS, class))
- class = M16_REGS;
+ if (TARGET_MIPS16 && reg_class_subset_p (M16_REGS, rclass))
+ rclass = M16_REGS;
- return class;
+ return rclass;
}
/* Implement REGISTER_MOVE_COST. */
@@ -9234,13 +9234,13 @@ mips_register_move_cost (enum machine_mode mode,
}
/* Return the register class required for a secondary register when
- copying between one of the registers in CLASS and value X, which
+ copying between one of the registers in RCLASS and value X, which
has mode MODE. X is the source of the move if IN_P, otherwise it
is the destination. Return NO_REGS if no secondary register is
needed. */
enum reg_class
-mips_secondary_reload_class (enum reg_class class,
+mips_secondary_reload_class (enum reg_class rclass,
enum machine_mode mode, rtx x, bool in_p)
{
int regno;
@@ -9248,17 +9248,17 @@ mips_secondary_reload_class (enum reg_class class,
/* If X is a constant that cannot be loaded into $25, it must be loaded
into some other GPR. No other register class allows a direct move. */
if (mips_dangerous_for_la25_p (x))
- return reg_class_subset_p (class, LEA_REGS) ? NO_REGS : LEA_REGS;
+ return reg_class_subset_p (rclass, LEA_REGS) ? NO_REGS : LEA_REGS;
regno = true_regnum (x);
if (TARGET_MIPS16)
{
/* In MIPS16 mode, every move must involve a member of M16_REGS. */
- if (!reg_class_subset_p (class, M16_REGS) && !M16_REG_P (regno))
+ if (!reg_class_subset_p (rclass, M16_REGS) && !M16_REG_P (regno))
return M16_REGS;
/* We can't really copy to HI or LO at all in MIPS16 mode. */
- if (in_p ? reg_classes_intersect_p (class, ACC_REGS) : ACC_REG_P (regno))
+ if (in_p ? reg_classes_intersect_p (rclass, ACC_REGS) : ACC_REG_P (regno))
return M16_REGS;
return NO_REGS;
@@ -9266,16 +9266,16 @@ mips_secondary_reload_class (enum reg_class class,
/* Copying from accumulator registers to anywhere other than a general
register requires a temporary general register. */
- if (reg_class_subset_p (class, ACC_REGS))
+ if (reg_class_subset_p (rclass, ACC_REGS))
return GP_REG_P (regno) ? NO_REGS : GR_REGS;
if (ACC_REG_P (regno))
- return reg_class_subset_p (class, GR_REGS) ? NO_REGS : GR_REGS;
+ return reg_class_subset_p (rclass, GR_REGS) ? NO_REGS : GR_REGS;
/* We can only copy a value to a condition code register from a
floating-point register, and even then we require a scratch
floating-point register. We can only copy a value out of a
condition-code register into a general register. */
- if (reg_class_subset_p (class, ST_REGS))
+ if (reg_class_subset_p (rclass, ST_REGS))
{
if (in_p)
return FP_REGS;
@@ -9285,10 +9285,10 @@ mips_secondary_reload_class (enum reg_class class,
{
if (!in_p)
return FP_REGS;
- return reg_class_subset_p (class, GR_REGS) ? NO_REGS : GR_REGS;
+ return reg_class_subset_p (rclass, GR_REGS) ? NO_REGS : GR_REGS;
}
- if (reg_class_subset_p (class, FP_REGS))
+ if (reg_class_subset_p (rclass, FP_REGS))
{
if (MEM_P (x)
&& (GET_MODE_SIZE (mode) == 4 || GET_MODE_SIZE (mode) == 8))
@@ -9314,7 +9314,7 @@ mips_secondary_reload_class (enum reg_class class,
return GR_REGS;
}
if (FP_REG_P (regno))
- return reg_class_subset_p (class, GR_REGS) ? NO_REGS : GR_REGS;
+ return reg_class_subset_p (rclass, GR_REGS) ? NO_REGS : GR_REGS;
return NO_REGS;
}
@@ -12217,7 +12217,7 @@ mips_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
HOST_WIDE_INT delta, HOST_WIDE_INT vcall_offset,
tree function)
{
- rtx this, temp1, temp2, insn, fnaddr;
+ rtx this_rtx, temp1, temp2, insn, fnaddr;
bool use_sibcall_p;
/* Pretend to be a post-reload pass while generating rtl. */
@@ -12257,11 +12257,11 @@ mips_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
/* Find out which register contains the "this" pointer. */
if (aggregate_value_p (TREE_TYPE (TREE_TYPE (function)), function))
- this = gen_rtx_REG (Pmode, GP_ARG_FIRST + 1);
+ this_rtx = gen_rtx_REG (Pmode, GP_ARG_FIRST + 1);
else
- this = gen_rtx_REG (Pmode, GP_ARG_FIRST);
+ this_rtx = gen_rtx_REG (Pmode, GP_ARG_FIRST);
- /* Add DELTA to THIS. */
+ /* Add DELTA to THIS_RTX. */
if (delta != 0)
{
rtx offset = GEN_INT (delta);
@@ -12270,23 +12270,23 @@ mips_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
mips_emit_move (temp1, offset);
offset = temp1;
}
- emit_insn (gen_add3_insn (this, this, offset));
+ emit_insn (gen_add3_insn (this_rtx, this_rtx, offset));
}
- /* If needed, add *(*THIS + VCALL_OFFSET) to THIS. */
+ /* If needed, add *(*THIS_RTX + VCALL_OFFSET) to THIS_RTX. */
if (vcall_offset != 0)
{
rtx addr;
- /* Set TEMP1 to *THIS. */
- mips_emit_move (temp1, gen_rtx_MEM (Pmode, this));
+ /* Set TEMP1 to *THIS_RTX. */
+ mips_emit_move (temp1, gen_rtx_MEM (Pmode, this_rtx));
- /* Set ADDR to a legitimate address for *THIS + VCALL_OFFSET. */
+ /* Set ADDR to a legitimate address for *THIS_RTX + VCALL_OFFSET. */
addr = mips_add_offset (temp2, temp1, vcall_offset);
- /* Load the offset and add it to THIS. */
+ /* Load the offset and add it to THIS_RTX. */
mips_emit_move (temp1, gen_rtx_MEM (Pmode, addr));
- emit_insn (gen_add3_insn (this, this, temp1));
+ emit_insn (gen_add3_insn (this_rtx, this_rtx, temp1));
}
/* Jump to the target function. Use a sibcall if direct jumps are
diff --git a/gcc/config/mmix/mmix.c b/gcc/config/mmix/mmix.c
index fe38bb01eca..e57f52dd796 100644
--- a/gcc/config/mmix/mmix.c
+++ b/gcc/config/mmix/mmix.c
@@ -353,11 +353,11 @@ mmix_local_regno (int regno)
We need to extend the reload class of REMAINDER_REG and HIMULT_REG. */
enum reg_class
-mmix_preferred_reload_class (rtx x ATTRIBUTE_UNUSED, enum reg_class class)
+mmix_preferred_reload_class (rtx x ATTRIBUTE_UNUSED, enum reg_class rclass)
{
/* FIXME: Revisit. */
return GET_CODE (x) == MOD && GET_MODE (x) == DImode
- ? REMAINDER_REG : class;
+ ? REMAINDER_REG : rclass;
}
/* PREFERRED_OUTPUT_RELOAD_CLASS.
@@ -365,25 +365,25 @@ mmix_preferred_reload_class (rtx x ATTRIBUTE_UNUSED, enum reg_class class)
enum reg_class
mmix_preferred_output_reload_class (rtx x ATTRIBUTE_UNUSED,
- enum reg_class class)
+ enum reg_class rclass)
{
/* FIXME: Revisit. */
return GET_CODE (x) == MOD && GET_MODE (x) == DImode
- ? REMAINDER_REG : class;
+ ? REMAINDER_REG : rclass;
}
/* SECONDARY_RELOAD_CLASS.
We need to reload regs of REMAINDER_REG and HIMULT_REG elsewhere. */
enum reg_class
-mmix_secondary_reload_class (enum reg_class class,
+mmix_secondary_reload_class (enum reg_class rclass,
enum machine_mode mode ATTRIBUTE_UNUSED,
rtx x ATTRIBUTE_UNUSED,
int in_p ATTRIBUTE_UNUSED)
{
- if (class == REMAINDER_REG
- || class == HIMULT_REG
- || class == SYSTEM_REGS)
+ if (rclass == REMAINDER_REG
+ || rclass == HIMULT_REG
+ || rclass == SYSTEM_REGS)
return GENERAL_REGS;
return NO_REGS;
diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c
index ea7392bb0f9..6f172fc0b26 100644
--- a/gcc/config/mn10300/mn10300.c
+++ b/gcc/config/mn10300/mn10300.c
@@ -1319,11 +1319,11 @@ store_multiple_operation (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
}
/* What (if any) secondary registers are needed to move IN with mode
- MODE into a register in register class CLASS.
+ MODE into a register in register class RCLASS.
We might be able to simplify this. */
enum reg_class
-mn10300_secondary_reload_class (enum reg_class class, enum machine_mode mode,
+mn10300_secondary_reload_class (enum reg_class rclass, enum machine_mode mode,
rtx in)
{
/* Memory loads less than a full word wide can't have an
@@ -1336,8 +1336,8 @@ mn10300_secondary_reload_class (enum reg_class class, enum machine_mode mode,
&& GET_CODE (SUBREG_REG (in)) == REG
&& REGNO (SUBREG_REG (in)) >= FIRST_PSEUDO_REGISTER))
&& (mode == QImode || mode == HImode)
- && (class == ADDRESS_REGS || class == SP_REGS
- || class == SP_OR_ADDRESS_REGS))
+ && (rclass == ADDRESS_REGS || rclass == SP_REGS
+ || rclass == SP_OR_ADDRESS_REGS))
{
if (TARGET_AM33)
return DATA_OR_EXTENDED_REGS;
@@ -1346,12 +1346,12 @@ mn10300_secondary_reload_class (enum reg_class class, enum machine_mode mode,
/* We can't directly load sp + const_int into a data register;
we must use an address register as an intermediate. */
- if (class != SP_REGS
- && class != ADDRESS_REGS
- && class != SP_OR_ADDRESS_REGS
- && class != SP_OR_EXTENDED_REGS
- && class != ADDRESS_OR_EXTENDED_REGS
- && class != SP_OR_ADDRESS_OR_EXTENDED_REGS
+ if (rclass != SP_REGS
+ && rclass != ADDRESS_REGS
+ && rclass != SP_OR_ADDRESS_REGS
+ && rclass != SP_OR_EXTENDED_REGS
+ && rclass != ADDRESS_OR_EXTENDED_REGS
+ && rclass != SP_OR_ADDRESS_OR_EXTENDED_REGS
&& (in == stack_pointer_rtx
|| (GET_CODE (in) == PLUS
&& (XEXP (in, 0) == stack_pointer_rtx
@@ -1363,7 +1363,7 @@ mn10300_secondary_reload_class (enum reg_class class, enum machine_mode mode,
|| XEXP (in, 1) == stack_pointer_rtx))
return GENERAL_REGS;
- if (TARGET_AM33_2 && class == FP_REGS
+ if (TARGET_AM33_2 && rclass == FP_REGS
&& GET_CODE (in) == MEM
&& ! (GET_CODE (in) == MEM && !CONSTANT_ADDRESS_P (XEXP (in, 0))))
{
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 76d84bad092..9ff778b5b47 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -5684,19 +5684,19 @@ output_arg_descriptor (rtx call_insn)
}
static enum reg_class
-pa_secondary_reload (bool in_p, rtx x, enum reg_class class,
+pa_secondary_reload (bool in_p, rtx x, enum reg_class rclass,
enum machine_mode mode, secondary_reload_info *sri)
{
int is_symbolic, regno;
/* Handle the easy stuff first. */
- if (class == R1_REGS)
+ if (rclass == R1_REGS)
return NO_REGS;
if (REG_P (x))
{
regno = REGNO (x);
- if (class == BASE_REG_CLASS && regno < FIRST_PSEUDO_REGISTER)
+ if (rclass == BASE_REG_CLASS && regno < FIRST_PSEUDO_REGISTER)
return NO_REGS;
}
else
@@ -5712,7 +5712,7 @@ pa_secondary_reload (bool in_p, rtx x, enum reg_class class,
generation requires %r1 as a scratch register. */
if (flag_pic
&& (mode == SImode || mode == DImode)
- && FP_REG_CLASS_P (class)
+ && FP_REG_CLASS_P (rclass)
&& (GET_CODE (x) == CONST_INT || GET_CODE (x) == CONST_DOUBLE))
{
sri->icode = (mode == SImode ? CODE_FOR_reload_insi_r1
@@ -5735,7 +5735,7 @@ pa_secondary_reload (bool in_p, rtx x, enum reg_class class,
memory loads and stores. */
if ((regno >= FIRST_PSEUDO_REGISTER || regno == -1)
&& GET_MODE_CLASS (mode) == MODE_INT
- && FP_REG_CLASS_P (class))
+ && FP_REG_CLASS_P (rclass))
{
/* Reload passes (mem:SI (reg/f:DI 30 %r30) when it wants to check
the secondary reload needed for a pseudo. It never passes a
@@ -5767,7 +5767,7 @@ pa_secondary_reload (bool in_p, rtx x, enum reg_class class,
/* We need a secondary register (GPR) for copies between the SAR
and anything other than a general register. */
- if (class == SHIFT_REGS && (regno <= 0 || regno >= 32))
+ if (rclass == SHIFT_REGS && (regno <= 0 || regno >= 32))
{
sri->icode = in_p ? reload_in_optab[mode] : reload_out_optab[mode];
return NO_REGS;
@@ -5777,7 +5777,7 @@ pa_secondary_reload (bool in_p, rtx x, enum reg_class class,
well as secondary memory. */
if (regno >= 0 && regno < FIRST_PSEUDO_REGISTER
&& (REGNO_REG_CLASS (regno) == SHIFT_REGS
- && FP_REG_CLASS_P (class)))
+ && FP_REG_CLASS_P (rclass)))
{
sri->icode = in_p ? reload_in_optab[mode] : reload_out_optab[mode];
return NO_REGS;
@@ -8831,7 +8831,7 @@ pa_reorg (void)
static void
pa_combine_instructions (void)
{
- rtx anchor, new;
+ rtx anchor, new_rtx;
/* This can get expensive since the basic algorithm is on the
order of O(n^2) (or worse). Only do it for -O2 or higher
@@ -8843,8 +8843,8 @@ pa_combine_instructions (void)
may be combined with "floating" insns. As the name implies,
"anchor" instructions don't move, while "floating" insns may
move around. */
- new = gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, NULL_RTX, NULL_RTX));
- new = make_insn_raw (new);
+ new_rtx = gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, NULL_RTX, NULL_RTX));
+ new_rtx = make_insn_raw (new_rtx);
for (anchor = get_insns (); anchor; anchor = NEXT_INSN (anchor))
{
@@ -8900,7 +8900,7 @@ pa_combine_instructions (void)
{
/* If ANCHOR and FLOATER can be combined, then we're
done with this pass. */
- if (pa_can_combine_p (new, anchor, floater, 0,
+ if (pa_can_combine_p (new_rtx, anchor, floater, 0,
SET_DEST (PATTERN (floater)),
XEXP (SET_SRC (PATTERN (floater)), 0),
XEXP (SET_SRC (PATTERN (floater)), 1)))
@@ -8912,7 +8912,7 @@ pa_combine_instructions (void)
{
if (GET_CODE (SET_SRC (PATTERN (floater))) == PLUS)
{
- if (pa_can_combine_p (new, anchor, floater, 0,
+ if (pa_can_combine_p (new_rtx, anchor, floater, 0,
SET_DEST (PATTERN (floater)),
XEXP (SET_SRC (PATTERN (floater)), 0),
XEXP (SET_SRC (PATTERN (floater)), 1)))
@@ -8920,7 +8920,7 @@ pa_combine_instructions (void)
}
else
{
- if (pa_can_combine_p (new, anchor, floater, 0,
+ if (pa_can_combine_p (new_rtx, anchor, floater, 0,
SET_DEST (PATTERN (floater)),
SET_SRC (PATTERN (floater)),
SET_SRC (PATTERN (floater))))
@@ -8962,7 +8962,7 @@ pa_combine_instructions (void)
{
/* If ANCHOR and FLOATER can be combined, then we're
done with this pass. */
- if (pa_can_combine_p (new, anchor, floater, 1,
+ if (pa_can_combine_p (new_rtx, anchor, floater, 1,
SET_DEST (PATTERN (floater)),
XEXP (SET_SRC (PATTERN (floater)),
0),
@@ -9021,7 +9021,7 @@ pa_combine_instructions (void)
}
static int
-pa_can_combine_p (rtx new, rtx anchor, rtx floater, int reversed, rtx dest,
+pa_can_combine_p (rtx new_rtx, rtx anchor, rtx floater, int reversed, rtx dest,
rtx src1, rtx src2)
{
int insn_code_number;
@@ -9034,12 +9034,12 @@ pa_can_combine_p (rtx new, rtx anchor, rtx floater, int reversed, rtx dest,
If the pattern doesn't match or the constraints
aren't met keep searching for a suitable floater
insn. */
- XVECEXP (PATTERN (new), 0, 0) = PATTERN (anchor);
- XVECEXP (PATTERN (new), 0, 1) = PATTERN (floater);
- INSN_CODE (new) = -1;
- insn_code_number = recog_memoized (new);
+ XVECEXP (PATTERN (new_rtx), 0, 0) = PATTERN (anchor);
+ XVECEXP (PATTERN (new_rtx), 0, 1) = PATTERN (floater);
+ INSN_CODE (new_rtx) = -1;
+ insn_code_number = recog_memoized (new_rtx);
if (insn_code_number < 0
- || (extract_insn (new), ! constrain_operands (1)))
+ || (extract_insn (new_rtx), ! constrain_operands (1)))
return 0;
if (reversed)
@@ -9652,11 +9652,11 @@ pa_hpux_file_end (void)
#endif
/* Return true if a change from mode FROM to mode TO for a register
- in register class CLASS is invalid. */
+ in register class RCLASS is invalid. */
bool
pa_cannot_change_mode_class (enum machine_mode from, enum machine_mode to,
- enum reg_class class)
+ enum reg_class rclass)
{
if (from == to)
return false;
@@ -9674,7 +9674,7 @@ pa_cannot_change_mode_class (enum machine_mode from, enum machine_mode to,
On the 64-bit target, this conflicts with the definition of
LOAD_EXTEND_OP. Thus, we can't allow changing between modes
with different sizes in the floating-point registers. */
- if (MAYBE_FP_REG_CLASS_P (class))
+ if (MAYBE_FP_REG_CLASS_P (rclass))
return true;
/* HARD_REGNO_MODE_OK places modes with sizes larger than a word
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
index 22cd9f33f32..610bcf5da3c 100644
--- a/gcc/config/pa/pa.h
+++ b/gcc/config/pa/pa.h
@@ -1377,7 +1377,7 @@ extern int may_call_alloca;
#define LEGITIMIZE_RELOAD_ADDRESS(AD, MODE, OPNUM, TYPE, IND, WIN) \
do { \
long offset, newoffset, mask; \
- rtx new, temp = NULL_RTX; \
+ rtx new_rtx, temp = NULL_RTX; \
\
mask = (GET_MODE_CLASS (MODE) == MODE_FLOAT \
? (INT14_OK_STRICT ? 0x3fff : 0x1f) : 0x3fff); \
@@ -1386,14 +1386,14 @@ do { \
temp = simplify_binary_operation (PLUS, Pmode, \
XEXP (AD, 0), XEXP (AD, 1)); \
\
- new = temp ? temp : AD; \
+ new_rtx = temp ? temp : AD; \
\
if (optimize \
- && GET_CODE (new) == PLUS \
- && GET_CODE (XEXP (new, 0)) == REG \
- && GET_CODE (XEXP (new, 1)) == CONST_INT) \
+ && GET_CODE (new_rtx) == PLUS \
+ && GET_CODE (XEXP (new_rtx, 0)) == REG \
+ && GET_CODE (XEXP (new_rtx, 1)) == CONST_INT) \
{ \
- offset = INTVAL (XEXP ((new), 1)); \
+ offset = INTVAL (XEXP ((new_rtx), 1)); \
\
/* Choose rounding direction. Round up if we are >= halfway. */ \
if ((offset & mask) >= ((mask + 1) / 2)) \
@@ -1409,7 +1409,7 @@ do { \
\
if (newoffset != 0 && VAL_14_BITS_P (newoffset)) \
{ \
- temp = gen_rtx_PLUS (Pmode, XEXP (new, 0), \
+ temp = gen_rtx_PLUS (Pmode, XEXP (new_rtx, 0), \
GEN_INT (newoffset)); \
AD = gen_rtx_PLUS (Pmode, temp, GEN_INT (offset - newoffset));\
push_reload (XEXP (AD, 0), 0, &XEXP (AD, 0), 0, \
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index e67b1a7fed8..2494056eabe 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -2849,7 +2849,7 @@ paired_expand_vector_init (rtx target, rtx vals)
enum machine_mode mode = GET_MODE (target);
int n_elts = GET_MODE_NUNITS (mode);
int n_var = 0;
- rtx x, new, tmp, constant_op, op1, op2;
+ rtx x, new_rtx, tmp, constant_op, op1, op2;
int i;
for (i = 0; i < n_elts; ++i)
@@ -2868,10 +2868,10 @@ paired_expand_vector_init (rtx target, rtx vals)
if (n_var == 2)
{
/* The vector is initialized only with non-constants. */
- new = gen_rtx_VEC_CONCAT (V2SFmode, XVECEXP (vals, 0, 0),
+ new_rtx = gen_rtx_VEC_CONCAT (V2SFmode, XVECEXP (vals, 0, 0),
XVECEXP (vals, 0, 1));
- emit_move_insn (target, new);
+ emit_move_insn (target, new_rtx);
return;
}
@@ -2887,11 +2887,11 @@ paired_expand_vector_init (rtx target, rtx vals)
emit_move_insn (tmp, constant_op);
if (CONSTANT_P (op1))
- new = gen_rtx_VEC_CONCAT (V2SFmode, tmp, op2);
+ new_rtx = gen_rtx_VEC_CONCAT (V2SFmode, tmp, op2);
else
- new = gen_rtx_VEC_CONCAT (V2SFmode, op1, tmp);
+ new_rtx = gen_rtx_VEC_CONCAT (V2SFmode, op1, tmp);
- emit_move_insn (target, new);
+ emit_move_insn (target, new_rtx);
}
void
@@ -11370,11 +11370,11 @@ rs6000_instantiate_decls (void)
}
/* Return the register class of a scratch register needed to copy IN into
- or out of a register in CLASS in MODE. If it can be done directly,
+ or out of a register in RCLASS in MODE. If it can be done directly,
NO_REGS is returned. */
enum reg_class
-rs6000_secondary_reload_class (enum reg_class class,
+rs6000_secondary_reload_class (enum reg_class rclass,
enum machine_mode mode ATTRIBUTE_UNUSED,
rtx in)
{
@@ -11393,7 +11393,7 @@ rs6000_secondary_reload_class (enum reg_class class,
On Darwin, pic addresses require a load from memory, which
needs a base register. */
- if (class != BASE_REGS
+ if (rclass != BASE_REGS
&& (GET_CODE (in) == SYMBOL_REF
|| GET_CODE (in) == HIGH
|| GET_CODE (in) == LABEL_REF
@@ -11422,22 +11422,22 @@ rs6000_secondary_reload_class (enum reg_class class,
/* We can place anything into GENERAL_REGS and can put GENERAL_REGS
into anything. */
- if (class == GENERAL_REGS || class == BASE_REGS
+ if (rclass == GENERAL_REGS || rclass == BASE_REGS
|| (regno >= 0 && INT_REGNO_P (regno)))
return NO_REGS;
/* Constants, memory, and FP registers can go into FP registers. */
if ((regno == -1 || FP_REGNO_P (regno))
- && (class == FLOAT_REGS || class == NON_SPECIAL_REGS))
+ && (rclass == FLOAT_REGS || rclass == NON_SPECIAL_REGS))
return (mode != SDmode) ? NO_REGS : GENERAL_REGS;
/* Memory, and AltiVec registers can go into AltiVec registers. */
if ((regno == -1 || ALTIVEC_REGNO_P (regno))
- && class == ALTIVEC_REGS)
+ && rclass == ALTIVEC_REGS)
return NO_REGS;
/* We can copy among the CR registers. */
- if ((class == CR_REGS || class == CR0_REGS)
+ if ((rclass == CR_REGS || rclass == CR0_REGS)
&& regno >= 0 && CR_REGNO_P (regno))
return NO_REGS;
@@ -17578,7 +17578,7 @@ rs6000_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
HOST_WIDE_INT delta, HOST_WIDE_INT vcall_offset,
tree function)
{
- rtx this, insn, funexp;
+ rtx this_rtx, insn, funexp;
reload_completed = 1;
epilogue_completed = 1;
@@ -17589,17 +17589,17 @@ rs6000_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
/* Find the "this" pointer. If the function returns a structure,
the structure return pointer is in r3. */
if (aggregate_value_p (TREE_TYPE (TREE_TYPE (function)), function))
- this = gen_rtx_REG (Pmode, 4);
+ this_rtx = gen_rtx_REG (Pmode, 4);
else
- this = gen_rtx_REG (Pmode, 3);
+ this_rtx = gen_rtx_REG (Pmode, 3);
/* Apply the constant offset, if required. */
if (delta)
{
rtx delta_rtx = GEN_INT (delta);
emit_insn (TARGET_32BIT
- ? gen_addsi3 (this, this, delta_rtx)
- : gen_adddi3 (this, this, delta_rtx));
+ ? gen_addsi3 (this_rtx, this_rtx, delta_rtx)
+ : gen_adddi3 (this_rtx, this_rtx, delta_rtx));
}
/* Apply the offset from the vtable, if required. */
@@ -17608,7 +17608,7 @@ rs6000_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
rtx vcall_offset_rtx = GEN_INT (vcall_offset);
rtx tmp = gen_rtx_REG (Pmode, 12);
- emit_move_insn (tmp, gen_rtx_MEM (Pmode, this));
+ emit_move_insn (tmp, gen_rtx_MEM (Pmode, this_rtx));
if (((unsigned HOST_WIDE_INT) vcall_offset) + 0x8000 >= 0x10000)
{
emit_insn (TARGET_32BIT
@@ -17623,8 +17623,8 @@ rs6000_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
emit_move_insn (tmp, gen_rtx_MEM (Pmode, loc));
}
emit_insn (TARGET_32BIT
- ? gen_addsi3 (this, this, tmp)
- : gen_adddi3 (this, this, tmp));
+ ? gen_addsi3 (this_rtx, this_rtx, tmp)
+ : gen_adddi3 (this_rtx, this_rtx, tmp));
}
/* Generate a tail call to the target function. */
@@ -20520,12 +20520,12 @@ rs6000_elf_encode_section_info (tree decl, rtx rtl, int first)
}
static inline bool
-compare_section_name (const char *section, const char *template)
+compare_section_name (const char *section, const char *templ)
{
int len;
- len = strlen (template);
- return (strncmp (section, template, len) == 0
+ len = strlen (templ);
+ return (strncmp (section, templ, len) == 0
&& (section[len] == 0 || section[len] == '.'));
}
@@ -21813,17 +21813,17 @@ rs6000_register_move_cost (enum machine_mode mode,
or from memory. */
int
-rs6000_memory_move_cost (enum machine_mode mode, enum reg_class class,
+rs6000_memory_move_cost (enum machine_mode mode, enum reg_class rclass,
int in ATTRIBUTE_UNUSED)
{
- if (reg_classes_intersect_p (class, GENERAL_REGS))
+ if (reg_classes_intersect_p (rclass, GENERAL_REGS))
return 4 * hard_regno_nregs[0][mode];
- else if (reg_classes_intersect_p (class, FLOAT_REGS))
+ else if (reg_classes_intersect_p (rclass, FLOAT_REGS))
return 4 * hard_regno_nregs[32][mode];
- else if (reg_classes_intersect_p (class, ALTIVEC_REGS))
+ else if (reg_classes_intersect_p (rclass, ALTIVEC_REGS))
return 4 * hard_regno_nregs[FIRST_ALTIVEC_REGNO][mode];
else
- return 4 + rs6000_register_move_cost (mode, class, GENERAL_REGS);
+ return 4 + rs6000_register_move_cost (mode, rclass, GENERAL_REGS);
}
/* Returns a code for a target-specific builtin that implements
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 3c7d92b3c8d..9d60c442542 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -836,17 +836,17 @@ s390_emit_compare (enum rtx_code code, rtx op0, rtx op1)
return ret;
}
-/* Emit a SImode compare and swap instruction setting MEM to NEW if OLD
+/* Emit a SImode compare and swap instruction setting MEM to NEW_RTX if OLD
matches CMP.
Return the correct condition RTL to be placed in the IF_THEN_ELSE of the
conditional branch testing the result. */
static rtx
-s390_emit_compare_and_swap (enum rtx_code code, rtx old, rtx mem, rtx cmp, rtx new)
+s390_emit_compare_and_swap (enum rtx_code code, rtx old, rtx mem, rtx cmp, rtx new_rtx)
{
rtx ret;
- emit_insn (gen_sync_compare_and_swap_ccsi (old, mem, cmp, new));
+ emit_insn (gen_sync_compare_and_swap_ccsi (old, mem, cmp, new_rtx));
ret = gen_rtx_fmt_ee (code, VOIDmode, s390_compare_emitted, const0_rtx);
s390_compare_emitted = NULL_RTX;
@@ -2758,11 +2758,11 @@ legitimate_reload_constant_p (rtx op)
return false;
}
-/* Given an rtx OP being reloaded into a reg required to be in class CLASS,
+/* Given an rtx OP being reloaded into a reg required to be in class RCLASS,
return the class of reg to actually use. */
enum reg_class
-s390_preferred_reload_class (rtx op, enum reg_class class)
+s390_preferred_reload_class (rtx op, enum reg_class rclass)
{
switch (GET_CODE (op))
{
@@ -2772,7 +2772,7 @@ s390_preferred_reload_class (rtx op, enum reg_class class)
case CONST_DOUBLE:
case CONST_INT:
if (legitimate_reload_constant_p (op))
- return class;
+ return rclass;
else
return NO_REGS;
@@ -2784,7 +2784,7 @@ s390_preferred_reload_class (rtx op, enum reg_class class)
case LABEL_REF:
case SYMBOL_REF:
case CONST:
- if (reg_class_subset_p (ADDR_REGS, class))
+ if (reg_class_subset_p (ADDR_REGS, rclass))
return ADDR_REGS;
else
return NO_REGS;
@@ -2793,7 +2793,7 @@ s390_preferred_reload_class (rtx op, enum reg_class class)
break;
}
- return class;
+ return rclass;
}
/* Return true if ADDR is of kind symbol_ref or symbol_ref + const_int
@@ -2923,15 +2923,15 @@ s390_reload_symref_address (rtx reg, rtx mem, rtx scratch, bool tomem)
}
/* Inform reload about cases where moving X with a mode MODE to a register in
- CLASS requires an extra scratch or immediate register. Return the class
+ RCLASS requires an extra scratch or immediate register. Return the class
needed for the immediate register. */
static enum reg_class
-s390_secondary_reload (bool in_p, rtx x, enum reg_class class,
+s390_secondary_reload (bool in_p, rtx x, enum reg_class rclass,
enum machine_mode mode, secondary_reload_info *sri)
{
/* Intermediate register needed. */
- if (reg_classes_intersect_p (CC_REGS, class))
+ if (reg_classes_intersect_p (CC_REGS, rclass))
return GENERAL_REGS;
if (TARGET_Z10)
@@ -3007,12 +3007,12 @@ s390_secondary_reload (bool in_p, rtx x, enum reg_class class,
/* For GENERAL_REGS a displacement overflow is no problem if occurring
in a s_operand address since we may fallback to lm/stm. So we only
have to care about overflows in the b+i+d case. */
- if ((reg_classes_intersect_p (GENERAL_REGS, class)
+ if ((reg_classes_intersect_p (GENERAL_REGS, rclass)
&& s390_class_max_nregs (GENERAL_REGS, mode) > 1
&& GET_CODE (XEXP (XEXP (x, 0), 0)) == PLUS)
/* For FP_REGS no lm/stm is available so this check is triggered
for displacement overflows in b+i+d and b+d like addresses. */
- || (reg_classes_intersect_p (FP_REGS, class)
+ || (reg_classes_intersect_p (FP_REGS, rclass)
&& s390_class_max_nregs (FP_REGS, mode) > 1))
{
if (in_p)
@@ -3029,7 +3029,7 @@ s390_secondary_reload (bool in_p, rtx x, enum reg_class class,
/* A scratch address register is needed when a symbolic constant is
copied to r0 compiling with -fPIC. In other cases the target
register might be used as temporary (see legitimize_pic_address). */
- if (in_p && SYMBOLIC_CONST (x) && flag_pic == 2 && class != ADDR_REGS)
+ if (in_p && SYMBOLIC_CONST (x) && flag_pic == 2 && rclass != ADDR_REGS)
sri->icode = (TARGET_64BIT ?
CODE_FOR_reloaddi_PIC_addr :
CODE_FOR_reloadsi_PIC_addr);
@@ -3218,7 +3218,7 @@ rtx
legitimize_pic_address (rtx orig, rtx reg)
{
rtx addr = orig;
- rtx new = orig;
+ rtx new_rtx = orig;
rtx base;
gcc_assert (!TLS_SYMBOLIC_CONST (addr));
@@ -3247,11 +3247,11 @@ legitimize_pic_address (rtx orig, rtx reg)
addr = force_const_mem (Pmode, addr);
emit_move_insn (temp, addr);
- new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, temp);
+ new_rtx = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, temp);
if (reg != 0)
{
- s390_load_address (reg, new);
- new = reg;
+ s390_load_address (reg, new_rtx);
+ new_rtx = reg;
}
}
}
@@ -3268,12 +3268,12 @@ legitimize_pic_address (rtx orig, rtx reg)
if (reload_in_progress || reload_completed)
df_set_regs_ever_live (PIC_OFFSET_TABLE_REGNUM, true);
- new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOT);
- new = gen_rtx_CONST (Pmode, new);
- new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, new);
- new = gen_const_mem (Pmode, new);
- emit_move_insn (reg, new);
- new = reg;
+ new_rtx = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOT);
+ new_rtx = gen_rtx_CONST (Pmode, new_rtx);
+ new_rtx = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, new_rtx);
+ new_rtx = gen_const_mem (Pmode, new_rtx);
+ emit_move_insn (reg, new_rtx);
+ new_rtx = reg;
}
else if (TARGET_CPU_ZARCH)
{
@@ -3285,13 +3285,13 @@ legitimize_pic_address (rtx orig, rtx reg)
gcc_assert (REGNO (temp) >= FIRST_PSEUDO_REGISTER
|| REGNO_REG_CLASS (REGNO (temp)) == ADDR_REGS);
- new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOTENT);
- new = gen_rtx_CONST (Pmode, new);
- emit_move_insn (temp, new);
+ new_rtx = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOTENT);
+ new_rtx = gen_rtx_CONST (Pmode, new_rtx);
+ emit_move_insn (temp, new_rtx);
- new = gen_const_mem (Pmode, temp);
- emit_move_insn (reg, new);
- new = reg;
+ new_rtx = gen_const_mem (Pmode, temp);
+ emit_move_insn (reg, new_rtx);
+ new_rtx = reg;
}
else
{
@@ -3311,10 +3311,10 @@ legitimize_pic_address (rtx orig, rtx reg)
addr = force_const_mem (Pmode, addr);
emit_move_insn (temp, addr);
- new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, temp);
- new = gen_const_mem (Pmode, new);
- emit_move_insn (reg, new);
- new = reg;
+ new_rtx = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, temp);
+ new_rtx = gen_const_mem (Pmode, new_rtx);
+ emit_move_insn (reg, new_rtx);
+ new_rtx = reg;
}
}
else
@@ -3331,13 +3331,13 @@ legitimize_pic_address (rtx orig, rtx reg)
out of the literal pool, force them back in. */
case UNSPEC_GOTOFF:
case UNSPEC_PLTOFF:
- new = force_const_mem (Pmode, orig);
+ new_rtx = force_const_mem (Pmode, orig);
break;
/* @GOT is OK as is if small. */
case UNSPEC_GOT:
if (flag_pic == 2)
- new = force_const_mem (Pmode, orig);
+ new_rtx = force_const_mem (Pmode, orig);
break;
/* @GOTENT is OK as is. */
@@ -3361,11 +3361,11 @@ legitimize_pic_address (rtx orig, rtx reg)
addr = force_const_mem (Pmode, addr);
emit_move_insn (temp, addr);
- new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, temp);
+ new_rtx = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, temp);
if (reg != 0)
{
- s390_load_address (reg, new);
- new = reg;
+ s390_load_address (reg, new_rtx);
+ new_rtx = reg;
}
}
break;
@@ -3411,12 +3411,12 @@ legitimize_pic_address (rtx orig, rtx reg)
}
emit_move_insn (temp, op0);
- new = gen_rtx_PLUS (Pmode, temp, op1);
+ new_rtx = gen_rtx_PLUS (Pmode, temp, op1);
if (reg != 0)
{
- s390_load_address (reg, new);
- new = reg;
+ s390_load_address (reg, new_rtx);
+ new_rtx = reg;
}
}
else
@@ -3441,11 +3441,11 @@ legitimize_pic_address (rtx orig, rtx reg)
addr = force_const_mem (Pmode, addr);
emit_move_insn (temp, addr);
- new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, temp);
+ new_rtx = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, temp);
if (reg != 0)
{
- s390_load_address (reg, new);
- new = reg;
+ s390_load_address (reg, new_rtx);
+ new_rtx = reg;
}
}
}
@@ -3459,34 +3459,34 @@ legitimize_pic_address (rtx orig, rtx reg)
{
gcc_assert (XVECLEN (op0, 0) == 1);
- new = force_const_mem (Pmode, orig);
+ new_rtx = force_const_mem (Pmode, orig);
}
/* Otherwise, compute the sum. */
else
{
base = legitimize_pic_address (XEXP (addr, 0), reg);
- new = legitimize_pic_address (XEXP (addr, 1),
+ new_rtx = legitimize_pic_address (XEXP (addr, 1),
base == reg ? NULL_RTX : reg);
- if (GET_CODE (new) == CONST_INT)
- new = plus_constant (base, INTVAL (new));
+ if (GET_CODE (new_rtx) == CONST_INT)
+ new_rtx = plus_constant (base, INTVAL (new_rtx));
else
{
- if (GET_CODE (new) == PLUS && CONSTANT_P (XEXP (new, 1)))
+ if (GET_CODE (new_rtx) == PLUS && CONSTANT_P (XEXP (new_rtx, 1)))
{
- base = gen_rtx_PLUS (Pmode, base, XEXP (new, 0));
- new = XEXP (new, 1);
+ base = gen_rtx_PLUS (Pmode, base, XEXP (new_rtx, 0));
+ new_rtx = XEXP (new_rtx, 1);
}
- new = gen_rtx_PLUS (Pmode, base, new);
+ new_rtx = gen_rtx_PLUS (Pmode, base, new_rtx);
}
- if (GET_CODE (new) == CONST)
- new = XEXP (new, 0);
- new = force_operand (new, 0);
+ if (GET_CODE (new_rtx) == CONST)
+ new_rtx = XEXP (new_rtx, 0);
+ new_rtx = force_operand (new_rtx, 0);
}
}
}
- return new;
+ return new_rtx;
}
/* Load the thread pointer into a register. */
@@ -3532,7 +3532,7 @@ s390_emit_tls_call_insn (rtx result_reg, rtx tls_call)
static rtx
legitimize_tls_address (rtx addr, rtx reg)
{
- rtx new, tls_call, temp, base, r2, insn;
+ rtx new_rtx, tls_call, temp, base, r2, insn;
if (GET_CODE (addr) == SYMBOL_REF)
switch (tls_symbolic_operand (addr))
@@ -3541,22 +3541,22 @@ legitimize_tls_address (rtx addr, rtx reg)
start_sequence ();
r2 = gen_rtx_REG (Pmode, 2);
tls_call = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_TLSGD);
- new = gen_rtx_CONST (Pmode, tls_call);
- new = force_const_mem (Pmode, new);
- emit_move_insn (r2, new);
+ new_rtx = gen_rtx_CONST (Pmode, tls_call);
+ new_rtx = force_const_mem (Pmode, new_rtx);
+ emit_move_insn (r2, new_rtx);
s390_emit_tls_call_insn (r2, tls_call);
insn = get_insns ();
end_sequence ();
- new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_NTPOFF);
+ new_rtx = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_NTPOFF);
temp = gen_reg_rtx (Pmode);
- emit_libcall_block (insn, temp, r2, new);
+ emit_libcall_block (insn, temp, r2, new_rtx);
- new = gen_rtx_PLUS (Pmode, s390_get_thread_pointer (), temp);
+ new_rtx = gen_rtx_PLUS (Pmode, s390_get_thread_pointer (), temp);
if (reg != 0)
{
- s390_load_address (reg, new);
- new = reg;
+ s390_load_address (reg, new_rtx);
+ new_rtx = reg;
}
break;
@@ -3564,32 +3564,32 @@ legitimize_tls_address (rtx addr, rtx reg)
start_sequence ();
r2 = gen_rtx_REG (Pmode, 2);
tls_call = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, const0_rtx), UNSPEC_TLSLDM);
- new = gen_rtx_CONST (Pmode, tls_call);
- new = force_const_mem (Pmode, new);
- emit_move_insn (r2, new);
+ new_rtx = gen_rtx_CONST (Pmode, tls_call);
+ new_rtx = force_const_mem (Pmode, new_rtx);
+ emit_move_insn (r2, new_rtx);
s390_emit_tls_call_insn (r2, tls_call);
insn = get_insns ();
end_sequence ();
- new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, const0_rtx), UNSPEC_TLSLDM_NTPOFF);
+ new_rtx = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, const0_rtx), UNSPEC_TLSLDM_NTPOFF);
temp = gen_reg_rtx (Pmode);
- emit_libcall_block (insn, temp, r2, new);
+ emit_libcall_block (insn, temp, r2, new_rtx);
- new = gen_rtx_PLUS (Pmode, s390_get_thread_pointer (), temp);
+ new_rtx = gen_rtx_PLUS (Pmode, s390_get_thread_pointer (), temp);
base = gen_reg_rtx (Pmode);
- s390_load_address (base, new);
+ s390_load_address (base, new_rtx);
- new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_DTPOFF);
- new = gen_rtx_CONST (Pmode, new);
- new = force_const_mem (Pmode, new);
+ new_rtx = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_DTPOFF);
+ new_rtx = gen_rtx_CONST (Pmode, new_rtx);
+ new_rtx = force_const_mem (Pmode, new_rtx);
temp = gen_reg_rtx (Pmode);
- emit_move_insn (temp, new);
+ emit_move_insn (temp, new_rtx);
- new = gen_rtx_PLUS (Pmode, base, temp);
+ new_rtx = gen_rtx_PLUS (Pmode, base, temp);
if (reg != 0)
{
- s390_load_address (reg, new);
- new = reg;
+ s390_load_address (reg, new_rtx);
+ new_rtx = reg;
}
break;
@@ -3602,26 +3602,26 @@ legitimize_tls_address (rtx addr, rtx reg)
if (reload_in_progress || reload_completed)
df_set_regs_ever_live (PIC_OFFSET_TABLE_REGNUM, true);
- new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOTNTPOFF);
- new = gen_rtx_CONST (Pmode, new);
- new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, new);
- new = gen_const_mem (Pmode, new);
+ new_rtx = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOTNTPOFF);
+ new_rtx = gen_rtx_CONST (Pmode, new_rtx);
+ new_rtx = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, new_rtx);
+ new_rtx = gen_const_mem (Pmode, new_rtx);
temp = gen_reg_rtx (Pmode);
- emit_move_insn (temp, new);
+ emit_move_insn (temp, new_rtx);
}
else if (TARGET_CPU_ZARCH)
{
/* If the GOT offset might be >= 4k, we determine the position
of the GOT entry via a PC-relative LARL. */
- new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_INDNTPOFF);
- new = gen_rtx_CONST (Pmode, new);
+ new_rtx = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_INDNTPOFF);
+ new_rtx = gen_rtx_CONST (Pmode, new_rtx);
temp = gen_reg_rtx (Pmode);
- emit_move_insn (temp, new);
+ emit_move_insn (temp, new_rtx);
- new = gen_const_mem (Pmode, temp);
+ new_rtx = gen_const_mem (Pmode, temp);
temp = gen_reg_rtx (Pmode);
- emit_move_insn (temp, new);
+ emit_move_insn (temp, new_rtx);
}
else if (flag_pic)
{
@@ -3631,57 +3631,57 @@ legitimize_tls_address (rtx addr, rtx reg)
if (reload_in_progress || reload_completed)
df_set_regs_ever_live (PIC_OFFSET_TABLE_REGNUM, true);
- new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOTNTPOFF);
- new = gen_rtx_CONST (Pmode, new);
- new = force_const_mem (Pmode, new);
+ new_rtx = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOTNTPOFF);
+ new_rtx = gen_rtx_CONST (Pmode, new_rtx);
+ new_rtx = force_const_mem (Pmode, new_rtx);
temp = gen_reg_rtx (Pmode);
- emit_move_insn (temp, new);
+ emit_move_insn (temp, new_rtx);
- new = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, temp);
- new = gen_const_mem (Pmode, new);
+ new_rtx = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, temp);
+ new_rtx = gen_const_mem (Pmode, new_rtx);
- new = gen_rtx_UNSPEC (Pmode, gen_rtvec (2, new, addr), UNSPEC_TLS_LOAD);
+ new_rtx = gen_rtx_UNSPEC (Pmode, gen_rtvec (2, new_rtx, addr), UNSPEC_TLS_LOAD);
temp = gen_reg_rtx (Pmode);
- emit_insn (gen_rtx_SET (Pmode, temp, new));
+ emit_insn (gen_rtx_SET (Pmode, temp, new_rtx));
}
else
{
/* In position-dependent code, load the absolute address of
the GOT entry from the literal pool. */
- new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_INDNTPOFF);
- new = gen_rtx_CONST (Pmode, new);
- new = force_const_mem (Pmode, new);
+ new_rtx = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_INDNTPOFF);
+ new_rtx = gen_rtx_CONST (Pmode, new_rtx);
+ new_rtx = force_const_mem (Pmode, new_rtx);
temp = gen_reg_rtx (Pmode);
- emit_move_insn (temp, new);
+ emit_move_insn (temp, new_rtx);
- new = temp;
- new = gen_const_mem (Pmode, new);
- new = gen_rtx_UNSPEC (Pmode, gen_rtvec (2, new, addr), UNSPEC_TLS_LOAD);
+ new_rtx = temp;
+ new_rtx = gen_const_mem (Pmode, new_rtx);
+ new_rtx = gen_rtx_UNSPEC (Pmode, gen_rtvec (2, new_rtx, addr), UNSPEC_TLS_LOAD);
temp = gen_reg_rtx (Pmode);
- emit_insn (gen_rtx_SET (Pmode, temp, new));
+ emit_insn (gen_rtx_SET (Pmode, temp, new_rtx));
}
- new = gen_rtx_PLUS (Pmode, s390_get_thread_pointer (), temp);
+ new_rtx = gen_rtx_PLUS (Pmode, s390_get_thread_pointer (), temp);
if (reg != 0)
{
- s390_load_address (reg, new);
- new = reg;
+ s390_load_address (reg, new_rtx);
+ new_rtx = reg;
}
break;
case TLS_MODEL_LOCAL_EXEC:
- new = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_NTPOFF);
- new = gen_rtx_CONST (Pmode, new);
- new = force_const_mem (Pmode, new);
+ new_rtx = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_NTPOFF);
+ new_rtx = gen_rtx_CONST (Pmode, new_rtx);
+ new_rtx = force_const_mem (Pmode, new_rtx);
temp = gen_reg_rtx (Pmode);
- emit_move_insn (temp, new);
+ emit_move_insn (temp, new_rtx);
- new = gen_rtx_PLUS (Pmode, s390_get_thread_pointer (), temp);
+ new_rtx = gen_rtx_PLUS (Pmode, s390_get_thread_pointer (), temp);
if (reg != 0)
{
- s390_load_address (reg, new);
- new = reg;
+ s390_load_address (reg, new_rtx);
+ new_rtx = reg;
}
break;
@@ -3695,7 +3695,7 @@ legitimize_tls_address (rtx addr, rtx reg)
{
case UNSPEC_INDNTPOFF:
gcc_assert (TARGET_CPU_ZARCH);
- new = addr;
+ new_rtx = addr;
break;
default:
@@ -3706,19 +3706,19 @@ legitimize_tls_address (rtx addr, rtx reg)
else if (GET_CODE (addr) == CONST && GET_CODE (XEXP (addr, 0)) == PLUS
&& GET_CODE (XEXP (XEXP (addr, 0), 1)) == CONST_INT)
{
- new = XEXP (XEXP (addr, 0), 0);
- if (GET_CODE (new) != SYMBOL_REF)
- new = gen_rtx_CONST (Pmode, new);
+ new_rtx = XEXP (XEXP (addr, 0), 0);
+ if (GET_CODE (new_rtx) != SYMBOL_REF)
+ new_rtx = gen_rtx_CONST (Pmode, new_rtx);
- new = legitimize_tls_address (new, reg);
- new = plus_constant (new, INTVAL (XEXP (XEXP (addr, 0), 1)));
- new = force_operand (new, 0);
+ new_rtx = legitimize_tls_address (new_rtx, reg);
+ new_rtx = plus_constant (new_rtx, INTVAL (XEXP (XEXP (addr, 0), 1)));
+ new_rtx = force_operand (new_rtx, 0);
}
else
gcc_unreachable (); /* for now ... */
- return new;
+ return new_rtx;
}
/* Emit insns making the address in operands[1] valid for a standard
@@ -3865,19 +3865,19 @@ legitimize_reload_address (rtx ad, enum machine_mode mode ATTRIBUTE_UNUSED,
{
HOST_WIDE_INT lower = INTVAL (XEXP (ad, 1)) & 0xfff;
HOST_WIDE_INT upper = INTVAL (XEXP (ad, 1)) ^ lower;
- rtx cst, tem, new;
+ rtx cst, tem, new_rtx;
cst = GEN_INT (upper);
if (!legitimate_reload_constant_p (cst))
cst = force_const_mem (Pmode, cst);
tem = gen_rtx_PLUS (Pmode, XEXP (ad, 0), cst);
- new = gen_rtx_PLUS (Pmode, tem, GEN_INT (lower));
+ new_rtx = gen_rtx_PLUS (Pmode, tem, GEN_INT (lower));
push_reload (XEXP (tem, 1), 0, &XEXP (tem, 1), 0,
BASE_REG_CLASS, Pmode, VOIDmode, 0, 0,
opnum, (enum reload_type) type);
- return new;
+ return new_rtx;
}
return NULL_RTX;
@@ -4547,13 +4547,13 @@ init_alignment_context (struct alignment_context *ac, rtx mem,
}
/* Expand an atomic compare and swap operation for HImode and QImode. MEM is
- the memory location, CMP the old value to compare MEM with and NEW the value
+ the memory location, CMP the old value to compare MEM with and NEW_RTX the value
to set if CMP == MEM.
CMP is never in memory for compare_and_swap_cc because
expand_bool_compare_and_swap puts it into a register for later compare. */
void
-s390_expand_cs_hqi (enum machine_mode mode, rtx target, rtx mem, rtx cmp, rtx new)
+s390_expand_cs_hqi (enum machine_mode mode, rtx target, rtx mem, rtx cmp, rtx new_rtx)
{
struct alignment_context ac;
rtx cmpv, newv, val, resv, cc;
@@ -4569,8 +4569,8 @@ s390_expand_cs_hqi (enum machine_mode mode, rtx target, rtx mem, rtx cmp, rtx ne
/* Shift the values to the correct bit positions. */
if (!(ac.aligned && MEM_P (cmp)))
cmp = s390_expand_mask_and_shift (cmp, mode, ac.shift);
- if (!(ac.aligned && MEM_P (new)))
- new = s390_expand_mask_and_shift (new, mode, ac.shift);
+ if (!(ac.aligned && MEM_P (new_rtx)))
+ new_rtx = s390_expand_mask_and_shift (new_rtx, mode, ac.shift);
/* Load full word. Subsequent loads are performed by CS. */
val = expand_simple_binop (SImode, AND, ac.memsi, ac.modemaski,
@@ -4592,13 +4592,13 @@ s390_expand_cs_hqi (enum machine_mode mode, rtx target, rtx mem, rtx cmp, rtx ne
else
cmpv = force_reg (SImode, expand_simple_binop (SImode, IOR, cmp, val,
NULL_RTX, 1, OPTAB_DIRECT));
- if (ac.aligned && MEM_P (new))
+ if (ac.aligned && MEM_P (new_rtx))
{
newv = force_reg (SImode, val);
- store_bit_field (newv, GET_MODE_BITSIZE (mode), 0, SImode, new);
+ store_bit_field (newv, GET_MODE_BITSIZE (mode), 0, SImode, new_rtx);
}
else
- newv = force_reg (SImode, expand_simple_binop (SImode, IOR, new, val,
+ newv = force_reg (SImode, expand_simple_binop (SImode, IOR, new_rtx, val,
NULL_RTX, 1, OPTAB_DIRECT));
/* Jump to end if we're done (likely?). */
@@ -4632,7 +4632,7 @@ s390_expand_atomic (enum machine_mode mode, enum rtx_code code,
{
struct alignment_context ac;
rtx cmp;
- rtx new = gen_reg_rtx (SImode);
+ rtx new_rtx = gen_reg_rtx (SImode);
rtx orig = gen_reg_rtx (SImode);
rtx csloop = gen_label_rtx ();
@@ -4658,39 +4658,39 @@ s390_expand_atomic (enum machine_mode mode, enum rtx_code code,
/* Start CS loop. */
emit_label (csloop);
- emit_move_insn (new, cmp);
+ emit_move_insn (new_rtx, cmp);
/* Patch new with val at correct position. */
switch (code)
{
case PLUS:
case MINUS:
- val = expand_simple_binop (SImode, code, new, orig,
+ val = expand_simple_binop (SImode, code, new_rtx, orig,
NULL_RTX, 1, OPTAB_DIRECT);
val = expand_simple_binop (SImode, AND, val, ac.modemask,
NULL_RTX, 1, OPTAB_DIRECT);
/* FALLTHRU */
case SET:
if (ac.aligned && MEM_P (val))
- store_bit_field (new, GET_MODE_BITSIZE (mode), 0, SImode, val);
+ store_bit_field (new_rtx, GET_MODE_BITSIZE (mode), 0, SImode, val);
else
{
- new = expand_simple_binop (SImode, AND, new, ac.modemaski,
+ new_rtx = expand_simple_binop (SImode, AND, new_rtx, ac.modemaski,
NULL_RTX, 1, OPTAB_DIRECT);
- new = expand_simple_binop (SImode, IOR, new, val,
+ new_rtx = expand_simple_binop (SImode, IOR, new_rtx, val,
NULL_RTX, 1, OPTAB_DIRECT);
}
break;
case AND:
case IOR:
case XOR:
- new = expand_simple_binop (SImode, code, new, val,
+ new_rtx = expand_simple_binop (SImode, code, new_rtx, val,
NULL_RTX, 1, OPTAB_DIRECT);
break;
case MULT: /* NAND */
- new = expand_simple_binop (SImode, XOR, new, ac.modemask,
+ new_rtx = expand_simple_binop (SImode, XOR, new_rtx, ac.modemask,
NULL_RTX, 1, OPTAB_DIRECT);
- new = expand_simple_binop (SImode, AND, new, val,
+ new_rtx = expand_simple_binop (SImode, AND, new_rtx, val,
NULL_RTX, 1, OPTAB_DIRECT);
break;
default:
@@ -4698,12 +4698,12 @@ s390_expand_atomic (enum machine_mode mode, enum rtx_code code,
}
s390_emit_jump (csloop, s390_emit_compare_and_swap (NE, cmp,
- ac.memsi, cmp, new));
+ ac.memsi, cmp, new_rtx));
/* Return the correct part of the bitfield. */
if (target)
convert_move (target, expand_simple_binop (SImode, LSHIFTRT,
- after ? new : cmp, ac.shift,
+ after ? new_rtx : cmp, ac.shift,
NULL_RTX, 1, OPTAB_DIRECT), 1);
}
@@ -7288,12 +7288,12 @@ s390_hard_regno_rename_ok (unsigned int old_reg, unsigned int new_reg)
}
/* Maximum number of registers to represent a value of mode MODE
- in a register of class CLASS. */
+ in a register of class RCLASS. */
bool
-s390_class_max_nregs (enum reg_class class, enum machine_mode mode)
+s390_class_max_nregs (enum reg_class rclass, enum machine_mode mode)
{
- switch (class)
+ switch (rclass)
{
case FP_REGS:
if (GET_MODE_CLASS (mode) == MODE_COMPLEX_FLOAT)
diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h
index 79286d5a9bc..a8cb4774969 100644
--- a/gcc/config/s390/s390.h
+++ b/gcc/config/s390/s390.h
@@ -748,10 +748,10 @@ used in insn definitions or inline assemblies. */
macro is used in only one place: `find_reloads_address' in reload.c. */
#define LEGITIMIZE_RELOAD_ADDRESS(AD, MODE, OPNUM, TYPE, IND, WIN) \
do { \
- rtx new = legitimize_reload_address (AD, MODE, OPNUM, (int)(TYPE)); \
- if (new) \
+ rtx new_rtx = legitimize_reload_address (AD, MODE, OPNUM, (int)(TYPE)); \
+ if (new_rtx) \
{ \
- (AD) = new; \
+ (AD) = new_rtx; \
goto WIN; \
} \
} while (0)
diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md
index ec5b7532977..f9e89c9fe07 100644
--- a/gcc/config/s390/s390.md
+++ b/gcc/config/s390/s390.md
@@ -1181,8 +1181,8 @@
(match_operand:P 2 "register_operand" "=a")])]
""
{
- rtx new = legitimize_pic_address (operands[1], operands[2]);
- emit_move_insn (operands[0], new);
+ rtx new_rtx = legitimize_pic_address (operands[1], operands[2]);
+ emit_move_insn (operands[0], new_rtx);
})
;
diff --git a/gcc/config/score/score-protos.h b/gcc/config/score/score-protos.h
index c240d8272dc..5f444abdf73 100644
--- a/gcc/config/score/score-protos.h
+++ b/gcc/config/score/score-protos.h
@@ -62,13 +62,13 @@ extern void score_declare_object (FILE *stream, const char *name,
const char *directive, const char *fmt, ...);
extern int score_output_external (FILE *file, tree decl, const char *name);
extern void score_override_options (void);
-extern enum reg_class score_secondary_reload_class (enum reg_class class,
+extern enum reg_class score_secondary_reload_class (enum reg_class rclass,
enum machine_mode mode,
rtx x);
extern rtx score_function_value (tree valtype, tree func,
enum machine_mode mode);
extern enum reg_class score_preferred_reload_class (rtx x,
- enum reg_class class);
+ enum reg_class rclass);
extern HOST_WIDE_INT score_initial_elimination_offset (int from, int to);
extern void score_print_operand (FILE *file, rtx op, int letter);
extern void score_print_operand_address (FILE *file, rtx addr);
diff --git a/gcc/config/score/score.c b/gcc/config/score/score.c
index 4f383da88dd..c2e4176e382 100644
--- a/gcc/config/score/score.c
+++ b/gcc/config/score/score.c
@@ -361,12 +361,12 @@ score_reg_class (int regno)
/* Implement PREFERRED_RELOAD_CLASS macro. */
enum reg_class
-score_preferred_reload_class (rtx x ATTRIBUTE_UNUSED, enum reg_class class)
+score_preferred_reload_class (rtx x ATTRIBUTE_UNUSED, enum reg_class rclass)
{
if (TARGET_SCORE5 || TARGET_SCORE5U || TARGET_SCORE7 || TARGET_SCORE7D)
- return score7_preferred_reload_class (x, class);
+ return score7_preferred_reload_class (x, rclass);
else if (TARGET_SCORE3)
- return score3_preferred_reload_class (x, class);
+ return score3_preferred_reload_class (x, rclass);
gcc_unreachable ();
}
@@ -374,14 +374,14 @@ score_preferred_reload_class (rtx x ATTRIBUTE_UNUSED, enum reg_class class)
/* Implement SECONDARY_INPUT_RELOAD_CLASS
and SECONDARY_OUTPUT_RELOAD_CLASS macro. */
enum reg_class
-score_secondary_reload_class (enum reg_class class,
+score_secondary_reload_class (enum reg_class rclass,
enum machine_mode mode ATTRIBUTE_UNUSED,
rtx x)
{
if (TARGET_SCORE5 || TARGET_SCORE5U || TARGET_SCORE7 || TARGET_SCORE7D)
- return score7_secondary_reload_class (class, mode, x);
+ return score7_secondary_reload_class (rclass, mode, x);
else if (TARGET_SCORE3)
- return score3_secondary_reload_class (class, mode, x);
+ return score3_secondary_reload_class (rclass, mode, x);
gcc_unreachable ();
}
diff --git a/gcc/config/score/score3.c b/gcc/config/score/score3.c
index 3114bcd1c55..c976f38c005 100644
--- a/gcc/config/score/score3.c
+++ b/gcc/config/score/score3.c
@@ -323,7 +323,7 @@ score3_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
HOST_WIDE_INT delta, HOST_WIDE_INT vcall_offset,
tree function)
{
- rtx this, temp1, insn, fnaddr;
+ rtx this_rtx, temp1, insn, fnaddr;
/* Pretend to be a post-reload pass while generating rtl. */
reload_completed = 1;
@@ -336,11 +336,11 @@ score3_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
/* Find out which register contains the "this" pointer. */
if (aggregate_value_p (TREE_TYPE (TREE_TYPE (function)), function))
- this = gen_rtx_REG (Pmode, ARG_REG_FIRST + 1);
+ this_rtx = gen_rtx_REG (Pmode, ARG_REG_FIRST + 1);
else
- this = gen_rtx_REG (Pmode, ARG_REG_FIRST);
+ this_rtx = gen_rtx_REG (Pmode, ARG_REG_FIRST);
- /* Add DELTA to THIS. */
+ /* Add DELTA to THIS_RTX. */
if (delta != 0)
{
rtx offset = GEN_INT (delta);
@@ -349,23 +349,23 @@ score3_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
emit_move_insn (temp1, offset);
offset = temp1;
}
- emit_insn (gen_add3_insn (this, this, offset));
+ emit_insn (gen_add3_insn (this_rtx, this_rtx, offset));
}
- /* If needed, add *(*THIS + VCALL_OFFSET) to THIS. */
+ /* If needed, add *(*THIS_RTX + VCALL_OFFSET) to THIS_RTX. */
if (vcall_offset != 0)
{
rtx addr;
- /* Set TEMP1 to *THIS. */
- emit_move_insn (temp1, gen_rtx_MEM (Pmode, this));
+ /* Set TEMP1 to *THIS_RTX. */
+ emit_move_insn (temp1, gen_rtx_MEM (Pmode, this_rtx));
- /* Set ADDR to a legitimate address for *THIS + VCALL_OFFSET. */
+ /* Set ADDR to a legitimate address for *THIS_RTX + VCALL_OFFSET. */
addr = score3_add_offset (temp1, vcall_offset);
- /* Load the offset and add it to THIS. */
+ /* Load the offset and add it to THIS_RTX. */
emit_move_insn (temp1, gen_rtx_MEM (Pmode, addr));
- emit_insn (gen_add3_insn (this, this, temp1));
+ emit_insn (gen_add3_insn (this_rtx, this_rtx, temp1));
}
/* Jump to the target function. */
@@ -691,19 +691,19 @@ score3_reg_class (int regno)
/* Implement PREFERRED_RELOAD_CLASS macro. */
enum reg_class
-score3_preferred_reload_class (rtx x ATTRIBUTE_UNUSED, enum reg_class class)
+score3_preferred_reload_class (rtx x ATTRIBUTE_UNUSED, enum reg_class rclass)
{
- if (reg_class_subset_p (G16_REGS, class))
+ if (reg_class_subset_p (G16_REGS, rclass))
return G16_REGS;
- if (reg_class_subset_p (G32_REGS, class))
+ if (reg_class_subset_p (G32_REGS, rclass))
return G32_REGS;
- return class;
+ return rclass;
}
/* Implement SECONDARY_INPUT_RELOAD_CLASS
and SECONDARY_OUTPUT_RELOAD_CLASS macro. */
enum reg_class
-score3_secondary_reload_class (enum reg_class class,
+score3_secondary_reload_class (enum reg_class rclass,
enum machine_mode mode ATTRIBUTE_UNUSED,
rtx x)
{
@@ -711,7 +711,7 @@ score3_secondary_reload_class (enum reg_class class,
if (GET_CODE (x) == REG || GET_CODE(x) == SUBREG)
regno = true_regnum (x);
- if (!GR_REG_CLASS_P (class))
+ if (!GR_REG_CLASS_P (rclass))
return GP_REG_P (regno) ? NO_REGS : G32_REGS;
return NO_REGS;
}
@@ -768,21 +768,21 @@ int
score3_hard_regno_mode_ok (unsigned int regno, enum machine_mode mode)
{
int size = GET_MODE_SIZE (mode);
- enum mode_class class = GET_MODE_CLASS (mode);
+ enum mode_class mclass = GET_MODE_CLASS (mode);
- if (class == MODE_CC)
+ if (mclass == MODE_CC)
return regno == CC_REGNUM;
else if (regno == FRAME_POINTER_REGNUM
|| regno == ARG_POINTER_REGNUM)
- return class == MODE_INT;
+ return mclass == MODE_INT;
else if (GP_REG_P (regno))
return !(regno & 1) || (size <= UNITS_PER_WORD);
else if (CE_REG_P (regno))
- return (class == MODE_INT
+ return (mclass == MODE_INT
&& ((size <= UNITS_PER_WORD)
|| (regno == CE_REG_FIRST && size == 2 * UNITS_PER_WORD)));
else
- return (class == MODE_INT) && (size <= UNITS_PER_WORD);
+ return (mclass == MODE_INT) && (size <= UNITS_PER_WORD);
}
/* Implement INITIAL_ELIMINATION_OFFSET. FROM is either the frame
diff --git a/gcc/config/score/score3.h b/gcc/config/score/score3.h
index 098da9500d2..79677702d47 100644
--- a/gcc/config/score/score3.h
+++ b/gcc/config/score/score3.h
@@ -93,9 +93,9 @@ extern void score3_asm_file_end (void);
extern void score3_override_options (void);
extern int score3_reg_class (int regno);
extern enum reg_class score3_preferred_reload_class (rtx x ATTRIBUTE_UNUSED,
- enum reg_class class);
+ enum reg_class rclass);
extern enum reg_class
-score3_secondary_reload_class (enum reg_class class,
+score3_secondary_reload_class (enum reg_class rclass,
enum machine_mode mode ATTRIBUTE_UNUSED,
rtx x);
extern int score3_const_ok_for_letter_p (HOST_WIDE_INT value, char c);
diff --git a/gcc/config/score/score7.c b/gcc/config/score/score7.c
index 74031c2c6ae..03c47042ed5 100644
--- a/gcc/config/score/score7.c
+++ b/gcc/config/score/score7.c
@@ -322,7 +322,7 @@ score7_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
HOST_WIDE_INT delta, HOST_WIDE_INT vcall_offset,
tree function)
{
- rtx this, temp1, insn, fnaddr;
+ rtx this_rtx, temp1, insn, fnaddr;
/* Pretend to be a post-reload pass while generating rtl. */
reload_completed = 1;
@@ -335,11 +335,11 @@ score7_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
/* Find out which register contains the "this" pointer. */
if (aggregate_value_p (TREE_TYPE (TREE_TYPE (function)), function))
- this = gen_rtx_REG (Pmode, ARG_REG_FIRST + 1);
+ this_rtx = gen_rtx_REG (Pmode, ARG_REG_FIRST + 1);
else
- this = gen_rtx_REG (Pmode, ARG_REG_FIRST);
+ this_rtx = gen_rtx_REG (Pmode, ARG_REG_FIRST);
- /* Add DELTA to THIS. */
+ /* Add DELTA to THIS_RTX. */
if (delta != 0)
{
rtx offset = GEN_INT (delta);
@@ -348,23 +348,23 @@ score7_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
emit_move_insn (temp1, offset);
offset = temp1;
}
- emit_insn (gen_add3_insn (this, this, offset));
+ emit_insn (gen_add3_insn (this_rtx, this_rtx, offset));
}
- /* If needed, add *(*THIS + VCALL_OFFSET) to THIS. */
+ /* If needed, add *(*THIS_RTX + VCALL_OFFSET) to THIS_RTX. */
if (vcall_offset != 0)
{
rtx addr;
- /* Set TEMP1 to *THIS. */
- emit_move_insn (temp1, gen_rtx_MEM (Pmode, this));
+ /* Set TEMP1 to *THIS_RTX. */
+ emit_move_insn (temp1, gen_rtx_MEM (Pmode, this_rtx));
- /* Set ADDR to a legitimate address for *THIS + VCALL_OFFSET. */
+ /* Set ADDR to a legitimate address for *THIS_RTX + VCALL_OFFSET. */
addr = score7_add_offset (temp1, vcall_offset);
- /* Load the offset and add it to THIS. */
+ /* Load the offset and add it to THIS_RTX. */
emit_move_insn (temp1, gen_rtx_MEM (Pmode, addr));
- emit_insn (gen_add3_insn (this, this, temp1));
+ emit_insn (gen_add3_insn (this_rtx, this_rtx, temp1));
}
/* Jump to the target function. */
@@ -690,19 +690,19 @@ score7_reg_class (int regno)
/* Implement PREFERRED_RELOAD_CLASS macro. */
enum reg_class
-score7_preferred_reload_class (rtx x ATTRIBUTE_UNUSED, enum reg_class class)
+score7_preferred_reload_class (rtx x ATTRIBUTE_UNUSED, enum reg_class rclass)
{
- if (reg_class_subset_p (G16_REGS, class))
+ if (reg_class_subset_p (G16_REGS, rclass))
return G16_REGS;
- if (reg_class_subset_p (G32_REGS, class))
+ if (reg_class_subset_p (G32_REGS, rclass))
return G32_REGS;
- return class;
+ return rclass;
}
/* Implement SECONDARY_INPUT_RELOAD_CLASS
and SECONDARY_OUTPUT_RELOAD_CLASS macro. */
enum reg_class
-score7_secondary_reload_class (enum reg_class class,
+score7_secondary_reload_class (enum reg_class rclass,
enum machine_mode mode ATTRIBUTE_UNUSED,
rtx x)
{
@@ -710,7 +710,7 @@ score7_secondary_reload_class (enum reg_class class,
if (GET_CODE (x) == REG || GET_CODE(x) == SUBREG)
regno = true_regnum (x);
- if (!GR_REG_CLASS_P (class))
+ if (!GR_REG_CLASS_P (rclass))
return GP_REG_P (regno) ? NO_REGS : G32_REGS;
return NO_REGS;
}
@@ -758,22 +758,22 @@ int
score7_hard_regno_mode_ok (unsigned int regno, enum machine_mode mode)
{
int size = GET_MODE_SIZE (mode);
- enum mode_class class = GET_MODE_CLASS (mode);
+ enum mode_class mclass = GET_MODE_CLASS (mode);
- if (class == MODE_CC)
+ if (mclass == MODE_CC)
return regno == CC_REGNUM;
else if (regno == FRAME_POINTER_REGNUM
|| regno == ARG_POINTER_REGNUM)
- return class == MODE_INT;
+ return mclass == MODE_INT;
else if (GP_REG_P (regno))
/* ((regno <= (GP_REG_LAST- HARD_REGNO_NREGS (dummy, mode)) + 1) */
return !(regno & 1) || (size <= UNITS_PER_WORD);
else if (CE_REG_P (regno))
- return (class == MODE_INT
+ return (mclass == MODE_INT
&& ((size <= UNITS_PER_WORD)
|| (regno == CE_REG_FIRST && size == 2 * UNITS_PER_WORD)));
else
- return (class == MODE_INT) && (size <= UNITS_PER_WORD);
+ return (mclass == MODE_INT) && (size <= UNITS_PER_WORD);
}
/* Implement INITIAL_ELIMINATION_OFFSET. FROM is either the frame
diff --git a/gcc/config/score/score7.h b/gcc/config/score/score7.h
index 900aa6f4924..1797e472279 100644
--- a/gcc/config/score/score7.h
+++ b/gcc/config/score/score7.h
@@ -93,9 +93,9 @@ extern void score7_asm_file_end (void);
extern void score7_override_options (void);
extern int score7_reg_class (int regno);
extern enum reg_class score7_preferred_reload_class (rtx x ATTRIBUTE_UNUSED,
- enum reg_class class);
+ enum reg_class rclass);
extern enum
-reg_class score7_secondary_reload_class (enum reg_class class,
+reg_class score7_secondary_reload_class (enum reg_class rclass,
enum machine_mode mode ATTRIBUTE_UNUSED,
rtx x);
extern int score7_const_ok_for_letter_p (HOST_WIDE_INT value, char c);
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 60a940bbc84..74060738ee9 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -1300,9 +1300,9 @@ prepare_move_operands (rtx operands[], enum machine_mode mode)
{
/* This is like change_address_1 (operands[0], mode, 0, 1) ,
except that we can't use that function because it is static. */
- rtx new = change_address (operands[0], mode, 0);
- MEM_COPY_ATTRIBUTES (new, operands[0]);
- operands[0] = new;
+ rtx new_rtx = change_address (operands[0], mode, 0);
+ MEM_COPY_ATTRIBUTES (new_rtx, operands[0]);
+ operands[0] = new_rtx;
}
/* This case can happen while generating code to move the result
@@ -1915,14 +1915,14 @@ print_slot (rtx insn)
const char *
output_far_jump (rtx insn, rtx op)
{
- struct { rtx lab, reg, op; } this;
+ struct { rtx lab, reg, op; } this_jmp;
rtx braf_base_lab = NULL_RTX;
const char *jump;
int far;
int offset = branch_dest (insn) - INSN_ADDRESSES (INSN_UID (insn));
rtx prev;
- this.lab = gen_label_rtx ();
+ this_jmp.lab = gen_label_rtx ();
if (TARGET_SH2
&& offset >= -32764
@@ -1948,10 +1948,10 @@ output_far_jump (rtx insn, rtx op)
if (GET_CODE ((prev = prev_nonnote_insn (insn))) == INSN
&& INSN_CODE (prev) == CODE_FOR_indirect_jump_scratch)
{
- this.reg = SET_DEST (XVECEXP (PATTERN (prev), 0, 0));
- if (REGNO (this.reg) == R0_REG && flag_pic && ! TARGET_SH2)
+ this_jmp.reg = SET_DEST (XVECEXP (PATTERN (prev), 0, 0));
+ if (REGNO (this_jmp.reg) == R0_REG && flag_pic && ! TARGET_SH2)
jump = "mov.l r1,@-r15; mova %O0,r0; mov.l @r0,r1; add r1,r0; mov.l @r15+,r1; jmp @%1";
- output_asm_insn (jump, &this.lab);
+ output_asm_insn (jump, &this_jmp.lab);
if (dbr_sequence_length ())
print_slot (final_sequence);
else
@@ -1963,7 +1963,7 @@ output_far_jump (rtx insn, rtx op)
if (dbr_sequence_length ())
print_slot (final_sequence);
- this.reg = gen_rtx_REG (SImode, 13);
+ this_jmp.reg = gen_rtx_REG (SImode, 13);
/* We must keep the stack aligned to 8-byte boundaries on SH5.
Fortunately, MACL is fixed and call-clobbered, and we never
need its value across jumps, so save r13 in it instead of in
@@ -1972,7 +1972,7 @@ output_far_jump (rtx insn, rtx op)
output_asm_insn ("lds r13, macl", 0);
else
output_asm_insn ("mov.l r13,@-r15", 0);
- output_asm_insn (jump, &this.lab);
+ output_asm_insn (jump, &this_jmp.lab);
if (TARGET_SH5)
output_asm_insn ("sts macl, r13", 0);
else
@@ -1986,16 +1986,16 @@ output_far_jump (rtx insn, rtx op)
}
if (far)
output_asm_insn (".align 2", 0);
- (*targetm.asm_out.internal_label) (asm_out_file, "L", CODE_LABEL_NUMBER (this.lab));
- this.op = op;
+ (*targetm.asm_out.internal_label) (asm_out_file, "L", CODE_LABEL_NUMBER (this_jmp.lab));
+ this_jmp.op = op;
if (far && flag_pic)
{
if (TARGET_SH2)
- this.lab = braf_base_lab;
- output_asm_insn (".long %O2-%O0", &this.lab);
+ this_jmp.lab = braf_base_lab;
+ output_asm_insn (".long %O2-%O0", &this_jmp.lab);
}
else
- output_asm_insn (far ? ".long %O2" : ".word %O2-%O0", &this.lab);
+ output_asm_insn (far ? ".long %O2" : ".word %O2-%O0", &this_jmp.lab);
return "";
}
@@ -2092,14 +2092,14 @@ output_branch (int logic, rtx insn, rtx *operands)
}
}
-/* Output a code sequence for INSN using TEMPLATE with OPERANDS; but before,
+/* Output a code sequence for INSN using TEMPL with OPERANDS; but before,
fill in operands 9 as a label to the successor insn.
We try to use jump threading where possible.
IF CODE matches the comparison in the IF_THEN_ELSE of a following jump,
we assume the jump is taken. I.e. EQ means follow jmp and bf, NE means
follow jmp and bt, if the address is in range. */
const char *
-output_branchy_insn (enum rtx_code code, const char *template,
+output_branchy_insn (enum rtx_code code, const char *templ,
rtx insn, rtx *operands)
{
rtx next_insn = NEXT_INSN (insn);
@@ -2115,7 +2115,7 @@ output_branchy_insn (enum rtx_code code, const char *template,
INSN_ADDRESSES_NEW (operands[9],
INSN_ADDRESSES (INSN_UID (next_insn))
+ get_attr_length (next_insn));
- return template;
+ return templ;
}
else
{
@@ -2127,7 +2127,7 @@ output_branchy_insn (enum rtx_code code, const char *template,
/* branch_true */
src = XEXP (src, 1);
operands[9] = src;
- return template;
+ return templ;
}
}
}
@@ -2136,7 +2136,7 @@ output_branchy_insn (enum rtx_code code, const char *template,
INSN_ADDRESSES_NEW (operands[9],
INSN_ADDRESSES (INSN_UID (insn))
+ get_attr_length (insn));
- return template;
+ return templ;
}
const char *
@@ -3483,7 +3483,7 @@ static rtx
add_constant (rtx x, enum machine_mode mode, rtx last_value)
{
int i;
- rtx lab, new;
+ rtx lab, new_rtx;
label_ref_list_t ref, newref;
/* First see if we've already got it. */
@@ -3499,14 +3499,14 @@ add_constant (rtx x, enum machine_mode mode, rtx last_value)
}
if (rtx_equal_p (x, pool_vector[i].value))
{
- lab = new = 0;
+ lab = new_rtx = 0;
if (! last_value
|| ! i
|| ! rtx_equal_p (last_value, pool_vector[i-1].value))
{
- new = gen_label_rtx ();
- LABEL_REFS (new) = pool_vector[i].label;
- pool_vector[i].label = lab = new;
+ new_rtx = gen_label_rtx ();
+ LABEL_REFS (new_rtx) = pool_vector[i].label;
+ pool_vector[i].label = lab = new_rtx;
}
if (lab && pool_window_label)
{
@@ -3516,8 +3516,8 @@ add_constant (rtx x, enum machine_mode mode, rtx last_value)
newref->next = ref;
pool_vector[pool_window_last].wend = newref;
}
- if (new)
- pool_window_label = new;
+ if (new_rtx)
+ pool_window_label = new_rtx;
pool_window_last = i;
return lab;
}
@@ -4421,7 +4421,7 @@ gen_block_redirect (rtx jump, int addr, int need_block)
rtx scan;
/* Don't look for the stack pointer as a scratch register,
it would cause trouble if an interrupt occurred. */
- unsigned try = 0x7fff, used;
+ unsigned attempt = 0x7fff, used;
int jump_left = flag_expensive_optimizations + 1;
/* It is likely that the most recent eligible instruction is wanted for
@@ -4442,7 +4442,7 @@ gen_block_redirect (rtx jump, int addr, int need_block)
&& GET_CODE (PATTERN (scan)) != CLOBBER
&& get_attr_in_delay_slot (scan) == IN_DELAY_SLOT_YES)
{
- try &= ~regs_used (PATTERN (scan), 0);
+ attempt &= ~regs_used (PATTERN (scan), 0);
break;
}
}
@@ -4460,9 +4460,9 @@ gen_block_redirect (rtx jump, int addr, int need_block)
if (code == CALL_INSN)
used |= regs_used (CALL_INSN_FUNCTION_USAGE (scan), 0);
dead |= (used >> 16) & ~used;
- if (dead & try)
+ if (dead & attempt)
{
- dead &= try;
+ dead &= attempt;
break;
}
if (code == JUMP_INSN)
@@ -8775,14 +8775,14 @@ sh_insn_length_adjustment (rtx insn)
{
int sum = 0;
rtx body = PATTERN (insn);
- const char *template;
+ const char *templ;
char c;
int maybe_label = 1;
if (GET_CODE (body) == ASM_INPUT)
- template = XSTR (body, 0);
+ templ = XSTR (body, 0);
else if (asm_noperands (body) >= 0)
- template
+ templ
= decode_asm_operands (body, NULL, NULL, NULL, NULL, NULL);
else
return 0;
@@ -8791,20 +8791,20 @@ sh_insn_length_adjustment (rtx insn)
int ppi_adjust = 0;
do
- c = *template++;
+ c = *templ++;
while (c == ' ' || c == '\t');
/* all sh-dsp parallel-processing insns start with p.
The only non-ppi sh insn starting with p is pref.
The only ppi starting with pr is prnd. */
- if ((c == 'p' || c == 'P') && strncasecmp ("re", template, 2))
+ if ((c == 'p' || c == 'P') && strncasecmp ("re", templ, 2))
ppi_adjust = 2;
/* The repeat pseudo-insn expands two three insns, a total of
six bytes in size. */
else if ((c == 'r' || c == 'R')
- && ! strncasecmp ("epeat", template, 5))
+ && ! strncasecmp ("epeat", templ, 5))
ppi_adjust = 4;
while (c && c != '\n'
- && ! IS_ASM_LOGICAL_LINE_SEPARATOR (c, template))
+ && ! IS_ASM_LOGICAL_LINE_SEPARATOR (c, templ))
{
/* If this is a label, it is obviously not a ppi insn. */
if (c == ':' && maybe_label)
@@ -8814,7 +8814,7 @@ sh_insn_length_adjustment (rtx insn)
}
else if (c == '\'' || c == '"')
maybe_label = 0;
- c = *template++;
+ c = *templ++;
}
sum += ppi_adjust;
maybe_label = c != ':';
@@ -10234,24 +10234,24 @@ sh_expand_binop_v2sf (enum rtx_code code, rtx op0, rtx op1, rtx op2)
is invalid. */
bool
sh_cannot_change_mode_class (enum machine_mode from, enum machine_mode to,
- enum reg_class class)
+ enum reg_class rclass)
{
/* We want to enable the use of SUBREGs as a means to
VEC_SELECT a single element of a vector. */
if (to == SFmode && VECTOR_MODE_P (from) && GET_MODE_INNER (from) == SFmode)
- return (reg_classes_intersect_p (GENERAL_REGS, class));
+ return (reg_classes_intersect_p (GENERAL_REGS, rclass));
if (GET_MODE_SIZE (from) != GET_MODE_SIZE (to))
{
if (TARGET_LITTLE_ENDIAN)
{
if (GET_MODE_SIZE (to) < 8 || GET_MODE_SIZE (from) < 8)
- return reg_classes_intersect_p (DF_REGS, class);
+ return reg_classes_intersect_p (DF_REGS, rclass);
}
else
{
if (GET_MODE_SIZE (from) < 8)
- return reg_classes_intersect_p (DF_HI_REGS, class);
+ return reg_classes_intersect_p (DF_HI_REGS, rclass);
}
}
return 0;
@@ -10371,7 +10371,7 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
{
CUMULATIVE_ARGS cum;
int structure_value_byref = 0;
- rtx this, this_value, sibcall, insns, funexp;
+ rtx this_rtx, this_value, sibcall, insns, funexp;
tree funtype = TREE_TYPE (function);
int simple_add = CONST_OK_FOR_ADD (delta);
int did_load = 0;
@@ -10399,7 +10399,7 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
FUNCTION_ARG_ADVANCE (cum, Pmode, ptype, 1);
}
- this = FUNCTION_ARG (cum, Pmode, ptr_type_node, 1);
+ this_rtx = FUNCTION_ARG (cum, Pmode, ptr_type_node, 1);
/* For SHcompact, we only have r0 for a scratch register: r1 is the
static chain pointer (even if you can't have nested virtual functions
@@ -10440,7 +10440,7 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
error ("Need a call-clobbered target register");
}
- this_value = plus_constant (this, delta);
+ this_value = plus_constant (this_rtx, delta);
if (vcall_offset
&& (simple_add || scratch0 != scratch1)
&& strict_memory_address_p (ptr_mode, this_value))
@@ -10452,11 +10452,11 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
if (!delta)
; /* Do nothing. */
else if (simple_add)
- emit_move_insn (this, this_value);
+ emit_move_insn (this_rtx, this_value);
else
{
emit_move_insn (scratch1, GEN_INT (delta));
- emit_insn (gen_add2_insn (this, scratch1));
+ emit_insn (gen_add2_insn (this_rtx, scratch1));
}
if (vcall_offset)
@@ -10464,7 +10464,7 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
rtx offset_addr;
if (!did_load)
- emit_load_ptr (scratch0, this);
+ emit_load_ptr (scratch0, this_rtx);
offset_addr = plus_constant (scratch0, vcall_offset);
if (strict_memory_address_p (ptr_mode, offset_addr))
@@ -10474,7 +10474,7 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
/* scratch0 != scratch1, and we have indexed loads. Get better
schedule by loading the offset into r1 and using an indexed
load - then the load of r1 can issue before the load from
- (this + delta) finishes. */
+ (this_rtx + delta) finishes. */
emit_move_insn (scratch1, GEN_INT (vcall_offset));
offset_addr = gen_rtx_PLUS (Pmode, scratch0, scratch1);
}
@@ -10495,7 +10495,7 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
if (Pmode != ptr_mode)
scratch0 = gen_rtx_TRUNCATE (ptr_mode, scratch0);
- emit_insn (gen_add2_insn (this, scratch0));
+ emit_insn (gen_add2_insn (this_rtx, scratch0));
}
/* Generate a tail call to the target function. */
@@ -10530,7 +10530,7 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
}
sibcall = emit_call_insn (sibcall);
SIBLING_CALL_P (sibcall) = 1;
- use_reg (&CALL_INSN_FUNCTION_USAGE (sibcall), this);
+ use_reg (&CALL_INSN_FUNCTION_USAGE (sibcall), this_rtx);
emit_barrier ();
/* Run just enough of rest_of_compilation to do scheduling and get
@@ -10930,19 +10930,19 @@ replace_n_hard_rtx (rtx x, rtx *replacements, int n_replacements, int modify)
if (GET_CODE (x) == SUBREG)
{
- rtx new = replace_n_hard_rtx (SUBREG_REG (x), replacements,
+ rtx new_rtx = replace_n_hard_rtx (SUBREG_REG (x), replacements,
n_replacements, modify);
- if (GET_CODE (new) == CONST_INT)
+ if (GET_CODE (new_rtx) == CONST_INT)
{
- x = simplify_subreg (GET_MODE (x), new,
+ x = simplify_subreg (GET_MODE (x), new_rtx,
GET_MODE (SUBREG_REG (x)),
SUBREG_BYTE (x));
if (! x)
abort ();
}
else if (modify)
- SUBREG_REG (x) = new;
+ SUBREG_REG (x) = new_rtx;
return x;
}
@@ -10990,18 +10990,18 @@ replace_n_hard_rtx (rtx x, rtx *replacements, int n_replacements, int modify)
}
else if (GET_CODE (x) == ZERO_EXTEND)
{
- rtx new = replace_n_hard_rtx (XEXP (x, 0), replacements,
+ rtx new_rtx = replace_n_hard_rtx (XEXP (x, 0), replacements,
n_replacements, modify);
- if (GET_CODE (new) == CONST_INT)
+ if (GET_CODE (new_rtx) == CONST_INT)
{
x = simplify_unary_operation (ZERO_EXTEND, GET_MODE (x),
- new, GET_MODE (XEXP (x, 0)));
+ new_rtx, GET_MODE (XEXP (x, 0)));
if (! x)
abort ();
}
else if (modify)
- XEXP (x, 0) = new;
+ XEXP (x, 0) = new_rtx;
return x;
}
@@ -11009,26 +11009,26 @@ replace_n_hard_rtx (rtx x, rtx *replacements, int n_replacements, int modify)
fmt = GET_RTX_FORMAT (GET_CODE (x));
for (i = GET_RTX_LENGTH (GET_CODE (x)) - 1; i >= 0; i--)
{
- rtx new;
+ rtx new_rtx;
if (fmt[i] == 'e')
{
- new = replace_n_hard_rtx (XEXP (x, i), replacements,
+ new_rtx = replace_n_hard_rtx (XEXP (x, i), replacements,
n_replacements, modify);
- if (!new)
+ if (!new_rtx)
return NULL_RTX;
if (modify)
- XEXP (x, i) = new;
+ XEXP (x, i) = new_rtx;
}
else if (fmt[i] == 'E')
for (j = XVECLEN (x, i) - 1; j >= 0; j--)
{
- new = replace_n_hard_rtx (XVECEXP (x, i, j), replacements,
+ new_rtx = replace_n_hard_rtx (XVECEXP (x, i, j), replacements,
n_replacements, modify);
- if (!new)
+ if (!new_rtx)
return NULL_RTX;
if (modify)
- XVECEXP (x, i, j) = new;
+ XVECEXP (x, i, j) = new_rtx;
}
}
@@ -11162,12 +11162,12 @@ shmedia_prepare_call_address (rtx fnaddr, int is_sibcall)
}
enum reg_class
-sh_secondary_reload (bool in_p, rtx x, enum reg_class class,
+sh_secondary_reload (bool in_p, rtx x, enum reg_class rclass,
enum machine_mode mode, secondary_reload_info *sri)
{
if (in_p)
{
- if (REGCLASS_HAS_FP_REG (class)
+ if (REGCLASS_HAS_FP_REG (rclass)
&& ! TARGET_SHMEDIA
&& immediate_operand ((x), mode)
&& ! ((fp_zero_operand (x) || fp_one_operand (x))
@@ -11187,13 +11187,13 @@ sh_secondary_reload (bool in_p, rtx x, enum reg_class class,
default:
abort ();
}
- if (class == FPUL_REGS
+ if (rclass == FPUL_REGS
&& ((GET_CODE (x) == REG
&& (REGNO (x) == MACL_REG || REGNO (x) == MACH_REG
|| REGNO (x) == T_REG))
|| GET_CODE (x) == PLUS))
return GENERAL_REGS;
- if (class == FPUL_REGS && immediate_operand (x, mode))
+ if (rclass == FPUL_REGS && immediate_operand (x, mode))
{
if (satisfies_constraint_I08 (x) || fp_zero_operand (x))
return GENERAL_REGS;
@@ -11202,11 +11202,11 @@ sh_secondary_reload (bool in_p, rtx x, enum reg_class class,
sri->icode = CODE_FOR_reload_insi__i_fpul;
return NO_REGS;
}
- if (class == FPSCR_REGS
+ if (rclass == FPSCR_REGS
&& ((GET_CODE (x) == REG && REGNO (x) >= FIRST_PSEUDO_REGISTER)
|| (GET_CODE (x) == MEM && GET_CODE (XEXP (x, 0)) == PLUS)))
return GENERAL_REGS;
- if (REGCLASS_HAS_FP_REG (class)
+ if (REGCLASS_HAS_FP_REG (rclass)
&& TARGET_SHMEDIA
&& immediate_operand (x, mode)
&& x != CONST0_RTX (GET_MODE (x))
@@ -11219,24 +11219,24 @@ sh_secondary_reload (bool in_p, rtx x, enum reg_class class,
? CODE_FOR_reload_inqi : CODE_FOR_reload_inhi);
return NO_REGS;
}
- if (TARGET_SHMEDIA && class == GENERAL_REGS
+ if (TARGET_SHMEDIA && rclass == GENERAL_REGS
&& (GET_CODE (x) == LABEL_REF || PIC_DIRECT_ADDR_P (x)))
return TARGET_REGS;
} /* end of input-only processing. */
- if (((REGCLASS_HAS_FP_REG (class)
+ if (((REGCLASS_HAS_FP_REG (rclass)
&& (GET_CODE (x) == REG
&& (GENERAL_OR_AP_REGISTER_P (REGNO (x))
|| (FP_REGISTER_P (REGNO (x)) && mode == SImode
&& TARGET_FMOVD))))
- || (REGCLASS_HAS_GENERAL_REG (class)
+ || (REGCLASS_HAS_GENERAL_REG (rclass)
&& GET_CODE (x) == REG
&& FP_REGISTER_P (REGNO (x))))
&& ! TARGET_SHMEDIA
&& (mode == SFmode || mode == SImode))
return FPUL_REGS;
- if ((class == FPUL_REGS
- || (REGCLASS_HAS_FP_REG (class)
+ if ((rclass == FPUL_REGS
+ || (REGCLASS_HAS_FP_REG (rclass)
&& ! TARGET_SHMEDIA && mode == SImode))
&& (GET_CODE (x) == MEM
|| (GET_CODE (x) == REG
@@ -11244,20 +11244,20 @@ sh_secondary_reload (bool in_p, rtx x, enum reg_class class,
|| REGNO (x) == T_REG
|| system_reg_operand (x, VOIDmode)))))
{
- if (class == FPUL_REGS)
+ if (rclass == FPUL_REGS)
return GENERAL_REGS;
return FPUL_REGS;
}
- if ((class == TARGET_REGS
- || (TARGET_SHMEDIA && class == SIBCALL_REGS))
+ if ((rclass == TARGET_REGS
+ || (TARGET_SHMEDIA && rclass == SIBCALL_REGS))
&& !satisfies_constraint_Csy (x)
&& (GET_CODE (x) != REG || ! GENERAL_REGISTER_P (REGNO (x))))
return GENERAL_REGS;
- if ((class == MAC_REGS || class == PR_REGS)
+ if ((rclass == MAC_REGS || rclass == PR_REGS)
&& GET_CODE (x) == REG && ! GENERAL_REGISTER_P (REGNO (x))
- && class != REGNO_REG_CLASS (REGNO (x)))
+ && rclass != REGNO_REG_CLASS (REGNO (x)))
return GENERAL_REGS;
- if (class != GENERAL_REGS && GET_CODE (x) == REG
+ if (rclass != GENERAL_REGS && GET_CODE (x) == REG
&& TARGET_REGISTER_P (REGNO (x)))
return GENERAL_REGS;
return NO_REGS;
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index adf28c027b1..045735f208c 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -8637,7 +8637,7 @@ sparc_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
HOST_WIDE_INT delta, HOST_WIDE_INT vcall_offset,
tree function)
{
- rtx this, insn, funexp;
+ rtx this_rtx, insn, funexp;
unsigned int int_arg_first;
reload_completed = 1;
@@ -8668,9 +8668,9 @@ sparc_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
/* Find the "this" pointer. Normally in %o0, but in ARCH64 if the function
returns a structure, the structure return pointer is there instead. */
if (TARGET_ARCH64 && aggregate_value_p (TREE_TYPE (TREE_TYPE (function)), function))
- this = gen_rtx_REG (Pmode, int_arg_first + 1);
+ this_rtx = gen_rtx_REG (Pmode, int_arg_first + 1);
else
- this = gen_rtx_REG (Pmode, int_arg_first);
+ this_rtx = gen_rtx_REG (Pmode, int_arg_first);
/* Add DELTA. When possible use a plain add, otherwise load it into
a register first. */
@@ -8685,11 +8685,11 @@ sparc_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
delta_rtx = scratch;
}
- /* THIS += DELTA. */
- emit_insn (gen_add2_insn (this, delta_rtx));
+ /* THIS_RTX += DELTA. */
+ emit_insn (gen_add2_insn (this_rtx, delta_rtx));
}
- /* Add the word at address (*THIS + VCALL_OFFSET). */
+ /* Add the word at address (*THIS_RTX + VCALL_OFFSET). */
if (vcall_offset)
{
rtx vcall_offset_rtx = GEN_INT (vcall_offset);
@@ -8697,8 +8697,8 @@ sparc_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
gcc_assert (vcall_offset < 0);
- /* SCRATCH = *THIS. */
- emit_move_insn (scratch, gen_rtx_MEM (Pmode, this));
+ /* SCRATCH = *THIS_RTX. */
+ emit_move_insn (scratch, gen_rtx_MEM (Pmode, this_rtx));
/* Prepare for adding VCALL_OFFSET. The difficulty is that we
may not have any available scratch register at this point. */
@@ -8731,14 +8731,14 @@ sparc_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
vcall_offset_rtx = GEN_INT (vcall_offset); /* cannot be 0 */
}
- /* SCRATCH = *(*THIS + VCALL_OFFSET). */
+ /* SCRATCH = *(*THIS_RTX + VCALL_OFFSET). */
emit_move_insn (scratch, gen_rtx_MEM (Pmode,
gen_rtx_PLUS (Pmode,
scratch,
vcall_offset_rtx)));
- /* THIS += *(*THIS + VCALL_OFFSET). */
- emit_insn (gen_add2_insn (this, scratch));
+ /* THIS_RTX += *(*THIS_RTX + VCALL_OFFSET). */
+ emit_insn (gen_add2_insn (this_rtx, scratch));
}
/* Generate a tail call to the target function. */
diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c
index 64ecec8f5e5..77aedd6e01e 100644
--- a/gcc/config/stormy16/stormy16.c
+++ b/gcc/config/stormy16/stormy16.c
@@ -283,7 +283,7 @@ xstormy16_output_cbranch_hi (rtx op, const char *label, int reversed, rtx insn)
: get_attr_length (insn) == 4);
int really_reversed = reversed ^ need_longbranch;
const char *ccode;
- const char *template;
+ const char *templ;
const char *operands;
enum rtx_code code;
@@ -329,10 +329,10 @@ xstormy16_output_cbranch_hi (rtx op, const char *label, int reversed, rtx insn)
}
if (need_longbranch)
- template = "b%s %s,.+8 | jmpf %s";
+ templ = "b%s %s,.+8 | jmpf %s";
else
- template = "b%s %s,%s";
- sprintf (string, template, ccode, operands, label);
+ templ = "b%s %s,%s";
+ sprintf (string, templ, ccode, operands, label);
return string;
}
@@ -354,7 +354,7 @@ xstormy16_output_cbranch_si (rtx op, const char *label, int reversed, rtx insn)
int need_longbranch = get_attr_length (insn) >= 8;
int really_reversed = reversed ^ need_longbranch;
const char *ccode;
- const char *template;
+ const char *templ;
char prevop[16];
enum rtx_code code;
@@ -400,10 +400,10 @@ xstormy16_output_cbranch_si (rtx op, const char *label, int reversed, rtx insn)
}
if (need_longbranch)
- template = "%s | b%s .+6 | jmpf %s";
+ templ = "%s | b%s .+6 | jmpf %s";
else
- template = "%s | b%s %s";
- sprintf (string, template, prevop, ccode, label);
+ templ = "%s | b%s %s";
+ sprintf (string, templ, prevop, ccode, label);
return string;
}
@@ -420,11 +420,11 @@ xstormy16_output_cbranch_si (rtx op, const char *label, int reversed, rtx insn)
You should define these macros to indicate to the reload phase that it may
need to allocate at least one register for a reload in addition to the
register to contain the data. Specifically, if copying X to a register
- CLASS in MODE requires an intermediate register, you should define
+ RCLASS in MODE requires an intermediate register, you should define
`SECONDARY_INPUT_RELOAD_CLASS' to return the largest register class all of
whose registers can be used as intermediate registers or scratch registers.
- If copying a register CLASS in MODE to X requires an intermediate or scratch
+ If copying a register RCLASS in MODE to X requires an intermediate or scratch
register, `SECONDARY_OUTPUT_RELOAD_CLASS' should be defined to return the
largest register class required. If the requirements for input and output
reloads are the same, the macro `SECONDARY_RELOAD_CLASS' should be used
@@ -432,7 +432,7 @@ xstormy16_output_cbranch_si (rtx op, const char *label, int reversed, rtx insn)
The values returned by these macros are often `GENERAL_REGS'. Return
`NO_REGS' if no spare register is needed; i.e., if X can be directly copied
- to or from a register of CLASS in MODE without requiring a scratch register.
+ to or from a register of RCLASS in MODE without requiring a scratch register.
Do not define this macro if it would always return `NO_REGS'.
If a scratch register is required (either with or without an intermediate
@@ -443,7 +443,7 @@ xstormy16_output_cbranch_si (rtx op, const char *label, int reversed, rtx insn)
Define constraints for the reload register and scratch register that contain
a single register class. If the original reload register (whose class is
- CLASS) can meet the constraint given in the pattern, the value returned by
+ RCLASS) can meet the constraint given in the pattern, the value returned by
these macros is used for the class of the scratch register. Otherwise, two
additional reload registers are required. Their classes are obtained from
the constraints in the insn pattern.
@@ -461,7 +461,7 @@ xstormy16_output_cbranch_si (rtx op, const char *label, int reversed, rtx insn)
This case often occurs between floating-point and general registers. */
enum reg_class
-xstormy16_secondary_reload_class (enum reg_class class,
+xstormy16_secondary_reload_class (enum reg_class rclass,
enum machine_mode mode,
rtx x)
{
@@ -471,7 +471,7 @@ xstormy16_secondary_reload_class (enum reg_class class,
|| ((GET_CODE (x) == SUBREG || GET_CODE (x) == REG)
&& (true_regnum (x) == -1
|| true_regnum (x) >= FIRST_PSEUDO_REGISTER)))
- && ! reg_class_subset_p (class, EIGHT_REGS))
+ && ! reg_class_subset_p (rclass, EIGHT_REGS))
return EIGHT_REGS;
/* When reloading a PLUS, the carry register will be required
@@ -483,13 +483,13 @@ xstormy16_secondary_reload_class (enum reg_class class,
}
enum reg_class
-xstormy16_preferred_reload_class (rtx x, enum reg_class class)
+xstormy16_preferred_reload_class (rtx x, enum reg_class rclass)
{
- if (class == GENERAL_REGS
+ if (rclass == GENERAL_REGS
&& GET_CODE (x) == MEM)
return EIGHT_REGS;
- return class;
+ return rclass;
}
/* Predicate for symbols and addresses that reflect special 8-bit
diff --git a/gcc/config/xtensa/t-xtensa b/gcc/config/xtensa/t-xtensa
index b0a7e8115e4..da2e8345e16 100644
--- a/gcc/config/xtensa/t-xtensa
+++ b/gcc/config/xtensa/t-xtensa
@@ -22,4 +22,3 @@ $(T)crtn.o: $(srcdir)/config/xtensa/crtn.asm $(GCC_PASSES)
-c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/xtensa/crtn.asm
$(out_object_file): gt-xtensa.h
-gt-xtensa.h : s-gtype ; @true
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
index 000df14854c..ec849653421 100644
--- a/gcc/config/xtensa/xtensa.c
+++ b/gcc/config/xtensa/xtensa.c
@@ -1310,10 +1310,10 @@ init_alignment_context (struct alignment_context *ac, rtx mem)
/* Expand an atomic compare and swap operation for HImode and QImode.
MEM is the memory location, CMP the old value to compare MEM with
- and NEW the value to set if CMP == MEM. */
+ and NEW_RTX the value to set if CMP == MEM. */
void
-xtensa_expand_compare_and_swap (rtx target, rtx mem, rtx cmp, rtx new)
+xtensa_expand_compare_and_swap (rtx target, rtx mem, rtx cmp, rtx new_rtx)
{
enum machine_mode mode = GET_MODE (mem);
struct alignment_context ac;
@@ -1328,7 +1328,7 @@ xtensa_expand_compare_and_swap (rtx target, rtx mem, rtx cmp, rtx new)
if (ac.shift != NULL_RTX)
{
cmp = xtensa_expand_mask_and_shift (cmp, mode, ac.shift);
- new = xtensa_expand_mask_and_shift (new, mode, ac.shift);
+ new_rtx = xtensa_expand_mask_and_shift (new_rtx, mode, ac.shift);
}
/* Load the surrounding word into VAL with the MEM value masked out. */
@@ -1337,10 +1337,10 @@ xtensa_expand_compare_and_swap (rtx target, rtx mem, rtx cmp, rtx new)
OPTAB_DIRECT));
emit_label (csloop);
- /* Patch CMP and NEW into VAL at correct position. */
+ /* Patch CMP and NEW_RTX into VAL at correct position. */
cmpv = force_reg (SImode, expand_simple_binop (SImode, IOR, cmp, val,
NULL_RTX, 1, OPTAB_DIRECT));
- newv = force_reg (SImode, expand_simple_binop (SImode, IOR, new, val,
+ newv = force_reg (SImode, expand_simple_binop (SImode, IOR, new_rtx, val,
NULL_RTX, 1, OPTAB_DIRECT));
/* Jump to end if we're done. */
@@ -1384,7 +1384,7 @@ xtensa_expand_atomic (enum rtx_code code, rtx target, rtx mem, rtx val,
rtx csloop = gen_label_rtx ();
rtx cmp, tmp;
rtx old = gen_reg_rtx (SImode);
- rtx new = gen_reg_rtx (SImode);
+ rtx new_rtx = gen_reg_rtx (SImode);
rtx orig = NULL_RTX;
init_alignment_context (&ac, mem);
@@ -1435,35 +1435,35 @@ xtensa_expand_atomic (enum rtx_code code, rtx target, rtx mem, rtx val,
tmp = expand_simple_binop (SImode, AND, old, ac.modemaski,
NULL_RTX, 1, OPTAB_DIRECT);
tmp = expand_simple_binop (SImode, IOR, tmp, val,
- new, 1, OPTAB_DIRECT);
+ new_rtx, 1, OPTAB_DIRECT);
break;
case AND:
case IOR:
case XOR:
tmp = expand_simple_binop (SImode, code, old, val,
- new, 1, OPTAB_DIRECT);
+ new_rtx, 1, OPTAB_DIRECT);
break;
case MULT: /* NAND */
tmp = expand_simple_binop (SImode, XOR, old, ac.modemask,
NULL_RTX, 1, OPTAB_DIRECT);
tmp = expand_simple_binop (SImode, AND, tmp, val,
- new, 1, OPTAB_DIRECT);
+ new_rtx, 1, OPTAB_DIRECT);
break;
default:
gcc_unreachable ();
}
- if (tmp != new)
- emit_move_insn (new, tmp);
- emit_insn (gen_sync_compare_and_swapsi (cmp, ac.memsi, old, new));
+ if (tmp != new_rtx)
+ emit_move_insn (new_rtx, tmp);
+ emit_insn (gen_sync_compare_and_swapsi (cmp, ac.memsi, old, new_rtx));
emit_cmp_and_jump_insns (cmp, old, NE, const0_rtx, SImode, true, csloop);
if (target)
{
- tmp = (after ? new : cmp);
+ tmp = (after ? new_rtx : cmp);
convert_move (target,
(ac.shift == NULL_RTX ? tmp
: expand_simple_binop (SImode, LSHIFTRT, tmp, ac.shift,
@@ -1884,7 +1884,7 @@ override_options (void)
mode = (enum machine_mode) ((int) mode + 1))
{
int size = GET_MODE_SIZE (mode);
- enum mode_class class = GET_MODE_CLASS (mode);
+ enum mode_class mclass = GET_MODE_CLASS (mode);
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
{
@@ -1892,7 +1892,7 @@ override_options (void)
if (ACC_REG_P (regno))
temp = (TARGET_MAC16
- && (class == MODE_INT) && (size <= UNITS_PER_WORD));
+ && (mclass == MODE_INT) && (size <= UNITS_PER_WORD));
else if (GP_REG_P (regno))
temp = ((regno & 1) == 0 || (size <= UNITS_PER_WORD));
else if (FP_REG_P (regno))
@@ -2533,8 +2533,10 @@ xtensa_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED)
f_ndx = TREE_CHAIN (f_reg);
stk = build3 (COMPONENT_REF, TREE_TYPE (f_stk), valist, f_stk, NULL_TREE);
- reg = build3 (COMPONENT_REF, TREE_TYPE (f_reg), valist, f_reg, NULL_TREE);
- ndx = build3 (COMPONENT_REF, TREE_TYPE (f_ndx), valist, f_ndx, NULL_TREE);
+ reg = build3 (COMPONENT_REF, TREE_TYPE (f_reg), unshare_expr (valist),
+ f_reg, NULL_TREE);
+ ndx = build3 (COMPONENT_REF, TREE_TYPE (f_ndx), unshare_expr (valist),
+ f_ndx, NULL_TREE);
/* Call __builtin_saveregs; save the result in __va_reg */
u = make_tree (sizetype, expand_builtin_saveregs ());
@@ -2588,7 +2590,8 @@ xtensa_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
pre_p, NULL);
real_part = get_initialized_tmp_var (real_part, pre_p, NULL);
- imag_part = xtensa_gimplify_va_arg_expr (valist, TREE_TYPE (type),
+ imag_part = xtensa_gimplify_va_arg_expr (unshare_expr (valist),
+ TREE_TYPE (type),
pre_p, NULL);
imag_part = get_initialized_tmp_var (imag_part, pre_p, NULL);
@@ -2599,9 +2602,12 @@ xtensa_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
f_reg = TREE_CHAIN (f_stk);
f_ndx = TREE_CHAIN (f_reg);
- stk = build3 (COMPONENT_REF, TREE_TYPE (f_stk), valist, f_stk, NULL_TREE);
- reg = build3 (COMPONENT_REF, TREE_TYPE (f_reg), valist, f_reg, NULL_TREE);
- ndx = build3 (COMPONENT_REF, TREE_TYPE (f_ndx), valist, f_ndx, NULL_TREE);
+ stk = build3 (COMPONENT_REF, TREE_TYPE (f_stk), valist,
+ f_stk, NULL_TREE);
+ reg = build3 (COMPONENT_REF, TREE_TYPE (f_reg), unshare_expr (valist),
+ f_reg, NULL_TREE);
+ ndx = build3 (COMPONENT_REF, TREE_TYPE (f_ndx), unshare_expr (valist),
+ f_ndx, NULL_TREE);
type_size = size_in_bytes (type);
va_size = round_up (type_size, UNITS_PER_WORD);
@@ -2621,11 +2627,11 @@ xtensa_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
{
int align = MIN (TYPE_ALIGN (type), STACK_BOUNDARY) / BITS_PER_UNIT;
- t = build2 (PLUS_EXPR, integer_type_node, orig_ndx,
+ t = build2 (PLUS_EXPR, integer_type_node, unshare_expr (orig_ndx),
build_int_cst (integer_type_node, align - 1));
t = build2 (BIT_AND_EXPR, integer_type_node, t,
build_int_cst (integer_type_node, -align));
- gimplify_assign (orig_ndx, t, pre_p);
+ gimplify_assign (unshare_expr (orig_ndx), t, pre_p);
}
@@ -2635,7 +2641,7 @@ xtensa_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
t = fold_convert (integer_type_node, va_size);
t = build2 (PLUS_EXPR, integer_type_node, orig_ndx, t);
- gimplify_assign (ndx, t, pre_p);
+ gimplify_assign (unshare_expr (ndx), t, pre_p);
/* Check if the argument is in registers:
@@ -2652,7 +2658,7 @@ xtensa_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
lab_false = create_artificial_label ();
lab_over = create_artificial_label ();
- t = build2 (GT_EXPR, boolean_type_node, ndx,
+ t = build2 (GT_EXPR, boolean_type_node, unshare_expr (ndx),
build_int_cst (integer_type_node,
MAX_ARGS_IN_REGISTERS * UNITS_PER_WORD));
t = build3 (COND_EXPR, void_type_node, t,
@@ -2660,7 +2666,7 @@ xtensa_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
NULL_TREE);
gimplify_and_add (t, pre_p);
- gimplify_assign (array, reg, pre_p);
+ gimplify_assign (unshare_expr (array), reg, pre_p);
t = build1 (GOTO_EXPR, void_type_node, lab_over);
gimplify_and_add (t, pre_p);
@@ -2682,7 +2688,7 @@ xtensa_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
lab_false2 = create_artificial_label ();
- t = build2 (GT_EXPR, boolean_type_node, orig_ndx,
+ t = build2 (GT_EXPR, boolean_type_node, unshare_expr (orig_ndx),
build_int_cst (integer_type_node,
MAX_ARGS_IN_REGISTERS * UNITS_PER_WORD));
t = build3 (COND_EXPR, void_type_node, t,
@@ -2690,9 +2696,9 @@ xtensa_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
NULL_TREE);
gimplify_and_add (t, pre_p);
- t = size_binop (PLUS_EXPR, va_size, size_int (32));
+ t = size_binop (PLUS_EXPR, unshare_expr (va_size), size_int (32));
t = fold_convert (integer_type_node, t);
- gimplify_assign (ndx, t, pre_p);
+ gimplify_assign (unshare_expr (ndx), t, pre_p);
t = build1 (LABEL_EXPR, void_type_node, lab_false2);
gimplify_and_add (t, pre_p);
@@ -2719,17 +2725,18 @@ xtensa_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
if (BYTES_BIG_ENDIAN && TREE_CODE (type_size) == INTEGER_CST)
{
- t = fold_build2 (GE_EXPR, boolean_type_node, type_size,
+ t = fold_build2 (GE_EXPR, boolean_type_node, unshare_expr (type_size),
size_int (PARM_BOUNDARY / BITS_PER_UNIT));
- t = fold_build3 (COND_EXPR, sizetype, t, va_size, type_size);
+ t = fold_build3 (COND_EXPR, sizetype, t, unshare_expr (va_size),
+ unshare_expr (type_size));
size = t;
}
else
- size = va_size;
+ size = unshare_expr (va_size);
- t = fold_convert (sizetype, ndx);
+ t = fold_convert (sizetype, unshare_expr (ndx));
t = build2 (MINUS_EXPR, sizetype, t, size);
- addr = build2 (POINTER_PLUS_EXPR, ptr_type_node, array, t);
+ addr = build2 (POINTER_PLUS_EXPR, ptr_type_node, unshare_expr (array), t);
addr = fold_convert (build_pointer_type (type), addr);
if (indirect)
@@ -2807,7 +2814,7 @@ xtensa_expand_builtin (tree exp, rtx target,
enum reg_class
-xtensa_preferred_reload_class (rtx x, enum reg_class class, int isoutput)
+xtensa_preferred_reload_class (rtx x, enum reg_class rclass, int isoutput)
{
if (!isoutput && CONSTANT_P (x) && GET_CODE (x) == CONST_DOUBLE)
return NO_REGS;
@@ -2818,15 +2825,15 @@ xtensa_preferred_reload_class (rtx x, enum reg_class class, int isoutput)
won't know that it is live because the hard frame pointer is
treated specially. */
- if (class == AR_REGS || class == GR_REGS)
+ if (rclass == AR_REGS || rclass == GR_REGS)
return RL_REGS;
- return class;
+ return rclass;
}
enum reg_class
-xtensa_secondary_reload_class (enum reg_class class,
+xtensa_secondary_reload_class (enum reg_class rclass,
enum machine_mode mode ATTRIBUTE_UNUSED,
rtx x, int isoutput)
{
@@ -2838,14 +2845,14 @@ xtensa_secondary_reload_class (enum reg_class class,
if (!isoutput)
{
- if ((class == FP_REGS || GET_MODE_SIZE (mode) < UNITS_PER_WORD)
+ if ((rclass == FP_REGS || GET_MODE_SIZE (mode) < UNITS_PER_WORD)
&& constantpool_mem_p (x))
return RL_REGS;
}
if (ACC_REG_P (regno))
- return ((class == GR_REGS || class == RL_REGS) ? NO_REGS : RL_REGS);
- if (class == ACC_REG)
+ return ((rclass == GR_REGS || rclass == RL_REGS) ? NO_REGS : RL_REGS);
+ if (rclass == ACC_REG)
return (GP_REG_P (regno) ? NO_REGS : RL_REGS);
return NO_REGS;
diff --git a/gcc/configure b/gcc/configure
index a79664b708e..0ad273b0cfa 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -20832,6 +20832,51 @@ _ACEOF
fi
+# Check if we have assembler support for unwind directives.
+echo "$as_me:$LINENO: checking assembler for cfi directives" >&5
+echo $ECHO_N "checking assembler for cfi directives... $ECHO_C" >&6
+if test "${gcc_cv_as_cfi_directive+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ gcc_cv_as_cfi_directive=no
+ if test $in_tree_gas = yes; then
+ if test $in_tree_gas_is_elf = yes \
+ && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0`
+ then gcc_cv_as_cfi_directive=yes
+fi
+ elif test x$gcc_cv_as != x; then
+ echo ' .text
+ .cfi_startproc
+ .cfi_offset 0, 0
+ .cfi_same_value 1
+ .cfi_def_cfa 1, 2
+ .cfi_escape 1, 2, 3, 4, 5
+ .cfi_personality 0, symbol
+ .cfi_endproc' > conftest.s
+ if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }
+ then
+ gcc_cv_as_cfi_directive=yes
+ else
+ echo "configure: failed program was" >&5
+ cat conftest.s >&5
+ fi
+ rm -f conftest.o conftest.s
+ fi
+fi
+echo "$as_me:$LINENO: result: $gcc_cv_as_cfi_directive" >&5
+echo "${ECHO_T}$gcc_cv_as_cfi_directive" >&6
+
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_GAS_CFI_DIRECTIVE `if test $gcc_cv_as_cfi_directive = yes; then echo 1; else echo 0; fi`
+_ACEOF
+
+
# GAS versions up to and including 2.11.0 may mis-optimize
# .eh_frame data.
echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5
@@ -22755,7 +22800,7 @@ esac
case "$target" in
i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
| x86_64*-*-* | hppa*-*-* | arm*-*-* \
- | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-* | score*-*-* \
+ | xstormy16*-*-* | cris-*-* | xtensa*-*-* | bfin-*-* | score*-*-* \
| spu-*-* | fido*-*-*)
insn="nop"
;;
diff --git a/gcc/configure.ac b/gcc/configure.ac
index ced1a7cd21b..f2f0eea0b92 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -2180,6 +2180,21 @@ changequote([,])dnl
[AC_DEFINE(HAVE_AS_LEB128, 1,
[Define if your assembler supports .sleb128 and .uleb128.])])
+# Check if we have assembler support for unwind directives.
+gcc_GAS_CHECK_FEATURE([cfi directives], gcc_cv_as_cfi_directive,
+ [elf,2,17,0],,
+[ .text
+ .cfi_startproc
+ .cfi_offset 0, 0
+ .cfi_same_value 1
+ .cfi_def_cfa 1, 2
+ .cfi_escape 1, 2, 3, 4, 5
+ .cfi_personality 0, symbol
+ .cfi_endproc])
+AC_DEFINE_UNQUOTED(HAVE_GAS_CFI_DIRECTIVE,
+ [`if test $gcc_cv_as_cfi_directive = yes; then echo 1; else echo 0; fi`],
+[Define 0/1 if your assembler supports CFI directives.])
+
# GAS versions up to and including 2.11.0 may mis-optimize
# .eh_frame data.
gcc_GAS_CHECK_FEATURE(eh_frame optimization, gcc_cv_as_eh_frame,
@@ -3070,7 +3085,7 @@ esac
case "$target" in
i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
| x86_64*-*-* | hppa*-*-* | arm*-*-* \
- | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-* | score*-*-* \
+ | xstormy16*-*-* | cris-*-* | xtensa*-*-* | bfin-*-* | score*-*-* \
| spu-*-* | fido*-*-*)
insn="nop"
;;
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 8ff23cdb5dd..4dfd564a7ec 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,23 @@
+2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
+
+ PR 26785
+ * decl.c (grokdeclarator): Use explicit location with permerror_at.
+
+2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
+
+ PR 8715
+ * typeck.c (cp_build_binary_op): Move code to c-common.c.
+
+2008-08-05 Jason Merrill <jason@redhat.com>
+
+ PR c++/37016
+ * decl.c (build_ptrmemfunc_type): Don't require structural
+ comparison of PMF types.
+ * tree.c (cp_build_qualified_type_real): Don't clear
+ a valid TYPE_PTRMEMFUNC_TYPE.
+ * typeck.c (cp_build_unary_op): Still do build_ptrmemfunc in
+ templates.
+
2008-08-04 Jason Merrill <jason@redhat.com>
PR c++/36963
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 1ed98eee4ff..4c340e28a91 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -6961,16 +6961,17 @@ build_ptrmemfunc_type (tree type)
TYPE_MAIN_VARIANT (t) = unqualified_variant;
TYPE_NEXT_VARIANT (t) = TYPE_NEXT_VARIANT (unqualified_variant);
TYPE_NEXT_VARIANT (unqualified_variant) = t;
+ TREE_TYPE (TYPE_BINFO (t)) = t;
}
/* Cache this pointer-to-member type so that we can find it again
later. */
TYPE_SET_PTRMEMFUNC_TYPE (type, t);
- /* Managing canonical types for the RECORD_TYPE behind a
- pointer-to-member function is a nightmare, so use structural
- equality for now. */
- SET_TYPE_STRUCTURAL_EQUALITY (t);
+ if (TYPE_STRUCTURAL_EQUALITY_P (type))
+ SET_TYPE_STRUCTURAL_EQUALITY (t);
+ else if (TYPE_CANONICAL (type) != type)
+ TYPE_CANONICAL (t) = build_ptrmemfunc_type (TYPE_CANONICAL (type));
return t;
}
@@ -8436,8 +8437,9 @@ grokdeclarator (const cp_declarator *declarator,
friendp = 0;
}
else
- permerror ("extra qualification %<%T::%> on member %qs",
- ctype, name);
+ permerror_at (declarator->id_loc,
+ "extra qualification %<%T::%> on member %qs",
+ ctype, name);
}
else if (/* If the qualifying type is already complete, then we
can skip the following checks. */
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 4114f868d41..ff19cd69d8b 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -873,7 +873,8 @@ cp_build_qualified_type_real (tree type,
between the unqualified and qualified types. */
if (result != type
&& TREE_CODE (type) == POINTER_TYPE
- && TREE_CODE (TREE_TYPE (type)) == METHOD_TYPE)
+ && TREE_CODE (TREE_TYPE (type)) == METHOD_TYPE
+ && TYPE_LANG_SPECIFIC (result) == TYPE_LANG_SPECIFIC (type))
TYPE_LANG_SPECIFIC (result) = NULL;
return result;
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index feb6b5f8f54..792a77cc1a8 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -3839,115 +3839,11 @@ cp_build_binary_op (enum tree_code code, tree orig_op0, tree orig_op1,
&& warn_sign_compare
/* Do not warn until the template is instantiated; we cannot
bound the ranges of the arguments until that point. */
- && !processing_template_decl)
+ && !processing_template_decl
+ && (complain & tf_warning))
{
- int op0_signed = !TYPE_UNSIGNED (TREE_TYPE (orig_op0));
- int op1_signed = !TYPE_UNSIGNED (TREE_TYPE (orig_op1));
-
- int unsignedp0, unsignedp1;
- tree primop0 = get_narrower (op0, &unsignedp0);
- tree primop1 = get_narrower (op1, &unsignedp1);
-
- /* Check for comparison of different enum types. */
- if (TREE_CODE (TREE_TYPE (orig_op0)) == ENUMERAL_TYPE
- && TREE_CODE (TREE_TYPE (orig_op1)) == ENUMERAL_TYPE
- && TYPE_MAIN_VARIANT (TREE_TYPE (orig_op0))
- != TYPE_MAIN_VARIANT (TREE_TYPE (orig_op1))
- && (complain & tf_warning))
- {
- warning (OPT_Wsign_compare, "comparison between types %q#T and %q#T",
- TREE_TYPE (orig_op0), TREE_TYPE (orig_op1));
- }
-
- /* Give warnings for comparisons between signed and unsigned
- quantities that may fail. */
- /* Do the checking based on the original operand trees, so that
- casts will be considered, but default promotions won't be. */
-
- /* Do not warn if the comparison is being done in a signed type,
- since the signed type will only be chosen if it can represent
- all the values of the unsigned type. */
- if (!TYPE_UNSIGNED (result_type))
- /* OK */;
- /* Do not warn if both operands are unsigned. */
- else if (op0_signed == op1_signed)
- /* OK */;
- /* Do not warn if the signed quantity is an unsuffixed
- integer literal (or some static constant expression
- involving such literals or a conditional expression
- involving such literals) and it is non-negative. */
- else if ((op0_signed && tree_expr_nonnegative_p (orig_op0))
- || (op1_signed && tree_expr_nonnegative_p (orig_op1)))
- /* OK */;
- /* Do not warn if the comparison is an equality operation,
- the unsigned quantity is an integral constant and it does
- not use the most significant bit of result_type. */
- else if ((resultcode == EQ_EXPR || resultcode == NE_EXPR)
- && ((op0_signed && TREE_CODE (orig_op1) == INTEGER_CST
- && int_fits_type_p (orig_op1, c_common_signed_type
- (result_type)))
- || (op1_signed && TREE_CODE (orig_op0) == INTEGER_CST
- && int_fits_type_p (orig_op0, c_common_signed_type
- (result_type)))))
- /* OK */;
- else if (complain & tf_warning)
- warning (OPT_Wsign_compare,
- "comparison between signed and unsigned integer expressions");
-
- /* Warn if two unsigned values are being compared in a size
- larger than their original size, and one (and only one) is the
- result of a `~' operator. This comparison will always fail.
-
- Also warn if one operand is a constant, and the constant does not
- have all bits set that are set in the ~ operand when it is
- extended. */
-
- if ((TREE_CODE (primop0) == BIT_NOT_EXPR)
- ^ (TREE_CODE (primop1) == BIT_NOT_EXPR))
- {
- if (TREE_CODE (primop0) == BIT_NOT_EXPR)
- primop0 = get_narrower (TREE_OPERAND (op0, 0), &unsignedp0);
- if (TREE_CODE (primop1) == BIT_NOT_EXPR)
- primop1 = get_narrower (TREE_OPERAND (op1, 0), &unsignedp1);
-
- if (host_integerp (primop0, 0) || host_integerp (primop1, 0))
- {
- tree primop;
- HOST_WIDE_INT constant, mask;
- int unsignedp;
- unsigned int bits;
-
- if (host_integerp (primop0, 0))
- {
- primop = primop1;
- unsignedp = unsignedp1;
- constant = tree_low_cst (primop0, 0);
- }
- else
- {
- primop = primop0;
- unsignedp = unsignedp0;
- constant = tree_low_cst (primop1, 0);
- }
-
- bits = TYPE_PRECISION (TREE_TYPE (primop));
- if (bits < TYPE_PRECISION (result_type)
- && bits < HOST_BITS_PER_LONG && unsignedp)
- {
- mask = (~ (HOST_WIDE_INT) 0) << bits;
- if ((mask & constant) != mask
- && (complain & tf_warning))
- warning (OPT_Wsign_compare, "comparison of promoted ~unsigned with constant");
- }
- }
- else if (unsignedp0 && unsignedp1
- && (TYPE_PRECISION (TREE_TYPE (primop0))
- < TYPE_PRECISION (result_type))
- && (TYPE_PRECISION (TREE_TYPE (primop1))
- < TYPE_PRECISION (result_type))
- && (complain & tf_warning))
- warning (OPT_Wsign_compare, "comparison of promoted ~unsigned with unsigned");
- }
+ warn_for_sign_compare (orig_op0, orig_op1, op0, op1,
+ result_type, resultcode);
}
}
@@ -4642,15 +4538,7 @@ cp_build_unary_op (enum tree_code code, tree xarg, int noconvert,
/* In a template, we are processing a non-dependent expression
so we can just form an ADDR_EXPR with the correct type. */
- if (processing_template_decl)
- {
- val = build_address (arg);
- if (TREE_CODE (arg) == OFFSET_REF)
- PTRMEM_OK_P (val) = PTRMEM_OK_P (arg);
- return val;
- }
-
- if (TREE_CODE (arg) != COMPONENT_REF)
+ if (processing_template_decl || TREE_CODE (arg) != COMPONENT_REF)
{
val = build_address (arg);
if (TREE_CODE (arg) == OFFSET_REF)
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c
index 49b3f9a058f..69b7e4b534e 100644
--- a/gcc/diagnostic.c
+++ b/gcc/diagnostic.c
@@ -554,10 +554,26 @@ pedwarn0 (const char *gmsgid, ...)
va_end (ap);
}
-/* A "permissive" error: issues an error unless -fpermissive was given
- on the command line, in which case it issues a warning. Use this
- for things that really should be errors but we want to support
- legacy code. */
+/* A "permissive" error at LOCATION: issues an error unless
+ -fpermissive was given on the command line, in which case it issues
+ a warning. Use this for things that really should be errors but we
+ want to support legacy code. */
+
+void
+permerror_at (location_t location, const char *gmsgid, ...)
+{
+ diagnostic_info diagnostic;
+ va_list ap;
+
+ va_start (ap, gmsgid);
+ diagnostic_set_info (&diagnostic, gmsgid, &ap, location,
+ permissive_error_kind ());
+ diagnostic.option_index = OPT_fpermissive;
+ report_diagnostic (&diagnostic);
+ va_end (ap);
+}
+
+/* Equivalent to permerror_at (input_location, ...). */
void
permerror (const char *gmsgid, ...)
diff --git a/gcc/doc/cpp.texi b/gcc/doc/cpp.texi
index aaf83f99774..0eaece14d45 100644
--- a/gcc/doc/cpp.texi
+++ b/gcc/doc/cpp.texi
@@ -2239,6 +2239,10 @@ If GCC cannot determine the current date, it will emit a warning message
These macros are defined when the target processor supports atomic compare
and swap operations on operands 1, 2, 4, 8 or 16 bytes in length, respectively.
+@item __GCC_HAVE_DWARF2_CFI_ASM
+This macro is defined when the compiler is emitting Dwarf2 CFI directives
+to the assembler. When this is defined, it is possible to emit those same
+directives in inline assembly.
@end table
@node System-specific Predefined Macros
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index f2aeb2c9586..7c9564419bb 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -2625,9 +2625,9 @@ information are.
@item
@uref{#x86-64-x-x,,x86_64-*-*, amd64-*-*}
@item
-@uref{#xtensa-x-elf,,xtensa-*-elf}
+@uref{#xtensa-x-elf,,xtensa*-*-elf}
@item
-@uref{#xtensa-x-linux,,xtensa-*-linux*}
+@uref{#xtensa-x-linux,,xtensa*-*-linux*}
@item
@uref{#windows,,Microsoft Windows}
@item
@@ -4036,7 +4036,7 @@ both 64-bit x86-64 and 32-bit x86 code (via the @option{-m32} switch).
@html
<hr />
@end html
-@heading @anchor{xtensa-x-elf}xtensa-*-elf
+@heading @anchor{xtensa-x-elf}xtensa*-*-elf
This target is intended for embedded Xtensa systems using the
@samp{newlib} C library. It uses ELF but does not support shared
@@ -4054,14 +4054,14 @@ which you can use to replace the default header file.
@html
<hr />
@end html
-@heading @anchor{xtensa-x-linux}xtensa-*-linux*
+@heading @anchor{xtensa-x-linux}xtensa*-*-linux*
This target is for Xtensa systems running GNU/Linux. It supports ELF
shared objects and the GNU C library (glibc). It also generates
position-independent code (PIC) regardless of whether the
@option{-fpic} or @option{-fPIC} options are used. In other
respects, this target is the same as the
-@uref{#xtensa-*-elf,,@samp{xtensa-*-elf}} target.
+@uref{#xtensa*-*-elf,,@samp{xtensa*-*-elf}} target.
@html
<hr />
diff --git a/gcc/dwarf2asm.c b/gcc/dwarf2asm.c
index 43d57e9fa8f..9ae94200f18 100644
--- a/gcc/dwarf2asm.c
+++ b/gcc/dwarf2asm.c
@@ -62,6 +62,34 @@ dw2_assemble_integer (int size, rtx x)
}
+/* Output a value of a given size in target byte order. */
+
+void
+dw2_asm_output_data_raw (int size, unsigned HOST_WIDE_INT value)
+{
+ unsigned char bytes[8];
+ int i;
+
+ for (i = 0; i < 8; ++i)
+ {
+ bytes[i] = value & 0xff;
+ value >>= 8;
+ }
+
+ if (BYTES_BIG_ENDIAN)
+ {
+ for (i = size - 1; i > 0; --i)
+ fprintf (asm_out_file, "0x%x,", bytes[i]);
+ fprintf (asm_out_file, "0x%x", bytes[0]);
+ }
+ else
+ {
+ for (i = 0; i < size - 1; ++i)
+ fprintf (asm_out_file, "0x%x,", bytes[i]);
+ fprintf (asm_out_file, "0x%x", bytes[i]);
+ }
+}
+
/* Output an immediate constant in a given SIZE in bytes. */
void
@@ -505,6 +533,26 @@ eh_data_format_name (int format)
#endif
}
+/* Output an unsigned LEB128 quantity, but only the byte values. */
+
+void
+dw2_asm_output_data_uleb128_raw (unsigned HOST_WIDE_INT value)
+{
+ while (1)
+ {
+ int byte = (value & 0x7f);
+ value >>= 7;
+ if (value != 0)
+ /* More bytes to follow. */
+ byte |= 0x80;
+
+ fprintf (asm_out_file, "0x%x", byte);
+ if (value == 0)
+ break;
+ fputc (',', asm_out_file);
+ }
+}
+
/* Output an unsigned LEB128 quantity. */
void
@@ -566,6 +614,29 @@ dw2_asm_output_data_uleb128 (unsigned HOST_WIDE_INT value,
va_end (ap);
}
+/* Output an signed LEB128 quantity, but only the byte values. */
+
+void
+dw2_asm_output_data_sleb128_raw (HOST_WIDE_INT value)
+{
+ int byte, more;
+
+ while (1)
+ {
+ byte = (value & 0x7f);
+ value >>= 7;
+ more = !((value == 0 && (byte & 0x40) == 0)
+ || (value == -1 && (byte & 0x40) != 0));
+ if (more)
+ byte |= 0x80;
+
+ fprintf (asm_out_file, "0x%x", byte);
+ if (!more)
+ break;
+ fputc (',', asm_out_file);
+ }
+}
+
/* Output a signed LEB128 quantity. */
void
@@ -689,7 +760,6 @@ dw2_asm_output_delta_sleb128 (const char *lab1 ATTRIBUTE_UNUSED,
}
#endif /* 0 */
-static rtx dw2_force_const_mem (rtx, bool);
static int dw2_output_indirect_constant_1 (splay_tree_node, void *);
static GTY((param1_is (char *), param2_is (tree))) splay_tree indirect_pool;
@@ -733,7 +803,7 @@ splay_tree_compare_strings (splay_tree_key k1, splay_tree_key k2)
"near" the function in any interesting sense. IS_PUBLIC controls whether
the symbol can be shared across the entire application (or DSO). */
-static rtx
+rtx
dw2_force_const_mem (rtx x, bool is_public)
{
splay_tree_node node;
diff --git a/gcc/dwarf2asm.h b/gcc/dwarf2asm.h
index 03fc0ca0e16..70fbd4c4400 100644
--- a/gcc/dwarf2asm.h
+++ b/gcc/dwarf2asm.h
@@ -20,6 +20,8 @@ along with GCC; see the file COPYING3. If not see
extern void dw2_assemble_integer (int, rtx);
+extern void dw2_asm_output_data_raw (int, unsigned HOST_WIDE_INT);
+
extern void dw2_asm_output_data (int, unsigned HOST_WIDE_INT,
const char *, ...)
ATTRIBUTE_NULL_PRINTF_3;
@@ -46,10 +48,14 @@ extern void dw2_asm_output_nstring (const char *, size_t,
const char *, ...)
ATTRIBUTE_NULL_PRINTF_3;
+extern void dw2_asm_output_data_uleb128_raw (unsigned HOST_WIDE_INT);
+
extern void dw2_asm_output_data_uleb128 (unsigned HOST_WIDE_INT,
const char *, ...)
ATTRIBUTE_NULL_PRINTF_2;
+extern void dw2_asm_output_data_sleb128_raw (HOST_WIDE_INT);
+
extern void dw2_asm_output_data_sleb128 (HOST_WIDE_INT,
const char *, ...)
ATTRIBUTE_NULL_PRINTF_2;
@@ -63,6 +69,7 @@ extern int size_of_sleb128 (HOST_WIDE_INT);
extern int size_of_encoded_value (int);
extern const char *eh_data_format_name (int);
+extern rtx dw2_force_const_mem (rtx, bool);
extern void dw2_output_indirect_constants (void);
/* These are currently unused. */
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index e9b6b53562b..b1caf4d5866 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -384,6 +384,7 @@ static void initial_return_save (rtx);
#endif
static HOST_WIDE_INT stack_adjust_offset (const_rtx);
static void output_cfi (dw_cfi_ref, dw_fde_ref, int);
+static void output_cfi_directive (dw_cfi_ref);
static void output_call_frame_info (int);
static void dwarf2out_note_section_used (void);
static void dwarf2out_stack_adjust (rtx, bool);
@@ -394,6 +395,7 @@ static void dwarf2out_frame_debug_expr (rtx, const char *);
/* Support for complex CFA locations. */
static void output_cfa_loc (dw_cfi_ref);
+static void output_cfa_loc_raw (dw_cfi_ref);
static void get_cfa_from_loc_descr (dw_cfa_location *,
struct dw_loc_descr_struct *);
static struct dw_loc_descr_struct *build_cfa_loc
@@ -665,8 +667,19 @@ dwarf2out_cfi_label (void)
{
static char label[20];
- ASM_GENERATE_INTERNAL_LABEL (label, "LCFI", dwarf2out_cfi_label_num++);
- ASM_OUTPUT_LABEL (asm_out_file, label);
+ if (flag_dwarf2_cfi_asm)
+ {
+ /* In this case, we will be emitting the asm directive instead of
+ the label, so just return a placeholder to keep the rest of the
+ interfaces happy. */
+ strcpy (label, "<do not output>");
+ }
+ else
+ {
+ ASM_GENERATE_INTERNAL_LABEL (label, "LCFI", dwarf2out_cfi_label_num++);
+ ASM_OUTPUT_LABEL (asm_out_file, label);
+ }
+
return label;
}
@@ -676,7 +689,25 @@ dwarf2out_cfi_label (void)
static void
add_fde_cfi (const char *label, dw_cfi_ref cfi)
{
- if (label)
+ dw_cfi_ref *list_head = &cie_cfi_head;
+
+ if (flag_dwarf2_cfi_asm)
+ {
+ if (label)
+ {
+ output_cfi_directive (cfi);
+
+ /* We still have to add the cfi to the list so that
+ lookup_cfa works later on. */
+ list_head = &current_fde ()->dw_fde_cfi;
+ }
+ /* ??? If this is a CFI for the CIE, we don't emit. This
+ assumes that the standard CIE contents that the assembler
+ uses matches the standard CIE contents that the compiler
+ uses. This is probably a bad assumption. I'm not quite
+ sure how to address this for now. */
+ }
+ else if (label)
{
dw_fde_ref fde = current_fde ();
@@ -705,11 +736,10 @@ add_fde_cfi (const char *label, dw_cfi_ref cfi)
fde->dw_fde_current_label = label;
}
- add_cfi (&fde->dw_fde_cfi, cfi);
+ list_head = &fde->dw_fde_cfi;
}
- else
- add_cfi (&cie_cfi_head, cfi);
+ add_cfi (list_head, cfi);
}
/* Subroutine of lookup_cfa. */
@@ -2619,6 +2649,100 @@ output_cfi (dw_cfi_ref cfi, dw_fde_ref fde, int for_eh)
}
}
+/* Similar, but do it via assembler directives instead. */
+
+static void
+output_cfi_directive (dw_cfi_ref cfi)
+{
+ unsigned long r, r2;
+
+ switch (cfi->dw_cfi_opc)
+ {
+ case DW_CFA_advance_loc:
+ case DW_CFA_advance_loc1:
+ case DW_CFA_advance_loc2:
+ case DW_CFA_advance_loc4:
+ case DW_CFA_MIPS_advance_loc8:
+ case DW_CFA_set_loc:
+ /* Should only be created by add_fde_cfi in a code path not
+ followed when emitting via directives. The assembler is
+ going to take care of this for us. */
+ gcc_unreachable ();
+
+ case DW_CFA_offset:
+ case DW_CFA_offset_extended:
+ case DW_CFA_offset_extended_sf:
+ r = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, 0);
+ fprintf (asm_out_file, "\t.cfi_offset %lu, "HOST_WIDE_INT_PRINT_DEC"\n",
+ r, cfi->dw_cfi_oprnd2.dw_cfi_offset * DWARF_CIE_DATA_ALIGNMENT);
+ break;
+
+ case DW_CFA_restore:
+ case DW_CFA_restore_extended:
+ r = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, 0);
+ fprintf (asm_out_file, "\t.cfi_restore %lu\n", r);
+ break;
+
+ case DW_CFA_undefined:
+ r = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, 0);
+ fprintf (asm_out_file, "\t.cfi_undefined %lu\n", r);
+ break;
+
+ case DW_CFA_same_value:
+ r = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, 0);
+ fprintf (asm_out_file, "\t.cfi_same_value %lu\n", r);
+ break;
+
+ case DW_CFA_def_cfa:
+ case DW_CFA_def_cfa_sf:
+ r = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, 0);
+ fprintf (asm_out_file, "\t.cfi_def_cfa %lu, "HOST_WIDE_INT_PRINT_DEC"\n",
+ r, cfi->dw_cfi_oprnd2.dw_cfi_offset);
+ break;
+
+ case DW_CFA_def_cfa_register:
+ r = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, 0);
+ fprintf (asm_out_file, "\t.cfi_def_cfa_register %lu\n", r);
+ break;
+
+ case DW_CFA_register:
+ r = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd1.dw_cfi_reg_num, 0);
+ r2 = DWARF2_FRAME_REG_OUT (cfi->dw_cfi_oprnd2.dw_cfi_reg_num, 0);
+ fprintf (asm_out_file, "\t.cfi_register %lu, %lu\n", r, r2);
+ break;
+
+ case DW_CFA_def_cfa_offset:
+ case DW_CFA_def_cfa_offset_sf:
+ fprintf (asm_out_file, "\t.cfi_def_cfa_offset "
+ HOST_WIDE_INT_PRINT_DEC"\n",
+ cfi->dw_cfi_oprnd1.dw_cfi_offset);
+ break;
+
+ case DW_CFA_GNU_args_size:
+ fprintf (asm_out_file, "\t.cfi_escape 0x%x,", DW_CFA_GNU_args_size);
+ dw2_asm_output_data_uleb128_raw (cfi->dw_cfi_oprnd1.dw_cfi_offset);
+ if (flag_debug_asm)
+ fprintf (asm_out_file, "\t%s args_size "HOST_WIDE_INT_PRINT_DEC,
+ ASM_COMMENT_START, cfi->dw_cfi_oprnd1.dw_cfi_offset);
+ fputc ('\n', asm_out_file);
+ break;
+
+ case DW_CFA_GNU_window_save:
+ fprintf (asm_out_file, "\t.cfi_window_save\n");
+ break;
+
+ case DW_CFA_def_cfa_expression:
+ case DW_CFA_expression:
+ fprintf (asm_out_file, "\t.cfi_escape 0x%x,", cfi->dw_cfi_opc);
+ output_cfa_loc_raw (cfi);
+ fputc ('\n', asm_out_file);
+ break;
+
+ default:
+ gcc_unreachable ();
+ }
+}
+
/* Output the call frame information used to record information
that relates to calculating the frame pointer, and records the
location of saved registers. */
@@ -2642,6 +2766,10 @@ output_call_frame_info (int for_eh)
if (fde_table_in_use == 0)
return;
+ /* Nothing to do if the assembler's doing it all. */
+ if (flag_dwarf2_cfi_asm)
+ return;
+
/* If we make FDEs linkonce, we may have to emit an empty label for
an FDE that wouldn't otherwise be emitted. We want to avoid
having an FDE kept around when the function it refers to is
@@ -3058,6 +3186,49 @@ dwarf2out_begin_prologue (unsigned int line ATTRIBUTE_UNUSED,
if (file)
dwarf2out_source_line (line, file);
#endif
+
+ if (flag_dwarf2_cfi_asm)
+ {
+ int enc;
+ rtx ref;
+
+ fprintf (asm_out_file, "\t.cfi_startproc\n");
+
+ if (eh_personality_libfunc)
+ {
+ enc = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/2, /*global=*/1);
+ ref = eh_personality_libfunc;
+
+ /* ??? The GAS support isn't entirely consistent. We have to
+ handle indirect support ourselves, but PC-relative is done
+ in the assembler. Further, the assembler can't handle any
+ of the weirder relocation types. */
+ if (enc & DW_EH_PE_indirect)
+ ref = dw2_force_const_mem (ref, true);
+
+ fprintf (asm_out_file, "\t.cfi_personality 0x%x,", enc);
+ output_addr_const (asm_out_file, ref);
+ fputc ('\n', asm_out_file);
+ }
+
+ if (crtl->uses_eh_lsda)
+ {
+ char lab[20];
+
+ enc = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/0, /*global=*/0);
+ ASM_GENERATE_INTERNAL_LABEL (lab, "LLSDA",
+ current_function_funcdef_no);
+ ref = gen_rtx_SYMBOL_REF (Pmode, lab);
+ SYMBOL_REF_FLAGS (ref) = SYMBOL_FLAG_LOCAL;
+
+ if (enc & DW_EH_PE_indirect)
+ ref = dw2_force_const_mem (ref, true);
+
+ fprintf (asm_out_file, "\t.cfi_lsda 0x%x,", enc);
+ output_addr_const (asm_out_file, ref);
+ fputc ('\n', asm_out_file);
+ }
+ }
}
/* Output a marker (i.e. a label) for the absolute end of the generated code
@@ -3071,6 +3242,9 @@ dwarf2out_end_epilogue (unsigned int line ATTRIBUTE_UNUSED,
dw_fde_ref fde;
char label[MAX_ARTIFICIAL_LABEL_BYTES];
+ if (flag_dwarf2_cfi_asm)
+ fprintf (asm_out_file, "\t.cfi_endproc\n");
+
/* Output a label to mark the endpoint of the code generated for this
function. */
ASM_GENERATE_INTERNAL_LABEL (label, FUNC_END_LABEL,
@@ -3931,6 +4105,141 @@ output_loc_sequence (dw_loc_descr_ref loc)
}
}
+/* Output location description stack opcode's operands (if any).
+ The output is single bytes on a line, suitable for .cfi_escape. */
+
+static void
+output_loc_operands_raw (dw_loc_descr_ref loc)
+{
+ dw_val_ref val1 = &loc->dw_loc_oprnd1;
+ dw_val_ref val2 = &loc->dw_loc_oprnd2;
+
+ switch (loc->dw_loc_opc)
+ {
+ case DW_OP_addr:
+ /* We cannot output addresses in .cfi_escape, only bytes. */
+ gcc_unreachable ();
+
+ case DW_OP_const1u:
+ case DW_OP_const1s:
+ case DW_OP_pick:
+ case DW_OP_deref_size:
+ case DW_OP_xderef_size:
+ fputc (',', asm_out_file);
+ dw2_asm_output_data_raw (1, val1->v.val_int);
+ break;
+
+ case DW_OP_const2u:
+ case DW_OP_const2s:
+ fputc (',', asm_out_file);
+ dw2_asm_output_data_raw (2, val1->v.val_int);
+ break;
+
+ case DW_OP_const4u:
+ case DW_OP_const4s:
+ fputc (',', asm_out_file);
+ dw2_asm_output_data_raw (4, val1->v.val_int);
+ break;
+
+ case DW_OP_const8u:
+ case DW_OP_const8s:
+ gcc_assert (HOST_BITS_PER_LONG >= 64);
+ fputc (',', asm_out_file);
+ dw2_asm_output_data_raw (8, val1->v.val_int);
+ break;
+
+ case DW_OP_skip:
+ case DW_OP_bra:
+ {
+ int offset;
+
+ gcc_assert (val1->val_class == dw_val_class_loc);
+ offset = val1->v.val_loc->dw_loc_addr - (loc->dw_loc_addr + 3);
+
+ fputc (',', asm_out_file);
+ dw2_asm_output_data_raw (2, offset);
+ }
+ break;
+
+ case DW_OP_constu:
+ case DW_OP_plus_uconst:
+ case DW_OP_regx:
+ case DW_OP_piece:
+ fputc (',', asm_out_file);
+ dw2_asm_output_data_uleb128_raw (val1->v.val_unsigned);
+ break;
+
+ case DW_OP_consts:
+ case DW_OP_breg0:
+ case DW_OP_breg1:
+ case DW_OP_breg2:
+ case DW_OP_breg3:
+ case DW_OP_breg4:
+ case DW_OP_breg5:
+ case DW_OP_breg6:
+ case DW_OP_breg7:
+ case DW_OP_breg8:
+ case DW_OP_breg9:
+ case DW_OP_breg10:
+ case DW_OP_breg11:
+ case DW_OP_breg12:
+ case DW_OP_breg13:
+ case DW_OP_breg14:
+ case DW_OP_breg15:
+ case DW_OP_breg16:
+ case DW_OP_breg17:
+ case DW_OP_breg18:
+ case DW_OP_breg19:
+ case DW_OP_breg20:
+ case DW_OP_breg21:
+ case DW_OP_breg22:
+ case DW_OP_breg23:
+ case DW_OP_breg24:
+ case DW_OP_breg25:
+ case DW_OP_breg26:
+ case DW_OP_breg27:
+ case DW_OP_breg28:
+ case DW_OP_breg29:
+ case DW_OP_breg30:
+ case DW_OP_breg31:
+ case DW_OP_fbreg:
+ fputc (',', asm_out_file);
+ dw2_asm_output_data_sleb128_raw (val1->v.val_int);
+ break;
+
+ case DW_OP_bregx:
+ fputc (',', asm_out_file);
+ dw2_asm_output_data_uleb128_raw (val1->v.val_unsigned);
+ fputc (',', asm_out_file);
+ dw2_asm_output_data_sleb128_raw (val2->v.val_int);
+ break;
+
+ case INTERNAL_DW_OP_tls_addr:
+ gcc_unreachable ();
+
+ default:
+ /* Other codes have no operands. */
+ break;
+ }
+}
+
+static void
+output_loc_sequence_raw (dw_loc_descr_ref loc)
+{
+ while (1)
+ {
+ /* Output the opcode. */
+ fprintf (asm_out_file, "0x%x", loc->dw_loc_opc);
+ output_loc_operands_raw (loc);
+
+ if (!loc->dw_loc_next)
+ break;
+ loc = loc->dw_loc_next;
+
+ fputc (',', asm_out_file);
+ }
+}
+
/* This routine will generate the correct assembly data for a location
description based on a cfi entry with a complex address. */
@@ -3952,6 +4261,27 @@ output_cfa_loc (dw_cfi_ref cfi)
output_loc_sequence (loc);
}
+/* Similar, but used for .cfi_escape. */
+
+static void
+output_cfa_loc_raw (dw_cfi_ref cfi)
+{
+ dw_loc_descr_ref loc;
+ unsigned long size;
+
+ if (cfi->dw_cfi_opc == DW_CFA_expression)
+ fprintf (asm_out_file, "0x%x,", cfi->dw_cfi_oprnd2.dw_cfi_reg_num);
+
+ /* Output the size of the block. */
+ loc = cfi->dw_cfi_oprnd1.dw_cfi_loc;
+ size = size_of_locs (loc);
+ dw2_asm_output_data_uleb128_raw (size);
+ fputc (',', asm_out_file);
+
+ /* Now output the operations themselves. */
+ output_loc_sequence_raw (loc);
+}
+
/* This function builds a dwarf location descriptor sequence from a
dw_cfa_location, adding the given OFFSET to the result of the
expression. */
diff --git a/gcc/except.c b/gcc/except.c
index 962dd0b8b64..77a3049ba5e 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -148,9 +148,9 @@ struct eh_region GTY(())
/* A list of catch blocks, a surrounding try block,
and the label for continuing after a catch. */
struct eh_region_u_try {
- struct eh_region *catch;
+ struct eh_region *eh_catch;
struct eh_region *last_catch;
- } GTY ((tag ("ERT_TRY"))) try;
+ } GTY ((tag ("ERT_TRY"))) eh_try;
/* The list through the catch handlers, the list of type objects
matched, and the list of associated filters. */
@@ -159,7 +159,7 @@ struct eh_region GTY(())
struct eh_region *prev_catch;
tree type_list;
tree filter_list;
- } GTY ((tag ("ERT_CATCH"))) catch;
+ } GTY ((tag ("ERT_CATCH"))) eh_catch;
/* A tree_list of allowed types. */
struct eh_region_u_allowed {
@@ -171,7 +171,7 @@ struct eh_region GTY(())
for a throw. */
struct eh_region_u_throw {
tree type;
- } GTY ((tag ("ERT_THROW"))) throw;
+ } GTY ((tag ("ERT_THROW"))) eh_throw;
/* Retain the cleanup expression even after expansion so that
we can match up fixup regions. */
@@ -479,14 +479,14 @@ gen_eh_region_catch (struct eh_region *t, tree type_or_list)
}
c = gen_eh_region (ERT_CATCH, t->outer);
- c->u.catch.type_list = type_list;
- l = t->u.try.last_catch;
- c->u.catch.prev_catch = l;
+ c->u.eh_catch.type_list = type_list;
+ l = t->u.eh_try.last_catch;
+ c->u.eh_catch.prev_catch = l;
if (l)
- l->u.catch.next_catch = c;
+ l->u.eh_catch.next_catch = c;
else
- t->u.try.catch = c;
- t->u.try.last_catch = c;
+ t->u.eh_try.eh_catch = c;
+ t->u.eh_try.last_catch = c;
return c;
}
@@ -683,7 +683,7 @@ remove_unreachable_regions (rtx insns)
/* TRY regions are reachable if any of its CATCH regions
are reachable. */
struct eh_region *c;
- for (c = r->u.try.catch; c ; c = c->u.catch.next_catch)
+ for (c = r->u.eh_try.eh_catch; c ; c = c->u.eh_catch.next_catch)
if (reachable[c->region_number])
{
kill_it = false;
@@ -988,17 +988,17 @@ duplicate_eh_regions (struct function *ifun, duplicate_eh_regions_map map,
switch (cur->type)
{
case ERT_TRY:
- if (cur->u.try.catch)
- REMAP (cur->u.try.catch);
- if (cur->u.try.last_catch)
- REMAP (cur->u.try.last_catch);
+ if (cur->u.eh_try.eh_catch)
+ REMAP (cur->u.eh_try.eh_catch);
+ if (cur->u.eh_try.last_catch)
+ REMAP (cur->u.eh_try.last_catch);
break;
case ERT_CATCH:
- if (cur->u.catch.next_catch)
- REMAP (cur->u.catch.next_catch);
- if (cur->u.catch.prev_catch)
- REMAP (cur->u.catch.prev_catch);
+ if (cur->u.eh_catch.next_catch)
+ REMAP (cur->u.eh_catch.next_catch);
+ if (cur->u.eh_catch.prev_catch)
+ REMAP (cur->u.eh_catch.prev_catch);
break;
case ERT_CLEANUP:
@@ -1290,21 +1290,21 @@ assign_filter_values (void)
case ERT_CATCH:
/* Whatever type_list is (NULL or true list), we build a list
of filters for the region. */
- r->u.catch.filter_list = NULL_TREE;
+ r->u.eh_catch.filter_list = NULL_TREE;
- if (r->u.catch.type_list != NULL)
+ if (r->u.eh_catch.type_list != NULL)
{
/* Get a filter value for each of the types caught and store
them in the region's dedicated list. */
- tree tp_node = r->u.catch.type_list;
+ tree tp_node = r->u.eh_catch.type_list;
for (;tp_node; tp_node = TREE_CHAIN (tp_node))
{
int flt = add_ttypes_entry (ttypes, TREE_VALUE (tp_node));
tree flt_node = build_int_cst (NULL_TREE, flt);
- r->u.catch.filter_list
- = tree_cons (NULL_TREE, flt_node, r->u.catch.filter_list);
+ r->u.eh_catch.filter_list
+ = tree_cons (NULL_TREE, flt_node, r->u.eh_catch.filter_list);
}
}
else
@@ -1314,8 +1314,8 @@ assign_filter_values (void)
int flt = add_ttypes_entry (ttypes, NULL);
tree flt_node = build_int_cst (NULL_TREE, flt);
- r->u.catch.filter_list
- = tree_cons (NULL_TREE, flt_node, r->u.catch.filter_list);
+ r->u.eh_catch.filter_list
+ = tree_cons (NULL_TREE, flt_node, r->u.eh_catch.filter_list);
}
break;
@@ -1400,17 +1400,17 @@ build_post_landing_pads (void)
Rapid prototyping sez a sequence of ifs. */
{
struct eh_region *c;
- for (c = region->u.try.catch; c ; c = c->u.catch.next_catch)
+ for (c = region->u.eh_try.eh_catch; c ; c = c->u.eh_catch.next_catch)
{
- if (c->u.catch.type_list == NULL)
+ if (c->u.eh_catch.type_list == NULL)
emit_jump (c->label);
else
{
/* Need for one cmp/jump per type caught. Each type
list entry has a matching entry in the filter list
(see assign_filter_values). */
- tree tp_node = c->u.catch.type_list;
- tree flt_node = c->u.catch.filter_list;
+ tree tp_node = c->u.eh_catch.type_list;
+ tree flt_node = c->u.eh_catch.filter_list;
for (; tp_node; )
{
@@ -1437,7 +1437,7 @@ build_post_landing_pads (void)
seq = get_insns ();
end_sequence ();
- emit_to_new_bb_before (seq, region->u.try.catch->label);
+ emit_to_new_bb_before (seq, region->u.eh_try.eh_catch->label);
break;
@@ -1651,7 +1651,7 @@ sjlj_find_directly_reachable_regions (struct sjlj_lp_info *lp_info)
type_thrown = NULL_TREE;
if (region->type == ERT_THROW)
{
- type_thrown = region->u.throw.type;
+ type_thrown = region->u.eh_throw.type;
region = region->outer;
}
@@ -2204,28 +2204,28 @@ remove_eh_handler (struct eh_region *region)
if (region->type == ERT_CATCH)
{
- struct eh_region *try, *next, *prev;
+ struct eh_region *eh_try, *next, *prev;
- for (try = region->next_peer;
- try->type == ERT_CATCH;
- try = try->next_peer)
+ for (eh_try = region->next_peer;
+ eh_try->type == ERT_CATCH;
+ eh_try = eh_try->next_peer)
continue;
- gcc_assert (try->type == ERT_TRY);
+ gcc_assert (eh_try->type == ERT_TRY);
- next = region->u.catch.next_catch;
- prev = region->u.catch.prev_catch;
+ next = region->u.eh_catch.next_catch;
+ prev = region->u.eh_catch.prev_catch;
if (next)
- next->u.catch.prev_catch = prev;
+ next->u.eh_catch.prev_catch = prev;
else
- try->u.try.last_catch = prev;
+ eh_try->u.eh_try.last_catch = prev;
if (prev)
- prev->u.catch.next_catch = next;
+ prev->u.eh_catch.next_catch = next;
else
{
- try->u.try.catch = next;
+ eh_try->u.eh_try.eh_catch = next;
if (! next)
- remove_eh_handler (try);
+ remove_eh_handler (eh_try);
}
}
}
@@ -2388,10 +2388,10 @@ reachable_next_level (struct eh_region *region, tree type_thrown,
struct eh_region *c;
enum reachable_code ret = RNL_NOT_CAUGHT;
- for (c = region->u.try.catch; c ; c = c->u.catch.next_catch)
+ for (c = region->u.eh_try.eh_catch; c ; c = c->u.eh_catch.next_catch)
{
/* A catch-all handler ends the search. */
- if (c->u.catch.type_list == NULL)
+ if (c->u.eh_catch.type_list == NULL)
{
add_reachable_handler (info, region, c);
return RNL_CAUGHT;
@@ -2400,7 +2400,7 @@ reachable_next_level (struct eh_region *region, tree type_thrown,
if (type_thrown)
{
/* If we have at least one type match, end the search. */
- tree tp_node = c->u.catch.type_list;
+ tree tp_node = c->u.eh_catch.type_list;
for (; tp_node; tp_node = TREE_CHAIN (tp_node))
{
@@ -2438,7 +2438,7 @@ reachable_next_level (struct eh_region *region, tree type_thrown,
ret = RNL_MAYBE_CAUGHT;
else
{
- tree tp_node = c->u.catch.type_list;
+ tree tp_node = c->u.eh_catch.type_list;
bool maybe_reachable = false;
/* Compute the potential reachability of this handler and
@@ -2562,7 +2562,7 @@ foreach_reachable_handler (int region_number, bool is_resx,
}
else if (region->type == ERT_THROW)
{
- type_thrown = region->u.throw.type;
+ type_thrown = region->u.eh_throw.type;
region = region->outer;
}
@@ -2645,7 +2645,7 @@ can_throw_internal_1 (int region_number, bool is_resx)
region = region->outer;
else if (region->type == ERT_THROW)
{
- type_thrown = region->u.throw.type;
+ type_thrown = region->u.eh_throw.type;
region = region->outer;
}
@@ -2705,7 +2705,7 @@ can_throw_external_1 (int region_number, bool is_resx)
region = region->outer;
else if (region->type == ERT_THROW)
{
- type_thrown = region->u.throw.type;
+ type_thrown = region->u.eh_throw.type;
region = region->outer;
}
@@ -3109,14 +3109,14 @@ collect_one_action_chain (htab_t ar_hash, struct eh_region *region)
search outer regions. Use a magic -3 value to record
that we haven't done the outer search. */
next = -3;
- for (c = region->u.try.last_catch; c ; c = c->u.catch.prev_catch)
+ for (c = region->u.eh_try.last_catch; c ; c = c->u.eh_catch.prev_catch)
{
- if (c->u.catch.type_list == NULL)
+ if (c->u.eh_catch.type_list == NULL)
{
/* Retrieve the filter from the head of the filter list
where we have stored it (see assign_filter_values). */
int filter
- = TREE_INT_CST_LOW (TREE_VALUE (c->u.catch.filter_list));
+ = TREE_INT_CST_LOW (TREE_VALUE (c->u.eh_catch.filter_list));
next = add_action_record (ar_hash, filter, 0);
}
@@ -3141,7 +3141,7 @@ collect_one_action_chain (htab_t ar_hash, struct eh_region *region)
next = add_action_record (ar_hash, 0, 0);
}
- flt_node = c->u.catch.filter_list;
+ flt_node = c->u.eh_catch.filter_list;
for (; flt_node; flt_node = TREE_CHAIN (flt_node))
{
int filter = TREE_INT_CST_LOW (TREE_VALUE (flt_node));
diff --git a/gcc/expr.c b/gcc/expr.c
index eae8093d61e..109ddebe5dc 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -7944,20 +7944,20 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
if (mode == BLKmode)
{
HOST_WIDE_INT size = GET_MODE_BITSIZE (ext_mode);
- rtx new;
+ rtx new_rtx;
/* If the reference doesn't use the alias set of its type,
we cannot create the temporary using that type. */
if (component_uses_parent_alias_set (exp))
{
- new = assign_stack_local (ext_mode, size, 0);
- set_mem_alias_set (new, get_alias_set (exp));
+ new_rtx = assign_stack_local (ext_mode, size, 0);
+ set_mem_alias_set (new_rtx, get_alias_set (exp));
}
else
- new = assign_stack_temp_for_type (ext_mode, size, 0, type);
+ new_rtx = assign_stack_temp_for_type (ext_mode, size, 0, type);
- emit_move_insn (new, op0);
- op0 = copy_rtx (new);
+ emit_move_insn (new_rtx, op0);
+ op0 = copy_rtx (new_rtx);
PUT_MODE (op0, BLKmode);
set_mem_attributes (op0, exp, 1);
}
@@ -8198,9 +8198,9 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
HOST_WIDE_INT temp_size
= MAX (int_size_in_bytes (inner_type),
(HOST_WIDE_INT) GET_MODE_SIZE (TYPE_MODE (type)));
- rtx new = assign_stack_temp_for_type (TYPE_MODE (type),
- temp_size, 0, type);
- rtx new_with_op0_mode = adjust_address (new, GET_MODE (op0), 0);
+ rtx new_rtx = assign_stack_temp_for_type (TYPE_MODE (type),
+ temp_size, 0, type);
+ rtx new_with_op0_mode = adjust_address (new_rtx, GET_MODE (op0), 0);
gcc_assert (!TREE_ADDRESSABLE (exp));
@@ -8212,7 +8212,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
else
emit_move_insn (new_with_op0_mode, op0);
- op0 = new;
+ op0 = new_rtx;
}
op0 = adjust_address (op0, TYPE_MODE (type), 0);
@@ -9997,16 +9997,16 @@ try_tablejump (tree index_type, tree index_expr, tree minval, tree range,
int
vector_mode_valid_p (enum machine_mode mode)
{
- enum mode_class class = GET_MODE_CLASS (mode);
+ enum mode_class mclass = GET_MODE_CLASS (mode);
enum machine_mode innermode;
/* Doh! What's going on? */
- if (class != MODE_VECTOR_INT
- && class != MODE_VECTOR_FLOAT
- && class != MODE_VECTOR_FRACT
- && class != MODE_VECTOR_UFRACT
- && class != MODE_VECTOR_ACCUM
- && class != MODE_VECTOR_UACCUM)
+ if (mclass != MODE_VECTOR_INT
+ && mclass != MODE_VECTOR_FLOAT
+ && mclass != MODE_VECTOR_FRACT
+ && mclass != MODE_VECTOR_UFRACT
+ && mclass != MODE_VECTOR_ACCUM
+ && mclass != MODE_VECTOR_UACCUM)
return 0;
/* Hardware support. Woo hoo! */
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index f8085dc3709..cb693d60c11 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -3391,17 +3391,17 @@ static int
twoval_comparison_p (tree arg, tree *cval1, tree *cval2, int *save_p)
{
enum tree_code code = TREE_CODE (arg);
- enum tree_code_class class = TREE_CODE_CLASS (code);
+ enum tree_code_class tclass = TREE_CODE_CLASS (code);
/* We can handle some of the tcc_expression cases here. */
- if (class == tcc_expression && code == TRUTH_NOT_EXPR)
- class = tcc_unary;
- else if (class == tcc_expression
+ if (tclass == tcc_expression && code == TRUTH_NOT_EXPR)
+ tclass = tcc_unary;
+ else if (tclass == tcc_expression
&& (code == TRUTH_ANDIF_EXPR || code == TRUTH_ORIF_EXPR
|| code == COMPOUND_EXPR))
- class = tcc_binary;
+ tclass = tcc_binary;
- else if (class == tcc_expression && code == SAVE_EXPR
+ else if (tclass == tcc_expression && code == SAVE_EXPR
&& ! TREE_SIDE_EFFECTS (TREE_OPERAND (arg, 0)))
{
/* If we've already found a CVAL1 or CVAL2, this expression is
@@ -3409,11 +3409,11 @@ twoval_comparison_p (tree arg, tree *cval1, tree *cval2, int *save_p)
if (*cval1 || *cval2)
return 0;
- class = tcc_unary;
+ tclass = tcc_unary;
*save_p = 1;
}
- switch (class)
+ switch (tclass)
{
case tcc_unary:
return twoval_comparison_p (TREE_OPERAND (arg, 0), cval1, cval2, save_p);
@@ -3484,16 +3484,16 @@ eval_subst (tree arg, tree old0, tree new0, tree old1, tree new1)
{
tree type = TREE_TYPE (arg);
enum tree_code code = TREE_CODE (arg);
- enum tree_code_class class = TREE_CODE_CLASS (code);
+ enum tree_code_class tclass = TREE_CODE_CLASS (code);
/* We can handle some of the tcc_expression cases here. */
- if (class == tcc_expression && code == TRUTH_NOT_EXPR)
- class = tcc_unary;
- else if (class == tcc_expression
+ if (tclass == tcc_expression && code == TRUTH_NOT_EXPR)
+ tclass = tcc_unary;
+ else if (tclass == tcc_expression
&& (code == TRUTH_ANDIF_EXPR || code == TRUTH_ORIF_EXPR))
- class = tcc_binary;
+ tclass = tcc_binary;
- switch (class)
+ switch (tclass)
{
case tcc_unary:
return fold_build1 (code, type,
diff --git a/gcc/function.c b/gcc/function.c
index 73600220c15..b3f5cbffa45 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -932,59 +932,60 @@ find_temp_slot_from_address (rtx x)
return 0;
}
-/* Indicate that NEW is an alternate way of referring to the temp slot
- that previously was known by OLD. */
+/* Indicate that NEW_RTX is an alternate way of referring to the temp
+ slot that previously was known by OLD_RTX. */
void
-update_temp_slot_address (rtx old, rtx new)
+update_temp_slot_address (rtx old_rtx, rtx new_rtx)
{
struct temp_slot *p;
- if (rtx_equal_p (old, new))
+ if (rtx_equal_p (old_rtx, new_rtx))
return;
- p = find_temp_slot_from_address (old);
+ p = find_temp_slot_from_address (old_rtx);
- /* If we didn't find one, see if both OLD is a PLUS. If so, and NEW
- is a register, see if one operand of the PLUS is a temporary
- location. If so, NEW points into it. Otherwise, if both OLD and
- NEW are a PLUS and if there is a register in common between them.
- If so, try a recursive call on those values. */
+ /* If we didn't find one, see if both OLD_RTX is a PLUS. If so, and
+ NEW_RTX is a register, see if one operand of the PLUS is a
+ temporary location. If so, NEW_RTX points into it. Otherwise,
+ if both OLD_RTX and NEW_RTX are a PLUS and if there is a register
+ in common between them. If so, try a recursive call on those
+ values. */
if (p == 0)
{
- if (GET_CODE (old) != PLUS)
+ if (GET_CODE (old_rtx) != PLUS)
return;
- if (REG_P (new))
+ if (REG_P (new_rtx))
{
- update_temp_slot_address (XEXP (old, 0), new);
- update_temp_slot_address (XEXP (old, 1), new);
+ update_temp_slot_address (XEXP (old_rtx, 0), new_rtx);
+ update_temp_slot_address (XEXP (old_rtx, 1), new_rtx);
return;
}
- else if (GET_CODE (new) != PLUS)
+ else if (GET_CODE (new_rtx) != PLUS)
return;
- if (rtx_equal_p (XEXP (old, 0), XEXP (new, 0)))
- update_temp_slot_address (XEXP (old, 1), XEXP (new, 1));
- else if (rtx_equal_p (XEXP (old, 1), XEXP (new, 0)))
- update_temp_slot_address (XEXP (old, 0), XEXP (new, 1));
- else if (rtx_equal_p (XEXP (old, 0), XEXP (new, 1)))
- update_temp_slot_address (XEXP (old, 1), XEXP (new, 0));
- else if (rtx_equal_p (XEXP (old, 1), XEXP (new, 1)))
- update_temp_slot_address (XEXP (old, 0), XEXP (new, 0));
+ if (rtx_equal_p (XEXP (old_rtx, 0), XEXP (new_rtx, 0)))
+ update_temp_slot_address (XEXP (old_rtx, 1), XEXP (new_rtx, 1));
+ else if (rtx_equal_p (XEXP (old_rtx, 1), XEXP (new_rtx, 0)))
+ update_temp_slot_address (XEXP (old_rtx, 0), XEXP (new_rtx, 1));
+ else if (rtx_equal_p (XEXP (old_rtx, 0), XEXP (new_rtx, 1)))
+ update_temp_slot_address (XEXP (old_rtx, 1), XEXP (new_rtx, 0));
+ else if (rtx_equal_p (XEXP (old_rtx, 1), XEXP (new_rtx, 1)))
+ update_temp_slot_address (XEXP (old_rtx, 0), XEXP (new_rtx, 0));
return;
}
/* Otherwise add an alias for the temp's address. */
else if (p->address == 0)
- p->address = new;
+ p->address = new_rtx;
else
{
if (GET_CODE (p->address) != EXPR_LIST)
p->address = gen_rtx_EXPR_LIST (VOIDmode, p->address, NULL_RTX);
- p->address = gen_rtx_EXPR_LIST (VOIDmode, new, p->address);
+ p->address = gen_rtx_EXPR_LIST (VOIDmode, new_rtx, p->address);
}
}
@@ -1210,7 +1211,7 @@ static int cfa_offset;
static rtx
instantiate_new_reg (rtx x, HOST_WIDE_INT *poffset)
{
- rtx new;
+ rtx new_rtx;
HOST_WIDE_INT offset;
if (x == virtual_incoming_args_rtx)
@@ -1219,24 +1220,24 @@ instantiate_new_reg (rtx x, HOST_WIDE_INT *poffset)
{
/* Replace virtual_incoming_args_rtx with internal arg
pointer if DRAP is used to realign stack. */
- new = crtl->args.internal_arg_pointer;
+ new_rtx = crtl->args.internal_arg_pointer;
offset = 0;
}
else
- new = arg_pointer_rtx, offset = in_arg_offset;
+ new_rtx = arg_pointer_rtx, offset = in_arg_offset;
}
else if (x == virtual_stack_vars_rtx)
- new = frame_pointer_rtx, offset = var_offset;
+ new_rtx = frame_pointer_rtx, offset = var_offset;
else if (x == virtual_stack_dynamic_rtx)
- new = stack_pointer_rtx, offset = dynamic_offset;
+ new_rtx = stack_pointer_rtx, offset = dynamic_offset;
else if (x == virtual_outgoing_args_rtx)
- new = stack_pointer_rtx, offset = out_arg_offset;
+ new_rtx = stack_pointer_rtx, offset = out_arg_offset;
else if (x == virtual_cfa_rtx)
{
#ifdef FRAME_POINTER_CFA_OFFSET
- new = frame_pointer_rtx;
+ new_rtx = frame_pointer_rtx;
#else
- new = arg_pointer_rtx;
+ new_rtx = arg_pointer_rtx;
#endif
offset = cfa_offset;
}
@@ -1244,7 +1245,7 @@ instantiate_new_reg (rtx x, HOST_WIDE_INT *poffset)
return NULL_RTX;
*poffset = offset;
- return new;
+ return new_rtx;
}
/* A subroutine of instantiate_virtual_regs, called via for_each_rtx.
@@ -1258,7 +1259,7 @@ instantiate_virtual_regs_in_rtx (rtx *loc, void *data)
{
HOST_WIDE_INT offset;
bool *changed = (bool *) data;
- rtx x, new;
+ rtx x, new_rtx;
x = *loc;
if (x == 0)
@@ -1267,21 +1268,21 @@ instantiate_virtual_regs_in_rtx (rtx *loc, void *data)
switch (GET_CODE (x))
{
case REG:
- new = instantiate_new_reg (x, &offset);
- if (new)
+ new_rtx = instantiate_new_reg (x, &offset);
+ if (new_rtx)
{
- *loc = plus_constant (new, offset);
+ *loc = plus_constant (new_rtx, offset);
if (changed)
*changed = true;
}
return -1;
case PLUS:
- new = instantiate_new_reg (XEXP (x, 0), &offset);
- if (new)
+ new_rtx = instantiate_new_reg (XEXP (x, 0), &offset);
+ if (new_rtx)
{
- new = plus_constant (new, offset);
- *loc = simplify_gen_binary (PLUS, GET_MODE (x), new, XEXP (x, 1));
+ new_rtx = plus_constant (new_rtx, offset);
+ *loc = simplify_gen_binary (PLUS, GET_MODE (x), new_rtx, XEXP (x, 1));
if (changed)
*changed = true;
return -1;
@@ -1327,7 +1328,7 @@ instantiate_virtual_regs_in_insn (rtx insn)
HOST_WIDE_INT offset;
int insn_code, i;
bool any_change = false;
- rtx set, new, x, seq;
+ rtx set, new_rtx, x, seq;
/* There are some special cases to be handled first. */
set = single_set (insn);
@@ -1337,17 +1338,17 @@ instantiate_virtual_regs_in_insn (rtx insn)
to mean that the underlying register gets assigned the inverse
transformation. This is used, for example, in the handling of
non-local gotos. */
- new = instantiate_new_reg (SET_DEST (set), &offset);
- if (new)
+ new_rtx = instantiate_new_reg (SET_DEST (set), &offset);
+ if (new_rtx)
{
start_sequence ();
for_each_rtx (&SET_SRC (set), instantiate_virtual_regs_in_rtx, NULL);
- x = simplify_gen_binary (PLUS, GET_MODE (new), SET_SRC (set),
+ x = simplify_gen_binary (PLUS, GET_MODE (new_rtx), SET_SRC (set),
GEN_INT (-offset));
- x = force_operand (x, new);
- if (x != new)
- emit_move_insn (new, x);
+ x = force_operand (x, new_rtx);
+ if (x != new_rtx)
+ emit_move_insn (new_rtx, x);
seq = get_insns ();
end_sequence ();
@@ -1361,15 +1362,15 @@ instantiate_virtual_regs_in_insn (rtx insn)
new add insn. The difference between this and falling through
to the generic case is avoiding a new pseudo and eliminating a
move insn in the initial rtl stream. */
- new = instantiate_new_reg (SET_SRC (set), &offset);
- if (new && offset != 0
+ new_rtx = instantiate_new_reg (SET_SRC (set), &offset);
+ if (new_rtx && offset != 0
&& REG_P (SET_DEST (set))
&& REGNO (SET_DEST (set)) > LAST_VIRTUAL_REGISTER)
{
start_sequence ();
x = expand_simple_binop (GET_MODE (SET_DEST (set)), PLUS,
- new, GEN_INT (offset), SET_DEST (set),
+ new_rtx, GEN_INT (offset), SET_DEST (set),
1, OPTAB_LIB_WIDEN);
if (x != SET_DEST (set))
emit_move_insn (SET_DEST (set), x);
@@ -1392,7 +1393,7 @@ instantiate_virtual_regs_in_insn (rtx insn)
&& recog_data.operand_loc[1] == &XEXP (SET_SRC (set), 0)
&& recog_data.operand_loc[2] == &XEXP (SET_SRC (set), 1)
&& GET_CODE (recog_data.operand[2]) == CONST_INT
- && (new = instantiate_new_reg (recog_data.operand[1], &offset)))
+ && (new_rtx = instantiate_new_reg (recog_data.operand[1], &offset)))
{
offset += INTVAL (recog_data.operand[2]);
@@ -1402,7 +1403,7 @@ instantiate_virtual_regs_in_insn (rtx insn)
&& REGNO (SET_DEST (set)) > LAST_VIRTUAL_REGISTER)
{
start_sequence ();
- emit_move_insn (SET_DEST (set), new);
+ emit_move_insn (SET_DEST (set), new_rtx);
seq = get_insns ();
end_sequence ();
@@ -1416,10 +1417,10 @@ instantiate_virtual_regs_in_insn (rtx insn)
/* Using validate_change and apply_change_group here leaves
recog_data in an invalid state. Since we know exactly what
we want to check, do those two by hand. */
- if (safe_insn_predicate (insn_code, 1, new)
+ if (safe_insn_predicate (insn_code, 1, new_rtx)
&& safe_insn_predicate (insn_code, 2, x))
{
- *recog_data.operand_loc[1] = recog_data.operand[1] = new;
+ *recog_data.operand_loc[1] = recog_data.operand[1] = new_rtx;
*recog_data.operand_loc[2] = recog_data.operand[2] = x;
any_change = true;
@@ -1474,11 +1475,11 @@ instantiate_virtual_regs_in_insn (rtx insn)
break;
case REG:
- new = instantiate_new_reg (x, &offset);
- if (new == NULL)
+ new_rtx = instantiate_new_reg (x, &offset);
+ if (new_rtx == NULL)
continue;
if (offset == 0)
- x = new;
+ x = new_rtx;
else
{
start_sequence ();
@@ -1489,7 +1490,7 @@ instantiate_virtual_regs_in_insn (rtx insn)
/* ??? Recognize address_operand and/or "p" constraints
to see if (plus new offset) is a valid before we put
this through expand_simple_binop. */
- x = expand_simple_binop (GET_MODE (x), PLUS, new,
+ x = expand_simple_binop (GET_MODE (x), PLUS, new_rtx,
GEN_INT (offset), NULL_RTX,
1, OPTAB_LIB_WIDEN);
seq = get_insns ();
@@ -1499,21 +1500,21 @@ instantiate_virtual_regs_in_insn (rtx insn)
break;
case SUBREG:
- new = instantiate_new_reg (SUBREG_REG (x), &offset);
- if (new == NULL)
+ new_rtx = instantiate_new_reg (SUBREG_REG (x), &offset);
+ if (new_rtx == NULL)
continue;
if (offset != 0)
{
start_sequence ();
- new = expand_simple_binop (GET_MODE (new), PLUS, new,
+ new_rtx = expand_simple_binop (GET_MODE (new_rtx), PLUS, new_rtx,
GEN_INT (offset), NULL_RTX,
1, OPTAB_LIB_WIDEN);
seq = get_insns ();
end_sequence ();
emit_insn_before (seq, insn);
}
- x = simplify_gen_subreg (recog_data.operand_mode[i], new,
- GET_MODE (new), SUBREG_BYTE (x));
+ x = simplify_gen_subreg (recog_data.operand_mode[i], new_rtx,
+ GET_MODE (new_rtx), SUBREG_BYTE (x));
break;
default:
diff --git a/gcc/gengtype.c b/gcc/gengtype.c
index adc355a3881..02923a952d9 100644
--- a/gcc/gengtype.c
+++ b/gcc/gengtype.c
@@ -314,6 +314,10 @@ read_input_line (FILE *list, char **herep, char **linep,
char *line;
int c = getc (list);
+ /* Read over whitespace. */
+ while (c == '\n' || c == ' ')
+ c = getc (list);
+
if (c == EOF)
{
*linep = 0;
diff --git a/gcc/gimple.c b/gcc/gimple.c
index 69cfd4e1db8..2d097c733e7 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -370,22 +370,22 @@ void
extract_ops_from_tree (tree expr, enum tree_code *subcode_p, tree *op1_p,
tree *op2_p)
{
- enum gimple_rhs_class class;
+ enum gimple_rhs_class grhs_class;
*subcode_p = TREE_CODE (expr);
- class = get_gimple_rhs_class (*subcode_p);
+ grhs_class = get_gimple_rhs_class (*subcode_p);
- if (class == GIMPLE_BINARY_RHS)
+ if (grhs_class == GIMPLE_BINARY_RHS)
{
*op1_p = TREE_OPERAND (expr, 0);
*op2_p = TREE_OPERAND (expr, 1);
}
- else if (class == GIMPLE_UNARY_RHS)
+ else if (grhs_class == GIMPLE_UNARY_RHS)
{
*op1_p = TREE_OPERAND (expr, 0);
*op2_p = NULL_TREE;
}
- else if (class == GIMPLE_SINGLE_RHS)
+ else if (grhs_class == GIMPLE_SINGLE_RHS)
{
*op1_p = expr;
*op2_p = NULL_TREE;
@@ -1276,16 +1276,16 @@ gimple_seq
gimple_seq_copy (gimple_seq src)
{
gimple_stmt_iterator gsi;
- gimple_seq new = gimple_seq_alloc ();
+ gimple_seq new_seq = gimple_seq_alloc ();
gimple stmt;
for (gsi = gsi_start (src); !gsi_end_p (gsi); gsi_next (&gsi))
{
stmt = gimple_copy (gsi_stmt (gsi));
- gimple_seq_add_stmt (&new, stmt);
+ gimple_seq_add_stmt (&new_seq, stmt);
}
- return new;
+ return new_seq;
}
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index e7fc1679aa3..f22111d4cd7 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -2294,14 +2294,14 @@ gimplify_call_expr (tree *expr_p, gimple_seq *pre_p, bool want_value)
fndecl = get_callee_fndecl (*expr_p);
if (fndecl && DECL_BUILT_IN (fndecl))
{
- tree new = fold_call_expr (*expr_p, !want_value);
+ tree new_tree = fold_call_expr (*expr_p, !want_value);
- if (new && new != *expr_p)
+ if (new_tree && new_tree != *expr_p)
{
/* There was a transformation of this call which computes the
same value, but in a more efficient way. Return and try
again. */
- *expr_p = new;
+ *expr_p = new_tree;
return GS_OK;
}
@@ -2452,14 +2452,14 @@ gimplify_call_expr (tree *expr_p, gimple_seq *pre_p, bool want_value)
/* Try this again in case gimplification exposed something. */
if (ret != GS_ERROR)
{
- tree new = fold_call_expr (*expr_p, !want_value);
+ tree new_tree = fold_call_expr (*expr_p, !want_value);
- if (new && new != *expr_p)
+ if (new_tree && new_tree != *expr_p)
{
/* There was a transformation of this call which computes the
same value, but in a more efficient way. Return and try
again. */
- *expr_p = new;
+ *expr_p = new_tree;
return GS_OK;
}
}
@@ -3636,25 +3636,25 @@ gimplify_init_constructor (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
if (size > 0 && !can_move_by_pieces (size, align))
{
- tree new;
+ tree new_tree;
if (notify_temp_creation)
return GS_ERROR;
- new = create_tmp_var_raw (type, "C");
+ new_tree = create_tmp_var_raw (type, "C");
- gimple_add_tmp_var (new);
- TREE_STATIC (new) = 1;
- TREE_READONLY (new) = 1;
- DECL_INITIAL (new) = ctor;
- if (align > DECL_ALIGN (new))
+ gimple_add_tmp_var (new_tree);
+ TREE_STATIC (new_tree) = 1;
+ TREE_READONLY (new_tree) = 1;
+ DECL_INITIAL (new_tree) = ctor;
+ if (align > DECL_ALIGN (new_tree))
{
- DECL_ALIGN (new) = align;
- DECL_USER_ALIGN (new) = 1;
+ DECL_ALIGN (new_tree) = align;
+ DECL_USER_ALIGN (new_tree) = 1;
}
- walk_tree (&DECL_INITIAL (new), force_labels_r, NULL, NULL);
+ walk_tree (&DECL_INITIAL (new_tree), force_labels_r, NULL, NULL);
- TREE_OPERAND (*expr_p, 1) = new;
+ TREE_OPERAND (*expr_p, 1) = new_tree;
/* This is no longer an assignment of a CONSTRUCTOR, but
we still may have processing to do on the LHS. So
@@ -4217,7 +4217,7 @@ gimplify_modify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
side as statements and throw away the assignment. Do this after
gimplify_modify_expr_rhs so we handle TARGET_EXPRs of addressable
types properly. */
- if (zero_sized_type (TREE_TYPE (*from_p)))
+ if (zero_sized_type (TREE_TYPE (*from_p)) && !want_value)
{
gimplify_stmt (from_p, pre_p);
gimplify_stmt (to_p, pre_p);
@@ -4844,7 +4844,7 @@ gimplify_cleanup_point_expr (tree *expr_p, gimple_seq *pre_p)
}
else
{
- gimple try;
+ gimple gtry;
gimple_seq seq;
enum gimple_try_flags kind;
@@ -4854,10 +4854,10 @@ gimplify_cleanup_point_expr (tree *expr_p, gimple_seq *pre_p)
kind = GIMPLE_TRY_FINALLY;
seq = gsi_split_seq_after (iter);
- try = gimple_build_try (seq, gimple_wce_cleanup (wce), kind);
+ gtry = gimple_build_try (seq, gimple_wce_cleanup (wce), kind);
/* Do not use gsi_replace here, as it may scan operands.
We want to do a simple structural modification only. */
- *gsi_stmt_ptr (&iter) = try;
+ *gsi_stmt_ptr (&iter) = gtry;
iter = gsi_start (seq);
}
}
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index d614986b49c..76282bd0ced 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -544,8 +544,6 @@ static void change_queue_index (rtx, int);
static void extend_h_i_d (void);
static void extend_ready (int);
-static void extend_global (rtx);
-static void extend_all (rtx);
static void init_h_i_d (rtx);
static void generate_recovery_code (rtx);
static void process_insn_forw_deps_be_in_spec (rtx, rtx, ds_t);
@@ -3188,36 +3186,45 @@ extend_ready (int n_new_insns)
choice_stack[i].state = xmalloc (dfa_state_size);
}
-/* Extend global scheduler structures (those, that live across calls to
- schedule_block) to include information about just emitted INSN. */
+/* Extend global-scope scheduler data structures
+ (those, that live within one call to schedule_insns)
+ to include information about just emitted INSN. */
static void
-extend_global (rtx insn)
+extend_global_data (rtx insn)
{
gcc_assert (INSN_P (insn));
- /* These structures have scheduler scope. */
-
/* Init h_i_d. */
extend_h_i_d ();
init_h_i_d (insn);
- /* Init data handled in sched-deps.c. */
- sd_init_insn (insn);
-
/* Extend dependency caches by one element. */
extend_dependency_caches (1, false);
}
-/* Extends global and local scheduler structures to include information
- about just emitted INSN. */
+/* Extend global- and region-scope scheduler data structures
+ (those, that live within one call to schedule_region)
+ to include information about just emitted INSN. */
+static void
+extend_region_data (rtx insn)
+{
+ extend_global_data (insn);
+
+ /* Init dependency data. */
+ sd_init_insn (insn);
+}
+
+/* Extend global-, region- and block-scope scheduler data structures
+ (those, that live within one call to schedule_block)
+ to include information about just emitted INSN. */
static void
-extend_all (rtx insn)
-{
- extend_global (insn);
+extend_block_data (rtx insn)
+{
+ extend_region_data (insn);
/* These structures have block scope. */
extend_ready (1);
-
+
(*current_sched_info->add_remove_insn) (insn, 0);
}
@@ -3391,7 +3398,7 @@ add_to_speculative_block (rtx insn)
rec = BLOCK_FOR_INSN (check);
twin = emit_insn_before (copy_insn (PATTERN (insn)), BB_END (rec));
- extend_global (twin);
+ extend_region_data (twin);
sd_copy_back_deps (twin, insn, true);
@@ -3581,7 +3588,7 @@ init_before_recovery (void)
x = emit_jump_insn_after (gen_jump (label), BB_END (single));
JUMP_LABEL (x) = label;
LABEL_NUSES (label)++;
- extend_global (x);
+ extend_global_data (x);
emit_barrier_after (x);
@@ -3681,7 +3688,7 @@ create_check_block_twin (rtx insn, bool mutate_p)
check = emit_insn_before (check, insn);
/* Extend data structures. */
- extend_all (check);
+ extend_block_data (check);
RECOVERY_BLOCK (check) = rec;
if (sched_verbose && spec_info->dump)
@@ -3708,7 +3715,7 @@ create_check_block_twin (rtx insn, bool mutate_p)
}
twin = emit_insn_after (ORIG_PAT (insn), BB_END (rec));
- extend_global (twin);
+ extend_region_data (twin);
if (sched_verbose && spec_info->dump)
/* INSN_BB (insn) isn't determined for twin insns yet.
@@ -3761,7 +3768,7 @@ create_check_block_twin (rtx insn, bool mutate_p)
jump = emit_jump_insn_after (gen_jump (label), BB_END (rec));
JUMP_LABEL (jump) = label;
LABEL_NUSES (label)++;
- extend_global (jump);
+ extend_region_data (jump);
if (BB_PARTITION (second_bb) != BB_PARTITION (rec))
/* Partition type is the same, if it is "unpartitioned". */
@@ -4012,32 +4019,6 @@ change_pattern (rtx insn, rtx new_pat)
dfa_clear_single_insn_cache (insn);
}
-/* Return true if INSN can potentially be speculated with type DS. */
-bool
-sched_insn_is_legitimate_for_speculation_p (const_rtx insn, ds_t ds)
-{
- if (HAS_INTERNAL_DEP (insn))
- return false;
-
- if (!NONJUMP_INSN_P (insn))
- return false;
-
- if (SCHED_GROUP_P (insn))
- return false;
-
- if (IS_SPECULATION_CHECK_P (insn))
- return false;
-
- if (side_effects_p (PATTERN (insn)))
- return false;
-
- if ((ds & BE_IN_SPEC)
- && may_trap_p (PATTERN (insn)))
- return false;
-
- return true;
-}
-
/* -1 - can't speculate,
0 - for speculation with REQUEST mode it is OK to use
current instruction pattern,
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index af1cc0fd787..8ad6ddb3fec 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -281,15 +281,17 @@ ipcp_lattice_from_jfunc (struct ipa_node_params *info, struct ipcp_lattice *lat,
lat->type = IPA_BOTTOM;
}
-/* True when OLD and NEW values are not the same. */
+/* True when OLD_LAT and NEW_LAT values are not the same. */
+
static bool
-ipcp_lattice_changed (struct ipcp_lattice *old, struct ipcp_lattice *new)
+ipcp_lattice_changed (struct ipcp_lattice *old_lat,
+ struct ipcp_lattice *new_lat)
{
- if (old->type == new->type)
+ if (old_lat->type == new_lat->type)
{
- if (!ipcp_lat_is_const (old))
+ if (!ipcp_lat_is_const (old_lat))
return false;
- if (ipcp_lats_are_equal (old, new))
+ if (ipcp_lats_are_equal (old_lat, new_lat))
return false;
}
return true;
diff --git a/gcc/jump.c b/gcc/jump.c
index 595363b1adb..c0ab6909a2a 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -1552,12 +1552,22 @@ rtx_renumbered_equal_p (const_rtx x, const_rtx y)
if (reg_renumber[reg_x] >= 0)
{
+ if (!subreg_offset_representable_p (reg_renumber[reg_x],
+ GET_MODE (SUBREG_REG (x)),
+ byte_x,
+ GET_MODE (x)))
+ return 0;
reg_x = subreg_regno_offset (reg_renumber[reg_x],
GET_MODE (SUBREG_REG (x)),
byte_x,
GET_MODE (x));
byte_x = 0;
}
+ else if (!subreg_offset_representable_p (reg_x,
+ GET_MODE (SUBREG_REG (x)),
+ byte_x,
+ GET_MODE (x)))
+ return 0;
}
else
{
@@ -1573,12 +1583,22 @@ rtx_renumbered_equal_p (const_rtx x, const_rtx y)
if (reg_renumber[reg_y] >= 0)
{
+ if (!subreg_offset_representable_p (reg_renumber[reg_y],
+ GET_MODE (SUBREG_REG (y)),
+ byte_y,
+ GET_MODE (y)))
+ return 0;
reg_y = subreg_regno_offset (reg_renumber[reg_y],
GET_MODE (SUBREG_REG (y)),
byte_y,
GET_MODE (y));
byte_y = 0;
}
+ else if (!subreg_offset_representable_p (reg_y,
+ GET_MODE (SUBREG_REG (y)),
+ byte_y,
+ GET_MODE (y)))
+ return 0;
}
else
{
diff --git a/gcc/matrix-reorg.c b/gcc/matrix-reorg.c
index 846a813898f..66145518f53 100644
--- a/gcc/matrix-reorg.c
+++ b/gcc/matrix-reorg.c
@@ -1755,16 +1755,20 @@ record_all_accesses_in_func (void)
sbitmap_free (visited_stmts_1);
}
-/* Used when we want to convert the expression: RESULT = something * ORIG to RESULT = something * NEW. If ORIG and NEW are power of 2, shift operations can be done, else division and multiplication. */
+/* Used when we want to convert the expression: RESULT = something *
+ ORIG to RESULT = something * NEW_VAL. If ORIG and NEW_VAL are power
+ of 2, shift operations can be done, else division and
+ multiplication. */
+
static tree
-compute_offset (HOST_WIDE_INT orig, HOST_WIDE_INT new, tree result)
+compute_offset (HOST_WIDE_INT orig, HOST_WIDE_INT new_val, tree result)
{
int x, y;
tree result1, ratio, log, orig_tree, new_tree;
x = exact_log2 (orig);
- y = exact_log2 (new);
+ y = exact_log2 (new_val);
if (x != -1 && y != -1)
{
@@ -1783,7 +1787,7 @@ compute_offset (HOST_WIDE_INT orig, HOST_WIDE_INT new, tree result)
return result1;
}
orig_tree = build_int_cst (TREE_TYPE (result), orig);
- new_tree = build_int_cst (TREE_TYPE (result), new);
+ new_tree = build_int_cst (TREE_TYPE (result), new_val);
ratio = fold_build2 (TRUNC_DIV_EXPR, TREE_TYPE (result), result, orig_tree);
result1 = fold_build2 (MULT_EXPR, TREE_TYPE (result), ratio, new_tree);
diff --git a/gcc/passes.c b/gcc/passes.c
index 400717f79b7..64470ba2b0b 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -447,13 +447,13 @@ next_pass_1 (struct opt_pass **list, struct opt_pass *pass)
pass is already in the list. */
if (pass->static_pass_number)
{
- struct opt_pass *new;
+ struct opt_pass *new_pass;
- new = XNEW (struct opt_pass);
- memcpy (new, pass, sizeof (*new));
- new->next = NULL;
+ new_pass = XNEW (struct opt_pass);
+ memcpy (new_pass, pass, sizeof (*new_pass));
+ new_pass->next = NULL;
- new->todo_flags_start &= ~TODO_mark_first_instance;
+ new_pass->todo_flags_start &= ~TODO_mark_first_instance;
/* Indicate to register_dump_files that this pass has duplicates,
and so it should rename the dump file. The first instance will
@@ -462,10 +462,10 @@ next_pass_1 (struct opt_pass **list, struct opt_pass *pass)
if (pass->name)
{
pass->static_pass_number -= 1;
- new->static_pass_number = -pass->static_pass_number;
+ new_pass->static_pass_number = -pass->static_pass_number;
}
- *list = new;
+ *list = new_pass;
}
else
{
diff --git a/gcc/predict.c b/gcc/predict.c
index 853c0c6f70d..e90b95c0683 100644
--- a/gcc/predict.c
+++ b/gcc/predict.c
@@ -118,6 +118,8 @@ maybe_hot_frequency_p (int freq)
if (cfun->function_frequency == FUNCTION_FREQUENCY_HOT)
return true;
}
+ if (profile_status == PROFILE_ABSENT)
+ return true;
if (freq < BB_FREQ_MAX / PARAM_VALUE (HOT_BB_FREQUENCY_FRACTION))
return false;
return true;
diff --git a/gcc/print-tree.c b/gcc/print-tree.c
index b76a180fbdb..16ba3929fab 100644
--- a/gcc/print-tree.c
+++ b/gcc/print-tree.c
@@ -74,12 +74,12 @@ dump_addr (FILE *file, const char *prefix, const void *addr)
void
print_node_brief (FILE *file, const char *prefix, const_tree node, int indent)
{
- enum tree_code_class class;
+ enum tree_code_class tclass;
if (node == 0)
return;
- class = TREE_CODE_CLASS (TREE_CODE (node));
+ tclass = TREE_CODE_CLASS (TREE_CODE (node));
/* Always print the slot this node is in, and its code, address and
name if any. */
@@ -88,7 +88,7 @@ print_node_brief (FILE *file, const char *prefix, const_tree node, int indent)
fprintf (file, "%s <%s", prefix, tree_code_name[(int) TREE_CODE (node)]);
dump_addr (file, " ", node);
- if (class == tcc_declaration)
+ if (tclass == tcc_declaration)
{
if (DECL_NAME (node))
fprintf (file, " %s", IDENTIFIER_POINTER (DECL_NAME (node)));
@@ -99,7 +99,7 @@ print_node_brief (FILE *file, const char *prefix, const_tree node, int indent)
fprintf (file, " %c.%u", TREE_CODE (node) == CONST_DECL ? 'C' : 'D',
DECL_UID (node));
}
- else if (class == tcc_type)
+ else if (tclass == tcc_type)
{
if (TYPE_NAME (node))
{
@@ -188,7 +188,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
int hash;
struct bucket *b;
enum machine_mode mode;
- enum tree_code_class class;
+ enum tree_code_class tclass;
int len;
int i;
expanded_location xloc;
@@ -198,7 +198,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
return;
code = TREE_CODE (node);
- class = TREE_CODE_CLASS (code);
+ tclass = TREE_CODE_CLASS (code);
/* Don't get too deep in nesting. If the user wants to see deeper,
it is easy to use the address of a lowest-level node
@@ -210,7 +210,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
return;
}
- if (indent > 8 && (class == tcc_type || class == tcc_declaration))
+ if (indent > 8 && (tclass == tcc_type || tclass == tcc_declaration))
{
print_node_brief (file, prefix, node, indent);
return;
@@ -251,7 +251,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
dump_addr (file, " ", node);
/* Print the name, if any. */
- if (class == tcc_declaration)
+ if (tclass == tcc_declaration)
{
if (DECL_NAME (node))
fprintf (file, " %s", IDENTIFIER_POINTER (DECL_NAME (node)));
@@ -262,7 +262,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
fprintf (file, " %c.%u", TREE_CODE (node) == CONST_DECL ? 'C' : 'D',
DECL_UID (node));
}
- else if (class == tcc_type)
+ else if (tclass == tcc_type)
{
if (TYPE_NAME (node))
{
diff --git a/gcc/profile.c b/gcc/profile.c
index b6cddc2295f..7489579ca27 100644
--- a/gcc/profile.c
+++ b/gcc/profile.c
@@ -821,8 +821,8 @@ branch_prob (void)
|| (LOCATION_LINE (e->goto_locus)
!= LOCATION_LINE (gimple_location (last)))))
{
- basic_block new = split_edge (e);
- single_succ_edge (new)->goto_locus = e->goto_locus;
+ basic_block new_bb = split_edge (e);
+ single_succ_edge (new_bb)->goto_locus = e->goto_locus;
}
if ((e->flags & (EDGE_ABNORMAL | EDGE_ABNORMAL_CALL))
&& e->dest != EXIT_BLOCK_PTR)
diff --git a/gcc/reload.c b/gcc/reload.c
index a6ea4ff4e5a..5a79c44e874 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -1403,13 +1403,36 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
else
remove_address_replacements (rld[i].in);
}
- rld[i].in = in;
- rld[i].in_reg = in_reg;
+ /* When emitting reloads we don't necessarily look at the in-
+ and outmode, but also directly at the operands (in and out).
+ So we can't simply overwrite them with whatever we have found
+ for this (to-be-merged) reload, we have to "merge" that too.
+ Reusing another reload already verified that we deal with the
+ same operands, just possibly in different modes. So we
+ overwrite the operands only when the new mode is larger.
+ See also PR33613. */
+ if (!rld[i].in
+ || GET_MODE_SIZE (GET_MODE (in))
+ > GET_MODE_SIZE (GET_MODE (rld[i].in)))
+ rld[i].in = in;
+ if (!rld[i].in_reg
+ || (in_reg
+ && GET_MODE_SIZE (GET_MODE (in_reg))
+ > GET_MODE_SIZE (GET_MODE (rld[i].in_reg))))
+ rld[i].in_reg = in_reg;
}
if (out != 0)
{
- rld[i].out = out;
- rld[i].out_reg = outloc ? *outloc : 0;
+ if (!rld[i].out
+ || (out
+ && GET_MODE_SIZE (GET_MODE (out))
+ > GET_MODE_SIZE (GET_MODE (rld[i].out))))
+ rld[i].out = out;
+ if (outloc
+ && (!rld[i].out_reg
+ || GET_MODE_SIZE (GET_MODE (*outloc))
+ > GET_MODE_SIZE (GET_MODE (rld[i].out_reg))))
+ rld[i].out_reg = *outloc;
}
if (reg_class_subset_p (rclass, rld[i].rclass))
rld[i].rclass = rclass;
@@ -3843,49 +3866,61 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
/* Any constants that aren't allowed and can't be reloaded
into registers are here changed into memory references. */
for (i = 0; i < noperands; i++)
- if (! goal_alternative_win[i]
- && CONST_POOL_OK_P (recog_data.operand[i])
- && ((PREFERRED_RELOAD_CLASS (recog_data.operand[i],
- (enum reg_class) goal_alternative[i])
- == NO_REGS)
- || no_input_reloads)
- && operand_mode[i] != VOIDmode)
+ if (! goal_alternative_win[i])
{
- int this_address_reloaded;
+ rtx op = recog_data.operand[i];
+ rtx subreg = NULL_RTX;
+ rtx plus = NULL_RTX;
+ enum machine_mode mode = operand_mode[i];
+
+ /* Reloads of SUBREGs of CONSTANT RTXs are handled later in
+ push_reload so we have to let them pass here. */
+ if (GET_CODE (op) == SUBREG)
+ {
+ subreg = op;
+ op = SUBREG_REG (op);
+ mode = GET_MODE (op);
+ }
- this_address_reloaded = 0;
- substed_operand[i] = recog_data.operand[i]
- = find_reloads_toplev (force_const_mem (operand_mode[i],
- recog_data.operand[i]),
- i, address_type[i], ind_levels, 0, insn,
- &this_address_reloaded);
- if (alternative_allows_const_pool_ref (this_address_reloaded == 0
- ? substed_operand[i]
- : NULL,
- recog_data.constraints[i],
- goal_alternative_number))
- goal_alternative_win[i] = 1;
- }
+ if (GET_CODE (op) == PLUS)
+ {
+ plus = op;
+ op = XEXP (op, 1);
+ }
- /* Likewise any invalid constants appearing as operand of a PLUS
- that is to be reloaded. */
- for (i = 0; i < noperands; i++)
- if (! goal_alternative_win[i]
- && GET_CODE (recog_data.operand[i]) == PLUS
- && CONST_POOL_OK_P (XEXP (recog_data.operand[i], 1))
- && (PREFERRED_RELOAD_CLASS (XEXP (recog_data.operand[i], 1),
- (enum reg_class) goal_alternative[i])
- == NO_REGS)
- && operand_mode[i] != VOIDmode)
- {
- rtx tem = force_const_mem (operand_mode[i],
- XEXP (recog_data.operand[i], 1));
- tem = gen_rtx_PLUS (operand_mode[i],
- XEXP (recog_data.operand[i], 0), tem);
+ if (CONST_POOL_OK_P (op)
+ && ((PREFERRED_RELOAD_CLASS (op,
+ (enum reg_class) goal_alternative[i])
+ == NO_REGS)
+ || no_input_reloads)
+ && mode != VOIDmode)
+ {
+ int this_address_reloaded;
+ rtx tem = force_const_mem (mode, op);
- substed_operand[i] = recog_data.operand[i]
- = find_reloads_toplev (tem, i, address_type[i],
- ind_levels, 0, insn, NULL);
+ /* If we stripped a SUBREG or a PLUS above add it back. */
+ if (plus != NULL_RTX)
+ tem = gen_rtx_PLUS (mode, XEXP (plus, 0), tem);
+
+ if (subreg != NULL_RTX)
+ tem = gen_rtx_SUBREG (operand_mode[i], tem, SUBREG_BYTE (subreg));
+
+ this_address_reloaded = 0;
+ substed_operand[i] = recog_data.operand[i]
+ = find_reloads_toplev (tem, i, address_type[i], ind_levels,
+ 0, insn, &this_address_reloaded);
+
+ /* If the alternative accepts constant pool refs directly
+ there will be no reload needed at all. */
+ if (plus == NULL_RTX
+ && subreg == NULL_RTX
+ && alternative_allows_const_pool_ref (this_address_reloaded == 0
+ ? substed_operand[i]
+ : NULL,
+ recog_data.constraints[i],
+ goal_alternative_number))
+ goal_alternative_win[i] = 1;
+ }
}
/* Record the values of the earlyclobber operands for the caller. */
diff --git a/gcc/reorg.c b/gcc/reorg.c
index 25f410aad2d..59c6eecf2c2 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -1529,12 +1529,12 @@ try_merge_delay_insns (rtx insn, rtx thread)
{
if (! annul_p)
{
- rtx new;
+ rtx new_rtx;
update_block (dtrial, thread);
- new = delete_from_delay_slot (dtrial);
+ new_rtx = delete_from_delay_slot (dtrial);
if (INSN_DELETED_P (thread))
- thread = new;
+ thread = new_rtx;
INSN_FROM_TARGET_P (next_to_match) = 0;
}
else
@@ -1567,12 +1567,12 @@ try_merge_delay_insns (rtx insn, rtx thread)
{
if (GET_MODE (merged_insns) == SImode)
{
- rtx new;
+ rtx new_rtx;
update_block (XEXP (merged_insns, 0), thread);
- new = delete_from_delay_slot (XEXP (merged_insns, 0));
+ new_rtx = delete_from_delay_slot (XEXP (merged_insns, 0));
if (INSN_DELETED_P (thread))
- thread = new;
+ thread = new_rtx;
}
else
{
diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c
index b8b3a4418df..bbd7a36a441 100644
--- a/gcc/sched-deps.c
+++ b/gcc/sched-deps.c
@@ -536,6 +536,46 @@ sched_insns_conditions_mutex_p (const_rtx insn1, const_rtx insn2)
}
+/* Return true if INSN can potentially be speculated with type DS. */
+bool
+sched_insn_is_legitimate_for_speculation_p (const_rtx insn, ds_t ds)
+{
+ if (HAS_INTERNAL_DEP (insn))
+ return false;
+
+ if (!NONJUMP_INSN_P (insn))
+ return false;
+
+ if (SCHED_GROUP_P (insn))
+ return false;
+
+ if (IS_SPECULATION_CHECK_P (insn))
+ return false;
+
+ if (side_effects_p (PATTERN (insn)))
+ return false;
+
+ if (ds & BE_IN_SPEC)
+ /* The following instructions, which depend on a speculatively scheduled
+ instruction, cannot be speculatively scheduled along. */
+ {
+ if (may_trap_p (PATTERN (insn)))
+ /* If instruction might trap, it cannot be speculatively scheduled.
+ For control speculation it's obvious why and for data speculation
+ it's because the insn might get wrong input if speculation
+ wasn't successful. */
+ return false;
+
+ if ((ds & BE_IN_DATA)
+ && sched_get_condition (insn) != NULL_RTX)
+ /* If this is a predicated instruction, then it cannot be
+ speculatively scheduled. See PR35659. */
+ return false;
+ }
+
+ return true;
+}
+
/* Initialize LIST_PTR to point to one of the lists present in TYPES_PTR,
initialize RESOLVED_P_PTR with true if that list consists of resolved deps,
and remove the type of returned [through LIST_PTR] list from TYPES_PTR.
diff --git a/gcc/sched-int.h b/gcc/sched-int.h
index f2e39bf4fc3..bfbb8612456 100644
--- a/gcc/sched-int.h
+++ b/gcc/sched-int.h
@@ -805,6 +805,7 @@ enum INSN_TRAP_CLASS
/* Functions in sched-deps.c. */
extern bool sched_insns_conditions_mutex_p (const_rtx, const_rtx);
+extern bool sched_insn_is_legitimate_for_speculation_p (const_rtx, ds_t);
extern void add_dependence (rtx, rtx, enum reg_note);
extern void sched_analyze (struct deps *, rtx, rtx);
extern bool deps_pools_are_empty_p (void);
@@ -838,7 +839,6 @@ extern void sched_finish (void);
extern int try_ready (rtx);
extern void * xrecalloc (void *, size_t, size_t, size_t);
-extern bool sched_insn_is_legitimate_for_speculation_p (const_rtx, ds_t);
extern void unlink_bb_notes (basic_block, basic_block);
extern void add_block (basic_block, basic_block);
extern rtx bb_note (basic_block);
diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c
index 28f528302ff..9304536b580 100644
--- a/gcc/sched-rgn.c
+++ b/gcc/sched-rgn.c
@@ -2108,9 +2108,22 @@ new_ready (rtx next, ds_t ts)
But we possibly can handle that with control speculation. */
&& (current_sched_info->flags & DO_SPECULATION)
&& (spec_info->mask & BEGIN_CONTROL))
- /* Here we got new control-speculative instruction. */
- ts = set_dep_weak (ts, BEGIN_CONTROL, MAX_DEP_WEAK);
+ {
+ ds_t new_ds;
+
+ /* Add control speculation to NEXT's dependency type. */
+ new_ds = set_dep_weak (ts, BEGIN_CONTROL, MAX_DEP_WEAK);
+
+ /* Check if NEXT can be speculated with new dependency type. */
+ if (sched_insn_is_legitimate_for_speculation_p (next, new_ds))
+ /* Here we got new control-speculative instruction. */
+ ts = new_ds;
+ else
+ /* NEXT isn't ready yet. */
+ ts = (ts & ~SPECULATIVE) | HARD_DEP;
+ }
else
+ /* NEXT isn't ready yet. */
ts = (ts & ~SPECULATIVE) | HARD_DEP;
}
}
@@ -2584,7 +2597,6 @@ debug_rgn_dependencies (int from_bb)
{
rtx head, tail;
- gcc_assert (EBB_FIRST_BB (bb) == EBB_LAST_BB (bb));
get_ebb_head_tail (EBB_FIRST_BB (bb), EBB_LAST_BB (bb), &head, &tail);
fprintf (sched_dump, "\n;; --- Region Dependences --- b %d bb %d \n",
BB_TO_BLOCK (bb), bb);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index dda2c2a34f8..e53ea0b2814 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,78 @@
+2008-08-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * gcc.dg/Wcxx-compat-2.c: Adjust test for more warnings.
+
+2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
+
+ PR 26785
+ * g++.dg/warn/pr26785.C: New.
+
+2008-08-06 Victor Kaplansky <victork@il.ibm.com>
+
+ * gcc.dg/vect/costmodel/ppc/costmodel-slp-34.c: New test.
+
+2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
+
+ PR 8715
+ * gcc.dg/pr8715.c: New.
+ * g++.dg/warn/pr8715.C: New.
+
+2008-08-06 Marc Gauthier <marc@tensilica.com>
+
+ * lib/target-supports.exp (check_profiling_available): Match more
+ processor names for Xtensa.
+ * g++.old-deja/g++.jason/thunk3.C: Likewise.
+ * gcc.dg/intmax_t-1.c: Likewise.
+ * gcc.dg/sibcall-3.c: Likewise.
+ * gcc.dg/sibcall-4.c: Likewise.
+ * gcc.c-torture/compile/20001226-1.c: Likewise.
+
+2008-08-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR middle-end/37010
+ * gcc.dg/torture/stackalign/push-1.c: New.
+
+2008-08-06 Michael Matz <matz@suse.de>
+
+ PR target/36613
+ * gcc.target/i386/pr36613.c: New testcase.
+
+2008-08-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR middle-end/37009
+ * gcc.dg/torture/stackalign/alloca-2.c: New.
+ * gcc.dg/torture/stackalign/alloca-3.c: Likewise.
+ * gcc.dg/torture/stackalign/alloca-4.c: Likewise.
+ * gcc.dg/torture/stackalign/vararg-3.c: Likewise.
+ * gcc.target/i386/incoming-1.c: Likewise.
+ * gcc.target/i386/incoming-2.c: Likewise.
+ * gcc.target/i386/incoming-3.c: Likewise.
+ * gcc.target/i386/incoming-4.c: Likewise.
+ * gcc.target/i386/incoming-5.c: Likewise.
+
+2008-08-06 Aldy Hernandez <aldyh@redhat.com>
+
+ PR middle-end/35432
+ * gcc.c-torture/compile/pr35432.c: New file.
+
+2008-08-06 Arnaud Charlet <charlet@adacore.com>
+
+ * gnat.dg/iface_test.ad[s,b]: New test.
+ * gnat.dg/test_call.adb: New test.
+
+2008-08-06 Andreas Krebbel <krebbel1@de.ibm.com>
+
+ * gcc.c-torture/compile/20080806-1.c: New testcase.
+
+2008-08-06 Maxim Kuvyrkov <maxim@codesourcery.com>
+
+ * gcc.target/ia64/20080802-1.c: New test.
+
+2008-08-05 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ PR tree-opt/37024
+ * gcc.dg/tree-ssa/tailcall-4.c: New testcase.
+
2008-08-05 Richard Guenther <rguenther@suse.de>
PR middle-end/37026
diff --git a/gcc/testsuite/g++.dg/opt/pmf1.C b/gcc/testsuite/g++.dg/opt/pmf1.C
new file mode 100644
index 00000000000..428e7530b2c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pmf1.C
@@ -0,0 +1,76 @@
+// PR c++/37016
+// { dg-do run }
+// { dg-options "-O2 -Wall" }
+
+/*
+ Basic design concept is that WorldObject implements remote method call
+ functionality using the "curiously recurring template pattern" to enable
+ forwarding calls from the generic base class that implements the transport
+ layer to the derived class.
+
+ The specific failure was in forwarding calls to items in a container.
+ This is emulated here by wrapping a single item.
+
+ In the main program there are two forms of the call. In the last
+ (uncommented) form the member function pointer is for clarity
+ assigned to a variable (itemfunptr) before making the call.
+ With 4.3.0 and 4.3.1 this code compiles incorrectly with -O1 or greater
+ to produce this warning
+
+ reproduce.cc: In function ‘int main()’:
+ reproduce.cc:26: warning: ‘itemfunptr.void (Container::*)(void
+(Item::*)(int), int)::__pfn’ is used uninitialized in this function
+ reproduce.cc:47: note: ‘itemfunptr.void (Container::*)(void (Item::*)(int),
+int)::__pfn’ was declared here
+
+ and the resulting executable segvs. It works correctly with -O0.
+
+ With 4.2.3 and earlier it works correctly with optimization.
+
+ In the first (commented out) form of the call in the main program
+ we directly refer to desired member function. This compiles
+ and executes correctly with all tested versions.
+*/
+
+extern "C" int printf (const char *, ...);
+
+template <class Derived>
+struct WorldObject {
+ template <typename memfunT, typename arg1T, typename arg2T>
+ void forward(memfunT memfun, arg1T arg1, arg2T arg2) {
+ Derived* obj = static_cast<Derived*>(this);
+ (obj->*memfun)(arg1, arg2);
+ }
+};
+
+struct Item {
+ void fred(int a) {
+ printf ("a=%d\n", a);
+ }
+};
+
+struct Container : public WorldObject<Container> {
+ Item item;
+ template <typename itemfunT, typename arg1T>
+ void itemfun(itemfunT itemfun, int a) {
+ (item.*itemfun)(a);
+ }
+};
+
+int main() {
+ typedef void (Item::*itemfun)(int);
+
+ Container t;
+
+ // This call compiles and executes correctly with all versions tested
+ //t.forward(&Container::itemfun<itemfun,int>, &Item::fred, 1);
+
+ // This call compiles with a warning and segvs on execution if using
+ // -O1 or greater with 4.3.*. 4.2.* is correct.
+ void (Container::*itemfunptr)(itemfun, int) =
+&Container::itemfun<itemfun,int>;
+ t.forward(itemfunptr, &Item::fred, 1);
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/g++.dg/warn/pr26785.C b/gcc/testsuite/g++.dg/warn/pr26785.C
new file mode 100644
index 00000000000..b3c0313eaf6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/pr26785.C
@@ -0,0 +1,10 @@
+// PR 26785
+// { dg-do compile }
+// { dg-options "-fshow-column" }
+
+class foo {
+ foo::foo // { dg-error "3: error: extra qualification" }
+ (int a,
+ int b,
+ int c);
+};
diff --git a/gcc/testsuite/g++.dg/warn/pr8715.C b/gcc/testsuite/g++.dg/warn/pr8715.C
new file mode 100644
index 00000000000..330c148bb59
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/pr8715.C
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-Wsign-compare" } */
+
+int foo()
+{
+ unsigned char b = '1';
+
+ bool x = ~b; /* { dg-warning "promoted ~unsigned is always non-zero" } */
+
+ return 0;
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C b/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C
index 1b235ef58e9..d91982f7ed0 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C
@@ -1,4 +1,4 @@
-// { dg-do run { xfail rs6000-*-* powerpc-*-eabi m68k-*-coff mn10300-*-* v850-*-* sh-*-* sh64-*-* h8*-*-* xtensa-*-* m32r*-*-* } }
+// { dg-do run { xfail rs6000-*-* powerpc-*-eabi m68k-*-coff mn10300-*-* v850-*-* sh-*-* sh64-*-* h8*-*-* xtensa*-*-* m32r*-*-* } }
// Test that variadic function calls using thunks work right.
// Note that this will break on any target that uses the generic thunk
// support, because it doesn't support variadic functions.
diff --git a/gcc/testsuite/gcc.c-torture/compile/20001226-1.c b/gcc/testsuite/gcc.c-torture/compile/20001226-1.c
index 19701ab3877..64cf37cb840 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20001226-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20001226-1.c
@@ -3,7 +3,7 @@
/* { dg-do assemble } */
/* { dg-xfail-if "function larger than 64K" { m6811-*-* } { "*" } { "" } } */
/* { dg-skip-if "too much code for avr" { "avr-*-*" } { "*" } { "" } } */
-/* { dg-xfail-if "jump beyond 128K not supported" { xtensa-*-* } { "-O0" } { "" } } */
+/* { dg-xfail-if "jump beyond 128K not supported" { xtensa*-*-* } { "-O0" } { "" } } */
/* { dg-xfail-if "PR36698" { spu-*-* } { "-O0" } { "" } } */
/* { dg-skip-if "" { m32c-*-* } { "*" } { "" } } */
diff --git a/gcc/testsuite/gcc.c-torture/compile/20080806-1.c b/gcc/testsuite/gcc.c-torture/compile/20080806-1.c
new file mode 100644
index 00000000000..33f0857d5c2
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/20080806-1.c
@@ -0,0 +1,33 @@
+int gl2;
+typedef __SIZE_TYPE__ size_t;
+
+extern void *memcpy (void *dest, const void *src, size_t n);
+
+void
+f1 ()
+{
+ int i2;
+ unsigned char bf[64 * 1024 + 4];
+
+ for (i2 = 0; i2 < 3; i2++)
+ {
+ unsigned char *p2 = bf;
+ unsigned char *p3 = ((void *) 0);
+ unsigned short ctf2;
+
+ p2 += sizeof (short);
+
+ for (ctf2 = 0; ctf2 < 3; ctf2++)
+ {
+ if (ctf2 == 1)
+ {
+ unsigned short of = p2 - bf - 6;
+ unsigned short *ofp = (unsigned short *) &of;
+ memcpy (p3, ofp, sizeof (short));
+ }
+
+ if (gl2 == 1)
+ p2 += 3;
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr35432.c b/gcc/testsuite/gcc.c-torture/compile/pr35432.c
new file mode 100644
index 00000000000..6a0c9217746
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr35432.c
@@ -0,0 +1,11 @@
+/* PR middle-end/35432 */
+
+struct A
+{
+ char c[0];
+};
+
+void foo(struct A a)
+{
+ (a = a).c;
+}
diff --git a/gcc/testsuite/gcc.dg/Wcxx-compat-2.c b/gcc/testsuite/gcc.dg/Wcxx-compat-2.c
index 5a46fbe4bd5..43149aa6500 100644
--- a/gcc/testsuite/gcc.dg/Wcxx-compat-2.c
+++ b/gcc/testsuite/gcc.dg/Wcxx-compat-2.c
@@ -1,35 +1,35 @@
/* { dg-options "-Wc++-compat" } */
int bool;
-int catch;
-int char16_t;
-int char32_t;
-int class;
+int catch; /* { dg-warning "keyword" } */
+int char16_t; /* { dg-warning "keyword" } */
+int char32_t; /* { dg-warning "keyword" } */
+int class; /* { dg-warning "keyword" } */
int const_cast; /* { dg-warning "keyword" } */
-int decltype;
-int delete;
+int decltype; /* { dg-warning "keyword" } */
+int delete; /* { dg-warning "keyword" } */
int dynamic_cast; /* { dg-warning "keyword" } */
-int explicit;
-int export;
-int false;
-int friend;
+int explicit; /* { dg-warning "keyword" } */
+int export; /* { dg-warning "keyword" } */
+int false; /* { dg-warning "keyword" } */
+int friend; /* { dg-warning "keyword" } */
int mutable; /* { dg-warning "keyword" } */
-int namespace;
-int new;
-int operator;
-int private;
-int protected;
-int public;
+int namespace; /* { dg-warning "keyword" } */
+int new; /* { dg-warning "keyword" } */
+int operator; /* { dg-warning "keyword" } */
+int private; /* { dg-warning "keyword" } */
+int protected; /* { dg-warning "keyword" } */
+int public; /* { dg-warning "keyword" } */
int reinterpret_cast; /* { dg-warning "keyword" } */
int static_assert; /* { dg-warning "keyword" } */
int static_cast; /* { dg-warning "keyword" } */
-int template;
-int this;
-int throw;
-int true;
-int try;
-int typename;
-int typeid;
-int using;
-int virtual;
+int template; /* { dg-warning "keyword" } */
+int this; /* { dg-warning "keyword" } */
+int throw; /* { dg-warning "keyword" } */
+int true; /* { dg-warning "keyword" } */
+int try; /* { dg-warning "keyword" } */
+int typename; /* { dg-warning "keyword" } */
+int typeid; /* { dg-warning "keyword" } */
+int using; /* { dg-warning "keyword" } */
+int virtual; /* { dg-warning "keyword" } */
int wchar_t;
diff --git a/gcc/testsuite/gcc.dg/intmax_t-1.c b/gcc/testsuite/gcc.dg/intmax_t-1.c
index 9ac0cb9f037..00b503c2509 100644
--- a/gcc/testsuite/gcc.dg/intmax_t-1.c
+++ b/gcc/testsuite/gcc.dg/intmax_t-1.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-Wall" } */
-/* { dg-error "" "" { target { { *arm*-*-*elf* xtensa-*-elf* } || vxworks_kernel } } 0 } */
+/* { dg-error "" "" { target { { *arm*-*-*elf* xtensa*-*-elf* } || vxworks_kernel } } 0 } */
/* Compile with -Wall to get a warning if built-in and system intmax_t don't
match. */
diff --git a/gcc/testsuite/gcc.dg/pr8715.c b/gcc/testsuite/gcc.dg/pr8715.c
new file mode 100644
index 00000000000..e45e77c09f4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr8715.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-Wsign-compare -std=c99" } */
+
+#include <stdbool.h>
+
+int foo()
+{
+ unsigned char b = '1';
+
+ bool x = ~b; /* { dg-warning "promoted ~unsigned is always non-zero" } */
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/sibcall-3.c b/gcc/testsuite/gcc.dg/sibcall-3.c
index 38f3e37622d..a33d4d34502 100644
--- a/gcc/testsuite/gcc.dg/sibcall-3.c
+++ b/gcc/testsuite/gcc.dg/sibcall-3.c
@@ -5,7 +5,7 @@
Copyright (C) 2002 Free Software Foundation Inc.
Contributed by Hans-Peter Nilsson <hp@bitrange.com> */
-/* { dg-do run { xfail arc-*-* avr-*-* cris-*-* crisv32-*-* h8300-*-* hppa*64*-*-* m32r-*-* m68hc1?-*-* mcore-*-* mn10300-*-* xstormy16-*-* v850*-*-* vax-*-* xtensa-*-* } } */
+/* { dg-do run { xfail arc-*-* avr-*-* cris-*-* crisv32-*-* h8300-*-* hppa*64*-*-* m32r-*-* m68hc1?-*-* mcore-*-* mn10300-*-* xstormy16-*-* v850*-*-* vax-*-* xtensa*-*-* } } */
/* -mlongcall disables sibcall patterns. */
/* { dg-skip-if "" { powerpc*-*-* } { "-mlongcall" } { "" } } */
/* { dg-options "-O2 -foptimize-sibling-calls" } */
diff --git a/gcc/testsuite/gcc.dg/sibcall-4.c b/gcc/testsuite/gcc.dg/sibcall-4.c
index 535efb64504..e13db6bb74f 100644
--- a/gcc/testsuite/gcc.dg/sibcall-4.c
+++ b/gcc/testsuite/gcc.dg/sibcall-4.c
@@ -5,7 +5,7 @@
Copyright (C) 2002 Free Software Foundation Inc.
Contributed by Hans-Peter Nilsson <hp@bitrange.com> */
-/* { dg-do run { xfail arc-*-* avr-*-* cris-*-* crisv32-*-* h8300-*-* hppa*64*-*-* m32r-*-* m68hc1?-*-* mcore-*-* mn10300-*-* xstormy16-*-* v850*-*-* vax-*-* xtensa-*-* } } */
+/* { dg-do run { xfail arc-*-* avr-*-* cris-*-* crisv32-*-* h8300-*-* hppa*64*-*-* m32r-*-* m68hc1?-*-* mcore-*-* mn10300-*-* xstormy16-*-* v850*-*-* vax-*-* xtensa*-*-* } } */
/* -mlongcall disables sibcall patterns. */
/* { dg-skip-if "" { powerpc*-*-* } { "-mlongcall" } { "" } } */
/* { dg-options "-O2 -foptimize-sibling-calls" } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/tailcall-4.c b/gcc/testsuite/gcc.dg/tree-ssa/tailcall-4.c
new file mode 100644
index 00000000000..e7983da31da
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/tailcall-4.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-tailc-details" } */
+/* PR tree-opt/37024 */
+
+double doubleValue();
+
+long
+longValue ()
+{
+ return (long) doubleValue ();
+}
+
+/* We should not tail call doubleValue in longValue as the mode changes. */
+/* { dg-final { scan-tree-dump-times "Found tail call" 0 "tailc"} } */
+/* { dg-final { cleanup-tree-dump "tailc" } } */
+
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-slp-34.c b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-slp-34.c
new file mode 100644
index 00000000000..376c7e4ee07
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-slp-34.c
@@ -0,0 +1,74 @@
+/* { dg-require-effective-target vect_int } */
+
+#include <stdarg.h>
+#include "../../tree-vect.h"
+
+struct mystr {
+ int f1;
+ int f2;
+};
+
+struct mystr af[16] = {
+ 10, 11, 12, 13, 14, 15, 16, 17,
+ 20, 21, 22, 23, 24, 25, 26, 27,
+ 30, 31, 32, 33, 34, 35, 36, 37,
+ 40, 41, 42, 43, 44, 45, 46, 47
+};
+
+struct mystr bf[16] = {
+ 12, 13, 14, 15, 16, 17, 18, 19,
+ 22, 23, 24, 25, 26, 27, 28, 29,
+ 32, 33, 34, 35, 36, 37, 38, 39,
+ 42, 43, 44, 45, 46, 47, 48, 49
+};
+
+struct mystr cf[16];
+
+int res1[16] = {
+ 22, 26, 30, 34, 42, 46, 50, 54,
+ 62, 66, 70, 74, 82, 86, 90, 94,
+};
+
+int res2[16] = {
+ 24, 28, 32, 36, 44, 48, 52, 56,
+ 64, 68, 72, 76, 84, 88, 92, 96,
+};
+
+__attribute__ ((noinline)) void
+foo (void)
+{
+ int i;
+
+ for (i = 0; i < 16; i++)
+ {
+ cf[i].f1 = af[i].f1 + bf[i].f1;
+ cf[i].f2 = af[i].f2 + bf[i].f2;
+ }
+}
+
+
+
+int
+main (void)
+{
+ int i;
+
+ check_vect ();
+ foo ();
+
+ /* Check resiults. */
+ for (i = 0; i < 16; i++)
+ {
+ if (cf[i].f1 != res1[i])
+ abort ();
+ if (cf[i].f2 != res2[i])
+ abort ();
+
+ }
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorization not profitable" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr36613.c b/gcc/testsuite/gcc.target/i386/pr36613.c
new file mode 100644
index 00000000000..e9d7d11cedc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr36613.c
@@ -0,0 +1,44 @@
+/* { dg-do run { target { { i?86-*-linux* x86_64-*-linux* } && ilp32 } } } */
+/* { dg-options "-Os" } */
+/* PR target/36613 */
+
+extern void abort (void);
+
+static inline int
+lshifts (int val, int cnt)
+{
+ if (val < 0)
+ return val;
+ return val << cnt;
+}
+
+static inline unsigned int
+lshiftu (unsigned int val, unsigned int cnt)
+{
+ if (cnt >= sizeof (unsigned int) * __CHAR_BIT__
+ || val > ((__INT_MAX__ * 2U) >> cnt))
+ return val;
+ return val << cnt;
+}
+
+static inline int
+rshifts (int val, unsigned int cnt)
+{
+ if (val < 0 || cnt >= sizeof (int) * __CHAR_BIT__)
+ return val;
+ return val >> cnt;
+}
+
+int
+foo (unsigned int val)
+{
+ return rshifts (1 + val, lshifts (lshiftu (val, val), 1));
+}
+
+int
+main (void)
+{
+ if (foo (1) != 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/ia64/20080802-1.c b/gcc/testsuite/gcc.target/ia64/20080802-1.c
new file mode 100644
index 00000000000..b689a5d8d5f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/ia64/20080802-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -msched-control-spec" } */
+
+struct cpp_reader;
+
+extern const char * parse_include (struct cpp_reader *, int *m, void *);
+extern int _cpp_compare_file_date (struct cpp_reader *, const char *, int);
+
+void
+_cpp_init_internal_pragmas (struct cpp_reader *pfile)
+{
+ const char *fname;
+ int angle_brackets, ordering;
+
+ fname = parse_include (pfile, &angle_brackets, (void *) 0);
+ if (!fname)
+ return;
+ ordering = _cpp_compare_file_date (pfile, fname, angle_brackets);
+}
diff --git a/gcc/testsuite/gnat.dg/iface_test.adb b/gcc/testsuite/gnat.dg/iface_test.adb
new file mode 100644
index 00000000000..b47814f85d5
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/iface_test.adb
@@ -0,0 +1,28 @@
+-- { dg-do compile }
+package body Iface_Test is
+ protected SQLite_Safe is
+ function Prepare_Select
+ (DB : DT_1;
+ Iter : Standard.Iface_Test.Iface_2'Class)
+ return Standard.Iface_Test.Iface_2'Class;
+ end;
+
+ overriding procedure Prepare_Select
+ (DB : DT_1;
+ Iter : in out Standard.Iface_Test.Iface_2'Class)
+ is
+ begin
+ Iter := SQLite_Safe.Prepare_Select (DB, Iter); -- test
+ end;
+
+ protected body SQLite_Safe is
+ function Prepare_Select
+ (DB : DT_1;
+ Iter : Standard.Iface_Test.Iface_2'Class)
+ return Standard.Iface_Test.Iface_2'Class
+ is
+ begin
+ return Iter;
+ end;
+ end;
+end;
diff --git a/gcc/testsuite/gnat.dg/iface_test.ads b/gcc/testsuite/gnat.dg/iface_test.ads
new file mode 100644
index 00000000000..d093c28226f
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/iface_test.ads
@@ -0,0 +1,18 @@
+package Iface_Test is
+ type Iface_1 is interface;
+ type Iface_2 is interface;
+
+ procedure Prepare_Select
+ (DB : Iface_1;
+ Iter : in out Iface_2'Class) is abstract;
+
+ type DT_1 is new Iface_1 with null record;
+
+ type Iterator is new Iface_2 with record
+ More : Boolean;
+ end record;
+
+ overriding procedure Prepare_Select
+ (DB : DT_1;
+ Iter : in out Standard.Iface_Test.Iface_2'Class);
+end;
diff --git a/gcc/testsuite/gnat.dg/test_call.adb b/gcc/testsuite/gnat.dg/test_call.adb
new file mode 100644
index 00000000000..f1ea10f73b4
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/test_call.adb
@@ -0,0 +1,24 @@
+-- { dg-do compile }
+
+with System; with Ada.Unchecked_Conversion;
+procedure Test_Call is
+ type F_ACC is access function (Str : String) return String;
+
+ function Do_Something (V : F_Acc) return System.Address is
+ begin
+ return System.Null_Address;
+ end Do_Something;
+
+ function BUG_1 (This : access Integer) return F_Acc is
+ begin
+ return null;
+ end BUG_1;
+
+ function Unch is new Ada.Unchecked_Conversion (F_Acc, System.Address);
+ Func : System.Address := Unch (BUG_1 (null));
+
+ V : System.Address := Do_Something (BUG_1 (null));
+
+begin
+ null;
+end Test_Call;
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index d82829e2058..570b43e071a 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -476,7 +476,7 @@ proc check_profiling_available { test_what } {
|| [istarget m68k-*-uclinux*]
|| [istarget mips*-*-elf*]
|| [istarget xstormy16-*]
- || [istarget xtensa-*-elf]
+ || [istarget xtensa*-*-elf]
|| [istarget *-*-vxworks*] } {
set profiling_available_saved 0
} else {
diff --git a/gcc/toplev.h b/gcc/toplev.h
index f1e4fe500f6..1a015e69e0e 100644
--- a/gcc/toplev.h
+++ b/gcc/toplev.h
@@ -68,6 +68,8 @@ extern void pedwarn0 (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
/* Pass one of the OPT_W* from options.h as the first parameter. */
extern void pedwarn (int, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
extern void permerror (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
+extern void permerror_at (location_t, const char *, ...)
+ ATTRIBUTE_GCC_DIAG(2,3);
extern void sorry (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
extern void inform (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
extern void verbatim (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2);
diff --git a/gcc/tree-dump.c b/gcc/tree-dump.c
index 66ea1e75840..ffac189f449 100644
--- a/gcc/tree-dump.c
+++ b/gcc/tree-dump.c
@@ -832,9 +832,9 @@ dump_register (const char *suffix, const char *swtch, const char *glob,
static int next_dump = FIRST_AUTO_NUMBERED_DUMP;
int num = next_dump++;
- size_t this = extra_dump_files_in_use++;
+ size_t count = extra_dump_files_in_use++;
- if (this >= extra_dump_files_alloced)
+ if (count >= extra_dump_files_alloced)
{
if (extra_dump_files_alloced == 0)
extra_dump_files_alloced = 32;
@@ -845,14 +845,14 @@ dump_register (const char *suffix, const char *swtch, const char *glob,
extra_dump_files_alloced);
}
- memset (&extra_dump_files[this], 0, sizeof (struct dump_file_info));
- extra_dump_files[this].suffix = suffix;
- extra_dump_files[this].swtch = swtch;
- extra_dump_files[this].glob = glob;
- extra_dump_files[this].flags = flags;
- extra_dump_files[this].num = num;
+ memset (&extra_dump_files[count], 0, sizeof (struct dump_file_info));
+ extra_dump_files[count].suffix = suffix;
+ extra_dump_files[count].swtch = swtch;
+ extra_dump_files[count].glob = glob;
+ extra_dump_files[count].flags = flags;
+ extra_dump_files[count].num = num;
- return this + TDI_end;
+ return count + TDI_end;
}
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c
index 140cbc54953..a8885e36d1a 100644
--- a/gcc/tree-eh.c
+++ b/gcc/tree-eh.c
@@ -480,18 +480,18 @@ replace_goto_queue_cond_clause (tree *tp, struct leh_tf_state *tf,
gimple_stmt_iterator *gsi)
{
tree label;
- gimple_seq new;
+ gimple_seq new_seq;
treemple temp;
temp.tp = tp;
- new = find_goto_replacement (tf, temp);
- if (!new)
+ new_seq = find_goto_replacement (tf, temp);
+ if (!new_seq)
return;
- if (gimple_seq_singleton_p (new)
- && gimple_code (gimple_seq_first_stmt (new)) == GIMPLE_GOTO)
+ if (gimple_seq_singleton_p (new_seq)
+ && gimple_code (gimple_seq_first_stmt (new_seq)) == GIMPLE_GOTO)
{
- *tp = gimple_goto_dest (gimple_seq_first_stmt (new));
+ *tp = gimple_goto_dest (gimple_seq_first_stmt (new_seq));
return;
}
@@ -500,7 +500,7 @@ replace_goto_queue_cond_clause (tree *tp, struct leh_tf_state *tf,
*tp = label;
gsi_insert_after (gsi, gimple_build_label (label), GSI_CONTINUE_LINKING);
- gsi_insert_seq_after (gsi, gimple_seq_copy (new), GSI_CONTINUE_LINKING);
+ gsi_insert_seq_after (gsi, gimple_seq_copy (new_seq), GSI_CONTINUE_LINKING);
}
/* The real work of replace_goto_queue. Returns with TSI updated to
@@ -1665,15 +1665,15 @@ lower_catch (struct leh_state *state, gimple tp)
{
struct eh_region *catch_region;
tree eh_label;
- gimple x, catch;
+ gimple x, gcatch;
- catch = gsi_stmt (gsi);
+ gcatch = gsi_stmt (gsi);
catch_region = gen_eh_region_catch (try_region,
- gimple_catch_types (catch));
+ gimple_catch_types (gcatch));
this_state.cur_region = catch_region;
this_state.prev_try = state->prev_try;
- lower_eh_constructs_1 (&this_state, gimple_catch_handler (catch));
+ lower_eh_constructs_1 (&this_state, gimple_catch_handler (gcatch));
eh_label = create_artificial_label ();
set_eh_region_tree_label (catch_region, eh_label);
@@ -1681,16 +1681,16 @@ lower_catch (struct leh_state *state, gimple tp)
x = gimple_build_label (eh_label);
gsi_insert_before (&gsi, x, GSI_SAME_STMT);
- if (gimple_seq_may_fallthru (gimple_catch_handler (catch)))
+ if (gimple_seq_may_fallthru (gimple_catch_handler (gcatch)))
{
if (!out_label)
out_label = create_artificial_label ();
x = gimple_build_goto (out_label);
- gimple_seq_add_stmt (gimple_catch_handler_ptr (catch), x);
+ gimple_seq_add_stmt (gimple_catch_handler_ptr (gcatch), x);
}
- gsi_insert_seq_before (&gsi, gimple_catch_handler (catch),
+ gsi_insert_seq_before (&gsi, gimple_catch_handler (gcatch),
GSI_SAME_STMT);
gsi_remove (&gsi, false);
}
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index a10586128e8..4eeabb141b9 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -154,7 +154,7 @@ insert_decl_map (copy_body_data *id, tree key, tree value)
static tree
remap_ssa_name (tree name, copy_body_data *id)
{
- tree new;
+ tree new_tree;
tree *n;
gcc_assert (TREE_CODE (name) == SSA_NAME);
@@ -165,7 +165,7 @@ remap_ssa_name (tree name, copy_body_data *id)
/* Do not set DEF_STMT yet as statement is not copied yet. We do that
in copy_bb. */
- new = remap_decl (SSA_NAME_VAR (name), id);
+ new_tree = remap_decl (SSA_NAME_VAR (name), id);
/* We might've substituted constant or another SSA_NAME for
the variable.
@@ -173,15 +173,15 @@ remap_ssa_name (tree name, copy_body_data *id)
Replace the SSA name representing RESULT_DECL by variable during
inlining: this saves us from need to introduce PHI node in a case
return value is just partly initialized. */
- if ((TREE_CODE (new) == VAR_DECL || TREE_CODE (new) == PARM_DECL)
+ if ((TREE_CODE (new_tree) == VAR_DECL || TREE_CODE (new_tree) == PARM_DECL)
&& (TREE_CODE (SSA_NAME_VAR (name)) != RESULT_DECL
|| !id->transform_return_to_modify))
{
- new = make_ssa_name (new, NULL);
- insert_decl_map (id, name, new);
- SSA_NAME_OCCURS_IN_ABNORMAL_PHI (new)
+ new_tree = make_ssa_name (new_tree, NULL);
+ insert_decl_map (id, name, new_tree);
+ SSA_NAME_OCCURS_IN_ABNORMAL_PHI (new_tree)
= SSA_NAME_OCCURS_IN_ABNORMAL_PHI (name);
- TREE_TYPE (new) = TREE_TYPE (SSA_NAME_VAR (new));
+ TREE_TYPE (new_tree) = TREE_TYPE (SSA_NAME_VAR (new_tree));
if (gimple_nop_p (SSA_NAME_DEF_STMT (name)))
{
/* By inlining function having uninitialized variable, we might
@@ -202,24 +202,24 @@ remap_ssa_name (tree name, copy_body_data *id)
gimple_stmt_iterator gsi = gsi_last_bb (id->entry_bb);
gimple init_stmt;
- init_stmt = gimple_build_assign (new,
- fold_convert (TREE_TYPE (new),
+ init_stmt = gimple_build_assign (new_tree,
+ fold_convert (TREE_TYPE (new_tree),
integer_zero_node));
gsi_insert_after (&gsi, init_stmt, GSI_NEW_STMT);
- SSA_NAME_IS_DEFAULT_DEF (new) = 0;
+ SSA_NAME_IS_DEFAULT_DEF (new_tree) = 0;
}
else
{
- SSA_NAME_DEF_STMT (new) = gimple_build_nop ();
+ SSA_NAME_DEF_STMT (new_tree) = gimple_build_nop ();
if (gimple_default_def (id->src_cfun, SSA_NAME_VAR (name))
== name)
- set_default_def (SSA_NAME_VAR (new), new);
+ set_default_def (SSA_NAME_VAR (new_tree), new_tree);
}
}
}
else
- insert_decl_map (id, name, new);
- return new;
+ insert_decl_map (id, name, new_tree);
+ return new_tree;
}
/* Remap DECL during the copying of the BLOCK tree for the function. */
@@ -295,31 +295,31 @@ remap_decl (tree decl, copy_body_data *id)
static tree
remap_type_1 (tree type, copy_body_data *id)
{
- tree new, t;
+ tree new_tree, t;
/* We do need a copy. build and register it now. If this is a pointer or
reference type, remap the designated type and make a new pointer or
reference type. */
if (TREE_CODE (type) == POINTER_TYPE)
{
- new = build_pointer_type_for_mode (remap_type (TREE_TYPE (type), id),
+ new_tree = build_pointer_type_for_mode (remap_type (TREE_TYPE (type), id),
TYPE_MODE (type),
TYPE_REF_CAN_ALIAS_ALL (type));
- insert_decl_map (id, type, new);
- return new;
+ insert_decl_map (id, type, new_tree);
+ return new_tree;
}
else if (TREE_CODE (type) == REFERENCE_TYPE)
{
- new = build_reference_type_for_mode (remap_type (TREE_TYPE (type), id),
+ new_tree = build_reference_type_for_mode (remap_type (TREE_TYPE (type), id),
TYPE_MODE (type),
TYPE_REF_CAN_ALIAS_ALL (type));
- insert_decl_map (id, type, new);
- return new;
+ insert_decl_map (id, type, new_tree);
+ return new_tree;
}
else
- new = copy_node (type);
+ new_tree = copy_node (type);
- insert_decl_map (id, type, new);
+ insert_decl_map (id, type, new_tree);
/* This is a new type, not a copy of an old type. Need to reassociate
variants. We can handle everything except the main variant lazily. */
@@ -327,47 +327,47 @@ remap_type_1 (tree type, copy_body_data *id)
if (type != t)
{
t = remap_type (t, id);
- TYPE_MAIN_VARIANT (new) = t;
- TYPE_NEXT_VARIANT (new) = TYPE_NEXT_VARIANT (t);
- TYPE_NEXT_VARIANT (t) = new;
+ TYPE_MAIN_VARIANT (new_tree) = t;
+ TYPE_NEXT_VARIANT (new_tree) = TYPE_NEXT_VARIANT (t);
+ TYPE_NEXT_VARIANT (t) = new_tree;
}
else
{
- TYPE_MAIN_VARIANT (new) = new;
- TYPE_NEXT_VARIANT (new) = NULL;
+ TYPE_MAIN_VARIANT (new_tree) = new_tree;
+ TYPE_NEXT_VARIANT (new_tree) = NULL;
}
if (TYPE_STUB_DECL (type))
- TYPE_STUB_DECL (new) = remap_decl (TYPE_STUB_DECL (type), id);
+ TYPE_STUB_DECL (new_tree) = remap_decl (TYPE_STUB_DECL (type), id);
/* Lazily create pointer and reference types. */
- TYPE_POINTER_TO (new) = NULL;
- TYPE_REFERENCE_TO (new) = NULL;
+ TYPE_POINTER_TO (new_tree) = NULL;
+ TYPE_REFERENCE_TO (new_tree) = NULL;
- switch (TREE_CODE (new))
+ switch (TREE_CODE (new_tree))
{
case INTEGER_TYPE:
case REAL_TYPE:
case FIXED_POINT_TYPE:
case ENUMERAL_TYPE:
case BOOLEAN_TYPE:
- t = TYPE_MIN_VALUE (new);
+ t = TYPE_MIN_VALUE (new_tree);
if (t && TREE_CODE (t) != INTEGER_CST)
- walk_tree (&TYPE_MIN_VALUE (new), copy_tree_body_r, id, NULL);
+ walk_tree (&TYPE_MIN_VALUE (new_tree), copy_tree_body_r, id, NULL);
- t = TYPE_MAX_VALUE (new);
+ t = TYPE_MAX_VALUE (new_tree);
if (t && TREE_CODE (t) != INTEGER_CST)
- walk_tree (&TYPE_MAX_VALUE (new), copy_tree_body_r, id, NULL);
- return new;
+ walk_tree (&TYPE_MAX_VALUE (new_tree), copy_tree_body_r, id, NULL);
+ return new_tree;
case FUNCTION_TYPE:
- TREE_TYPE (new) = remap_type (TREE_TYPE (new), id);
- walk_tree (&TYPE_ARG_TYPES (new), copy_tree_body_r, id, NULL);
- return new;
+ TREE_TYPE (new_tree) = remap_type (TREE_TYPE (new_tree), id);
+ walk_tree (&TYPE_ARG_TYPES (new_tree), copy_tree_body_r, id, NULL);
+ return new_tree;
case ARRAY_TYPE:
- TREE_TYPE (new) = remap_type (TREE_TYPE (new), id);
- TYPE_DOMAIN (new) = remap_type (TYPE_DOMAIN (new), id);
+ TREE_TYPE (new_tree) = remap_type (TREE_TYPE (new_tree), id);
+ TYPE_DOMAIN (new_tree) = remap_type (TYPE_DOMAIN (new_tree), id);
break;
case RECORD_TYPE:
@@ -376,14 +376,14 @@ remap_type_1 (tree type, copy_body_data *id)
{
tree f, nf = NULL;
- for (f = TYPE_FIELDS (new); f ; f = TREE_CHAIN (f))
+ for (f = TYPE_FIELDS (new_tree); f ; f = TREE_CHAIN (f))
{
t = remap_decl (f, id);
- DECL_CONTEXT (t) = new;
+ DECL_CONTEXT (t) = new_tree;
TREE_CHAIN (t) = nf;
nf = t;
}
- TYPE_FIELDS (new) = nreverse (nf);
+ TYPE_FIELDS (new_tree) = nreverse (nf);
}
break;
@@ -393,10 +393,10 @@ remap_type_1 (tree type, copy_body_data *id)
gcc_unreachable ();
}
- walk_tree (&TYPE_SIZE (new), copy_tree_body_r, id, NULL);
- walk_tree (&TYPE_SIZE_UNIT (new), copy_tree_body_r, id, NULL);
+ walk_tree (&TYPE_SIZE (new_tree), copy_tree_body_r, id, NULL);
+ walk_tree (&TYPE_SIZE_UNIT (new_tree), copy_tree_body_r, id, NULL);
- return new;
+ return new_tree;
}
tree
@@ -504,28 +504,28 @@ static tree
remap_blocks (tree block, copy_body_data *id)
{
tree t;
- tree new = block;
+ tree new_tree = block;
if (!block)
return NULL;
- remap_block (&new, id);
- gcc_assert (new != block);
+ remap_block (&new_tree, id);
+ gcc_assert (new_tree != block);
for (t = BLOCK_SUBBLOCKS (block); t ; t = BLOCK_CHAIN (t))
- add_lexical_block (new, remap_blocks (t, id));
- return new;
+ add_lexical_block (new_tree, remap_blocks (t, id));
+ return new_tree;
}
static void
copy_statement_list (tree *tp)
{
tree_stmt_iterator oi, ni;
- tree new;
+ tree new_tree;
- new = alloc_stmt_list ();
- ni = tsi_start (new);
+ new_tree = alloc_stmt_list ();
+ ni = tsi_start (new_tree);
oi = tsi_start (*tp);
- *tp = new;
+ *tp = new_tree;
for (; !tsi_end_p (oi); tsi_next (&oi))
tsi_link_after (&ni, tsi_stmt (oi), TSI_NEW_STMT);
@@ -679,7 +679,7 @@ remap_gimple_op_r (tree *tp, int *walk_subtrees, void *data)
n = (tree *) pointer_map_contains (id->decl_map, decl);
if (n)
{
- tree type, new, old;
+ tree type, new_tree, old;
/* If we happen to get an ADDR_EXPR in n->value, strip
it manually here as we'll eventually get ADDR_EXPRs
@@ -689,23 +689,23 @@ remap_gimple_op_r (tree *tp, int *walk_subtrees, void *data)
fold_indirect_ref does other useful transformations,
try that first, though. */
type = TREE_TYPE (TREE_TYPE (*n));
- new = unshare_expr (*n);
+ new_tree = unshare_expr (*n);
old = *tp;
- *tp = gimple_fold_indirect_ref (new);
+ *tp = gimple_fold_indirect_ref (new_tree);
if (!*tp)
{
- if (TREE_CODE (new) == ADDR_EXPR)
+ if (TREE_CODE (new_tree) == ADDR_EXPR)
{
- *tp = fold_indirect_ref_1 (type, new);
+ *tp = fold_indirect_ref_1 (type, new_tree);
/* ??? We should either assert here or build
a VIEW_CONVERT_EXPR instead of blindly leaking
incompatible types to our IL. */
if (! *tp)
- *tp = TREE_OPERAND (new, 0);
+ *tp = TREE_OPERAND (new_tree, 0);
}
else
{
- *tp = build1 (INDIRECT_REF, type, new);
+ *tp = build1 (INDIRECT_REF, type, new_tree);
TREE_THIS_VOLATILE (*tp) = TREE_THIS_VOLATILE (old);
}
}
@@ -908,7 +908,7 @@ copy_tree_body_r (tree *tp, int *walk_subtrees, void *data)
n = (tree *) pointer_map_contains (id->decl_map, decl);
if (n)
{
- tree new;
+ tree new_tree;
tree old;
/* If we happen to get an ADDR_EXPR in n->value, strip
it manually here as we'll eventually get ADDR_EXPRs
@@ -917,23 +917,23 @@ copy_tree_body_r (tree *tp, int *walk_subtrees, void *data)
but we absolutely rely on that. As fold_indirect_ref
does other useful transformations, try that first, though. */
tree type = TREE_TYPE (TREE_TYPE (*n));
- new = unshare_expr (*n);
+ new_tree = unshare_expr (*n);
old = *tp;
- *tp = gimple_fold_indirect_ref (new);
+ *tp = gimple_fold_indirect_ref (new_tree);
if (! *tp)
{
- if (TREE_CODE (new) == ADDR_EXPR)
+ if (TREE_CODE (new_tree) == ADDR_EXPR)
{
- *tp = fold_indirect_ref_1 (type, new);
+ *tp = fold_indirect_ref_1 (type, new_tree);
/* ??? We should either assert here or build
a VIEW_CONVERT_EXPR instead of blindly leaking
incompatible types to our IL. */
if (! *tp)
- *tp = TREE_OPERAND (new, 0);
+ *tp = TREE_OPERAND (new_tree, 0);
}
else
{
- *tp = build1 (INDIRECT_REF, type, new);
+ *tp = build1 (INDIRECT_REF, type, new_tree);
TREE_THIS_VOLATILE (*tp) = TREE_THIS_VOLATILE (old);
TREE_SIDE_EFFECTS (*tp) = TREE_SIDE_EFFECTS (old);
}
@@ -1547,7 +1547,7 @@ copy_edges_for_bb (basic_block bb, gcov_type count_scale, basic_block ret_bb)
FOR_EACH_EDGE (old_edge, ei, bb->succs)
if (!(old_edge->flags & EDGE_EH))
{
- edge new;
+ edge new_edge;
flags = old_edge->flags;
@@ -1555,9 +1555,9 @@ copy_edges_for_bb (basic_block bb, gcov_type count_scale, basic_block ret_bb)
if (old_edge->dest->index == EXIT_BLOCK && !old_edge->flags
&& old_edge->dest->aux != EXIT_BLOCK_PTR)
flags |= EDGE_FALLTHRU;
- new = make_edge (new_bb, (basic_block) old_edge->dest->aux, flags);
- new->count = old_edge->count * count_scale / REG_BR_PROB_BASE;
- new->probability = old_edge->probability;
+ new_edge = make_edge (new_bb, (basic_block) old_edge->dest->aux, flags);
+ new_edge->count = old_edge->count * count_scale / REG_BR_PROB_BASE;
+ new_edge->probability = old_edge->probability;
}
if (bb->index == ENTRY_BLOCK || bb->index == EXIT_BLOCK)
@@ -1795,9 +1795,9 @@ copy_cfg_body (copy_body_data * id, gcov_type count, int frequency,
/* Use aux pointers to map the original blocks to copy. */
FOR_EACH_BB_FN (bb, cfun_to_copy)
{
- basic_block new = copy_bb (id, bb, frequency_scale, count_scale);
- bb->aux = new;
- new->aux = bb;
+ basic_block new_bb = copy_bb (id, bb, frequency_scale, count_scale);
+ bb->aux = new_bb;
+ new_bb->aux = bb;
}
last = last_basic_block;
@@ -3554,18 +3554,18 @@ copy_tree_r (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
{
/* Because the chain gets clobbered when we make a copy, we save it
here. */
- tree chain = NULL_TREE, new;
+ tree chain = NULL_TREE, new_tree;
chain = TREE_CHAIN (*tp);
/* Copy the node. */
- new = copy_node (*tp);
+ new_tree = copy_node (*tp);
/* Propagate mudflap marked-ness. */
if (flag_mudflap && mf_marked_p (*tp))
- mf_mark (new);
+ mf_mark (new_tree);
- *tp = new;
+ *tp = new_tree;
/* Now, restore the chain, if appropriate. That will cause
walk_tree to walk into the chain as well. */
@@ -3583,17 +3583,17 @@ copy_tree_r (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
{
/* CONSTRUCTOR nodes need special handling because
we need to duplicate the vector of elements. */
- tree new;
+ tree new_tree;
- new = copy_node (*tp);
+ new_tree = copy_node (*tp);
/* Propagate mudflap marked-ness. */
if (flag_mudflap && mf_marked_p (*tp))
- mf_mark (new);
+ mf_mark (new_tree);
- CONSTRUCTOR_ELTS (new) = VEC_copy (constructor_elt, gc,
+ CONSTRUCTOR_ELTS (new_tree) = VEC_copy (constructor_elt, gc,
CONSTRUCTOR_ELTS (*tp));
- *tp = new;
+ *tp = new_tree;
}
else if (TREE_CODE_CLASS (code) == tcc_type)
*walk_subtrees = 0;
@@ -4093,10 +4093,10 @@ copy_arguments_for_versioning (tree orig_parm, copy_body_data * id)
arg_copy = &orig_parm;
for (parg = arg_copy; *parg; parg = &TREE_CHAIN (*parg))
{
- tree new = remap_decl (*parg, id);
- lang_hooks.dup_lang_specific_decl (new);
- TREE_CHAIN (new) = TREE_CHAIN (*parg);
- *parg = new;
+ tree new_tree = remap_decl (*parg, id);
+ lang_hooks.dup_lang_specific_decl (new_tree);
+ TREE_CHAIN (new_tree) = TREE_CHAIN (*parg);
+ *parg = new_tree;
}
return orig_parm;
}
@@ -4110,10 +4110,10 @@ copy_static_chain (tree static_chain, copy_body_data * id)
chain_copy = &static_chain;
for (pvar = chain_copy; *pvar; pvar = &TREE_CHAIN (*pvar))
{
- tree new = remap_decl (*pvar, id);
- lang_hooks.dup_lang_specific_decl (new);
- TREE_CHAIN (new) = TREE_CHAIN (*pvar);
- *pvar = new;
+ tree new_tree = remap_decl (*pvar, id);
+ lang_hooks.dup_lang_specific_decl (new_tree);
+ TREE_CHAIN (new_tree) = TREE_CHAIN (*pvar);
+ *pvar = new_tree;
}
return static_chain;
}
diff --git a/gcc/tree-into-ssa.c b/gcc/tree-into-ssa.c
index fb61731893a..f0c55905060 100644
--- a/gcc/tree-into-ssa.c
+++ b/gcc/tree-into-ssa.c
@@ -638,15 +638,15 @@ repl_map_free (void *p)
}
-/* Return the names replaced by NEW (i.e., REPL_TBL[NEW].SET). */
+/* Return the names replaced by NEW_TREE (i.e., REPL_TBL[NEW_TREE].SET). */
static inline bitmap
-names_replaced_by (tree new)
+names_replaced_by (tree new_tree)
{
struct repl_map_d m;
void **slot;
- m.name = new;
+ m.name = new_tree;
slot = htab_find_slot (repl_tbl, (void *) &m, NO_INSERT);
/* If N was not registered in the replacement table, return NULL. */
@@ -657,20 +657,20 @@ names_replaced_by (tree new)
}
-/* Add OLD to REPL_TBL[NEW].SET. */
+/* Add OLD to REPL_TBL[NEW_TREE].SET. */
static inline void
-add_to_repl_tbl (tree new, tree old)
+add_to_repl_tbl (tree new_tree, tree old)
{
struct repl_map_d m, *mp;
void **slot;
- m.name = new;
+ m.name = new_tree;
slot = htab_find_slot (repl_tbl, (void *) &m, INSERT);
if (*slot == NULL)
{
mp = XNEW (struct repl_map_d);
- mp->name = new;
+ mp->name = new_tree;
mp->set = BITMAP_ALLOC (NULL);
*slot = (void *) mp;
}
@@ -681,23 +681,23 @@ add_to_repl_tbl (tree new, tree old)
}
-/* Add a new mapping NEW -> OLD REPL_TBL. Every entry N_i in REPL_TBL
+/* Add a new mapping NEW_TREE -> OLD REPL_TBL. Every entry N_i in REPL_TBL
represents the set of names O_1 ... O_j replaced by N_i. This is
used by update_ssa and its helpers to introduce new SSA names in an
already formed SSA web. */
static void
-add_new_name_mapping (tree new, tree old)
+add_new_name_mapping (tree new_tree, tree old)
{
timevar_push (TV_TREE_SSA_INCREMENTAL);
- /* OLD and NEW must be different SSA names for the same symbol. */
- gcc_assert (new != old && SSA_NAME_VAR (new) == SSA_NAME_VAR (old));
+ /* OLD and NEW_TREE must be different SSA names for the same symbol. */
+ gcc_assert (new_tree != old && SSA_NAME_VAR (new_tree) == SSA_NAME_VAR (old));
/* If this mapping is for virtual names, we will need to update
virtual operands. If this is a mapping for .MEM, then we gather
the symbols associated with each name. */
- if (!is_gimple_reg (new))
+ if (!is_gimple_reg (new_tree))
{
tree sym;
@@ -712,7 +712,7 @@ add_new_name_mapping (tree new, tree old)
will make more sense to rename the symbols from scratch.
Otherwise, the insertion of PHI nodes for each of the old
names in these mappings will be very slow. */
- sym = SSA_NAME_VAR (new);
+ sym = SSA_NAME_VAR (new_tree);
bitmap_set_bit (update_ssa_stats.virtual_symbols, DECL_UID (sym));
}
@@ -726,16 +726,16 @@ add_new_name_mapping (tree new, tree old)
}
/* Update the REPL_TBL table. */
- add_to_repl_tbl (new, old);
+ add_to_repl_tbl (new_tree, old);
/* If OLD had already been registered as a new name, then all the
- names that OLD replaces should also be replaced by NEW. */
+ names that OLD replaces should also be replaced by NEW_TREE. */
if (is_new_name (old))
- bitmap_ior_into (names_replaced_by (new), names_replaced_by (old));
+ bitmap_ior_into (names_replaced_by (new_tree), names_replaced_by (old));
- /* Register NEW and OLD in NEW_SSA_NAMES and OLD_SSA_NAMES,
+ /* Register NEW_TREE and OLD in NEW_SSA_NAMES and OLD_SSA_NAMES,
respectively. */
- SET_BIT (new_ssa_names, SSA_NAME_VERSION (new));
+ SET_BIT (new_ssa_names, SSA_NAME_VERSION (new_tree));
SET_BIT (old_ssa_names, SSA_NAME_VERSION (old));
/* Update mapping counter to use in the virtual mapping heuristic. */
@@ -2757,12 +2757,12 @@ create_new_def_for (tree old_name, gimple stmt, def_operand_p def)
update_ssa. */
void
-register_new_name_mapping (tree new ATTRIBUTE_UNUSED, tree old ATTRIBUTE_UNUSED)
+register_new_name_mapping (tree new_Tree ATTRIBUTE_UNUSED, tree old ATTRIBUTE_UNUSED)
{
if (need_to_initialize_update_ssa_p)
init_update_ssa ();
- add_new_name_mapping (new, old);
+ add_new_name_mapping (new_Tree, old);
}
diff --git a/gcc/tree-mudflap.c b/gcc/tree-mudflap.c
index 7d15077073b..3f77b2cb1f6 100644
--- a/gcc/tree-mudflap.c
+++ b/gcc/tree-mudflap.c
@@ -897,7 +897,7 @@ mf_xform_derefs (void)
basic_block bb, next;
gimple_stmt_iterator i;
int saved_last_basic_block = last_basic_block;
- enum gimple_rhs_class class;
+ enum gimple_rhs_class grhs_class;
bb = ENTRY_BLOCK_PTR ->next_bb;
do
@@ -915,8 +915,8 @@ mf_xform_derefs (void)
gimple_location (s), integer_one_node);
mf_xform_derefs_1 (&i, gimple_assign_rhs1_ptr (s),
gimple_location (s), integer_zero_node);
- class = get_gimple_rhs_class (gimple_assign_rhs_code (s));
- if (class == GIMPLE_BINARY_RHS)
+ grhs_class = get_gimple_rhs_class (gimple_assign_rhs_code (s));
+ if (grhs_class == GIMPLE_BINARY_RHS)
mf_xform_derefs_1 (&i, gimple_assign_rhs2_ptr (s),
gimple_location (s), integer_zero_node);
break;
diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c
index 94245a4678b..e26149fd1b4 100644
--- a/gcc/tree-predcom.c
+++ b/gcc/tree-predcom.c
@@ -267,7 +267,7 @@ typedef struct chain
/* For combination chains, the operator and the two chains that are
combined, and the type of the result. */
- enum tree_code operator;
+ enum tree_code op;
tree rslt_type;
struct chain *ch1, *ch2;
@@ -409,7 +409,7 @@ dump_chain (FILE *file, chain_p chain)
if (chain->type == CT_COMBINATION)
{
fprintf (file, " equal to %p %s %p in type ",
- (void *) chain->ch1, op_symbol_code (chain->operator),
+ (void *) chain->ch1, op_symbol_code (chain->op),
(void *) chain->ch2);
print_generic_expr (file, chain->rslt_type, TDF_SLIM);
fprintf (file, "\n");
@@ -1224,12 +1224,12 @@ determine_roots (struct loop *loop,
}
/* Replace the reference in statement STMT with temporary variable
- NEW. If SET is true, NEW is instead initialized to the value of
+ NEW_TREE. If SET is true, NEW_TREE is instead initialized to the value of
the reference in the statement. IN_LHS is true if the reference
is in the lhs of STMT, false if it is in rhs. */
static void
-replace_ref_with (gimple stmt, tree new, bool set, bool in_lhs)
+replace_ref_with (gimple stmt, tree new_tree, bool set, bool in_lhs)
{
tree val;
gimple new_stmt;
@@ -1245,7 +1245,7 @@ replace_ref_with (gimple stmt, tree new, bool set, bool in_lhs)
remove_phi_node (&psi, false);
/* Turn the phi node into GIMPLE_ASSIGN. */
- new_stmt = gimple_build_assign (val, new);
+ new_stmt = gimple_build_assign (val, new_tree);
gsi_insert_before (&bsi, new_stmt, GSI_NEW_STMT);
return;
}
@@ -1256,11 +1256,11 @@ replace_ref_with (gimple stmt, tree new, bool set, bool in_lhs)
bsi = gsi_for_stmt (stmt);
- /* If we do not need to initialize NEW, just replace the use of OLD. */
+ /* If we do not need to initialize NEW_TREE, just replace the use of OLD. */
if (!set)
{
gcc_assert (!in_lhs);
- gimple_assign_set_rhs_from_tree (&bsi, new);
+ gimple_assign_set_rhs_from_tree (&bsi, new_tree);
stmt = gsi_stmt (bsi);
update_stmt (stmt);
return;
@@ -1306,7 +1306,7 @@ replace_ref_with (gimple stmt, tree new, bool set, bool in_lhs)
val = gimple_assign_lhs (stmt);
}
- new_stmt = gimple_build_assign (new, unshare_expr (val));
+ new_stmt = gimple_build_assign (new_tree, unshare_expr (val));
gsi_insert_after (&bsi, new_stmt, GSI_NEW_STMT);
}
@@ -1406,7 +1406,7 @@ get_init_expr (chain_p chain, unsigned index)
tree e1 = get_init_expr (chain->ch1, index);
tree e2 = get_init_expr (chain->ch2, index);
- return fold_build2 (chain->operator, chain->rslt_type, e1, e2);
+ return fold_build2 (chain->op, chain->rslt_type, e1, e2);
}
else
return VEC_index (tree, chain->inits, index);
@@ -2347,7 +2347,7 @@ combine_chains (chain_p ch1, chain_p ch2)
new_chain = XCNEW (struct chain);
new_chain->type = CT_COMBINATION;
- new_chain->operator = op;
+ new_chain->op = op;
new_chain->ch1 = ch1;
new_chain->ch2 = ch2;
new_chain->rslt_type = rslt_type;
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c
index df055f84fe7..5708eedf3b2 100644
--- a/gcc/tree-pretty-print.c
+++ b/gcc/tree-pretty-print.c
@@ -519,7 +519,7 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
case BOOLEAN_TYPE:
{
unsigned int quals = TYPE_QUALS (node);
- enum tree_code_class class;
+ enum tree_code_class tclass;
if (quals & TYPE_QUAL_CONST)
pp_string (buffer, "const ");
@@ -528,16 +528,16 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
else if (quals & TYPE_QUAL_RESTRICT)
pp_string (buffer, "restrict ");
- class = TREE_CODE_CLASS (TREE_CODE (node));
+ tclass = TREE_CODE_CLASS (TREE_CODE (node));
- if (class == tcc_declaration)
+ if (tclass == tcc_declaration)
{
if (DECL_NAME (node))
dump_decl_name (buffer, node, flags);
else
pp_string (buffer, "<unnamed type decl>");
}
- else if (class == tcc_type)
+ else if (tclass == tcc_type)
{
if (TYPE_NAME (node))
{
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 6fb9bdd9168..4198498800b 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -4346,8 +4346,8 @@ create_variable_info_for (tree decl, const char *name)
{
unsigned int index = VEC_length (varinfo_t, varmap);
varinfo_t vi;
- tree decltype = TREE_TYPE (decl);
- tree declsize = DECL_P (decl) ? DECL_SIZE (decl) : TYPE_SIZE (decltype);
+ tree decl_type = TREE_TYPE (decl);
+ tree declsize = DECL_P (decl) ? DECL_SIZE (decl) : TYPE_SIZE (decl_type);
bool is_global = DECL_P (decl) ? is_global_var (decl) : false;
VEC (fieldoff_s,heap) *fieldstack = NULL;
@@ -4355,7 +4355,7 @@ create_variable_info_for (tree decl, const char *name)
return create_function_info_for (decl, name);
if (var_can_have_subvars (decl) && use_field_sensitive)
- push_fields_onto_fieldstack (decltype, &fieldstack, 0);
+ push_fields_onto_fieldstack (decl_type, &fieldstack, 0);
/* If the variable doesn't have subvars, we may end up needing to
sort the field list and create fake variables for all the
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index fbfcbf213d3..c308a359dd5 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -1165,12 +1165,18 @@ useless_type_conversion_p_1 (tree outer_type, tree inner_type)
if (TREE_CODE (inner_type) != TREE_CODE (outer_type))
return false;
- /* ??? Add structural equivalence check. */
+ /* ??? This seems to be necessary even for aggregates that don't
+ have TYPE_STRUCTURAL_EQUALITY_P set. */
/* ??? This should eventually just return false. */
return lang_hooks.types_compatible_p (inner_type, outer_type);
}
-
+ /* Also for functions and possibly other types with
+ TYPE_STRUCTURAL_EQUALITY_P set. */
+ else if (TYPE_STRUCTURAL_EQUALITY_P (inner_type)
+ && TYPE_STRUCTURAL_EQUALITY_P (outer_type))
+ return lang_hooks.types_compatible_p (inner_type, outer_type);
+
return false;
}
diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c
index 78bf1550d2b..935b41941a0 100644
--- a/gcc/tree-tailcall.c
+++ b/gcc/tree-tailcall.c
@@ -283,7 +283,7 @@ process_assignment (gimple stmt, gimple_stmt_iterator call, tree *m,
{
/* Reject a tailcall if the type conversion might need
additional code. */
- if (IS_CONVERT_EXPR_CODE_P (code)
+ if (gimple_assign_cast_p (stmt)
&& TYPE_MODE (TREE_TYPE (dest)) != TYPE_MODE (TREE_TYPE (src_var)))
return false;
diff --git a/gcc/tree-vect-transform.c b/gcc/tree-vect-transform.c
index e466594f0cf..9d3d40a70fa 100644
--- a/gcc/tree-vect-transform.c
+++ b/gcc/tree-vect-transform.c
@@ -580,6 +580,10 @@ vect_model_simple_cost (stmt_vec_info stmt_info, int ncopies,
int i;
int inside_cost = 0, outside_cost = 0;
+ /* The SLP costs were already calculated during SLP tree build. */
+ if (PURE_SLP_STMT (stmt_info))
+ return;
+
inside_cost = ncopies * TARG_VEC_STMT_COST;
/* FORNOW: Assuming maximum 2 args per stmts. */
@@ -629,11 +633,15 @@ vect_model_store_cost (stmt_vec_info stmt_info, int ncopies,
int group_size;
int inside_cost = 0, outside_cost = 0;
+ /* The SLP costs were already calculated during SLP tree build. */
+ if (PURE_SLP_STMT (stmt_info))
+ return;
+
if (dt == vect_constant_def || dt == vect_invariant_def)
outside_cost = TARG_SCALAR_TO_VEC_COST;
/* Strided access? */
- if (DR_GROUP_FIRST_DR (stmt_info))
+ if (DR_GROUP_FIRST_DR (stmt_info) && !slp_node)
group_size = vect_cost_strided_group_size (stmt_info);
/* Not a strided access. */
else
@@ -683,6 +691,10 @@ vect_model_load_cost (stmt_vec_info stmt_info, int ncopies, slp_tree slp_node)
struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info), *first_dr;
int inside_cost = 0, outside_cost = 0;
+ /* The SLP costs were already calculated during SLP tree build. */
+ if (PURE_SLP_STMT (stmt_info))
+ return;
+
/* Strided accesses? */
first_stmt = DR_GROUP_FIRST_DR (stmt_info);
if (first_stmt && !slp_node)
@@ -4865,8 +4877,7 @@ vectorizable_store (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
if (!vec_stmt) /* transformation not required. */
{
STMT_VINFO_TYPE (stmt_info) = store_vec_info_type;
- if (!PURE_SLP_STMT (stmt_info))
- vect_model_store_cost (stmt_info, ncopies, dt, NULL);
+ vect_model_store_cost (stmt_info, ncopies, dt, NULL);
return true;
}
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 40bec2e1d4d..af4060c6a1e 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -6383,9 +6383,9 @@ simplify_cond_using_ranges (gimple stmt)
able to simplify this conditional. */
if (vr->type == VR_RANGE)
{
- tree new = test_for_singularity (cond_code, op0, op1, vr);
+ tree new_tree = test_for_singularity (cond_code, op0, op1, vr);
- if (new)
+ if (new_tree)
{
if (dump_file)
{
@@ -6396,7 +6396,7 @@ simplify_cond_using_ranges (gimple stmt)
gimple_cond_set_code (stmt, EQ_EXPR);
gimple_cond_set_lhs (stmt, op0);
- gimple_cond_set_rhs (stmt, new);
+ gimple_cond_set_rhs (stmt, new_tree);
update_stmt (stmt);
@@ -6413,9 +6413,9 @@ simplify_cond_using_ranges (gimple stmt)
with integral types here, so no need to worry about
issues with inverting FP comparisons. */
cond_code = invert_tree_comparison (cond_code, false);
- new = test_for_singularity (cond_code, op0, op1, vr);
+ new_tree = test_for_singularity (cond_code, op0, op1, vr);
- if (new)
+ if (new_tree)
{
if (dump_file)
{
@@ -6426,7 +6426,7 @@ simplify_cond_using_ranges (gimple stmt)
gimple_cond_set_code (stmt, NE_EXPR);
gimple_cond_set_lhs (stmt, op0);
- gimple_cond_set_rhs (stmt, new);
+ gimple_cond_set_rhs (stmt, new_tree);
update_stmt (stmt);
diff --git a/gcc/tree.c b/gcc/tree.c
index cdecd707f00..c92beef74ca 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -2594,7 +2594,7 @@ substitute_in_expr (tree exp, tree f, tree r)
{
enum tree_code code = TREE_CODE (exp);
tree op0, op1, op2, op3;
- tree new, inner;
+ tree new_tree, inner;
/* We handle TREE_LIST and COMPONENT_REF separately. */
if (code == TREE_LIST)
@@ -2626,7 +2626,7 @@ substitute_in_expr (tree exp, tree f, tree r)
if (op0 == TREE_OPERAND (exp, 0))
return exp;
- new = fold_build3 (COMPONENT_REF, TREE_TYPE (exp),
+ new_tree = fold_build3 (COMPONENT_REF, TREE_TYPE (exp),
op0, TREE_OPERAND (exp, 1), NULL_TREE);
}
else
@@ -2652,7 +2652,7 @@ substitute_in_expr (tree exp, tree f, tree r)
if (op0 == TREE_OPERAND (exp, 0))
return exp;
- new = fold_build1 (code, TREE_TYPE (exp), op0);
+ new_tree = fold_build1 (code, TREE_TYPE (exp), op0);
break;
case 2:
@@ -2662,7 +2662,7 @@ substitute_in_expr (tree exp, tree f, tree r)
if (op0 == TREE_OPERAND (exp, 0) && op1 == TREE_OPERAND (exp, 1))
return exp;
- new = fold_build2 (code, TREE_TYPE (exp), op0, op1);
+ new_tree = fold_build2 (code, TREE_TYPE (exp), op0, op1);
break;
case 3:
@@ -2674,7 +2674,7 @@ substitute_in_expr (tree exp, tree f, tree r)
&& op2 == TREE_OPERAND (exp, 2))
return exp;
- new = fold_build3 (code, TREE_TYPE (exp), op0, op1, op2);
+ new_tree = fold_build3 (code, TREE_TYPE (exp), op0, op1, op2);
break;
case 4:
@@ -2688,7 +2688,7 @@ substitute_in_expr (tree exp, tree f, tree r)
&& op3 == TREE_OPERAND (exp, 3))
return exp;
- new = fold (build4 (code, TREE_TYPE (exp), op0, op1, op2, op3));
+ new_tree = fold (build4 (code, TREE_TYPE (exp), op0, op1, op2, op3));
break;
default:
@@ -2714,7 +2714,7 @@ substitute_in_expr (tree exp, tree f, tree r)
}
if (copy)
- new = fold (copy);
+ new_tree = fold (copy);
else
return exp;
}
@@ -2724,8 +2724,8 @@ substitute_in_expr (tree exp, tree f, tree r)
gcc_unreachable ();
}
- TREE_READONLY (new) = TREE_READONLY (exp);
- return new;
+ TREE_READONLY (new_tree) = TREE_READONLY (exp);
+ return new_tree;
}
/* Similar, but look for a PLACEHOLDER_EXPR in EXP and find a replacement
@@ -3915,7 +3915,7 @@ merge_decl_attributes (tree olddecl, tree newdecl)
The second instance of `foo' nullifies the dllimport. */
tree
-merge_dllimport_decl_attributes (tree old, tree new)
+merge_dllimport_decl_attributes (tree old, tree new_tree)
{
tree a;
int delete_dllimport_p = 1;
@@ -3926,16 +3926,16 @@ merge_dllimport_decl_attributes (tree old, tree new)
is not dllimport'd. We also remove a `new' dllimport if the old list
contains dllexport: dllexport always overrides dllimport, regardless
of the order of declaration. */
- if (!VAR_OR_FUNCTION_DECL_P (new))
+ if (!VAR_OR_FUNCTION_DECL_P (new_tree))
delete_dllimport_p = 0;
- else if (DECL_DLLIMPORT_P (new)
+ else if (DECL_DLLIMPORT_P (new_tree)
&& lookup_attribute ("dllexport", DECL_ATTRIBUTES (old)))
{
- DECL_DLLIMPORT_P (new) = 0;
+ DECL_DLLIMPORT_P (new_tree) = 0;
warning (OPT_Wattributes, "%q+D already declared with dllexport attribute: "
- "dllimport ignored", new);
+ "dllimport ignored", new_tree);
}
- else if (DECL_DLLIMPORT_P (old) && !DECL_DLLIMPORT_P (new))
+ else if (DECL_DLLIMPORT_P (old) && !DECL_DLLIMPORT_P (new_tree))
{
/* Warn about overriding a symbol that has already been used, e.g.:
extern int __attribute__ ((dllimport)) foo;
@@ -3945,27 +3945,27 @@ merge_dllimport_decl_attributes (tree old, tree new)
if (TREE_USED (old))
{
warning (0, "%q+D redeclared without dllimport attribute "
- "after being referenced with dll linkage", new);
+ "after being referenced with dll linkage", new_tree);
/* If we have used a variable's address with dllimport linkage,
keep the old DECL_DLLIMPORT_P flag: the ADDR_EXPR using the
decl may already have had TREE_CONSTANT computed.
We still remove the attribute so that assembler code refers
to '&foo rather than '_imp__foo'. */
if (TREE_CODE (old) == VAR_DECL && TREE_ADDRESSABLE (old))
- DECL_DLLIMPORT_P (new) = 1;
+ DECL_DLLIMPORT_P (new_tree) = 1;
}
/* Let an inline definition silently override the external reference,
but otherwise warn about attribute inconsistency. */
- else if (TREE_CODE (new) == VAR_DECL
- || !DECL_DECLARED_INLINE_P (new))
+ else if (TREE_CODE (new_tree) == VAR_DECL
+ || !DECL_DECLARED_INLINE_P (new_tree))
warning (OPT_Wattributes, "%q+D redeclared without dllimport attribute: "
- "previous dllimport ignored", new);
+ "previous dllimport ignored", new_tree);
}
else
delete_dllimport_p = 0;
- a = merge_attributes (DECL_ATTRIBUTES (old), DECL_ATTRIBUTES (new));
+ a = merge_attributes (DECL_ATTRIBUTES (old), DECL_ATTRIBUTES (new_tree));
if (delete_dllimport_p)
{
@@ -5253,7 +5253,7 @@ iterative_hash_expr (const_tree t, hashval_t val)
{
int i;
enum tree_code code;
- char class;
+ char tclass;
if (t == NULL_TREE)
return iterative_hash_pointer (t, val);
@@ -5322,16 +5322,16 @@ iterative_hash_expr (const_tree t, hashval_t val)
}
/* else FALL THROUGH */
default:
- class = TREE_CODE_CLASS (code);
+ tclass = TREE_CODE_CLASS (code);
- if (class == tcc_declaration)
+ if (tclass == tcc_declaration)
{
/* DECL's have a unique ID */
val = iterative_hash_host_wide_int (DECL_UID (t), val);
}
else
{
- gcc_assert (IS_EXPR_CODE_CLASS (class));
+ gcc_assert (IS_EXPR_CODE_CLASS (tclass));
val = iterative_hash_object (code, val);
diff --git a/gcc/value-prof.c b/gcc/value-prof.c
index b94a3f96b47..da35008ca8e 100644
--- a/gcc/value-prof.c
+++ b/gcc/value-prof.c
@@ -333,12 +333,12 @@ gimple_duplicate_stmt_histograms (struct function *fun, gimple stmt,
histogram_value val;
for (val = gimple_histogram_value (ofun, ostmt); val != NULL; val = val->hvalue.next)
{
- histogram_value new = gimple_alloc_histogram_value (fun, val->type, NULL, NULL);
- memcpy (new, val, sizeof (*val));
- new->hvalue.stmt = stmt;
- new->hvalue.counters = XNEWVAR (gcov_type, sizeof (*new->hvalue.counters) * new->n_counters);
- memcpy (new->hvalue.counters, val->hvalue.counters, sizeof (*new->hvalue.counters) * new->n_counters);
- gimple_add_histogram_value (fun, stmt, new);
+ histogram_value new_val = gimple_alloc_histogram_value (fun, val->type, NULL, NULL);
+ memcpy (new_val, val, sizeof (*val));
+ new_val->hvalue.stmt = stmt;
+ new_val->hvalue.counters = XNEWVAR (gcov_type, sizeof (*new_val->hvalue.counters) * new_val->n_counters);
+ memcpy (new_val->hvalue.counters, val->hvalue.counters, sizeof (*new_val->hvalue.counters) * new_val->n_counters);
+ gimple_add_histogram_value (fun, stmt, new_val);
}
}
diff --git a/libada/ChangeLog b/libada/ChangeLog
index 7e8be0a080f..e56394e0a40 100644
--- a/libada/ChangeLog
+++ b/libada/ChangeLog
@@ -1,3 +1,12 @@
+2008-08-06 Samuel Tardieu <sam@rfc1149.net>
+
+ * Makefile.in: Pass FLAGS_TO_PASS to sub-make for target
+ oscons.
+
+2008-08-06 Thomas Quinot <quinot@adacore.com>
+
+ * Makefile.in: Now generate s-oscons-$(THREAD_KIND).
+
2008-08-05 Thomas Quinot <quinot@adacore.com>
* Makefile.in (gnatlib*): Now depend on oscons target.
diff --git a/libada/Makefile.in b/libada/Makefile.in
index 452723b7a40..211e3eb50f1 100644
--- a/libada/Makefile.in
+++ b/libada/Makefile.in
@@ -94,7 +94,9 @@ gnatlib-sjlj gnatlib-zcx gnatlib-shared: oscons $(GCC_DIR)/ada/Makefile
&& touch stamp-libada
oscons:
- $(MAKE) -C $(GCC_DIR) THREAD_KIND="$(THREAD_KIND)" ada/s-oscons.ads
+ $(MAKE) -C $(GCC_DIR) THREAD_KIND="$(THREAD_KIND)" \
+ $(FLAGS_TO_PASS) \
+ ada/s-oscons-$(THREAD_KIND).ads
# Check uninstalled version.
check:
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 348afc5d227..35f7c8c11ba 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,7 @@
+2008-08-06 Bob Wilson <bob.wilson@acm.org>
+
+ * config.host: Match more processor names for Xtensa.
+
2008-07-08 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/64/t-softfp-compat: Update comments.
diff --git a/libgcc/config.host b/libgcc/config.host
index 93d1dbfacbb..0bca859cdae 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -558,9 +558,9 @@ vax-*-openbsd*)
;;
xstormy16-*-elf)
;;
-xtensa-*-elf*)
+xtensa*-*-elf*)
;;
-xtensa-*-linux*)
+xtensa*-*-linux*)
;;
am33_2.0-*-linux*)
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 9e8a6e6700f..8d81860ee74 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,39 @@
+008-08-06 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * acinclude.m4 ([GLIBCXX_CHECK_INT64_T]): Also check whether int64_t
+ is actually a typedef to long or long long.
+ * include/bits/postypes.h: If int64_t is actually a typedef for
+ long or long long don't include <stdint.h> unnecessarily.
+ * configure: Regenerate.
+ * config.h.in: Likewise.
+
+2008-08-05 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * testsuite/util/testsuite_api.h (diamond_derivation<>::test):
+ Expect ambiguity together with the standard exception classes.
+ * testsuite/27_io/ios_base/failure/cons_virtual_derivation.cc: Remove
+ xfail.
+ * testsuite/19_diagnostics/logic_error/cons_virtual_derivation.cc:
+ Likewise.
+ * testsuite/19_diagnostics/runtime_error/cons_virtual_derivation.cc:
+ Likewise.
+ * testsuite/19_diagnostics/system_error/cons_virtual_derivation.cc:
+ Likewise.
+ * testsuite/18_support/bad_alloc/cons_virtual_derivation.cc: Likewise.
+ * testsuite/18_support/bad_cast/cons_virtual_derivation.cc: Likewise.
+ * testsuite/18_support/bad_exception/cons_virtual_derivation.cc:
+ Likewise.
+ * testsuite/18_support/bad_typeid/cons_virtual_derivation.cc:
+ Likewise.
+ * testsuite/ext/concurrence_lock_error/cons_virtual_derivation.cc:
+ Likewise.
+ * testsuite/ext/forced_exception_error/cons_virtual_derivation.cc:
+ Likewise.
+ * testsuite/ext/concurrence_unlock_error/cons_virtual_derivation.cc:
+ Likewise.
+ * testsuite/20_util/bad_function_call/cons_virtual_derivation.cc:
+ Likewise.
+
2008-08-04 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/postypes.h: Reinstate inclusion of <stdint.h>;
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 0a669c9a7fa..50f207c2382 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -466,8 +466,13 @@ AC_DEFUN([GLIBCXX_CHECK_WRITEV], [
dnl
dnl Check whether int64_t is available in <stdint.h>, and define HAVE_INT64_T.
+dnl Also check whether int64_t is actually a typedef to long or long long.
dnl
AC_DEFUN([GLIBCXX_CHECK_INT64_T], [
+
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+
AC_MSG_CHECKING([for int64_t])
AC_CACHE_VAL(glibcxx_cv_INT64_T, [
AC_TRY_COMPILE(
@@ -476,10 +481,43 @@ AC_DEFUN([GLIBCXX_CHECK_INT64_T], [
[glibcxx_cv_INT64_T=yes],
[glibcxx_cv_INT64_T=no])
])
+
if test $glibcxx_cv_INT64_T = yes; then
AC_DEFINE(HAVE_INT64_T, 1, [Define if int64_t is available in <stdint.h>.])
+ AC_MSG_RESULT($glibcxx_cv_INT64_T)
+
+ AC_MSG_CHECKING([for int64_t as long])
+ AC_CACHE_VAL(glibcxx_cv_int64_t_long, [
+ AC_TRY_COMPILE(
+ [#include <stdint.h>
+ template<typename, typename> struct same { enum { value = -1 }; };
+ template<typename Tp> struct same<Tp, Tp> { enum { value = 1 }; };
+ int array[same<int64_t, long>::value];], [],
+ [glibcxx_cv_int64_t_long=yes], [glibcxx_cv_int64_t_long=no])
+ ])
+
+ if test $glibcxx_cv_int64_t_long = yes; then
+ AC_DEFINE(HAVE_INT64_T_LONG, 1, [Define if int64_t is a long.])
+ AC_MSG_RESULT($glibcxx_cv_int64_t_long)
+ fi
+
+ AC_MSG_CHECKING([for int64_t as long long])
+ AC_CACHE_VAL(glibcxx_cv_int64_t_long_long, [
+ AC_TRY_COMPILE(
+ [#include <stdint.h>
+ template<typename, typename> struct same { enum { value = -1 }; };
+ template<typename Tp> struct same<Tp, Tp> { enum { value = 1 }; };
+ int array[same<int64_t, long long>::value];], [],
+ [glibcxx_cv_int64_t_long_long=yes], [glibcxx_cv_int64_t_long_long=no])
+ ])
+
+ if test $glibcxx_cv_int64_t_long_long = yes; then
+ AC_DEFINE(HAVE_INT64_T_LONG_LONG, 1, [Define if int64_t is a long long.])
+ AC_MSG_RESULT($glibcxx_cv_int64_t_long_long)
+ fi
fi
- AC_MSG_RESULT($glibcxx_cv_INT64_T)
+
+ AC_LANG_RESTORE
])
diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.in
index 256637abcec..438fe1488c4 100644
--- a/libstdc++-v3/config.h.in
+++ b/libstdc++-v3/config.h.in
@@ -184,6 +184,12 @@
/* Define if int64_t is available in <stdint.h>. */
#undef HAVE_INT64_T
+/* Define if int64_t is a long. */
+#undef HAVE_INT64_T_LONG
+
+/* Define if int64_t is a long long. */
+#undef HAVE_INT64_T_LONG_LONG
+
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 2ea940ae8a1..5fb310780a6 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -39677,6 +39677,16 @@ echo "${ECHO_T}$glibcxx_cv_WRITEV" >&6
# For the __streamoff_base_type typedef.
+
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
echo "$as_me:$LINENO: checking for int64_t" >&5
echo $ECHO_N "checking for int64_t... $ECHO_C" >&6
if test "${glibcxx_cv_INT64_T+set}" = set; then
@@ -39707,7 +39717,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
+ { ac_try='test -z "$ac_cxx_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
@@ -39731,16 +39741,160 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+
if test $glibcxx_cv_INT64_T = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_INT64_T 1
_ACEOF
- fi
- echo "$as_me:$LINENO: result: $glibcxx_cv_INT64_T" >&5
+ echo "$as_me:$LINENO: result: $glibcxx_cv_INT64_T" >&5
echo "${ECHO_T}$glibcxx_cv_INT64_T" >&6
+ echo "$as_me:$LINENO: checking for int64_t as long" >&5
+echo $ECHO_N "checking for int64_t as long... $ECHO_C" >&6
+ if test "${glibcxx_cv_int64_t_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdint.h>
+ template<typename, typename> struct same { enum { value = -1 }; };
+ template<typename Tp> struct same<Tp, Tp> { enum { value = 1 }; };
+ int array[same<int64_t, long>::value];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_int64_t_long=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_int64_t_long=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+
+ if test $glibcxx_cv_int64_t_long = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INT64_T_LONG 1
+_ACEOF
+
+ echo "$as_me:$LINENO: result: $glibcxx_cv_int64_t_long" >&5
+echo "${ECHO_T}$glibcxx_cv_int64_t_long" >&6
+ fi
+
+ echo "$as_me:$LINENO: checking for int64_t as long long" >&5
+echo $ECHO_N "checking for int64_t as long long... $ECHO_C" >&6
+ if test "${glibcxx_cv_int64_t_long_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdint.h>
+ template<typename, typename> struct same { enum { value = -1 }; };
+ template<typename Tp> struct same<Tp, Tp> { enum { value = 1 }; };
+ int array[same<int64_t, long long>::value];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ glibcxx_cv_int64_t_long_long=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+glibcxx_cv_int64_t_long_long=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+
+ if test $glibcxx_cv_int64_t_long_long = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INT64_T_LONG_LONG 1
+_ACEOF
+
+ echo "$as_me:$LINENO: result: $glibcxx_cv_int64_t_long_long" >&5
+echo "${ECHO_T}$glibcxx_cv_int64_t_long_long" >&6
+ fi
+ fi
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
# For LFS support.
diff --git a/libstdc++-v3/include/bits/postypes.h b/libstdc++-v3/include/bits/postypes.h
index cdcafe2051f..1bc972af187 100644
--- a/libstdc++-v3/include/bits/postypes.h
+++ b/libstdc++-v3/include/bits/postypes.h
@@ -49,7 +49,8 @@
// XXX If <stdint.h> is really needed, make sure to define the macros,
// in order not to break <tr1/cstdint> (and <cstdint> in C++0x).
// Reconsider all this as soon as possible...
-#ifdef _GLIBCXX_HAVE_INT64_T
+#if (defined(_GLIBCXX_HAVE_INT64_T) && !defined(_GLIBCXX_HAVE_INT64_T_LONG) \
+ && !defined(_GLIBCXX_HAVE_INT64_T_LONG_LONG))
#ifndef __STDC_LIMIT_MACROS
# define __STDC_LIMIT_MACROS
#endif
@@ -76,7 +77,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* Note: In versions of GCC up to and including GCC 3.3, streamoff
* was typedef long.
*/
-#ifdef _GLIBCXX_HAVE_INT64_T
+#ifdef _GLIBCXX_HAVE_INT64_T_LONG
+ typedef long streamoff;
+#elif defined(_GLIBCXX_HAVE_INT64_T_LONG_LONG)
+ typedef long long streamoff;
+#elif defined(_GLIBCXX_HAVE_INT64_T)
typedef int64_t streamoff;
#else
typedef long long streamoff;
diff --git a/libstdc++-v3/testsuite/18_support/bad_alloc/cons_virtual_derivation.cc b/libstdc++-v3/testsuite/18_support/bad_alloc/cons_virtual_derivation.cc
index dd0d09b6fb4..b7d28cc34d8 100644
--- a/libstdc++-v3/testsuite/18_support/bad_alloc/cons_virtual_derivation.cc
+++ b/libstdc++-v3/testsuite/18_support/bad_alloc/cons_virtual_derivation.cc
@@ -1,7 +1,6 @@
-// { dg-do run { xfail *-*-* } }
// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
diff --git a/libstdc++-v3/testsuite/18_support/bad_cast/cons_virtual_derivation.cc b/libstdc++-v3/testsuite/18_support/bad_cast/cons_virtual_derivation.cc
index 4efc3466cf9..358f0c5dfd6 100644
--- a/libstdc++-v3/testsuite/18_support/bad_cast/cons_virtual_derivation.cc
+++ b/libstdc++-v3/testsuite/18_support/bad_cast/cons_virtual_derivation.cc
@@ -1,7 +1,6 @@
-// { dg-do run { xfail *-*-* } }
// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
diff --git a/libstdc++-v3/testsuite/18_support/bad_exception/cons_virtual_derivation.cc b/libstdc++-v3/testsuite/18_support/bad_exception/cons_virtual_derivation.cc
index b66ce7d43ed..8fb71fe6399 100644
--- a/libstdc++-v3/testsuite/18_support/bad_exception/cons_virtual_derivation.cc
+++ b/libstdc++-v3/testsuite/18_support/bad_exception/cons_virtual_derivation.cc
@@ -1,7 +1,6 @@
-// { dg-do run { xfail *-*-* } }
// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
diff --git a/libstdc++-v3/testsuite/18_support/bad_typeid/cons_virtual_derivation.cc b/libstdc++-v3/testsuite/18_support/bad_typeid/cons_virtual_derivation.cc
index 0da3c9deac8..9d69eb3fd25 100644
--- a/libstdc++-v3/testsuite/18_support/bad_typeid/cons_virtual_derivation.cc
+++ b/libstdc++-v3/testsuite/18_support/bad_typeid/cons_virtual_derivation.cc
@@ -1,7 +1,6 @@
-// { dg-do run { xfail *-*-* } }
// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
diff --git a/libstdc++-v3/testsuite/19_diagnostics/logic_error/cons_virtual_derivation.cc b/libstdc++-v3/testsuite/19_diagnostics/logic_error/cons_virtual_derivation.cc
index 5c936e27f16..350f66d9499 100644
--- a/libstdc++-v3/testsuite/19_diagnostics/logic_error/cons_virtual_derivation.cc
+++ b/libstdc++-v3/testsuite/19_diagnostics/logic_error/cons_virtual_derivation.cc
@@ -1,7 +1,6 @@
-// { dg-do run { xfail *-*-* } }
// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
diff --git a/libstdc++-v3/testsuite/19_diagnostics/runtime_error/cons_virtual_derivation.cc b/libstdc++-v3/testsuite/19_diagnostics/runtime_error/cons_virtual_derivation.cc
index 86d5bb5ed71..c8870e51efb 100644
--- a/libstdc++-v3/testsuite/19_diagnostics/runtime_error/cons_virtual_derivation.cc
+++ b/libstdc++-v3/testsuite/19_diagnostics/runtime_error/cons_virtual_derivation.cc
@@ -1,7 +1,6 @@
-// { dg-do run { xfail *-*-* } }
// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
diff --git a/libstdc++-v3/testsuite/19_diagnostics/system_error/cons_virtual_derivation.cc b/libstdc++-v3/testsuite/19_diagnostics/system_error/cons_virtual_derivation.cc
index 8e67ce5edae..098fb575dab 100644
--- a/libstdc++-v3/testsuite/19_diagnostics/system_error/cons_virtual_derivation.cc
+++ b/libstdc++-v3/testsuite/19_diagnostics/system_error/cons_virtual_derivation.cc
@@ -1,8 +1,7 @@
// { dg-options "-std=gnu++0x" }
-// { dg-do run { xfail *-*-* } }
// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
diff --git a/libstdc++-v3/testsuite/20_util/bad_function_call/cons_virtual_derivation.cc b/libstdc++-v3/testsuite/20_util/bad_function_call/cons_virtual_derivation.cc
index 6cc46c02a51..c31563a3351 100644
--- a/libstdc++-v3/testsuite/20_util/bad_function_call/cons_virtual_derivation.cc
+++ b/libstdc++-v3/testsuite/20_util/bad_function_call/cons_virtual_derivation.cc
@@ -1,8 +1,7 @@
-// { dg-do run { xfail *-*-* } }
// { dg-options "-std=gnu++0x" }
// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
diff --git a/libstdc++-v3/testsuite/27_io/ios_base/failure/cons_virtual_derivation.cc b/libstdc++-v3/testsuite/27_io/ios_base/failure/cons_virtual_derivation.cc
index 1819726a37b..87bf982407f 100644
--- a/libstdc++-v3/testsuite/27_io/ios_base/failure/cons_virtual_derivation.cc
+++ b/libstdc++-v3/testsuite/27_io/ios_base/failure/cons_virtual_derivation.cc
@@ -1,7 +1,6 @@
-// { dg-do run { xfail *-*-* } }
// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
diff --git a/libstdc++-v3/testsuite/ext/concurrence_lock_error/cons_virtual_derivation.cc b/libstdc++-v3/testsuite/ext/concurrence_lock_error/cons_virtual_derivation.cc
index 07396b0b219..35602c71272 100644
--- a/libstdc++-v3/testsuite/ext/concurrence_lock_error/cons_virtual_derivation.cc
+++ b/libstdc++-v3/testsuite/ext/concurrence_lock_error/cons_virtual_derivation.cc
@@ -1,7 +1,6 @@
-// { dg-do run { xfail *-*-* } }
// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
diff --git a/libstdc++-v3/testsuite/ext/concurrence_unlock_error/cons_virtual_derivation.cc b/libstdc++-v3/testsuite/ext/concurrence_unlock_error/cons_virtual_derivation.cc
index ddc2c46b8ed..d6e4e8b1b22 100644
--- a/libstdc++-v3/testsuite/ext/concurrence_unlock_error/cons_virtual_derivation.cc
+++ b/libstdc++-v3/testsuite/ext/concurrence_unlock_error/cons_virtual_derivation.cc
@@ -1,7 +1,6 @@
-// { dg-do run { xfail *-*-* } }
// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
diff --git a/libstdc++-v3/testsuite/ext/forced_exception_error/cons_virtual_derivation.cc b/libstdc++-v3/testsuite/ext/forced_exception_error/cons_virtual_derivation.cc
index ae6ef0bd623..81b5214812f 100644
--- a/libstdc++-v3/testsuite/ext/forced_exception_error/cons_virtual_derivation.cc
+++ b/libstdc++-v3/testsuite/ext/forced_exception_error/cons_virtual_derivation.cc
@@ -1,7 +1,6 @@
-// { dg-do run { xfail *-*-* } }
// 2007-05-29 Benjamin Kosnik <bkoz@redhat.com>
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
diff --git a/libstdc++-v3/testsuite/util/testsuite_api.h b/libstdc++-v3/testsuite/util/testsuite_api.h
index cbb606c42a8..74b25d2d950 100644
--- a/libstdc++-v3/testsuite/util/testsuite_api.h
+++ b/libstdc++-v3/testsuite/util/testsuite_api.h
@@ -1,7 +1,7 @@
// -*- C++ -*-
// Exception testing utils for the C++ library testsuite.
//
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -47,16 +47,19 @@ namespace __gnu_test
template<typename Exception>
struct diamond_derivation_base<Exception, true>
{
- struct diamond_derivation_error: bad_non_virtual, Exception
+ struct diamond_derivation_error
+ : bad_non_virtual, Exception
{
- diamond_derivation_error() : bad_non_virtual(), Exception() { }
+ diamond_derivation_error()
+ : bad_non_virtual(), Exception() { }
};
};
template<typename Exception>
struct diamond_derivation_base<Exception, false>
{
- struct diamond_derivation_error: bad_non_virtual, Exception
+ struct diamond_derivation_error
+ : bad_non_virtual, Exception
{
diamond_derivation_error()
: bad_non_virtual(), Exception("construct diamond") { }
@@ -64,18 +67,25 @@ namespace __gnu_test
};
template<typename Exception, bool DefaultCons>
- struct diamond_derivation: diamond_derivation_base<Exception, DefaultCons>
+ struct diamond_derivation
+ : diamond_derivation_base<Exception, DefaultCons>
{
typedef diamond_derivation_base<Exception, DefaultCons> base_type;
typedef typename base_type::diamond_derivation_error error_type;
-
+
+ // NB: In the libstdc++-v3 testsuite, all the standard exception
+ // classes (+ a couple of extensions) are checked: since they
+ // all derive *non* virtually from std::exception, the expected
+ // behavior is ambiguity.
static void test()
{
bool test __attribute__((unused)) = true;
- try { throw error_type(); }
- catch (std::exception const& e) { }
- catch (...)
+ try
+ { throw error_type(); }
+ catch (std::exception const&)
{ VERIFY( false ); }
+ catch (...)
+ { VERIFY( true ); }
}
};