diff options
author | Martin Liska <mliska@suse.cz> | 2018-06-08 09:53:31 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2018-06-08 07:53:31 +0000 |
commit | 31db0fe044cc9d4ba43dd4535575aeac3aa3952b (patch) | |
tree | 9bc543166dccf1ba541d41e05b67efd097cc795d /gcc/testsuite/gcc.target | |
parent | c71f71f8bd0dc7e5d93ee75993a84b3386c3fe12 (diff) | |
download | gcc-31db0fe044cc9d4ba43dd4535575aeac3aa3952b.tar.gz |
Remove MPX
2018-06-08 Martin Liska <mliska@suse.cz>
* MAINTAINERS: Remove MPX-related entries.
* Makefile.def: Remove libmpx support.
* Makefile.in: Likewise.
* configure: Remove removed files.
* configure.ac: Likewise.
* libmpx/ChangeLog: Remove.
* libmpx/Makefile.am: Remove.
* libmpx/Makefile.in: Remove.
* libmpx/acinclude.m4: Remove.
* libmpx/aclocal.m4: Remove.
* libmpx/config.h.in: Remove.
* libmpx/configure: Remove.
* libmpx/configure.ac: Remove.
* libmpx/configure.tgt: Remove.
* libmpx/libmpx.spec.in: Remove.
* libmpx/mpxrt/Makefile.am: Remove.
* libmpx/mpxrt/Makefile.in: Remove.
* libmpx/mpxrt/libmpx.map: Remove.
* libmpx/mpxrt/libtool-version: Remove.
* libmpx/mpxrt/mpxrt-utils.c: Remove.
* libmpx/mpxrt/mpxrt-utils.h: Remove.
* libmpx/mpxrt/mpxrt.c: Remove.
* libmpx/mpxrt/mpxrt.h: Remove.
* libmpx/mpxwrap/Makefile.am: Remove.
* libmpx/mpxwrap/Makefile.in: Remove.
* libmpx/mpxwrap/libmpxwrappers.map: Remove.
* libmpx/mpxwrap/libtool-version: Remove.
* libmpx/mpxwrap/mpx_wrappers.c: Remove.
2018-06-08 Martin Liska <mliska@suse.cz>
* bootstrap-mpx.mk: Remove.
2018-06-08 Martin Liska <mliska@suse.cz>
* Makefile.in: Remove support for MPX (macros, related functions,
fields in cgraph_node, ...).
* builtin-types.def (BT_BND): Likewise.
(BT_FN_BND_CONST_PTR): Likewise.
(BT_FN_CONST_PTR_BND): Likewise.
(BT_FN_VOID_PTR_BND): Likewise.
(BT_FN_BND_CONST_PTR_SIZE): Likewise.
(BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
* builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
(expand_builtin_mempcpy_with_bounds): Likewise.
(expand_builtin_memset_with_bounds): Likewise.
(expand_builtin_memset_args): Likewise.
(std_expand_builtin_va_start): Likewise.
(expand_builtin): Likewise.
(expand_builtin_with_bounds): Likewise.
* builtins.def (DEF_BUILTIN_CHKP): Likewise.
(DEF_LIB_BUILTIN_CHKP): Likewise.
(DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
(DEF_CHKP_BUILTIN): Likewise.
(BUILT_IN_MEMCPY): Likewise.
(BUILT_IN_MEMMOVE): Likewise.
(BUILT_IN_MEMPCPY): Likewise.
(BUILT_IN_MEMSET): Likewise.
(BUILT_IN_STPCPY): Likewise.
(BUILT_IN_STRCAT): Likewise.
(BUILT_IN_STRCHR): Likewise.
(BUILT_IN_STRCPY): Likewise.
(BUILT_IN_STRLEN): Likewise.
(BUILT_IN_MEMCPY_CHK): Likewise.
(BUILT_IN_MEMMOVE_CHK): Likewise.
(BUILT_IN_MEMPCPY_CHK): Likewise.
(BUILT_IN_MEMSET_CHK): Likewise.
(BUILT_IN_STPCPY_CHK): Likewise.
(BUILT_IN_STRCAT_CHK): Likewise.
(BUILT_IN_STRCPY_CHK): Likewise.
* calls.c (store_bounds): Likewise.
(emit_call_1): Likewise.
(special_function_p): Likewise.
(maybe_warn_nonstring_arg): Likewise.
(initialize_argument_information): Likewise.
(finalize_must_preallocate): Likewise.
(compute_argument_addresses): Likewise.
(expand_call): Likewise.
* cfgexpand.c (expand_call_stmt): Likewise.
(expand_return): Likewise.
(expand_gimple_stmt_1): Likewise.
(pass_expand::execute): Likewise.
* cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
(cgraph_node::remove): Likewise.
(cgraph_node::dump): Likewise.
(cgraph_node::verify_node): Likewise.
* cgraph.h (chkp_function_instrumented_p): Likewise.
(symtab_node::get_alias_target): Likewise.
(cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
(cgraph_local_p): Likewise.
* cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
(cgraph_edge::rebuild_references): Likewise.
* cgraphunit.c (varpool_node::finalize_decl): Likewise.
(walk_polymorphic_call_targets): Likewise.
(cgraph_node::expand_thunk): Likewise.
(symbol_table::output_weakrefs): Likewise.
* common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
(ix86_handle_option): Likewise.
* config/i386/constraints.md: Likewise.
* config/i386/i386-builtin-types.def (BND): Likewise.
(VOID): Likewise.
(PVOID): Likewise.
(ULONG): Likewise.
* config/i386/i386-builtin.def (BDESC_END): Likewise.
(BDESC_FIRST): Likewise.
(BDESC): Likewise.
* config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
* config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
* config/i386/i386.c (enum reg_class): Likewise.
(ix86_target_string): Likewise.
(ix86_option_override_internal): Likewise.
(ix86_conditional_register_usage): Likewise.
(ix86_valid_target_attribute_inner_p): Likewise.
(ix86_set_indirect_branch_type): Likewise.
(ix86_set_current_function): Likewise.
(ix86_function_arg_regno_p): Likewise.
(init_cumulative_args): Likewise.
(ix86_function_arg_advance): Likewise.
(ix86_function_arg): Likewise.
(ix86_pass_by_reference): Likewise.
(ix86_function_value_regno_p): Likewise.
(ix86_function_value_1): Likewise.
(ix86_function_value_bounds): Likewise.
(ix86_return_in_memory): Likewise.
(ix86_setup_incoming_vararg_bounds): Likewise.
(ix86_va_start): Likewise.
(indirect_thunk_need_prefix): Likewise.
(print_reg): Likewise.
(ix86_print_operand): Likewise.
(ix86_expand_call): Likewise.
(ix86_output_function_return): Likewise.
(reg_encoded_number): Likewise.
(BDESC_VERIFYS): Likewise.
(ix86_init_mpx_builtins): Likewise.
(ix86_init_builtins): Likewise.
(ix86_emit_cmove): Likewise.
(ix86_emit_move_max): Likewise.
(ix86_expand_builtin): Likewise.
(ix86_builtin_mpx_function): Likewise.
(ix86_get_arg_address_for_bt): Likewise.
(ix86_load_bounds): Likewise.
(ix86_store_bounds): Likewise.
(ix86_load_returned_bounds): Likewise.
(ix86_store_returned_bounds): Likewise.
(ix86_class_likely_spilled_p): Likewise.
(ix86_hard_regno_mode_ok): Likewise.
(x86_order_regs_for_local_alloc): Likewise.
(ix86_mitigate_rop): Likewise.
(ix86_bnd_prefixed_insn_p): Likewise.
(ix86_mpx_bound_mode): Likewise.
(ix86_make_bounds_constant): Likewise.
(ix86_initialize_bounds): Likewise.
(TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
(TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
(TARGET_LOAD_RETURNED_BOUNDS): Likewise.
(TARGET_STORE_RETURNED_BOUNDS): Likewise.
(TARGET_CHKP_BOUND_MODE): Likewise.
(TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
(TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
(TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
(TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
* config/i386/i386.h (TARGET_MPX): Likewise.
(TARGET_MPX_P): Likewise.
(VALID_BND_REG_MODE): Likewise.
(FIRST_BND_REG): Likewise.
(LAST_BND_REG): Likewise.
(enum reg_class): Likewise.
(BND_REG_P): Likewise.
(BND_REGNO_P): Likewise.
(BNDmode): Likewise.
(ADJUST_INSN_LENGTH): Likewise.
* config/i386/i386.md: Likewise.
* config/i386/i386.opt: Likewise.
* config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
(defined): Likewise.
(LINK_MPX): Likewise.
(MPX_SPEC): Likewise.
(LIBMPX_SPEC): Likewise.
(LIBMPXWRAPPERS_SPEC): Likewise.
(CHKP_SPEC): Likewise.
* config/i386/predicates.md: Likewise.
* dbxout.c (dbxout_type): Likewise.
* doc/extend.texi: Likewise.
* doc/invoke.texi: Likewise.
* doc/md.texi: Likewise.
* doc/tm.texi: Likewise.
* doc/tm.texi.in: Likewise.
* dwarf2out.c (is_base_type): Likewise.
(gen_formal_types_die): Likewise.
(gen_subprogram_die): Likewise.
(gen_type_die_with_usage): Likewise.
(gen_decl_die): Likewise.
(dwarf2out_late_global_decl): Likewise.
* expr.c (expand_assignment): Likewise.
(emit_storent_insn): Likewise.
(store_expr_with_bounds): Likewise.
(store_expr): Likewise.
(expand_expr_real_1): Likewise.
* expr.h (store_expr_with_bounds): Likewise.
* function.c (use_register_for_decl): Likewise.
(struct bounds_parm_data): Likewise.
(assign_parms_augmented_arg_list): Likewise.
(assign_parm_find_entry_rtl): Likewise.
(assign_parm_is_stack_parm): Likewise.
(assign_parm_load_bounds): Likewise.
(assign_bounds): Likewise.
(assign_parms): Likewise.
(expand_function_start): Likewise.
* gcc.c (CHKP_SPEC): Likewise.
* gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
* gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
(wrestrict_dom_walker::check_call): Likewise.
* gimple.c (gimple_build_call_from_tree): Likewise.
* gimple.h (enum gf_mask): Likewise.
(gimple_call_with_bounds_p): Likewise.
(gimple_call_set_with_bounds): Likewise.
* gimplify.c (gimplify_init_constructor): Likewise.
* ipa-cp.c (initialize_node_lattices): Likewise.
(propagate_constants_across_call): Likewise.
(find_more_scalar_values_for_callers_subset): Likewise.
* ipa-hsa.c (process_hsa_functions): Likewise.
* ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
* ipa-icf.c (sem_function::merge): Likewise.
* ipa-inline.c (early_inliner): Likewise.
* ipa-pure-const.c (warn_function_noreturn): Likewise.
(warn_function_cold): Likewise.
(propagate_pure_const): Likewise.
* ipa-ref.h (enum GTY): Likewise.
* ipa-split.c (find_retbnd): Likewise.
(consider_split): Likewise.
(split_function): Likewise.
* ipa-visibility.c (cgraph_externally_visible_p): Likewise.
* ipa.c (walk_polymorphic_call_targets): Likewise.
(symbol_table::remove_unreachable_nodes): Likewise.
(process_references): Likewise.
(cgraph_build_static_cdtor_1): Likewise.
* lto-cgraph.c (lto_output_node): Likewise.
(output_refs): Likewise.
(compute_ltrans_boundary): Likewise.
(input_overwrite_node): Likewise.
(input_node): Likewise.
(input_cgraph_1): Likewise.
* params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
* passes.c (pass_manager::execute_early_local_passes): Likewise.
(class pass_chkp_instrumentation_passes): Likewise.
(make_pass_chkp_instrumentation_passes): Likewise.
* passes.def: Likewise.
* rtl.h (struct GTY): Likewise.
(CALL_EXPR_WITH_BOUNDS_P): Likewise.
* stor-layout.c (layout_type): Likewise.
* symtab.c: Likewise.
* target.def: Likewise.
* targhooks.c (default_chkp_bound_type): Likewise.
(default_chkp_bound_mode): Likewise.
(default_builtin_chkp_function): Likewise.
(default_chkp_function_value_bounds): Likewise.
(default_chkp_make_bounds_constant): Likewise.
(default_chkp_initialize_bounds): Likewise.
* targhooks.h (default_chkp_bound_type): Likewise.
(default_chkp_bound_mode): Likewise.
(default_builtin_chkp_function): Likewise.
(default_chkp_function_value_bounds): Likewise.
(default_chkp_make_bounds_constant): Likewise.
(default_chkp_initialize_bounds): Likewise.
* toplev.c (compile_file): Likewise.
(process_options): Likewise.
* tree-core.h (DEF_BUILTIN): Likewise.
(DEF_BUILTIN_CHKP): Likewise.
* tree-inline.c (declare_return_variable): Likewise.
(remap_gimple_stmt): Likewise.
(copy_bb): Likewise.
(initialize_inlined_parameters): Likewise.
(expand_call_inline): Likewise.
* tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
(make_pass_ipa_chkp_early_produce_thunks): Likewise.
(make_pass_ipa_chkp_produce_thunks): Likewise.
(make_pass_chkp): Likewise.
(make_pass_chkp_opt): Likewise.
(make_pass_chkp_instrumentation_passes): Likewise.
* tree-pretty-print.c (dump_generic_node): Likewise.
* tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
* tree-ssa-dce.c (propagate_necessity): Likewise.
(eliminate_unnecessary_stmts): Likewise.
* tree-ssa-pre.c (create_expression_by_pieces): Likewise.
* tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
* tree-ssa-sccvn.h: Likewise.
* tree-ssa-strlen.c (get_string_length): Likewise.
(valid_builtin_call): Likewise.
(adjust_last_stmt): Likewise.
(handle_builtin_strchr): Likewise.
(handle_builtin_strcpy): Likewise.
(handle_builtin_stxncpy): Likewise.
(handle_builtin_memcpy): Likewise.
(handle_builtin_strcat): Likewise.
(strlen_check_and_optimize_stmt): Likewise.
* tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
* tree-streamer-in.c: Likewise.
* tree-streamer.c (record_common_node): Likewise.
* tree.c (tree_code_size): Likewise.
(wide_int_to_tree_1): Likewise.
(type_contains_placeholder_1): Likewise.
(build_common_tree_nodes): Likewise.
* tree.def (POINTER_BOUNDS_TYPE): Likewise.
* tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
(POINTER_BOUNDS_P): Likewise.
(BOUNDED_TYPE_P): Likewise.
(BOUNDED_P): Likewise.
(CALL_WITH_BOUNDS_P): Likewise.
(pointer_bounds_type_node): Likewise.
* value-prof.c (gimple_ic): Likewise.
* var-tracking.c (vt_add_function_parameters): Likewise.
* varasm.c (make_decl_rtl): Likewise.
(assemble_start_function): Likewise.
(output_constant): Likewise.
(maybe_assemble_visibility): Likewise.
* varpool.c (ctor_for_folding): Likewise.
* chkp-builtins.def: Remove.
* ipa-chkp.c: Remove.
* ipa-chkp.h: Remove.
* rtl-chkp.c: Remove.
* rtl-chkp.h: Remove.
* tree-chkp-opt.c: Remove.
* tree-chkp.c: Remove.
* tree-chkp.h: Remove.
2018-06-08 Martin Liska <mliska@suse.cz>
* c-attribs.c (handle_bnd_variable_size_attribute): Remove support
for MPX (macros, related functions, fields in cgraph_node, ...).
(handle_bnd_legacy): Likewise.
(handle_bnd_instrument): Likewise.
* c.opt: Likewise.
2018-06-08 Martin Liska <mliska@suse.cz>
* lto-partition.c (add_references_to_partition): Remove support
for MPX (macros, related functions, fields in cgraph_node, ...).
(add_symbol_to_partition_1): Likewise.
(privatize_symbol_name): Likewise.
* lto-symtab.c (lto_cgraph_replace_node): Likewise.
2018-06-08 Martin Liska <mliska@suse.cz>
* g++.dg/dg.exp: Do not use mpx.exp.
* g++.dg/lto/lto.exp: Likewise.
* g++.dg/lto/pr69729_0.C: Remove.
* g++.dg/opt/pr71529.C: Remove.
* g++.dg/pr63995-1.C: Remove.
* g++.dg/pr68270.C: Remove.
* g++.dg/pr71624.C: Remove.
* g++.dg/pr71633.C: Remove.
* g++.dg/pr79761.C: Remove.
* g++.dg/pr79764.C: Remove.
* g++.dg/pr79769.C: Remove.
* gcc.dg/lto/chkp-privatize-1_0.c: Remove.
* gcc.dg/lto/chkp-privatize-2_0.c: Remove.
* gcc.dg/lto/chkp-privatize_0.c: Remove.
* gcc.dg/lto/chkp-removed-alias_0.c: Remove.
* gcc.dg/lto/chkp-static-bounds_0.c: Remove.
* gcc.dg/lto/chkp-wrap-asm-name_0.c: Remove.
* gcc.dg/lto/lto.exp: Do not use mpx.exp.
* gcc.dg/lto/pr66221_0.c: Remove.
* gcc.target/i386/chkp-always_inline.c: Remove.
* gcc.target/i386/chkp-bndret.c: Remove.
* gcc.target/i386/chkp-builtins-1.c: Remove.
* gcc.target/i386/chkp-builtins-2.c: Remove.
* gcc.target/i386/chkp-builtins-3.c: Remove.
* gcc.target/i386/chkp-builtins-4.c: Remove.
* gcc.target/i386/chkp-const-check-1.c: Remove.
* gcc.target/i386/chkp-const-check-2.c: Remove.
* gcc.target/i386/chkp-hidden-def.c: Remove.
* gcc.target/i386/chkp-label-address.c: Remove.
* gcc.target/i386/chkp-lifetime-1.c: Remove.
* gcc.target/i386/chkp-narrow-bounds.c: Remove.
* gcc.target/i386/chkp-pr69044.c: Remove.
* gcc.target/i386/chkp-remove-bndint-1.c: Remove.
* gcc.target/i386/chkp-remove-bndint-2.c: Remove.
* gcc.target/i386/chkp-strchr.c: Remove.
* gcc.target/i386/chkp-strlen-1.c: Remove.
* gcc.target/i386/chkp-strlen-2.c: Remove.
* gcc.target/i386/chkp-strlen-3.c: Remove.
* gcc.target/i386/chkp-strlen-4.c: Remove.
* gcc.target/i386/chkp-strlen-5.c: Remove.
* gcc.target/i386/chkp-stropt-1.c: Remove.
* gcc.target/i386/chkp-stropt-10.c: Remove.
* gcc.target/i386/chkp-stropt-11.c: Remove.
* gcc.target/i386/chkp-stropt-12.c: Remove.
* gcc.target/i386/chkp-stropt-13.c: Remove.
* gcc.target/i386/chkp-stropt-14.c: Remove.
* gcc.target/i386/chkp-stropt-15.c: Remove.
* gcc.target/i386/chkp-stropt-16.c: Remove.
* gcc.target/i386/chkp-stropt-17.c: Remove.
* gcc.target/i386/chkp-stropt-2.c: Remove.
* gcc.target/i386/chkp-stropt-3.c: Remove.
* gcc.target/i386/chkp-stropt-4.c: Remove.
* gcc.target/i386/chkp-stropt-5.c: Remove.
* gcc.target/i386/chkp-stropt-6.c: Remove.
* gcc.target/i386/chkp-stropt-7.c: Remove.
* gcc.target/i386/chkp-stropt-8.c: Remove.
* gcc.target/i386/chkp-stropt-9.c: Remove.
* gcc.target/i386/i386.exp: Do not use mpx.exp.
* gcc.target/i386/indirect-thunk-11.c: Remove.
* gcc.target/i386/indirect-thunk-12.c: Remove.
* gcc.target/i386/indirect-thunk-attr-12.c: Remove.
* gcc.target/i386/indirect-thunk-attr-13.c: Remove.
* gcc.target/i386/indirect-thunk-bnd-1.c: Remove.
* gcc.target/i386/indirect-thunk-bnd-2.c: Remove.
* gcc.target/i386/indirect-thunk-bnd-3.c: Remove.
* gcc.target/i386/indirect-thunk-bnd-4.c: Remove.
* gcc.target/i386/interrupt-bnd-err-1.c: Remove.
* gcc.target/i386/interrupt-bnd-err-2.c: Remove.
* gcc.target/i386/mpx/alloca-1-lbv.c: Remove.
* gcc.target/i386/mpx/alloca-1-nov.c: Remove.
* gcc.target/i386/mpx/alloca-1-ubv.c: Remove.
* gcc.target/i386/mpx/arg-addr-1-lbv.c: Remove.
* gcc.target/i386/mpx/arg-addr-1-nov.c: Remove.
* gcc.target/i386/mpx/arg-addr-1-ubv.c: Remove.
* gcc.target/i386/mpx/bitfields-1-lbv.c: Remove.
* gcc.target/i386/mpx/bitfields-1-nov.c: Remove.
* gcc.target/i386/mpx/bitfields-1-ubv.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-lbv.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-nov.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-ubv.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-2.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-1-lbv.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-1-nov.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-2.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-1-nov.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-1-ubv.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-2.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-1.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-lbv.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-nov.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-ubv.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-3.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-get-ptr-lbound-1.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-get-ptr-lbound-2.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-get-ptr-ubound-1.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-get-ptr-ubound-2.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-1.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-2-nov.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-3.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-1.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-lbv.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-nov.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-ubv.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-lbv.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-nov.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-ubv.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-4.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-null-ptr-bounds-1-bbv.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-1.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-lbv.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-nov.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-ubv.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-3.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-lbv.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-nov.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-ubv.c: Remove.
* gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-2.c: Remove.
* gcc.target/i386/mpx/calloc-1-lbv.c: Remove.
* gcc.target/i386/mpx/calloc-1-nov.c: Remove.
* gcc.target/i386/mpx/calloc-1-ubv.c: Remove.
* gcc.target/i386/mpx/chkp-fix-calls-1.c: Remove.
* gcc.target/i386/mpx/chkp-fix-calls-2.c: Remove.
* gcc.target/i386/mpx/chkp-fix-calls-3.c: Remove.
* gcc.target/i386/mpx/chkp-fix-calls-4.c: Remove.
* gcc.target/i386/mpx/chkp-thunk-comdat-1.cc: Remove.
* gcc.target/i386/mpx/chkp-thunk-comdat-2.cc: Remove.
* gcc.target/i386/mpx/chkp-thunk-comdat-3.c: Remove.
* gcc.target/i386/mpx/fastcall-1-lbv.c: Remove.
* gcc.target/i386/mpx/fastcall-1-nov.c: Remove.
* gcc.target/i386/mpx/fastcall-1-ubv.c: Remove.
* gcc.target/i386/mpx/fastcall-2-lbv.c: Remove.
* gcc.target/i386/mpx/fastcall-2-nov.c: Remove.
* gcc.target/i386/mpx/fastcall-2-ubv.c: Remove.
* gcc.target/i386/mpx/field-addr-1-lbv.c: Remove.
* gcc.target/i386/mpx/field-addr-1-nov.c: Remove.
* gcc.target/i386/mpx/field-addr-1-ubv.c: Remove.
* gcc.target/i386/mpx/field-addr-10-lbv.c: Remove.
* gcc.target/i386/mpx/field-addr-10-nov.c: Remove.
* gcc.target/i386/mpx/field-addr-10-ubv.c: Remove.
* gcc.target/i386/mpx/field-addr-2-lbv.c: Remove.
* gcc.target/i386/mpx/field-addr-2-nov.c: Remove.
* gcc.target/i386/mpx/field-addr-2-ubv.c: Remove.
* gcc.target/i386/mpx/field-addr-3-lbv.c: Remove.
* gcc.target/i386/mpx/field-addr-3-nov.c: Remove.
* gcc.target/i386/mpx/field-addr-3-ubv.c: Remove.
* gcc.target/i386/mpx/field-addr-4-lbv.c: Remove.
* gcc.target/i386/mpx/field-addr-4-nov.c: Remove.
* gcc.target/i386/mpx/field-addr-4-ubv.c: Remove.
* gcc.target/i386/mpx/field-addr-5-lbv.c: Remove.
* gcc.target/i386/mpx/field-addr-5-nov.c: Remove.
* gcc.target/i386/mpx/field-addr-5-ubv.c: Remove.
* gcc.target/i386/mpx/field-addr-6-lbv.c: Remove.
* gcc.target/i386/mpx/field-addr-6-nov.c: Remove.
* gcc.target/i386/mpx/field-addr-6-ubv.c: Remove.
* gcc.target/i386/mpx/field-addr-7-lbv.c: Remove.
* gcc.target/i386/mpx/field-addr-7-nov.c: Remove.
* gcc.target/i386/mpx/field-addr-7-ubv.c: Remove.
* gcc.target/i386/mpx/field-addr-8-lbv.c: Remove.
* gcc.target/i386/mpx/field-addr-8-nov.c: Remove.
* gcc.target/i386/mpx/field-addr-8-ubv.c: Remove.
* gcc.target/i386/mpx/field-addr-9-lbv.c: Remove.
* gcc.target/i386/mpx/field-addr-9-nov.c: Remove.
* gcc.target/i386/mpx/field-addr-9-ubv.c: Remove.
* gcc.target/i386/mpx/frame-address-1-nov.c: Remove.
* gcc.target/i386/mpx/hard-reg-1-nov.c: Remove.
* gcc.target/i386/mpx/hard-reg-2-lbv.c: Remove.
* gcc.target/i386/mpx/hard-reg-2-nov.c: Remove.
* gcc.target/i386/mpx/hard-reg-2-ubv.c: Remove.
* gcc.target/i386/mpx/if-stmt-1-lbv.c: Remove.
* gcc.target/i386/mpx/if-stmt-1-nov.c: Remove.
* gcc.target/i386/mpx/if-stmt-1-ubv.c: Remove.
* gcc.target/i386/mpx/if-stmt-2-lbv.c: Remove.
* gcc.target/i386/mpx/if-stmt-2-nov.c: Remove.
* gcc.target/i386/mpx/if-stmt-2-ubv.c: Remove.
* gcc.target/i386/mpx/label-address-1.c: Remove.
* gcc.target/i386/mpx/legacy-1-nov.c: Remove.
* gcc.target/i386/mpx/macro.c: Remove.
* gcc.target/i386/mpx/malloc-1-lbv.c: Remove.
* gcc.target/i386/mpx/malloc-1-nov.c: Remove.
* gcc.target/i386/mpx/malloc-1-ubv.c: Remove.
* gcc.target/i386/mpx/memcpy-1.c: Remove.
* gcc.target/i386/mpx/memmove-1.c: Remove.
* gcc.target/i386/mpx/memmove-2.c: Remove.
* gcc.target/i386/mpx/memmove-zero-length.c: Remove.
* gcc.target/i386/mpx/mpx-check.h: Remove.
* gcc.target/i386/mpx/mpx-os-support.h: Remove.
* gcc.target/i386/mpx/mpx.exp: Remove.
* gcc.target/i386/mpx/nested-function-1-lbv.c: Remove.
* gcc.target/i386/mpx/nested-function-1-nov.c: Remove.
* gcc.target/i386/mpx/nested-function-1-ubv.c: Remove.
* gcc.target/i386/mpx/pointer-arg-1-lbv.c: Remove.
* gcc.target/i386/mpx/pointer-arg-1-nov.c: Remove.
* gcc.target/i386/mpx/pointer-arg-1-ubv.c: Remove.
* gcc.target/i386/mpx/pointer-arg-2-lbv.c: Remove.
* gcc.target/i386/mpx/pointer-arg-2-nov.c: Remove.
* gcc.target/i386/mpx/pointer-arg-2-ubv.c: Remove.
* gcc.target/i386/mpx/pointer-arg-3-lbv.c: Remove.
* gcc.target/i386/mpx/pointer-arg-3-nov.c: Remove.
* gcc.target/i386/mpx/pointer-arg-3-ubv.c: Remove.
* gcc.target/i386/mpx/pointer-arg-4-lbv.c: Remove.
* gcc.target/i386/mpx/pointer-arg-4-nov.c: Remove.
* gcc.target/i386/mpx/pointer-arg-4-ubv.c: Remove.
* gcc.target/i386/mpx/pointer-arg-5-lbv.c: Remove.
* gcc.target/i386/mpx/pointer-arg-5-nov.c: Remove.
* gcc.target/i386/mpx/pointer-arg-5-ubv.c: Remove.
* gcc.target/i386/mpx/pointer-diff-1.c: Remove.
* gcc.target/i386/mpx/pointer-store-1-lbv.c: Remove.
* gcc.target/i386/mpx/pointer-store-1-nov.c: Remove.
* gcc.target/i386/mpx/pointer-store-1-ubv.c: Remove.
* gcc.target/i386/mpx/pr65508.c: Remove.
* gcc.target/i386/mpx/pr65531.cc: Remove.
* gcc.target/i386/mpx/pr66048.cc: Remove.
* gcc.target/i386/mpx/pr66134.c: Remove.
* gcc.target/i386/mpx/pr66566.c: Remove.
* gcc.target/i386/mpx/pr66567.c: Remove.
* gcc.target/i386/mpx/pr66568.c: Remove.
* gcc.target/i386/mpx/pr66569.c: Remove.
* gcc.target/i386/mpx/pr66581.c: Remove.
* gcc.target/i386/mpx/pr68337-1.c: Remove.
* gcc.target/i386/mpx/pr68337-2.c: Remove.
* gcc.target/i386/mpx/pr68416.c: Remove.
* gcc.target/i386/mpx/pr78339.c: Remove.
* gcc.target/i386/mpx/pr79631.c: Remove.
* gcc.target/i386/mpx/pr79633.c: Remove.
* gcc.target/i386/mpx/pr79753.c: Remove.
* gcc.target/i386/mpx/pr79770.c: Remove.
* gcc.target/i386/mpx/pr79987.c: Remove.
* gcc.target/i386/mpx/pr79988.c: Remove.
* gcc.target/i386/mpx/realloc-1-lbv.c: Remove.
* gcc.target/i386/mpx/realloc-1-nov.c: Remove.
* gcc.target/i386/mpx/realloc-1-ubv.c: Remove.
* gcc.target/i386/mpx/realloc-2-lbv.c: Remove.
* gcc.target/i386/mpx/realloc-2-nov.c: Remove.
* gcc.target/i386/mpx/realloc-2-ubv.c: Remove.
* gcc.target/i386/mpx/reference-1-lbv.cpp: Remove.
* gcc.target/i386/mpx/reference-1-nov.cpp: Remove.
* gcc.target/i386/mpx/reference-1-ubv.cpp: Remove.
* gcc.target/i386/mpx/reference-2-lbv.cpp: Remove.
* gcc.target/i386/mpx/reference-2-nov.cpp: Remove.
* gcc.target/i386/mpx/reference-2-ubv.cpp: Remove.
* gcc.target/i386/mpx/reference-3-lbv.cpp: Remove.
* gcc.target/i386/mpx/reference-3-nov.cpp: Remove.
* gcc.target/i386/mpx/reference-3-ubv.cpp: Remove.
* gcc.target/i386/mpx/reference-4-lbv.cpp: Remove.
* gcc.target/i386/mpx/reference-4-nov.cpp: Remove.
* gcc.target/i386/mpx/reference-4-ubv.cpp: Remove.
* gcc.target/i386/mpx/return-pointer-1-lbv.c: Remove.
* gcc.target/i386/mpx/return-pointer-1-nov.c: Remove.
* gcc.target/i386/mpx/return-pointer-1-ubv.c: Remove.
* gcc.target/i386/mpx/return-struct-1-lbv.c: Remove.
* gcc.target/i386/mpx/return-struct-1-nov.c: Remove.
* gcc.target/i386/mpx/return-struct-1-ubv.c: Remove.
* gcc.target/i386/mpx/return-struct-2-lbv.c: Remove.
* gcc.target/i386/mpx/return-struct-2-nov.c: Remove.
* gcc.target/i386/mpx/return-struct-2-ubv.c: Remove.
* gcc.target/i386/mpx/return-struct-3-lbv.c: Remove.
* gcc.target/i386/mpx/return-struct-3-nov.c: Remove.
* gcc.target/i386/mpx/return-struct-3-ubv.c: Remove.
* gcc.target/i386/mpx/return-struct-4-lbv.c: Remove.
* gcc.target/i386/mpx/return-struct-4-nov.c: Remove.
* gcc.target/i386/mpx/return-struct-4-ubv.c: Remove.
* gcc.target/i386/mpx/return-struct-5-lbv.c: Remove.
* gcc.target/i386/mpx/return-struct-5-nov.c: Remove.
* gcc.target/i386/mpx/return-struct-5-ubv.c: Remove.
* gcc.target/i386/mpx/return-struct-6-lbv.c: Remove.
* gcc.target/i386/mpx/return-struct-6-nov.c: Remove.
* gcc.target/i386/mpx/return-struct-6-ubv.c: Remove.
* gcc.target/i386/mpx/sincos-1-nov.c: Remove.
* gcc.target/i386/mpx/static-array-1-lbv.c: Remove.
* gcc.target/i386/mpx/static-array-1-nov.c: Remove.
* gcc.target/i386/mpx/static-array-1-ubv.c: Remove.
* gcc.target/i386/mpx/static-init-1-lbv.c: Remove.
* gcc.target/i386/mpx/static-init-1-nov.c: Remove.
* gcc.target/i386/mpx/static-init-1-ubv.c: Remove.
* gcc.target/i386/mpx/static-init-2-lbv.c: Remove.
* gcc.target/i386/mpx/static-init-2-nov.c: Remove.
* gcc.target/i386/mpx/static-init-2-ubv.c: Remove.
* gcc.target/i386/mpx/static-init-3-lbv.c: Remove.
* gcc.target/i386/mpx/static-init-3-nov.c: Remove.
* gcc.target/i386/mpx/static-init-3-ubv.c: Remove.
* gcc.target/i386/mpx/static-init-4-lbv.c: Remove.
* gcc.target/i386/mpx/static-init-4-nov.c: Remove.
* gcc.target/i386/mpx/static-init-4-ubv.c: Remove.
* gcc.target/i386/mpx/static-init-5-lbv.c: Remove.
* gcc.target/i386/mpx/static-init-5-nov.c: Remove.
* gcc.target/i386/mpx/static-init-5-ubv.c: Remove.
* gcc.target/i386/mpx/static-init-6-lbv.c: Remove.
* gcc.target/i386/mpx/static-init-6-nov.c: Remove.
* gcc.target/i386/mpx/static-init-6-ubv.c: Remove.
* gcc.target/i386/mpx/static-string-1-lbv.c: Remove.
* gcc.target/i386/mpx/static-string-1-nov.c: Remove.
* gcc.target/i386/mpx/static-string-1-ubv.c: Remove.
* gcc.target/i386/mpx/struct-arg-1-lbv.c: Remove.
* gcc.target/i386/mpx/struct-arg-1-nov.c: Remove.
* gcc.target/i386/mpx/struct-arg-1-ubv.c: Remove.
* gcc.target/i386/mpx/struct-arg-10-lbv.c: Remove.
* gcc.target/i386/mpx/struct-arg-10-nov.c: Remove.
* gcc.target/i386/mpx/struct-arg-10-ubv.c: Remove.
* gcc.target/i386/mpx/struct-arg-2-lbv.c: Remove.
* gcc.target/i386/mpx/struct-arg-2-nov.c: Remove.
* gcc.target/i386/mpx/struct-arg-2-ubv.c: Remove.
* gcc.target/i386/mpx/struct-arg-3-lbv.c: Remove.
* gcc.target/i386/mpx/struct-arg-3-nov.c: Remove.
* gcc.target/i386/mpx/struct-arg-3-ubv.c: Remove.
* gcc.target/i386/mpx/struct-arg-4-lbv.c: Remove.
* gcc.target/i386/mpx/struct-arg-4-nov.c: Remove.
* gcc.target/i386/mpx/struct-arg-4-ubv.c: Remove.
* gcc.target/i386/mpx/struct-arg-5-lbv.c: Remove.
* gcc.target/i386/mpx/struct-arg-5-nov.c: Remove.
* gcc.target/i386/mpx/struct-arg-5-ubv.c: Remove.
* gcc.target/i386/mpx/struct-arg-6-lbv.c: Remove.
* gcc.target/i386/mpx/struct-arg-6-nov.c: Remove.
* gcc.target/i386/mpx/struct-arg-6-ubv.c: Remove.
* gcc.target/i386/mpx/struct-arg-7-lbv.c: Remove.
* gcc.target/i386/mpx/struct-arg-7-nov.c: Remove.
* gcc.target/i386/mpx/struct-arg-7-ubv.c: Remove.
* gcc.target/i386/mpx/struct-arg-8-lbv.c: Remove.
* gcc.target/i386/mpx/struct-arg-8-nov.c: Remove.
* gcc.target/i386/mpx/struct-arg-8-ubv.c: Remove.
* gcc.target/i386/mpx/struct-arg-9-lbv.c: Remove.
* gcc.target/i386/mpx/struct-arg-9-nov.c: Remove.
* gcc.target/i386/mpx/struct-arg-9-ubv.c: Remove.
* gcc.target/i386/mpx/struct-copy-1-lbv.c: Remove.
* gcc.target/i386/mpx/struct-copy-1-nov.c: Remove.
* gcc.target/i386/mpx/struct-copy-1-ubv.c: Remove.
* gcc.target/i386/mpx/struct-copy-2-lbv.c: Remove.
* gcc.target/i386/mpx/struct-copy-2-nov.c: Remove.
* gcc.target/i386/mpx/struct-copy-2-ubv.c: Remove.
* gcc.target/i386/mpx/thread-local-var-1-lbv.c: Remove.
* gcc.target/i386/mpx/thread-local-var-1-nov.c: Remove.
* gcc.target/i386/mpx/thread-local-var-1-ubv.c: Remove.
* gcc.target/i386/mpx/union-arg-1-lbv.c: Remove.
* gcc.target/i386/mpx/union-arg-1-nov.c: Remove.
* gcc.target/i386/mpx/union-arg-1-ubv.c: Remove.
* gcc.target/i386/mpx/va-arg-pack-1-lbv.c: Remove.
* gcc.target/i386/mpx/va-arg-pack-1-nov.c: Remove.
* gcc.target/i386/mpx/va-arg-pack-1-ubv.c: Remove.
* gcc.target/i386/mpx/va-arg-pack-2-lbv.c: Remove.
* gcc.target/i386/mpx/va-arg-pack-2-nov.c: Remove.
* gcc.target/i386/mpx/va-arg-pack-2-ubv.c: Remove.
* gcc.target/i386/mpx/vararg-1-lbv.c: Remove.
* gcc.target/i386/mpx/vararg-1-nov.c: Remove.
* gcc.target/i386/mpx/vararg-1-ubv.c: Remove.
* gcc.target/i386/mpx/vararg-2-lbv.c: Remove.
* gcc.target/i386/mpx/vararg-2-nov.c: Remove.
* gcc.target/i386/mpx/vararg-2-ubv.c: Remove.
* gcc.target/i386/mpx/vararg-3-lbv.c: Remove.
* gcc.target/i386/mpx/vararg-3-nov.c: Remove.
* gcc.target/i386/mpx/vararg-3-ubv.c: Remove.
* gcc.target/i386/mpx/vararg-4-lbv.c: Remove.
* gcc.target/i386/mpx/vararg-4-nov.c: Remove.
* gcc.target/i386/mpx/vararg-4-ubv.c: Remove.
* gcc.target/i386/mpx/vararg-5-lbv.c: Remove.
* gcc.target/i386/mpx/vararg-5-nov.c: Remove.
* gcc.target/i386/mpx/vararg-5-ubv.c: Remove.
* gcc.target/i386/mpx/vararg-6-lbv.c: Remove.
* gcc.target/i386/mpx/vararg-6-nov.c: Remove.
* gcc.target/i386/mpx/vararg-6-ubv.c: Remove.
* gcc.target/i386/mpx/vararg-7-lbv.c: Remove.
* gcc.target/i386/mpx/vararg-7-nov.c: Remove.
* gcc.target/i386/mpx/vararg-7-ubv.c: Remove.
* gcc.target/i386/mpx/vararg-8-lbv.c: Remove.
* gcc.target/i386/mpx/vararg-8-nov.c: Remove.
* gcc.target/i386/mpx/vararg-8-ubv.c: Remove.
* gcc.target/i386/mpx/vla-1-lbv.c: Remove.
* gcc.target/i386/mpx/vla-1-nov.c: Remove.
* gcc.target/i386/mpx/vla-1-ubv.c: Remove.
* gcc.target/i386/mpx/vla-2-lbv.c: Remove.
* gcc.target/i386/mpx/vla-2-nov.c: Remove.
* gcc.target/i386/mpx/vla-2-ubv.c: Remove.
* gcc.target/i386/mpx/vla-trailing-1-lbv.c: Remove.
* gcc.target/i386/mpx/vla-trailing-1-nov.c: Remove.
* gcc.target/i386/mpx/vla-trailing-1-ubv.c: Remove.
* gcc.target/i386/pr63995-2.c: Remove.
* gcc.target/i386/pr64805.c: Remove.
* gcc.target/i386/pr65044.c: Remove.
* gcc.target/i386/pr65167.c: Remove.
* gcc.target/i386/pr65183.c: Remove.
* gcc.target/i386/pr65184.c: Remove.
* gcc.target/i386/pr65523.c: Remove.
* gcc.target/i386/pr70876.c: Remove.
* gcc.target/i386/pr70877.c: Remove.
* gcc.target/i386/pr71458.c: Remove.
* gcc.target/i386/pr80880.c: Remove.
* gcc.target/i386/ret-thunk-25.c: Remove.
* gcc.target/i386/thunk-retbnd.c: Remove.
* lib/mpx-dg.exp: Remove.
* gcc.target/i386/funcspec-56.inc: Adjust test case.
From-SVN: r261304
Diffstat (limited to 'gcc/testsuite/gcc.target')
368 files changed, 0 insertions, 9434 deletions
diff --git a/gcc/testsuite/gcc.target/i386/chkp-always_inline.c b/gcc/testsuite/gcc.target/i386/chkp-always_inline.c deleted file mode 100644 index c10d1310e0e..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-always_inline.c +++ /dev/null @@ -1,12 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -Wno-attributes" } */ - -static __attribute__((always_inline)) int f1 (int *p) -{ - return *p; -} - -__attribute__((bnd_legacy)) int f2 (int *p) -{ - return f1 (p); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-bndret.c b/gcc/testsuite/gcc.target/i386/chkp-bndret.c deleted file mode 100644 index d84ea70dcda..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-bndret.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkp" } */ -/* { dg-final { scan-tree-dump-not "bndret" "chkp" } } */ - -#include "string.h" - -extern int *test1 (int *p) __attribute__((bnd_legacy)); - -int * -test2 (int *p) -{ - return test1 (p); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-builtins-1.c b/gcc/testsuite/gcc.target/i386/chkp-builtins-1.c deleted file mode 100644 index 99cfa82681c..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-builtins-1.c +++ /dev/null @@ -1,9 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -fdump-tree-chkp" } */ -/* { dg-final { scan-tree-dump-not "bnd_init_ptr_bounds" "chkp" } } */ - -void * -chkp_test (void *p) -{ - return __builtin___bnd_init_ptr_bounds (p); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-builtins-2.c b/gcc/testsuite/gcc.target/i386/chkp-builtins-2.c deleted file mode 100644 index 6da8d0a83ff..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-builtins-2.c +++ /dev/null @@ -1,9 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -fdump-tree-chkp" } */ -/* { dg-final { scan-tree-dump-not "bnd_copy_ptr_bounds" "chkp" } } */ - -void * -chkp_test (void *p, void *q) -{ - return __builtin___bnd_copy_ptr_bounds (p, q); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-builtins-3.c b/gcc/testsuite/gcc.target/i386/chkp-builtins-3.c deleted file mode 100644 index ae30534c6da..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-builtins-3.c +++ /dev/null @@ -1,9 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -fdump-tree-chkp" } */ -/* { dg-final { scan-tree-dump-not "bnd_set_ptr_bounds" "chkp" } } */ - -void * -chkp_test (void *p) -{ - return __builtin___bnd_set_ptr_bounds (p, 10); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-builtins-4.c b/gcc/testsuite/gcc.target/i386/chkp-builtins-4.c deleted file mode 100644 index d408a490b13..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-builtins-4.c +++ /dev/null @@ -1,9 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -fdump-tree-chkp" } */ -/* { dg-final { scan-tree-dump-not "bnd_null_ptr_bounds" "chkp" } } */ - -void * -chkp_test (void *p) -{ - return __builtin___bnd_null_ptr_bounds (p); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-const-check-1.c b/gcc/testsuite/gcc.target/i386/chkp-const-check-1.c deleted file mode 100644 index 6e6d067fb50..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-const-check-1.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt" } */ -/* { dg-final { scan-tree-dump-not "bndcl" "chkpopt" } } */ -/* { dg-final { scan-tree-dump-not "bndcu" "chkpopt" } } */ - -int test (int *p) -{ - p = (int *)__builtin___bnd_set_ptr_bounds (p, sizeof (int)); - return *p; -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-const-check-2.c b/gcc/testsuite/gcc.target/i386/chkp-const-check-2.c deleted file mode 100644 index 839cf788e7c..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-const-check-2.c +++ /dev/null @@ -1,8 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -Wchkp" } */ - -int test (int *p) -{ - p = (int *)__builtin___bnd_set_ptr_bounds (p, sizeof (int)); - return *(p + 1); /* { dg-warning "memory access check always fail" } */ -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-hidden-def.c b/gcc/testsuite/gcc.target/i386/chkp-hidden-def.c deleted file mode 100644 index 68f70ff258d..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-hidden-def.c +++ /dev/null @@ -1,15 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-require-alias "" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2" } */ -/* { dg-final { scan-assembler-not "test.chkp" } } */ - -int test (int *p); -extern __typeof (test) test __asm__ ("" "__test") __attribute__ ((visibility ("hidden"))); - -int test (int *p) -{ - return *p; -} - -extern __typeof (test) __test1 __asm__("" "test"); -extern __typeof (test) __test1 __attribute__((alias ("" "__test"))); diff --git a/gcc/testsuite/gcc.target/i386/chkp-label-address.c b/gcc/testsuite/gcc.target/i386/chkp-label-address.c deleted file mode 100644 index 23a2f7cd052..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-label-address.c +++ /dev/null @@ -1,23 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -Wchkp" } */ - -#include <stdio.h> - -static int f1 () /* { dg-warning "function cannot be instrumented" } */ -{ - static int array = &&label_B - &&label_A; - - label_A: - - printf ("%d\n", array); - - label_B: - - return 0; -} - -int f2 (int i) -{ - printf ("%d\n", i); - return f1 (); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-lifetime-1.c b/gcc/testsuite/gcc.target/i386/chkp-lifetime-1.c deleted file mode 100644 index 70b8b38dc28..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-lifetime-1.c +++ /dev/null @@ -1,15 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt-details" } */ -/* { dg-final { scan-tree-dump "Moving creation of \[^ \]+ down to its use" "chkpopt" } } */ - -extern int arr[]; - -int test (int i) -{ - int res; - if (i >= 0) - res = arr[i]; - else - res = -i; - return res; -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-narrow-bounds.c b/gcc/testsuite/gcc.target/i386/chkp-narrow-bounds.c deleted file mode 100644 index ab1b122479a..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-narrow-bounds.c +++ /dev/null @@ -1,11 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkp" } */ -/* { dg-final { scan-tree-dump "bndcl" "chkp" } } */ -/* { dg-final { scan-tree-dump "bndcu" "chkp" } } */ - -int -test (int *p) -{ - int *p1 = __bnd_narrow_ptr_bounds (p - 10, p, sizeof (int) * 20); - return p1[10]; -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-pr69044.c b/gcc/testsuite/gcc.target/i386/chkp-pr69044.c deleted file mode 100644 index 16751f51766..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-pr69044.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2" } */ - -int i; -int strncasecmp (char *p1, char *p2, long p3) { return 0; } -int special_command () -{ - if (strncasecmp (0, 0, 0)) - i++; -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-remove-bndint-1.c b/gcc/testsuite/gcc.target/i386/chkp-remove-bndint-1.c deleted file mode 100644 index 7c0f13f8ccf..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-remove-bndint-1.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-optimized" } */ -/* { dg-final { scan-tree-dump-not "bndint" "optimized" } } */ - -struct S -{ - int a; - int b; - int c; -}; - -int test (struct S *ps) -{ - int *pi = &ps->b; - return *pi; -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-remove-bndint-2.c b/gcc/testsuite/gcc.target/i386/chkp-remove-bndint-2.c deleted file mode 100644 index eea0b0afa10..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-remove-bndint-2.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-optimized -Wchkp" } */ -/* { dg-final { scan-tree-dump-not "bndint" "optimized" } } */ - -struct S -{ - int a; - int b; - int c; -}; - -int test (struct S *ps) -{ - int *pi = &ps->b; - return *(pi + 1); /* { dg-warning "memory access check always fail" } */ -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-strchr.c b/gcc/testsuite/gcc.target/i386/chkp-strchr.c deleted file mode 100644 index 01ee619dfd9..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-strchr.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2" } */ - -#include "string.h" - -static char * -test1 (char *str) -{ - return strrchr (str, '_'); -} - -char * -test2 () -{ - return test1 ("test_string"); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-1.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-1.c deleted file mode 100644 index 38d53900627..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-1.c +++ /dev/null @@ -1,12 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */ -/* { dg-final { scan-tree-dump "memcpy.chkp" "strlen" } } */ - -#include "../../gcc.dg/strlenopt.h" - -char *test (char *str1, char *str2) -{ - size_t len = strlen (str2); - strcpy (str1, str2); - return str1 + len; -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c deleted file mode 100644 index 789ebc1f2d8..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-2.c +++ /dev/null @@ -1,14 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-require-effective-target stpcpy } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */ -/* { dg-final { scan-tree-dump-not "strlen" "strlen" } } */ - -#define USE_GNU -#include "../../gcc.dg/strlenopt.h" - -char *test (char *str1, char *str2) -{ - char *p = stpcpy (str1, str2); - size_t len = strlen (str1); - return p + len; -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-3.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-3.c deleted file mode 100644 index 276f4127975..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-3.c +++ /dev/null @@ -1,12 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */ -/* { dg-final { scan-tree-dump-times "strlen" 1 "strlen" } } */ - -#include "../../gcc.dg/strlenopt.h" - -size_t test (char *str1, char *str2) -{ - size_t len = strlen (str2); - memcpy (str1, str2, len + 1); - return len + strlen (str1); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-4.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-4.c deleted file mode 100644 index 51ff96028be..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-4.c +++ /dev/null @@ -1,14 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-require-effective-target mempcpy } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */ -/* { dg-final { scan-tree-dump-times "strlen" 1 "strlen" } } */ - -#define USE_GNU -#include "../../gcc.dg/strlenopt.h" - -char * test (char *str1, char *str2) -{ - size_t len = strlen (str2); - char *p = (char *)mempcpy (str1, str2, len + 1); - return p + len + strlen (str1); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-strlen-5.c b/gcc/testsuite/gcc.target/i386/chkp-strlen-5.c deleted file mode 100644 index bbafecc3063..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-strlen-5.c +++ /dev/null @@ -1,14 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-strlen" } */ -/* { dg-final { scan-tree-dump-times "strlen" 2 "strlen" } } */ -/* { dg-final { scan-tree-dump "memcpy" "strlen" } } */ - -#include "../../gcc.dg/strlenopt.h" - -size_t test (char *str1, char *str2) -{ - size_t len1 = strlen (str1); - size_t len2 = strlen (str2); - strcat (str1, str2); - return len1 + len2 + strlen (str1); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-1.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-1.c deleted file mode 100644 index d6148a87fd1..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-1.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions" } */ -/* { dg-final { scan-tree-dump "memcpy_nochk" "chkpopt" } } */ - -#include "../../gcc.dg/strlenopt.h" - -void test (int *buf1, int *buf2, size_t len) -{ - memcpy (buf1, buf2, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-10.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-10.c deleted file mode 100644 index 18cff739b01..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-10.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ -/* { dg-final { scan-tree-dump-not "memset_nobnd" "chkpopt" } } */ - -#include "../../gcc.dg/strlenopt.h" - -void test (void *buf1, int c, size_t len) -{ - memset (buf1, c, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-11.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-11.c deleted file mode 100644 index c53db6a17e4..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-11.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ -/* { dg-final { scan-tree-dump-not "memmove_nobnd" "chkpopt" } } */ - -#include "../../gcc.dg/strlenopt.h" - -void test (void *buf1, void *buf2, size_t len) -{ - memmove (buf1, buf2, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-12.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-12.c deleted file mode 100644 index a076d17cd9a..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-12.c +++ /dev/null @@ -1,12 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-require-effective-target mempcpy } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ -/* { dg-final { scan-tree-dump-not "mempcpy_nobnd" "chkpopt" } } */ - -#define USE_GNU -#include "../../gcc.dg/strlenopt.h" - -void test (void *buf1, void *buf2, size_t len) -{ - mempcpy (buf1, buf2, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-13.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-13.c deleted file mode 100644 index 279cae3e5bf..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-13.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions -fchkp-use-fast-string-functions" } */ -/* { dg-final { scan-tree-dump "memcpy_nobnd_nochk" "chkpopt" } } */ - -#include "../../gcc.dg/strlenopt.h" - -void test (int *buf1, int *buf2, size_t len) -{ - memcpy (buf1, buf2, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-14.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-14.c deleted file mode 100644 index b810c682569..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-14.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions -fchkp-use-fast-string-functions" } */ -/* { dg-final { scan-tree-dump "memset_nobnd_nochk" "chkpopt" } } */ - -#include "../../gcc.dg/strlenopt.h" - -void test (int *buf1, int c, size_t len) -{ - memset (buf1, c, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-15.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-15.c deleted file mode 100644 index a9a79c1e330..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-15.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions -fchkp-use-fast-string-functions" } */ -/* { dg-final { scan-tree-dump "memmove_nobnd_nochk" "chkpopt" } } */ - -#include "../../gcc.dg/strlenopt.h" - -void test (int *buf1, int *buf2, size_t len) -{ - memmove (buf1, buf2, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-16.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-16.c deleted file mode 100644 index 6ce170c9d68..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-16.c +++ /dev/null @@ -1,12 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-require-effective-target mempcpy } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions -fchkp-use-fast-string-functions" } */ -/* { dg-final { scan-tree-dump "mempcpy_nobnd_nochk" "chkpopt" } } */ - -#define USE_GNU -#include "../../gcc.dg/strlenopt.h" - -void test (int *buf1, int *buf2, size_t len) -{ - mempcpy (buf1, buf2, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-17.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-17.c deleted file mode 100644 index faf304c3303..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-17.c +++ /dev/null @@ -1,68 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } - { dg-require-effective-target mempcpy } - { dg-options "-O2 -Wrestrict -fcheck-pointer-bounds -mmpx" } */ - -#define USE_GNU -#include "../../gcc.dg/strlenopt.h" - -/* There is no BUILT_IN_ST{P,R}NCPY_CHKP or BUILT_IN_STRNCAT_CHKP - so the test for them below are XFAIL. */ -char *stpncpy (char *__restrict, const char *__restrict, size_t); -char *strncpy (char *__restrict, const char *__restrict, size_t); -char *strncat (char *__restrict, const char *__restrict, size_t); - - -char a[8]; - -void test_memcpy (void) -{ - memcpy (a, a + 1, 3); /* { dg-warning ".memcpy\.chkp. accessing 3 bytes at offsets 0 and 1 overlaps 2 bytes at offset 1" } */ -} - -void test_memmove (void) -{ - memmove (a, a + 1, 3); -} - -void* test_mempcpy (void) -{ - return mempcpy (a, a + 1, 3); /* { dg-warning ".mempcpy\.chkp. accessing 3 bytes at offsets 0 and 1 overlaps 2 bytes at offset 1" } */ -} - -char* test_stpcpy (void) -{ - strcpy (a, "0123456"); - return stpcpy (a, a + 2); /* { dg-warning ".stpcpy\.chkp. accessing 6 bytes at offsets 0 and 2 overlaps 4 bytes at offset 2" } */ -} - -char* test_stpncpy (void) -{ - strcpy (a, "0123456"); - - /* There is no BUILT_IN_STPNCPY_CHKP so this isn't handled. */ - return stpncpy (a, a + 2, sizeof a); /* { dg-warning ".stpcpy\.chkp. accessing 7 bytes at offsets 0 and 2 overlaps 4 bytes at offset 2" "bug 82652" { xfail *-*-* } } */ -} - -void test_strcpy (void) -{ - strcpy (a, "0123456"); - strcpy (a, a + 1); /* { dg-warning ".strcpy\.chkp. accessing 7 bytes at offsets 0 and 1 overlaps 6 bytes at offset 1" } */ -} - -void test_strcat (int n) -{ - strcat (a, a + 3); /* { dg-warning ".strcat\.chkp. accessing 4 or more bytes at offsets 0 and 3 may overlap 1 byte at offset 3" } */ -} - -void test_strncat (int n) -{ - strncat (a, a + 3, sizeof a); /* { dg-warning ".strncat\.chkp. accessing 0 or more bytes at offsets 0 and 3 may overlap 1 byte" "bug 82652" { xfail *-*-* } } */ -} - -void test_strncpy (int n) -{ - strcpy (a, "0123456"); - - /* There is no BUILT_IN_STRNCPY_CHKP so this isn't handled. */ - strncpy (a, a + 2, sizeof a); /* { dg-warning ".strncpy\.chkp. accessing 7 bytes at offsets 0 and 2 overlaps 5 bytes at offset 2" "bug 82652" { xfail *-*-* } } */ -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-2.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-2.c deleted file mode 100644 index 6a0c24ee887..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-2.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions" } */ -/* { dg-final { scan-tree-dump "memset_nochk" "chkpopt" } } */ - -#include "../../gcc.dg/strlenopt.h" - -void test (int *buf1, int c, size_t len) -{ - memset (buf1, c, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-3.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-3.c deleted file mode 100644 index 310dec77456..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-3.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions" } */ -/* { dg-final { scan-tree-dump "memmove_nochk" "chkpopt" } } */ - -#include "../../gcc.dg/strlenopt.h" - -void test (int *buf1, int *buf2, size_t len) -{ - memmove (buf1, buf2, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-4.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-4.c deleted file mode 100644 index 7a30d17b8e6..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-4.c +++ /dev/null @@ -1,12 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-require-effective-target mempcpy } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-nochk-string-functions" } */ -/* { dg-final { scan-tree-dump "mempcpy_nochk" "chkpopt" } } */ - -#define USE_GNU -#include "../../gcc.dg/strlenopt.h" - -void test (int *buf1, int *buf2, size_t len) -{ - mempcpy (buf1, buf2, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-5.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-5.c deleted file mode 100644 index 39850d62be8..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-5.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ -/* { dg-final { scan-tree-dump "memcpy_nobnd" "chkpopt" } } */ - -#include "../../gcc.dg/strlenopt.h" - -void test (int *buf1, int *buf2, size_t len) -{ - memcpy (buf1, buf2, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-6.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-6.c deleted file mode 100644 index 06dcbfb9a25..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-6.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ -/* { dg-final { scan-tree-dump "memset_nobnd" "chkpopt" } } */ - -#include "../../gcc.dg/strlenopt.h" - -void test (int *buf1, int c, size_t len) -{ - memset (buf1, c, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-7.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-7.c deleted file mode 100644 index 40ded068f8e..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-7.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ -/* { dg-final { scan-tree-dump "memmove_nobnd" "chkpopt" } } */ - -#include "../../gcc.dg/strlenopt.h" - -void test (int *buf1, int *buf2, size_t len) -{ - memmove (buf1, buf2, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-8.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-8.c deleted file mode 100644 index 7e575bb40bb..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-8.c +++ /dev/null @@ -1,12 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-require-effective-target mempcpy } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ -/* { dg-final { scan-tree-dump "mempcpy_nobnd" "chkpopt" } } */ - -#define USE_GNU -#include "../../gcc.dg/strlenopt.h" - -void test (int *buf1, int *buf2, size_t len) -{ - mempcpy (buf1, buf2, len); -} diff --git a/gcc/testsuite/gcc.target/i386/chkp-stropt-9.c b/gcc/testsuite/gcc.target/i386/chkp-stropt-9.c deleted file mode 100644 index bf26874e5a8..00000000000 --- a/gcc/testsuite/gcc.target/i386/chkp-stropt-9.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -fdump-tree-chkpopt -fchkp-use-fast-string-functions" } */ -/* { dg-final { scan-tree-dump-not "memcpy_nobnd" "chkpopt" } } */ - -#include "../../gcc.dg/strlenopt.h" - -void test (void *buf1, void *buf2, size_t len) -{ - memcpy (buf1, buf2, len); -} diff --git a/gcc/testsuite/gcc.target/i386/funcspec-56.inc b/gcc/testsuite/gcc.target/i386/funcspec-56.inc index 9c9c347e8cd..437b12fc67d 100644 --- a/gcc/testsuite/gcc.target/i386/funcspec-56.inc +++ b/gcc/testsuite/gcc.target/i386/funcspec-56.inc @@ -62,7 +62,6 @@ extern void test_pku (void) __attribute__((__target__("pku"))); extern void test_lwp (void) __attribute__((__target__("lwp"))); extern void test_hle (void) __attribute__((__target__("hle"))); extern void test_fxsr (void) __attribute__((__target__("fxsr"))); -extern void test_mpx (void) __attribute__((__target__("mpx"))); extern void test_clwb (void) __attribute__((__target__("clwb"))); extern void test_cld (void) __attribute__((__target__("cld"))); @@ -130,7 +129,6 @@ extern void test_no_pku (void) __attribute__((__target__("no-pku"))); extern void test_no_lwp (void) __attribute__((__target__("no-lwp"))); extern void test_no_hle (void) __attribute__((__target__("no-hle"))); extern void test_no_fxsr (void) __attribute__((__target__("no-fxsr"))); -extern void test_no_mpx (void) __attribute__((__target__("no-mpx"))); extern void test_no_clwb (void) __attribute__((__target__("no-clwb"))); extern void test_no_cld (void) __attribute__((__target__("no-cld"))); diff --git a/gcc/testsuite/gcc.target/i386/i386.exp b/gcc/testsuite/gcc.target/i386/i386.exp index 6b30de3022f..91fa2a61af2 100644 --- a/gcc/testsuite/gcc.target/i386/i386.exp +++ b/gcc/testsuite/gcc.target/i386/i386.exp @@ -24,7 +24,6 @@ if { ![istarget i?86*-*-*] && ![istarget x86_64-*-*] } then { # Load support procs. load_lib gcc-dg.exp load_lib clearcap.exp -load_lib mpx-dg.exp # Return 1 if attribute ms_hook_prologue is supported. proc check_effective_target_ms_hook_prologue { } { diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-11.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-11.c deleted file mode 100644 index b6bd51be63a..00000000000 --- a/gcc/testsuite/gcc.target/i386/indirect-thunk-11.c +++ /dev/null @@ -1,7 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-O2 -mindirect-branch=thunk-extern -fcf-protection -fcheck-pointer-bounds -mmpx" } */ - -void -bar (void) -{ /* { dg-error "'-mindirect-branch=thunk-extern', '-fcf-protection=branch' and '-fcheck-pointer-bounds' are not compatible" } */ -} diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-12.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-12.c deleted file mode 100644 index 2c3848e1fb0..00000000000 --- a/gcc/testsuite/gcc.target/i386/indirect-thunk-12.c +++ /dev/null @@ -1,7 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-O2 -mindirect-branch=thunk -fcf-protection -fcheck-pointer-bounds -mmpx" } */ - -void -bar (void) -{ -} diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-12.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-12.c deleted file mode 100644 index 5da515690d4..00000000000 --- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-12.c +++ /dev/null @@ -1,8 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-O2 -mindirect-branch=keep -fcf-protection -fcheck-pointer-bounds -mmpx" } */ - -__attribute__ ((indirect_branch("thunk-extern"))) -void -bar (void) -{ /* { dg-error "'-mindirect-branch=thunk-extern', '-fcf-protection=branch' and '-fcheck-pointer-bounds' are not compatible" } */ -} diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-13.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-13.c deleted file mode 100644 index a671e460098..00000000000 --- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-13.c +++ /dev/null @@ -1,8 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-O2 -mindirect-branch=keep -fcf-protection -fcheck-pointer-bounds -mmpx" } */ - -__attribute__ ((indirect_branch("thunk-inline"))) -void -bar (void) -{ -} diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c deleted file mode 100644 index 73d16baddc7..00000000000 --- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c +++ /dev/null @@ -1,20 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */ - -void (*dispatch) (char *); -char buf[10]; - -void -foo (void) -{ - dispatch (buf); -} - -/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */ -/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd_rax" { target lp64 } } } */ -/* { dg-final { scan-assembler "bnd call\[ \t\]*__x86_indirect_thunk_bnd_eax" { target ia32 } } } */ -/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */ -/* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */ -/* { dg-final { scan-assembler "bnd ret" } } */ -/* { dg-final { scan-assembler {\tpause} } } */ -/* { dg-final { scan-assembler {\tlfence} } } */ diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c deleted file mode 100644 index 856751ac224..00000000000 --- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c +++ /dev/null @@ -1,19 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */ - -void (*dispatch) (char *); -char buf[10]; - -int -foo (void) -{ - dispatch (buf); - return 0; -} - -/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */ -/* { dg-final { scan-assembler "bnd call\[ \t\]*__x86_indirect_thunk_bnd_(r|e)ax" } } */ -/* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */ -/* { dg-final { scan-assembler "bnd ret" } } */ -/* { dg-final { scan-assembler {\tpause} } } */ -/* { dg-final { scan-assembler {\tlfence} } } */ diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c deleted file mode 100644 index 42312f65588..00000000000 --- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c +++ /dev/null @@ -1,20 +0,0 @@ -/* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */ -/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */ - -void bar (char *); -char buf[10]; - -void -foo (void) -{ - bar (buf); -} - -/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" } } */ -/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd_rax" { target lp64 } } } */ -/* { dg-final { scan-assembler "bnd call\[ \t\]*__x86_indirect_thunk_bnd_eax" { target ia32 } } } */ -/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */ -/* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */ -/* { dg-final { scan-assembler "bnd ret" } } */ -/* { dg-final { scan-assembler {\tpause} } } */ -/* { dg-final { scan-assembler {\tlfence} } } */ diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c deleted file mode 100644 index 8850f2ffca4..00000000000 --- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c +++ /dev/null @@ -1,19 +0,0 @@ -/* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */ -/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */ - -void bar (char *); -char buf[10]; - -int -foo (void) -{ - bar (buf); - return 0; -} - -/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" } } */ -/* { dg-final { scan-assembler "bnd call\[ \t\]*__x86_indirect_thunk_bnd_(r|e)ax" } } */ -/* { dg-final { scan-assembler-times "bnd call\[ \t\]*\.LIND" 1 } } */ -/* { dg-final { scan-assembler "bnd ret" } } */ -/* { dg-final { scan-assembler {\tpause} } } */ -/* { dg-final { scan-assembler {\tlfence} } } */ diff --git a/gcc/testsuite/gcc.target/i386/interrupt-bnd-err-1.c b/gcc/testsuite/gcc.target/i386/interrupt-bnd-err-1.c deleted file mode 100644 index e07688e7ee2..00000000000 --- a/gcc/testsuite/gcc.target/i386/interrupt-bnd-err-1.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-O2 -mgeneral-regs-only -mno-cld -mno-iamcu -mmpx" } */ - -typedef unsigned int uword_t __attribute__ ((mode (__word__))); - -void -__attribute__((interrupt)) -fn1 (void *frame) -{ /* { dg-message "MPX instructions aren't allowed in interrupt service routine" } */ -} - -void -__attribute__((interrupt)) -fn2 (void *frame, uword_t error) -{ /* { dg-message "MPX instructions aren't allowed in exception service routine" } */ -} diff --git a/gcc/testsuite/gcc.target/i386/interrupt-bnd-err-2.c b/gcc/testsuite/gcc.target/i386/interrupt-bnd-err-2.c deleted file mode 100644 index 641ca637f8c..00000000000 --- a/gcc/testsuite/gcc.target/i386/interrupt-bnd-err-2.c +++ /dev/null @@ -1,8 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-O2 -mgeneral-regs-only -mno-cld -mno-iamcu -mmpx" } */ - -void -__attribute__((no_caller_saved_registers)) -fn (void *frame) -{ /* { dg-message "MPX instructions aren't allowed in function with no_caller_saved_registers attribute" } */ -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/alloca-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/alloca-1-lbv.c deleted file mode 100644 index 1c77c192c17..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/alloca-1-lbv.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)__builtin_alloca (100 * sizeof(int)); - - rd (buf, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/alloca-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/alloca-1-nov.c deleted file mode 100644 index 835015fc432..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/alloca-1-nov.c +++ /dev/null @@ -1,22 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)__builtin_alloca (100 * sizeof(int)); - - rd (buf, 0); - rd (buf, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/alloca-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/alloca-1-ubv.c deleted file mode 100644 index c57c6c4811f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/alloca-1-ubv.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)__builtin_alloca (100 * sizeof(int)); - - rd (buf, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/arg-addr-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/arg-addr-1-lbv.c deleted file mode 100644 index 1fd2036cf06..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/arg-addr-1-lbv.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int foo (int i, int j) -{ - return rd(&i, j); -} - -int mpx_test (int argc, const char **argv) -{ - foo (1, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/arg-addr-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/arg-addr-1-nov.c deleted file mode 100644 index 4e338c76f7c..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/arg-addr-1-nov.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int foo (int i, int j) -{ - return rd(&i, j); -} - -int mpx_test (int argc, const char **argv) -{ - foo (1, 0); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/arg-addr-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/arg-addr-1-ubv.c deleted file mode 100644 index 65cb46bcd3f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/arg-addr-1-ubv.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int foo (int i, int j) -{ - return rd(&i, j); -} - -int mpx_test (int argc, const char **argv) -{ - foo (1, 1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/bitfields-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/bitfields-1-lbv.c deleted file mode 100644 index deca6fd6a97..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/bitfields-1-lbv.c +++ /dev/null @@ -1,33 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s { - int a; - int b : 10; - int c : 1; - int e : 10; -} s; - -#define HH (unsigned char)1 - -int foo (struct s *p) -{ - int val = p->b; - printf ("%d\n", val); - return val == HH; -} - -int mpx_test (int argc, const char **argv) -{ - struct s buf[100]; - - foo (buf - 1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/bitfields-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/bitfields-1-nov.c deleted file mode 100644 index 0a7913a256d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/bitfields-1-nov.c +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s { - int a; - int b : 10; - int c : 1; - int e : 10; -} s; - -#define HH (unsigned char)1 - -int foo (struct s *p) -{ - int val = p->b; - printf ("%d\n", val); - return val == HH; -} - -int mpx_test (int argc, const char **argv) -{ - struct s buf[100]; - - foo (buf); - foo (buf + 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/bitfields-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/bitfields-1-ubv.c deleted file mode 100644 index a20a7897fce..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/bitfields-1-ubv.c +++ /dev/null @@ -1,33 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s { - int a; - int b : 10; - int c : 1; - int e : 10; -} s; - -#define HH (unsigned char)1 - -int foo (struct s *p) -{ - int val = p->b; - printf ("%d\n", val); - return val == HH; -} - -int mpx_test (int argc, const char **argv) -{ - struct s buf[100]; - - foo (buf + 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-lbv.c deleted file mode 100644 index 140848e0158..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-lbv.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - __bnd_chk_ptr_bounds (buf - 1, sizeof (int)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-nov.c deleted file mode 100644 index 055b61d649c..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-nov.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - __bnd_chk_ptr_bounds (buf, sizeof (int) * 100); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-ubv.c deleted file mode 100644 index f811694b9ee..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-1-ubv.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - __bnd_chk_ptr_bounds (buf + 100, sizeof (int)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-2.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-2.c deleted file mode 100644 index 47e62e7834d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-bounds-2.c +++ /dev/null @@ -1,14 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fno-check-pointer-bounds" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - __bnd_chk_ptr_bounds (buf - 1, sizeof (int)); - __bnd_chk_ptr_bounds (buf + 100, sizeof (int)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-1-lbv.c deleted file mode 100644 index 085166fc142..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-1-lbv.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - __bnd_chk_ptr_lbounds (buf - 1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-1-nov.c deleted file mode 100644 index 3a666d8e300..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-1-nov.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - __bnd_chk_ptr_lbounds (buf); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-2.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-2.c deleted file mode 100644 index 87b80e0b62c..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-lbounds-2.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fno-check-pointer-bounds" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - __bnd_chk_ptr_lbounds (buf - 1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-1-nov.c deleted file mode 100644 index 8a73fe367d1..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-1-nov.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - __bnd_chk_ptr_ubounds (buf + 99); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-1-ubv.c deleted file mode 100644 index eb22dd1936a..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-1-ubv.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - __bnd_chk_ptr_ubounds (buf + 100); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-2.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-2.c deleted file mode 100644 index 503bd53a60b..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-chk-ptr-ubounds-2.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fno-check-pointer-bounds" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - __bnd_chk_ptr_ubounds (buf + 100); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-1.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-1.c deleted file mode 100644 index 0949f6acd87..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-1.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - assert (buf + 10 == __bnd_copy_ptr_bounds (buf + 10, buf)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-lbv.c deleted file mode 100644 index a7317e71785..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-lbv.c +++ /dev/null @@ -1,18 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_set_ptr_bounds (buf + 10, sizeof (int) * 10); - int *p1 = __bnd_copy_ptr_bounds (buf, p); - p1[9] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-nov.c deleted file mode 100644 index 6b6423e3c6d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-nov.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_set_ptr_bounds (buf + 10, sizeof (int) * 10); - int *p1 = __bnd_copy_ptr_bounds (buf, p); - p1[10] = argc; - p1[19] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-ubv.c deleted file mode 100644 index 2893d9be1f9..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-2-ubv.c +++ /dev/null @@ -1,18 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_set_ptr_bounds (buf + 10, sizeof (int) * 10); - int *p1 = __bnd_copy_ptr_bounds (buf, p); - p1[20] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-3.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-3.c deleted file mode 100644 index 4d0137579eb..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-copy-ptr-bounds-3.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fno-check-pointer-bounds" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - assert (buf + 10 == __bnd_copy_ptr_bounds (buf + 10, buf)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-get-ptr-lbound-1.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-get-ptr-lbound-1.c deleted file mode 100644 index 2a7f46ff2d6..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-get-ptr-lbound-1.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -char buf[100]; - -int mpx_test (int argc, const char **argv) -{ - assert (buf == __bnd_get_ptr_lbound (buf)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-get-ptr-lbound-2.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-get-ptr-lbound-2.c deleted file mode 100644 index 70b49e312b6..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-get-ptr-lbound-2.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fno-check-pointer-bounds" } */ - - -#include "mpx-check.h" - -char buf[100]; - -int mpx_test (int argc, const char **argv) -{ - assert ((void *)0 == __bnd_get_ptr_lbound (buf)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-get-ptr-ubound-1.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-get-ptr-ubound-1.c deleted file mode 100644 index a9111f35d7d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-get-ptr-ubound-1.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -char buf[100]; - -int mpx_test (int argc, const char **argv) -{ - assert (buf + 99 == __bnd_get_ptr_ubound (buf)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-get-ptr-ubound-2.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-get-ptr-ubound-2.c deleted file mode 100644 index cf0aca14a6b..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-get-ptr-ubound-2.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fno-check-pointer-bounds" } */ - - -#include "mpx-check.h" - -char buf[100]; - -int mpx_test (int argc, const char **argv) -{ - assert ((void *)-1 == __bnd_get_ptr_ubound (buf)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-1.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-1.c deleted file mode 100644 index ee259cc9fb6..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-1.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - assert (buf + 10 == __bnd_init_ptr_bounds (buf + 10)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-2-nov.c deleted file mode 100644 index da44e7a9642..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-2-nov.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_set_ptr_bounds (buf + 10, sizeof (int) * 10); - p = __bnd_init_ptr_bounds (p); - p[-1] = argc; - p[10] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-3.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-3.c deleted file mode 100644 index 8c1527025f6..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-init-ptr-bounds-3.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fno-check-pointer-bounds" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - assert (buf + 10 == __bnd_init_ptr_bounds (buf + 10)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-1.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-1.c deleted file mode 100644 index 4ac49abd70a..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-1.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - assert (buf + 10 == __bnd_narrow_ptr_bounds (buf + 10, buf, 4)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-lbv.c deleted file mode 100644 index 21a8f927f47..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-lbv.c +++ /dev/null @@ -1,17 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_narrow_ptr_bounds (buf - 10, buf, sizeof (int) * 20); - p[9] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-nov.c deleted file mode 100644 index 8182d029e07..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-nov.c +++ /dev/null @@ -1,15 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_narrow_ptr_bounds (buf - 10, buf, sizeof (int) * 20); - p[10] = argc; - p[19] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-ubv.c deleted file mode 100644 index 6ff90cee593..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-2-ubv.c +++ /dev/null @@ -1,17 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_narrow_ptr_bounds (buf - 10, buf, sizeof (int) * 20); - p[20] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-lbv.c deleted file mode 100644 index 69b4a51b490..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-lbv.c +++ /dev/null @@ -1,17 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_narrow_ptr_bounds (buf + 10, buf, sizeof (int) * 100); - p[-1] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-nov.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-nov.c deleted file mode 100644 index 0c13b123d8f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-nov.c +++ /dev/null @@ -1,15 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_narrow_ptr_bounds (buf + 10, buf, sizeof (int) * 100); - p[0] = argc; - p[89] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-ubv.c deleted file mode 100644 index 445e3375834..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-3-ubv.c +++ /dev/null @@ -1,17 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_narrow_ptr_bounds (buf + 10, buf, sizeof (int) * 100); - p[90] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-4.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-4.c deleted file mode 100644 index 144855cfabd..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-narrow-ptr-bounds-4.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fno-check-pointer-bounds" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - assert (buf - 10 == __bnd_narrow_ptr_bounds (buf - 10, buf, 4)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-null-ptr-bounds-1-bbv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-null-ptr-bounds-1-bbv.c deleted file mode 100644 index 5497ef1d2da..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-null-ptr-bounds-1-bbv.c +++ /dev/null @@ -1,17 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_null_ptr_bounds (buf + 10); - p[0] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-1.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-1.c deleted file mode 100644 index 8abb2576654..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-1.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - assert (buf + 10 == __bnd_set_ptr_bounds (buf + 10, 4)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-lbv.c deleted file mode 100644 index bbc578abd2c..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-lbv.c +++ /dev/null @@ -1,17 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_set_ptr_bounds (buf + 10, sizeof (int) * 10); - p[-1] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-nov.c deleted file mode 100644 index 39df101ad50..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-nov.c +++ /dev/null @@ -1,15 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_set_ptr_bounds (buf + 10, sizeof (int) * 10); - p[0] = argc; - p[9] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-ubv.c deleted file mode 100644 index c2d27e71065..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-2-ubv.c +++ /dev/null @@ -1,17 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_set_ptr_bounds (buf + 10, sizeof (int) * 10); - p[10] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-3.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-3.c deleted file mode 100644 index 811cdb4e116..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-set-ptr-bounds-3.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fno-check-pointer-bounds" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - assert (buf + 10 == __bnd_set_ptr_bounds (buf + 10, sizeof (int) * 10)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-lbv.c deleted file mode 100644 index af6c8dbe59c..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-lbv.c +++ /dev/null @@ -1,20 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; -int *p; - -int mpx_test (int argc, const char **argv) -{ - int *p1 = __bnd_set_ptr_bounds (buf + 10, sizeof (int) * 10); - p = buf; - __bnd_store_ptr_bounds ((void **)&p, p1 - 10); - p[9] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-nov.c deleted file mode 100644 index 9e9ea305ae8..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-nov.c +++ /dev/null @@ -1,18 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; -int *p; - -int mpx_test (int argc, const char **argv) -{ - int *p1 = __bnd_set_ptr_bounds (buf + 10, sizeof (int) * 10); - p = buf; - __bnd_store_ptr_bounds ((void **)&p, p1 - 10); - p[10] = argc; - p[19] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-ubv.c deleted file mode 100644 index 62aca8c131b..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-1-ubv.c +++ /dev/null @@ -1,20 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; -int *p; - -int mpx_test (int argc, const char **argv) -{ - int *p1 = __bnd_set_ptr_bounds (buf + 10, sizeof (int) * 10); - p = buf; - __bnd_store_ptr_bounds ((void **)&p, p1 - 10); - p[20] = argc; - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-2.c b/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-2.c deleted file mode 100644 index a2ca7900915..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/builtin-bnd-store-ptr-bounds-2.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fno-check-pointer-bounds" } */ - - -#include "mpx-check.h" - -int buf[100]; -int *p; - -int mpx_test (int argc, const char **argv) -{ - int *p1 = __bnd_set_ptr_bounds (buf + 10, sizeof (int) * 10); - p = buf; - __bnd_store_ptr_bounds ((void **)&p, p1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/calloc-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/calloc-1-lbv.c deleted file mode 100644 index 0ba5d73229d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/calloc-1-lbv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)calloc (100, sizeof(int)); - - rd (buf, -1); - - free (buf); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/calloc-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/calloc-1-nov.c deleted file mode 100644 index cb755e57391..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/calloc-1-nov.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)calloc (100, sizeof(int)); - - rd (buf, 0); - rd (buf, 99); - - free (buf); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/calloc-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/calloc-1-ubv.c deleted file mode 100644 index a932a8c7b47..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/calloc-1-ubv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)calloc (100, sizeof(int)); - - rd (buf, 100); - - free (buf); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-1.c b/gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-1.c deleted file mode 100644 index cb4d22984b6..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-1.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fcheck-pointer-bounds -mmpx" } */ - -#include "math.h" - -double -test1 (double x, double y, double (*fn)(double, double)) -{ - return fn (x, y); -} - -double -test2 (double x, double y) -{ - return test1 (x, y, copysign); -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-2.c b/gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-2.c deleted file mode 100644 index 951e7dece19..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-2.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O3 -fcheck-pointer-bounds -mmpx -fno-inline" } */ - -#include "math.h" - -double -test1 (double x, double y, double (*fn)(double, double)) -{ - return fn (x, y); -} - -double -test2 (double x, double y) -{ - return test1 (x, y, copysign); -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-3.c b/gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-3.c deleted file mode 100644 index 439f631a3b9..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-3.c +++ /dev/null @@ -1,33 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fexceptions -fcheck-pointer-bounds -mmpx" } */ - -extern int f2 (const char*, int, ...); -extern long int f3 (int *); -extern void err (void) __attribute__((__error__("error"))); - -extern __inline __attribute__ ((__always_inline__)) int -f1 (int i, ...) -{ - if (__builtin_constant_p (i)) - { - if (i) - err (); - return f2 ("", i); - } - - return f2 ("", i); -} - -int -test () -{ - int i; - - if (f1 (0)) - if (f3 (&i)) - i = 0; - - return i; -} - - diff --git a/gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-4.c b/gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-4.c deleted file mode 100644 index 1b7d7032ecb..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/chkp-fix-calls-4.c +++ /dev/null @@ -1,17 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-Os -fcheck-pointer-bounds -mmpx" } */ - -typedef void (func) (int *); - -static inline void -bar (func f) -{ - int i; - f (&i); -} - -void -foo () -{ - bar (0); -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/chkp-thunk-comdat-1.cc b/gcc/testsuite/gcc.target/i386/mpx/chkp-thunk-comdat-1.cc deleted file mode 100644 index 26d3c48a621..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/chkp-thunk-comdat-1.cc +++ /dev/null @@ -1,18 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fcheck-pointer-bounds -mmpx" } */ - -namespace -{ - template <int dim> - int __attribute__((noinline)) - f1 () - { - return dim; - } -} - -int -test () -{ - return f1<3> (); -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/chkp-thunk-comdat-2.cc b/gcc/testsuite/gcc.target/i386/mpx/chkp-thunk-comdat-2.cc deleted file mode 100644 index 2b1abe9b67d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/chkp-thunk-comdat-2.cc +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fcheck-pointer-bounds -mmpx" } */ - -class c1 -{ -public: - virtual int test1 (const char *); -}; - -class c2 -{ -public: - int test2 (const char *); -}; - -int -c1::test1 (const char *) -{ - return 0; -} - -int -c2::test2 (const char *) -{ - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/chkp-thunk-comdat-3.c b/gcc/testsuite/gcc.target/i386/mpx/chkp-thunk-comdat-3.c deleted file mode 100644 index dd0057e2981..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/chkp-thunk-comdat-3.c +++ /dev/null @@ -1,23 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O -fvisibility=hidden" } */ - -int val; - -static int __attribute__((noinline)) -test1 () -{ - return val; -} - -static int __attribute__((bnd_legacy,noinline)) -test2 () -{ - return test1 (); -} - -int -test3 (void) -{ - return test2 (); -} - diff --git a/gcc/testsuite/gcc.target/i386/mpx/fastcall-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/fastcall-1-lbv.c deleted file mode 100644 index 6f9ba88fed5..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/fastcall-1-lbv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-require-effective-target ia32 } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -__attribute__((fastcall)) int rd (int *p1, int *p2, int i) -{ - int res = p1[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, buf, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/fastcall-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/fastcall-1-nov.c deleted file mode 100644 index 6a2896e0125..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/fastcall-1-nov.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do run } */ -/* { dg-require-effective-target ia32 } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -__attribute__((fastcall)) int rd (int *p1, int *p2, int i) -{ - int res = p1[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, buf, 0); - rd (buf1, buf, 9); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/fastcall-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/fastcall-1-ubv.c deleted file mode 100644 index b5edc438f27..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/fastcall-1-ubv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-require-effective-target ia32 } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -__attribute__((fastcall)) int rd (int *p1, int *p2, int i) -{ - int res = p1[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, buf, 10); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/fastcall-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/fastcall-2-lbv.c deleted file mode 100644 index cbe7343e018..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/fastcall-2-lbv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-require-effective-target ia32 } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -__attribute__((fastcall)) int rd (int *p1, int *p2, int i) -{ - int res = p2[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - rd (buf, buf1, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/fastcall-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/fastcall-2-nov.c deleted file mode 100644 index 83773d0d90c..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/fastcall-2-nov.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do run } */ -/* { dg-require-effective-target ia32 } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -__attribute__((fastcall)) int rd (int *p1, int *p2, int i) -{ - int res = p2[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - rd (buf, buf1, 0); - rd (buf, buf1, 9); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/fastcall-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/fastcall-2-ubv.c deleted file mode 100644 index 1a614fa3610..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/fastcall-2-ubv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-require-effective-target ia32 } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -__attribute__((fastcall)) int rd (int *p1, int *p2, int i) -{ - int res = p2[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - rd (buf, buf1, 10); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-1-lbv.c deleted file mode 100644 index 46a58123bf4..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-1-lbv.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -int foo (int *i, int k) -{ - printf ("%d\n", i[k]); - return i[k]; -} - -int mpx_test (int argc, const char **argv) -{ - struct S s; - - foo(&s.a, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-1-nov.c deleted file mode 100644 index b8500ff333d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-1-nov.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -int foo (int *i, int k) -{ - printf ("%d\n", i[k]); - return i[k]; -} - -int mpx_test (int argc, const char **argv) -{ - struct S s; - - foo(&s.a, 0); - foo(&s.a, 101); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-1-ubv.c deleted file mode 100644 index 990adee3bb2..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-1-ubv.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -int foo (int *i, int k) -{ - printf ("%d\n", i[k]); - return i[k]; -} - -int mpx_test (int argc, const char **argv) -{ - struct S s; - - foo(&s.a, 102); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-10-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-10-lbv.c deleted file mode 100644 index cd8d59afd22..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-10-lbv.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-fchkp-narrow-to-innermost-array" } */ - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int arr[100]; -} S; - -struct S sa[10]; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (&sa[argc].arr[0], -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-10-nov.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-10-nov.c deleted file mode 100644 index 90f79a0eaed..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-10-nov.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-fchkp-narrow-to-innermost-array" } */ - -#include "mpx-check.h" - -struct S { - int arr[100]; -} S; - -struct S sa[10]; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (&sa[argc].arr[0], 0); - rd (&sa[argc].arr[0], 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-10-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-10-ubv.c deleted file mode 100644 index b6a9ad07071..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-10-ubv.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-fchkp-narrow-to-innermost-array" } */ - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int arr[100]; -} S; - -struct S sa[10]; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (&sa[argc].arr[0], 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-2-lbv.c deleted file mode 100644 index fdf39672315..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-2-lbv.c +++ /dev/null @@ -1,30 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-fchkp-first-field-has-own-bounds" } */ - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -int foo (int *i, int k) -{ - printf ("%d\n", i[k]); - return i[k]; -} - -int mpx_test (int argc, const char **argv) -{ - struct S s; - - foo(&s.a, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-2-nov.c deleted file mode 100644 index 2a685036ca0..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-2-nov.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-fchkp-first-field-has-own-bounds" } */ - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -int foo (int *i, int k) -{ - printf ("%d\n", i[k]); - return i[k]; -} - -int mpx_test (int argc, const char **argv) -{ - struct S s; - - foo(&s.a, 0); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-2-ubv.c deleted file mode 100644 index b07b09ff808..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-2-ubv.c +++ /dev/null @@ -1,30 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-fchkp-first-field-has-own-bounds" } */ - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -int foo (int *i, int k) -{ - printf ("%d\n", i[k]); - return i[k]; -} - -int mpx_test (int argc, const char **argv) -{ - struct S s; - - foo(&s.a, 1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-3-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-3-lbv.c deleted file mode 100644 index ea919d80fbc..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-3-lbv.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -int foo (int *p, int i) -{ - printf ("%d\n", p[i]); - return p[i]; -} - -struct S s; - -int mpx_test (int argc, const char **argv) -{ - foo (&s.b[0], -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-3-nov.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-3-nov.c deleted file mode 100644 index 12f42c4d289..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-3-nov.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -int foo (int *p, int i) -{ - printf ("%d\n", p[i]); - return p[i]; -} - -struct S s; - -int mpx_test (int argc, const char **argv) -{ - foo (&s.b[0], 0); - foo (&s.b[0], 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-3-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-3-ubv.c deleted file mode 100644 index 55a8af3a0ce..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-3-ubv.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -int foo (int *p, int i) -{ - printf ("%d\n", p[i]); - return p[i]; -} - -struct S s; - -int mpx_test (int argc, const char **argv) -{ - foo (&s.b[0], 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-4-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-4-lbv.c deleted file mode 100644 index 23cf71ed6df..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-4-lbv.c +++ /dev/null @@ -1,35 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -struct S1 { - int x; - struct S a[10]; - struct S b; -} S1; - -int foo (int *p, int i) -{ - printf ("%d\n", p[i]); - return p[i]; -} - -struct S1 s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&s1.a[0].a, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-4-nov.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-4-nov.c deleted file mode 100644 index 791753244f3..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-4-nov.c +++ /dev/null @@ -1,33 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -struct S1 { - int x; - struct S a[10]; - struct S b; -} S1; - -int foo (int *p, int i) -{ - printf ("%d\n", p[i]); - return p[i]; -} - -struct S1 s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&s1.a[9].c, 0); - foo (&s1.a[0].a, 0); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-4-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-4-ubv.c deleted file mode 100644 index 0d4ac020cf3..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-4-ubv.c +++ /dev/null @@ -1,35 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -struct S1 { - int x; - struct S a[10]; - struct S b; -} S1; - -int foo (int *p, int i) -{ - printf ("%d\n", p[i]); - return p[i]; -} - -struct S1 s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&s1.a[9].c, 1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-5-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-5-lbv.c deleted file mode 100644 index c00d42f3213..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-5-lbv.c +++ /dev/null @@ -1,35 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -struct S1 { - int x; - struct S a[10]; - struct S b; -} S1; - -int foo (int *p, int i) -{ - printf ("%d\n", p[i]); - return p[i]; -} - -struct S1 s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&s1.b.b[0], -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-5-nov.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-5-nov.c deleted file mode 100644 index b69895e1d20..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-5-nov.c +++ /dev/null @@ -1,33 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -struct S1 { - int x; - struct S a[10]; - struct S b; -} S1; - -int foo (int *p, int i) -{ - printf ("%d\n", p[i]); - return p[i]; -} - -struct S1 s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&s1.b.b[0], 0); - foo (&s1.b.b[0], 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-5-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-5-ubv.c deleted file mode 100644 index d00f41eb86e..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-5-ubv.c +++ /dev/null @@ -1,35 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -struct S1 { - int x; - struct S a[10]; - struct S b; -} S1; - -int foo (int *p, int i) -{ - printf ("%d\n", p[i]); - return p[i]; -} - -struct S1 s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&s1.b.b[0], 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-6-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-6-lbv.c deleted file mode 100644 index 91b64bf462d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-6-lbv.c +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -struct S1 { - int x; - struct S a[10]; - struct S b; -} S1; - -int foo (int *p, int i) -{ - printf ("%d\n", p[i]); - return p[i]; -} - -struct S1 s1; -struct S1 *s2 = &s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&(s2->a[0].a), -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-6-nov.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-6-nov.c deleted file mode 100644 index f837f57a421..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-6-nov.c +++ /dev/null @@ -1,34 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -struct S1 { - int x; - struct S a[10]; - struct S b; -} S1; - -int foo (int *p, int i) -{ - printf ("%d\n", p[i]); - return p[i]; -} - -struct S1 s1; -struct S1 *s2 = &s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&(s2->a[0].a), 0); - foo (&(s2->a[9].a), 101); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-6-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-6-ubv.c deleted file mode 100644 index 97ef911406e..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-6-ubv.c +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -struct S1 { - int x; - struct S a[10]; - struct S b; -} S1; - -int foo (int *p, int i) -{ - printf ("%d\n", p[i]); - return p[i]; -} - -struct S1 s1; -struct S1 *s2 = &s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&(s2->a[9].a), 102); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-7-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-7-lbv.c deleted file mode 100644 index 176971168e5..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-7-lbv.c +++ /dev/null @@ -1,42 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a[10]; - int b; -} S; - -struct S1 { - int a; - struct S b[10]; - int c; -} S1; - -struct S2 { - int x; - struct S1 a[10]; - struct S1 b; -} S2; - -int foo (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -struct S2 s1; -struct S2 *s2 = &s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&(s2->a[-1].a), 0); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-7-nov.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-7-nov.c deleted file mode 100644 index 19c09b8271e..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-7-nov.c +++ /dev/null @@ -1,40 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct S { - int a[10]; - int b; -} S; - -struct S1 { - int a; - struct S b[10]; - int c; -} S1; - -struct S2 { - int x; - struct S1 a[10]; - struct S1 b; -} S2; - -int foo (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -struct S2 s1; -struct S2 *s2 = &s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&(s2->a[0].a), 0); - foo (&(s2->a[9].c), 0); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-7-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-7-ubv.c deleted file mode 100644 index c9e8ae2442c..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-7-ubv.c +++ /dev/null @@ -1,42 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a[10]; - int b; -} S; - -struct S1 { - int a; - struct S b[10]; - int c; -} S1; - -struct S2 { - int x; - struct S1 a[10]; - struct S1 b; -} S2; - -int foo (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -struct S2 s1; -struct S2 *s2 = &s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&(s2->a[10].a), 0); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-8-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-8-lbv.c deleted file mode 100644 index cac6784175b..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-8-lbv.c +++ /dev/null @@ -1,43 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-fchkp-narrow-to-innermost-array" } */ - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a[10]; - int b; -} S; - -struct S1 { - int a; - struct S b[10]; - int c; -} S1; - -struct S2 { - int x; - struct S1 a[10]; - struct S1 b; -} S2; - -int foo (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -struct S2 s1; -struct S2 *s2 = &s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&(s1.a[argc].b[-1].a[0]), 9); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-8-nov.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-8-nov.c deleted file mode 100644 index e7243a989f9..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-8-nov.c +++ /dev/null @@ -1,43 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-fchkp-narrow-to-innermost-array" } */ - -#include "mpx-check.h" - -struct S { - int a[10]; - int b; -} S; - -struct S1 { - int a; - struct S b[10]; - int c; -} S1; - -struct S2 { - int x; - struct S1 a[10]; - struct S1 b; -} S2; - -int foo (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -struct S2 s1; -struct S2 *s2 = &s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&(s1.a[argc].b[0].a[0]), 0); - foo (&(s1.a[argc].b[0].a[0]), 9); - foo (&(s1.a[argc].b[9].a[0]), 0); - foo (&(s1.a[argc].b[9].a[0]), 9); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-8-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-8-ubv.c deleted file mode 100644 index d2792e1bba4..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-8-ubv.c +++ /dev/null @@ -1,43 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-fchkp-narrow-to-innermost-array" } */ - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a[10]; - int b; -} S; - -struct S1 { - int a; - struct S b[10]; - int c; -} S1; - -struct S2 { - int x; - struct S1 a[10]; - struct S1 b; -} S2; - -int foo (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -struct S2 s1; -struct S2 *s2 = &s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&(s1.a[argc].b[10].a[0]), 9); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-9-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-9-lbv.c deleted file mode 100644 index 127d0966330..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-9-lbv.c +++ /dev/null @@ -1,44 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-fchkp-narrow-to-innermost-array" } */ - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int first; - int a[10]; - int b; -} S; - -struct S1 { - int a; - struct S b[10]; - int c; -} S1; - -struct S2 { - int x; - struct S1 a[10]; - struct S1 b; -} S2; - -int foo (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -struct S2 s1; -struct S2 *s2 = &s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&(s2->a[argc].b[5].a[0]), -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-9-nov.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-9-nov.c deleted file mode 100644 index 7f98b0188a3..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-9-nov.c +++ /dev/null @@ -1,42 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-fchkp-narrow-to-innermost-array" } */ - -#include "mpx-check.h" - -struct S { - int first; - int a[10]; - int b; -} S; - -struct S1 { - int a; - struct S b[10]; - int c; -} S1; - -struct S2 { - int x; - struct S1 a[10]; - struct S1 b; -} S2; - -int foo (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -struct S2 s1; -struct S2 *s2 = &s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&(s2->a[argc].b[5].a[0]), 0); - foo (&(s2->a[argc].b[5].a[0]), 9); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/field-addr-9-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/field-addr-9-ubv.c deleted file mode 100644 index a65b8f0d17f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/field-addr-9-ubv.c +++ /dev/null @@ -1,44 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-fchkp-narrow-to-innermost-array" } */ - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int first; - int a[10]; - int b; -} S; - -struct S1 { - int a; - struct S b[10]; - int c; -} S1; - -struct S2 { - int x; - struct S1 a[10]; - struct S1 b; -} S2; - -int foo (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -struct S2 s1; -struct S2 *s2 = &s1; - -int mpx_test (int argc, const char **argv) -{ - foo (&(s2->a[argc].b[5].a[0]), 10); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/frame-address-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/frame-address-1-nov.c deleted file mode 100644 index 87cc2dd1cfc..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/frame-address-1-nov.c +++ /dev/null @@ -1,12 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int mpx_test (int argc, const char **argv) -{ - void **fa = (void **)__builtin_frame_address (0); - printf ("%p\n", *fa); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/hard-reg-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/hard-reg-1-nov.c deleted file mode 100644 index 8cf72e55543..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/hard-reg-1-nov.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ -#ifdef __x86_64__ - register int *frame __asm__("rsp"); -#else - register int *frame __asm__("esp"); -#endif - rd (frame, 1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-lbv.c deleted file mode 100644 index 38fe59f8be9..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-lbv.c +++ /dev/null @@ -1,21 +0,0 @@ -/* { dg-do run { target sse2_runtime } } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -msse2" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -typedef int v16 __attribute__((vector_size(16))); - -int foo(int i) { - register v16 u asm("xmm0"); - return u[i]; -} - -int mpx_test (int argc, const char **argv) -{ - printf ("%d\n", foo (-1)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-nov.c deleted file mode 100644 index 1db83f5b547..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-nov.c +++ /dev/null @@ -1,18 +0,0 @@ -/* { dg-do run { target sse2_runtime } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -msse2" } */ - -#include "mpx-check.h" - -typedef int v16 __attribute__((vector_size(16))); - -int foo (int i) { - register v16 u asm ("xmm0"); - return u[i]; -} - -int mpx_test (int argc, const char **argv) -{ - printf ("%d\n", foo (3)); - printf ("%d\n", foo (0)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-ubv.c deleted file mode 100644 index 66607805ca4..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/hard-reg-2-ubv.c +++ /dev/null @@ -1,21 +0,0 @@ -/* { dg-do run { target sse2_runtime } } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -msse2" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -typedef int v16 __attribute__((vector_size(16))); - -int foo (int i) { - register v16 u asm ("xmm0"); - return u[i]; -} - -int mpx_test (int argc, const char **argv) -{ - printf ("%d\n", foo (5)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/if-stmt-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/if-stmt-1-lbv.c deleted file mode 100644 index 29fa443697f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/if-stmt-1-lbv.c +++ /dev/null @@ -1,30 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p1, int *p2, int i) -{ - int res; - - if (p1 < p2) - p1 = p2; - - res = p1[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_set_ptr_bounds (buf + 1, 40); - rd (buf, p, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/if-stmt-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/if-stmt-1-nov.c deleted file mode 100644 index 576ea8487e3..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/if-stmt-1-nov.c +++ /dev/null @@ -1,28 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int rd (int *p1, int *p2, int i) -{ - int res; - - if (p1 < p2) - p1 = p2; - - res = p1[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_set_ptr_bounds (buf + 1, 40); - rd (buf, p, 0); - rd (buf, p, 9); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/if-stmt-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/if-stmt-1-ubv.c deleted file mode 100644 index 021a3aed267..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/if-stmt-1-ubv.c +++ /dev/null @@ -1,30 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p1, int *p2, int i) -{ - int res; - - if (p1 < p2) - p1 = p2; - - res = p1[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_set_ptr_bounds (buf + 1, 40); - rd (buf, p, 10); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/if-stmt-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/if-stmt-2-lbv.c deleted file mode 100644 index 5d7fe6299a5..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/if-stmt-2-lbv.c +++ /dev/null @@ -1,30 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p1, int *p2, int i) -{ - int res; - - if (p1 > p2) - p1 = p2; - - res = p1[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_set_ptr_bounds (buf + 1, 40); - rd (buf, p, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/if-stmt-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/if-stmt-2-nov.c deleted file mode 100644 index 327c108f789..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/if-stmt-2-nov.c +++ /dev/null @@ -1,28 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int rd (int *p1, int *p2, int i) -{ - int res; - - if (p1 > p2) - p1 = p2; - - res = p1[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_set_ptr_bounds (buf + 1, 40); - rd (buf, p, 0); - rd (buf, p, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/if-stmt-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/if-stmt-2-ubv.c deleted file mode 100644 index 3047f7b5104..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/if-stmt-2-ubv.c +++ /dev/null @@ -1,30 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p1, int *p2, int i) -{ - int res; - - if (p1 > p2) - p1 = p2; - - res = p1[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_set_ptr_bounds (buf + 1, 40); - rd (buf, p, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/label-address-1.c b/gcc/testsuite/gcc.target/i386/mpx/label-address-1.c deleted file mode 100644 index f4cd360b1d4..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/label-address-1.c +++ /dev/null @@ -1,14 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -void *p; -int mpx_test (int argc, const char **argv) -{ - p = &&label; - - label: - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/legacy-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/legacy-1-nov.c deleted file mode 100644 index b51ac7f0271..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/legacy-1-nov.c +++ /dev/null @@ -1,25 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -__attribute__((bnd_legacy)) -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p = __bnd_set_ptr_bounds (buf + 1, 10); - - rd (p, -1); - rd (p, 10); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/macro.c b/gcc/testsuite/gcc.target/i386/mpx/macro.c deleted file mode 100644 index 00d467bd19d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/macro.c +++ /dev/null @@ -1,18 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -#ifndef __MPX__ -#error -mmpx is required -#endif - -#ifndef __CHKP__ -#error -fcheck-pointer-bounds is required -#endif - -int mpx_test (int argc, const char **argv) -{ - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/malloc-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/malloc-1-lbv.c deleted file mode 100644 index aa2aed983cf..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/malloc-1-lbv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)malloc (100 * sizeof(int)); - - rd (buf, -1); - - free (buf); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/malloc-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/malloc-1-nov.c deleted file mode 100644 index 56f26e964d8..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/malloc-1-nov.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)malloc (100 * sizeof(int)); - - rd (buf, 0); - rd (buf, 99); - - free (buf); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/malloc-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/malloc-1-ubv.c deleted file mode 100644 index 6f48ec26923..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/malloc-1-ubv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)malloc (100 * sizeof(int)); - - rd (buf, 100); - - free (buf); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/memcpy-1.c b/gcc/testsuite/gcc.target/i386/mpx/memcpy-1.c deleted file mode 100644 index 6ecbdc1a322..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/memcpy-1.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* Fix for PR78631 */ - -#define SHOULDFAIL - -#include <stdio.h> -#include <string.h> -#include "mpx-check.h" - -char s[10]; -char d[10]; -__attribute__((noinline)) - -char* foo(char* dst, char* src, size_t size) { - return memcpy(dst, src, size); -} -int mpx_test(int argc, const char **argv) { - char* r = foo(d, s, 11); - printf("r = %p\n", r); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/memmove-1.c b/gcc/testsuite/gcc.target/i386/mpx/memmove-1.c deleted file mode 100644 index 0efd0303075..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/memmove-1.c +++ /dev/null @@ -1,117 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include <stdint.h> -#include <string.h> -#include "mpx-check.h" - -#ifdef __i386__ -/* i386 directory size is 4MB. */ -#define MPX_NUM_L2_BITS 10 -#define MPX_NUM_IGN_BITS 2 -#else /* __i386__ */ -/* x86_64 directory size is 2GB. */ -#define MPX_NUM_L2_BITS 17 -#define MPX_NUM_IGN_BITS 3 -#endif /* !__i386__ */ - - -/* bt_num_of_elems is the number of elements in bounds table. */ -unsigned long bt_num_of_elems = (1UL << MPX_NUM_L2_BITS); -/* Function to test MPX wrapper of memmove function. - src_bigger_dst determines which address is bigger, can be 0 or 1. - src_bt_index and dst_bt index are bt_indexes - from the beginning of the page. - bd_index_end is the bd index of the last element of src if we define - bd index of the first element as 0. - src_bt index_end is bt index of the last element of src. - pointers inside determines if array being copied includes pointers - src_align and dst_align are alignments of src and dst. - Arrays may contain unaligned pointers. */ -int -test (int src_bigger_dst, int src_bt_index, int dst_bt_index, - int bd_index_end, int src_bt_index_end, int pointers_inside, - int src_align, int dst_align) -{ - const int n = - src_bt_index_end - src_bt_index + bd_index_end * bt_num_of_elems; - if (n < 0) - { - return 0; - } - const int num_of_pointers = (bd_index_end + 2) * bt_num_of_elems; - void **arr = 0; - posix_memalign ((void **) (&arr), - 1UL << (MPX_NUM_L2_BITS + MPX_NUM_IGN_BITS), - num_of_pointers * sizeof (void *)); - void **src = arr, **dst = arr; - if ((src_bigger_dst) && (src_bt_index < dst_bt_index)) - src_bt_index += bt_num_of_elems; - if (!(src_bigger_dst) && (src_bt_index > dst_bt_index)) - dst_bt_index += bt_num_of_elems; - src += src_bt_index; - dst += dst_bt_index; - char *realign = (char *) src; - realign += src_align; - src = (void **) realign; - realign = (char *) dst; - realign += src_align; - dst = (void **) realign; - if (pointers_inside) - { - for (int i = 0; i < n; i++) - src[i] = __bnd_set_ptr_bounds (arr + i, i * sizeof (void *) + 1); - } - memmove (dst, src, n * sizeof (void *)); - if (pointers_inside) - { - for (int i = 0; i < n; i++) - { - if (dst[i] != arr + i) - abort (); - if (__bnd_get_ptr_lbound (dst[i]) != arr + i) - abort (); - if (__bnd_get_ptr_ubound (dst[i]) != arr + 2 * i) - abort (); - } - } - free (arr); - return 0; -} - -/* Call testall to test common cases of memmove for MPX. */ -void -testall () -{ - int align[3]; - align[0] = 0; - align[1] = 1; - align[2] = 7; - for (int pointers_inside = 0; pointers_inside < 2; pointers_inside++) - for (int src_bigger_dst = 0; src_bigger_dst < 2; src_bigger_dst++) - for (int src_align = 0; src_align < 3; src_align ++) - for (int dst_align = 0; dst_align < 3; dst_align ++) - for (int pages = 0; pages < 4; pages++) - { - test (src_bigger_dst, 1, 2, pages, 1, pointers_inside, - align[src_align], align[dst_align]); - test (src_bigger_dst, 1, 2, pages, 2, pointers_inside, - align[src_align], align[dst_align]); - test (src_bigger_dst, 2, 1, pages, 12, pointers_inside, - align[src_align], align[dst_align]); - test (src_bigger_dst, 2, 1, pages, 1, pointers_inside, - align[src_align], align[dst_align]); - test (src_bigger_dst, 2, 3, pages, 12, pointers_inside, - align[src_align], align[dst_align]); - test (src_bigger_dst, 1, bt_num_of_elems - 2, pages, 2, - pointers_inside, align[src_align], align[dst_align]); - } -}; - -int -mpx_test (int argc, const char **argv) -{ - testall (); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/memmove-2.c b/gcc/testsuite/gcc.target/i386/mpx/memmove-2.c deleted file mode 100644 index e1d78fa47c6..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/memmove-2.c +++ /dev/null @@ -1,40 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include <stdint.h> -#include <string.h> -#include "mpx-check.h" - -#ifdef __i386__ -/* i386 directory size is 4MB. */ -#define MPX_NUM_L2_BITS 10 -#define MPX_NUM_IGN_BITS 2 -#else /* __i386__ */ -/* x86_64 directory size is 2GB. */ -#define MPX_NUM_L2_BITS 17 -#define MPX_NUM_IGN_BITS 3 -#endif /* !__i386__ */ - - -/* bt_num_of_elems is the number of elements in bounds table. */ -unsigned long bt_num_of_elems = (1UL << MPX_NUM_L2_BITS); - -/* Function to test MPX wrapper of memmove function. - Check case with no BT allocated for data. */ - -int -mpx_test (int argc, const char **argv) -{ - void **arr = 0; - posix_memalign ((void **) (&arr), - 1UL << (MPX_NUM_L2_BITS + MPX_NUM_IGN_BITS), - 2 * bt_num_of_elems * sizeof (void *)); - void **src = arr, **dst = arr, **ptr = arr; - src += 10; - dst += 1; - ptr += bt_num_of_elems + 100; - ptr[0] = __bnd_set_ptr_bounds (arr + 1, sizeof (void *) + 1); - memmove (dst, src, 5 * sizeof (void *)); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/memmove-zero-length.c b/gcc/testsuite/gcc.target/i386/mpx/memmove-zero-length.c deleted file mode 100644 index 78bfdebff03..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/memmove-zero-length.c +++ /dev/null @@ -1,18 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" -#include "string.h" - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)malloc (100 * sizeof(int)); - - memmove (buf, NULL, 0); - memmove (NULL, buf, 0); - - free (buf); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/mpx-check.h b/gcc/testsuite/gcc.target/i386/mpx/mpx-check.h deleted file mode 100644 index e622934fe32..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/mpx-check.h +++ /dev/null @@ -1,48 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <assert.h> -#include "cpuid.h" -#include "mpx-os-support.h" - -static int -__attribute__ ((noinline)) -mpx_test (int, const char **); - -#ifdef SHOULDFAIL -#define NORUNRES 1 -#else -#define NORUNRES 0 -#endif - -#define DEBUG - -static int -check_osxsave (void) -{ - unsigned int eax, ebx, ecx, edx; - - __cpuid (1, eax, ebx, ecx, edx); - return (ecx & bit_OSXSAVE) != 0; -} - -int -main (int argc, const char **argv) -{ - unsigned int eax, ebx, ecx, edx; - - if (!__get_cpuid_count (7, 0, &eax, &ebx, &ecx, &edx)) - return NORUNRES; - - /* Run MPX test only if host has MPX support. */ - if (check_osxsave () && (ebx & bit_MPX) && mpx_os_support ()) - mpx_test (argc, argv); - else - { -#ifdef DEBUG - printf ("SKIPPED\n"); -#endif - return NORUNRES; - } - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/mpx-os-support.h b/gcc/testsuite/gcc.target/i386/mpx/mpx-os-support.h deleted file mode 100644 index 8c9294d33a5..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/mpx-os-support.h +++ /dev/null @@ -1,16 +0,0 @@ -/* Check if the OS supports executing MPX instructions. */ - -#define XCR_XFEATURE_ENABLED_MASK 0x0 - -#define XSTATE_BNDREGS 0x8 - -static int -mpx_os_support (void) -{ - unsigned int eax, edx; - unsigned int ecx = XCR_XFEATURE_ENABLED_MASK; - - __asm__ ("xgetbv" : "=a" (eax), "=d" (edx) : "c" (ecx)); - - return (eax & XSTATE_BNDREGS) != 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/mpx.exp b/gcc/testsuite/gcc.target/i386/mpx/mpx.exp deleted file mode 100644 index 62d44697eab..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/mpx.exp +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (C) 2014-2018 Free Software Foundation, Inc. -# -# This file is part of GCC. -# -# GCC is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GCC is distributed in the hope that it will be useful, -# but WITHOUT 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 -# along with GCC; see the file COPYING3. If not see -# <http://www.gnu.org/licenses/>. - -# Exit immediately if this isn't a x86 target. -if { ![istarget i?86*-*-*] && ![istarget x86_64-*-*] } then { - return -} - -# Load support procs. -load_lib gcc-dg.exp -load_lib mpx-dg.exp - -# Initialize. -dg-init -mpx_init - -if [check_effective_target_mpx] { - # Run all tests. - gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c*]] "" "" -} - -# All done. -mpx_finish -dg-finish diff --git a/gcc/testsuite/gcc.target/i386/mpx/nested-function-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/nested-function-1-lbv.c deleted file mode 100644 index 0e9d657fcbd..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/nested-function-1-lbv.c +++ /dev/null @@ -1,22 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int mpx_test (int argc, const char **argv) -{ - int a[100]; - - void rd (int i) - { - printf ("%d\n", a[i]); - } - - rd (-1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/nested-function-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/nested-function-1-nov.c deleted file mode 100644 index dd985466328..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/nested-function-1-nov.c +++ /dev/null @@ -1,20 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int mpx_test (int argc, const char **argv) -{ - int a[100]; - - void rd (int i) - { - printf ("%d\n", a[i]); - } - - rd (0); - rd (99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/nested-function-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/nested-function-1-ubv.c deleted file mode 100644 index b5cf6cc29b3..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/nested-function-1-ubv.c +++ /dev/null @@ -1,22 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int mpx_test (int argc, const char **argv) -{ - int a[100]; - - void rd (int i) - { - printf ("%d\n", a[i]); - } - - rd (100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-1-lbv.c deleted file mode 100644 index 58692efb0e3..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-1-lbv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (buf, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-1-nov.c deleted file mode 100644 index 01279be8d3b..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-1-nov.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (buf, 0); - rd (buf, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-1-ubv.c deleted file mode 100644 index c377c57eb6b..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-1-ubv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (buf, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-2-lbv.c deleted file mode 100644 index ebe76cb8263..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-2-lbv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int rd (int t1, int t2, int t3, int t4, int t5, int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (0, 0, 0, 0, 0, buf, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-2-nov.c deleted file mode 100644 index 8b9fce2e297..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-2-nov.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int rd (int t1, int t2, int t3, int t4, int t5, int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (0, 0, 0, 0, 0, buf, 0); - rd (0, 0, 0, 0, 0, buf, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-2-ubv.c deleted file mode 100644 index 525140e2d79..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-2-ubv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int rd (int t1, int t2, int t3, int t4, int t5, int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (0, 0, 0, 0, 0, buf, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-3-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-3-lbv.c deleted file mode 100644 index d6571be44b5..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-3-lbv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int rd (int t1, int t2, int t3, int t4, int t5, int t6, int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (0, 0, 0, 0, 0, 0, buf, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-3-nov.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-3-nov.c deleted file mode 100644 index e42ecba4e2a..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-3-nov.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int rd (int t1, int t2, int t3, int t4, int t5, int t6, int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (0, 0, 0, 0, 0, 0, buf, 0); - rd (0, 0, 0, 0, 0, 0, buf, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-3-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-3-ubv.c deleted file mode 100644 index 8da6252a03a..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-3-ubv.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int rd (int t1, int t2, int t3, int t4, int t5, int t6, int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (0, 0, 0, 0, 0, 0, buf, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-4-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-4-lbv.c deleted file mode 100644 index 5a6842512db..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-4-lbv.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; -int buf1[10]; - -int rd (int *t1, int *t2, int *t3, int *t4, int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (buf1, buf1, buf1, buf1, buf, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-4-nov.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-4-nov.c deleted file mode 100644 index bb2bc46a6f3..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-4-nov.c +++ /dev/null @@ -1,25 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; -int buf1[10]; - -int rd (int *t1, int *t2, int *t3, int *t4, int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (buf1, buf1, buf1, buf1, buf, 0); - rd (buf1, buf1, buf1, buf1, buf, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-4-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-4-ubv.c deleted file mode 100644 index cf3a5c48f1b..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-4-ubv.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; -int buf1[10]; - -int rd (int *t1, int *t2, int *t3, int *t4, int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (buf1, buf1, buf1, buf1, buf, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-5-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-5-lbv.c deleted file mode 100644 index 7c3bd867204..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-5-lbv.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; -int buf1[10]; - -int rd (int *t1, int *t2, int *t3, int *t4, int *t5, int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (buf1, buf1, buf1, buf1, buf1, buf, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-5-nov.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-5-nov.c deleted file mode 100644 index 27e4a7130b0..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-5-nov.c +++ /dev/null @@ -1,25 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; -int buf1[10]; - -int rd (int *t1, int *t2, int *t3, int *t4, int *t5, int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (buf1, buf1, buf1, buf1, buf1, buf, 0); - rd (buf1, buf1, buf1, buf1, buf1, buf, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-5-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-5-ubv.c deleted file mode 100644 index 68e2654b91a..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-arg-5-ubv.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; -int buf1[10]; - -int rd (int *t1, int *t2, int *t3, int *t4, int *t5, int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (buf1, buf1, buf1, buf1, buf1, buf, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-diff-1.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-diff-1.c deleted file mode 100644 index 657991979f6..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-diff-1.c +++ /dev/null @@ -1,8 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -mmpx -fcheck-pointer-bounds" } */ - -char * -foo (char *p, char *q) -{ - return (char *) (p - q); /* { dg-bogus "pointer bounds were lost due to unexpected expression" } */ -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-store-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-store-1-lbv.c deleted file mode 100644 index bde8c76e4b7..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-store-1-lbv.c +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int *buf1[100]; -int buf2[100]; - -void wr (int i) -{ - buf1[i] = buf2; -} - -int rd(int i, int j) -{ - int res = buf1[i][j]; - printf("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - wr(10); - rd(10, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-store-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-store-1-nov.c deleted file mode 100644 index 269e3af17f0..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-store-1-nov.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int *buf1[100]; -int buf2[100]; - -void wr (int i) -{ - buf1[i] = buf2; -} - -int rd(int i, int j) -{ - int res = buf1[i][j]; - printf("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - wr(10); - rd(10, 0); - rd(10, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pointer-store-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/pointer-store-1-ubv.c deleted file mode 100644 index 4c8d45e003f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pointer-store-1-ubv.c +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int *buf1[100]; -int buf2[100]; - -void wr (int i) -{ - buf1[i] = buf2; -} - -int rd(int i, int j) -{ - int res = buf1[i][j]; - printf("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - wr(10); - rd(10, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr65508.c b/gcc/testsuite/gcc.target/i386/mpx/pr65508.c deleted file mode 100644 index 9060287cac5..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr65508.c +++ /dev/null @@ -1,12 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fcheck-pointer-bounds -mmpx" } */ - -void -bar (int N) -{ - int a[N]; - void foo (int a[N]) - { - } - foo (a); -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr65531.cc b/gcc/testsuite/gcc.target/i386/mpx/pr65531.cc deleted file mode 100644 index 049569c50b1..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr65531.cc +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fcheck-pointer-bounds -mmpx" } */ - -#pragma interface - -struct S -{ - ~S () - { - } -}; - -S s; diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr66048.cc b/gcc/testsuite/gcc.target/i386/mpx/pr66048.cc deleted file mode 100644 index b29cd03ed0f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr66048.cc +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fcheck-pointer-bounds -mmpx -march=corei7-avx" } */ - -struct c1 -{ - c1 (const c1 &other) : p (other.p) { }; - int *p; -}; - -struct c2 : public c1 { }; - -c1 -test (c2 a) -{ - return a; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr66134.c b/gcc/testsuite/gcc.target/i386/mpx/pr66134.c deleted file mode 100644 index 3889674ed5f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr66134.c +++ /dev/null @@ -1,17 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fcheck-pointer-bounds -mmpx -fno-tree-ccp" } */ - -extern int vfork (void) __attribute__ ((__nothrow__ , __leaf__)); -void test1 (void); -void test2 (void); -void test3 (int *); - -void test (int *p) -{ - test1 (); - p++; - test2 (); - p++; - vfork (); - test3 (p); -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr66566.c b/gcc/testsuite/gcc.target/i386/mpx/pr66566.c deleted file mode 100644 index a405c20ac0e..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr66566.c +++ /dev/null @@ -1,12 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fcheck-pointer-bounds -mmpx" } */ - -union jsval_layout -{ - void *asPtr; -}; -union jsval_layout a; -union jsval_layout b; -union jsval_layout __inline__ fn1() { return b; } - -void fn2() { a = fn1(); } diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr66567.c b/gcc/testsuite/gcc.target/i386/mpx/pr66567.c deleted file mode 100644 index 5a7e2f29e80..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr66567.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -void (*b) (); - -void fn1 (const int *p1) -{ - static void *a = &&conv_1234_123C; - conv_1234_123C: - ; -} - -void fn2 () -{ - b = fn1; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr66568.c b/gcc/testsuite/gcc.target/i386/mpx/pr66568.c deleted file mode 100644 index 2653ebc0fa0..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr66568.c +++ /dev/null @@ -1,11 +0,0 @@ -/* { dg-do compile } */ -/* { dg-require-effective-target fpic } */ -/* { dg-options "-O2 -fcheck-pointer-bounds -mmpx -O2 -fPIC" } */ - -extern void exit (int); -int a, b, c; -void *set_test () { - if (b) - a ? exit (0) : exit (1); - b = c; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr66569.c b/gcc/testsuite/gcc.target/i386/mpx/pr66569.c deleted file mode 100644 index ba2023c6846..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr66569.c +++ /dev/null @@ -1,14 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -struct s1 { - int *p; - int i; -}; - -struct s2 { - struct s1 s; - int i; -}; - -int test (struct s2 s, ...) { } diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr66581.c b/gcc/testsuite/gcc.target/i386/mpx/pr66581.c deleted file mode 100644 index 015faaeae50..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr66581.c +++ /dev/null @@ -1,18 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -void *a; -int b; - -void -fn1 (void) -{ - void *c = &&l_nop; -l_nop: - for (; b;) - ; - int *d = c; - c = fn1; - *d = 1; - goto *a; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr68337-1.c b/gcc/testsuite/gcc.target/i386/mpx/pr68337-1.c deleted file mode 100644 index 3f8d79d4282..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr68337-1.c +++ /dev/null @@ -1,32 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -#include "mpx-check.h" - -#define N 2 - -extern void abort (); - -static int -mpx_test (int argc, const char **argv) -{ - char ** src = (char **)malloc (sizeof (char *) * N); - char ** dst = (char **)malloc (sizeof (char *) * N); - int i; - - for (i = 0; i < N; i++) - src[i] = __bnd_set_ptr_bounds (argv[0] + i, i + 1); - - __builtin_memcpy(dst, src, sizeof (char *) * N); - - for (i = 0; i < N; i++) - { - char *p = dst[i]; - if (p != argv[0] + i - || __bnd_get_ptr_lbound (p) != p - || __bnd_get_ptr_ubound (p) != p + i) - abort (); - } - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr68337-2.c b/gcc/testsuite/gcc.target/i386/mpx/pr68337-2.c deleted file mode 100644 index 8845cca79be..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr68337-2.c +++ /dev/null @@ -1,9 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ -/* { dg-final { scan-assembler-not "memcpy" } } */ - -void -test (void *dst, void *src) -{ - __builtin_memcpy (dst, src, sizeof (char *) / 2); -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr68416.c b/gcc/testsuite/gcc.target/i386/mpx/pr68416.c deleted file mode 100644 index 10587edf251..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr68416.c +++ /dev/null @@ -1,9 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -mmpx -fcheck-pointer-bounds" } */ -/* { dg-final { scan-assembler-not "bndmov" } } */ - -int -foo(int **arr, int i) -{ - return (*arr)[i]; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr78339.c b/gcc/testsuite/gcc.target/i386/mpx/pr78339.c deleted file mode 100644 index 3dd04240e8c..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr78339.c +++ /dev/null @@ -1,5 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -Wsuggest-attribute=noreturn" } */ - -extern _Noreturn void exit (int); -int main (void) { exit (1); } diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr79631.c b/gcc/testsuite/gcc.target/i386/mpx/pr79631.c deleted file mode 100644 index 075d46b835f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr79631.c +++ /dev/null @@ -1,15 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2" } */ - -typedef struct { int _mp_size; } mpz_t[1]; -int a, b; -void fn1() -{ - mpz_t c[1][b]; - for (;;) { - int d = 0 >= 0 ? 0 == 0 ? c[0][0]->_mp_size ? -1 : 0 : 0 : 0, - e = 0 >= 0 ? 0 == 0 ? c[1][1]->_mp_size ? -1 : 0 : 0 : 0; - if (d != e) - a++; - } -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr79633.c b/gcc/testsuite/gcc.target/i386/mpx/pr79633.c deleted file mode 100644 index 2a60ee82971..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr79633.c +++ /dev/null @@ -1,11 +0,0 @@ -/* PR target/79633 */ -/* { dg-do compile } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -w -O2" } */ - -extern void *memcpy (); - -void -foo () -{ - memcpy (); -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr79753.c b/gcc/testsuite/gcc.target/i386/mpx/pr79753.c deleted file mode 100644 index 9b7bc52e1ed..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr79753.c +++ /dev/null @@ -1,14 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -O2" } */ - -int -foo (void) -{ - return 0; -} - -void -bar (int **p) -{ - *p = (int *) (__UINTPTR_TYPE__) foo (); -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr79770.c b/gcc/testsuite/gcc.target/i386/mpx/pr79770.c deleted file mode 100644 index 0890fcc7bf1..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr79770.c +++ /dev/null @@ -1,19 +0,0 @@ -/* { dg-do compile { target lp64 } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -mabi=ms -Wno-psabi" } */ - -typedef unsigned U __attribute__ ((vector_size (64))); -typedef unsigned __int128 V __attribute__ ((vector_size (64))); - -static inline V -bar (U u, U x, V v) -{ - v = (V)(U) { 0, ~0 }; - v[x[0]] <<= u[-63]; - return v; -} - -V -foo (U u) -{ - return bar (u, (U) {}, (V) {}); -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr79987.c b/gcc/testsuite/gcc.target/i386/mpx/pr79987.c deleted file mode 100644 index b3ebda95694..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr79987.c +++ /dev/null @@ -1,5 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -extern void foo; -void *bar = &foo; /* { dg-warning "taking address of expression of type .void." } */ diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr79988.c b/gcc/testsuite/gcc.target/i386/mpx/pr79988.c deleted file mode 100644 index a6e43eba562..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/pr79988.c +++ /dev/null @@ -1,6 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -void foo(unsigned char * __seg_gs *pointer_gs) { - pointer_gs[5] = 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/realloc-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/realloc-1-lbv.c deleted file mode 100644 index 961196f71c0..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/realloc-1-lbv.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)malloc (100 * sizeof(int)); - buf = (int *)realloc (buf, 200 * sizeof(int)); - - rd (buf, -1); - - free (buf); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/realloc-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/realloc-1-nov.c deleted file mode 100644 index f4b3dd86081..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/realloc-1-nov.c +++ /dev/null @@ -1,25 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)malloc (100 * sizeof(int)); - buf = (int *)realloc (buf, 200 * sizeof(int)); - - rd (buf, 0); - rd (buf, 199); - - free (buf); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/realloc-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/realloc-1-ubv.c deleted file mode 100644 index 8a14baa7a94..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/realloc-1-ubv.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)malloc (100 * sizeof(int)); - buf = (int *)realloc (buf, 200 * sizeof(int)); - - rd (buf, 200); - - free (buf); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/realloc-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/realloc-2-lbv.c deleted file mode 100644 index 919f62a490e..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/realloc-2-lbv.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)malloc (100 * sizeof(int)); - buf = (int *)realloc (buf, 10 * sizeof(int)); - - rd (buf, -1); - - free (buf); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/realloc-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/realloc-2-nov.c deleted file mode 100644 index 569cd241cc9..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/realloc-2-nov.c +++ /dev/null @@ -1,25 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)malloc (100 * sizeof(int)); - buf = (int *)realloc (buf, 10 * sizeof(int)); - - rd (buf, 0); - rd (buf, 9); - - free (buf); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/realloc-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/realloc-2-ubv.c deleted file mode 100644 index 36eb90c1abf..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/realloc-2-ubv.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *buf = (int *)malloc (100 * sizeof(int)); - buf = (int *)realloc (buf, 10 * sizeof(int)); - - rd (buf, 10); - - free (buf); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/reference-1-lbv.cpp b/gcc/testsuite/gcc.target/i386/mpx/reference-1-lbv.cpp deleted file mode 100644 index ec5f546c081..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/reference-1-lbv.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int __attribute((nothrow)) -rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -void set_p (int *&ref) -{ - ref = buf; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - set_p (p); - rd (p, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/reference-1-nov.cpp b/gcc/testsuite/gcc.target/i386/mpx/reference-1-nov.cpp deleted file mode 100644 index 98f1622349a..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/reference-1-nov.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int __attribute((nothrow)) -rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -void set_p (int *&ref) -{ - ref = buf; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - set_p (p); - rd (p, 0); - rd (p, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/reference-1-ubv.cpp b/gcc/testsuite/gcc.target/i386/mpx/reference-1-ubv.cpp deleted file mode 100644 index d2135e7270f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/reference-1-ubv.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int __attribute((nothrow)) -rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -void set_p (int *&ref) -{ - ref = buf; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - set_p (p); - rd (p, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/reference-2-lbv.cpp b/gcc/testsuite/gcc.target/i386/mpx/reference-2-lbv.cpp deleted file mode 100644 index 907cb06616c..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/reference-2-lbv.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int __attribute((nothrow)) -rd (int *&p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -void set_p (int *&ref) -{ - ref = buf; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - set_p (p); - rd (p, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/reference-2-nov.cpp b/gcc/testsuite/gcc.target/i386/mpx/reference-2-nov.cpp deleted file mode 100644 index cdd927c891e..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/reference-2-nov.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int __attribute((nothrow)) -rd (int *&p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -void set_p (int *&ref) -{ - ref = buf; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - set_p (p); - rd (p, 0); - rd (p, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/reference-2-ubv.cpp b/gcc/testsuite/gcc.target/i386/mpx/reference-2-ubv.cpp deleted file mode 100644 index 2f75375d251..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/reference-2-ubv.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int __attribute((nothrow)) -rd (int *&p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -void set_p (int *&ref) -{ - ref = buf; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - set_p (p); - rd (p, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/reference-3-lbv.cpp b/gcc/testsuite/gcc.target/i386/mpx/reference-3-lbv.cpp deleted file mode 100644 index 1330359797d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/reference-3-lbv.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; -int buf1[10]; - -int rd (int (&p)[100], int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (buf, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/reference-3-nov.cpp b/gcc/testsuite/gcc.target/i386/mpx/reference-3-nov.cpp deleted file mode 100644 index 9a5519318a4..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/reference-3-nov.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; -int buf1[10]; - -int rd (int (&p)[100], int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (buf, 0); - rd (buf, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/reference-3-ubv.cpp b/gcc/testsuite/gcc.target/i386/mpx/reference-3-ubv.cpp deleted file mode 100644 index 0a874fabb09..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/reference-3-ubv.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; -int buf1[10]; - -int rd (int (&p)[100], int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (buf, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/reference-4-lbv.cpp b/gcc/testsuite/gcc.target/i386/mpx/reference-4-lbv.cpp deleted file mode 100644 index 2442c6a4a9a..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/reference-4-lbv.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int rd (int (&p)[100], int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int (&get_buf ()) [100] -{ - return buf; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (get_buf (), -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/reference-4-nov.cpp b/gcc/testsuite/gcc.target/i386/mpx/reference-4-nov.cpp deleted file mode 100644 index 9646cc0645d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/reference-4-nov.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int rd (int (&p)[100], int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int (&get_buf ()) [100] -{ - return buf; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (get_buf (), 0); - rd (get_buf (), 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/reference-4-ubv.cpp b/gcc/testsuite/gcc.target/i386/mpx/reference-4-ubv.cpp deleted file mode 100644 index da3382357ab..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/reference-4-ubv.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int rd (int (&p)[100], int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int (&get_buf ()) [100] -{ - return buf; -} - -int mpx_test (int argc, const char **argv) -{ - int *p; - - rd (get_buf (), 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-pointer-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/return-pointer-1-lbv.c deleted file mode 100644 index 9a209b8d304..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-pointer-1-lbv.c +++ /dev/null @@ -1,43 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int *_buf1[100]; -int _buf2[100]; - -int **get_buf1 () -{ - return _buf1; -} - -int *get_buf2 () -{ - return _buf2; -} - -void wr (int i, int **buf1, int *buf2) -{ - buf1[i] = buf2; -} - -int rd (int i, int j, int **buf) -{ - int res = buf[i][j]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int **buf1 = get_buf1 (); - int *buf2 = get_buf2 (); - wr(10, buf1, buf2); - rd(10, -1, buf1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-pointer-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/return-pointer-1-nov.c deleted file mode 100644 index 62d05013909..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-pointer-1-nov.c +++ /dev/null @@ -1,41 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int *_buf1[100]; -int _buf2[100]; - -int **get_buf1 () -{ - return _buf1; -} - -int *get_buf2 () -{ - return _buf2; -} - -void wr (int i, int **buf1, int *buf2) -{ - buf1[i] = buf2; -} - -int rd (int i, int j, int **buf) -{ - int res = buf[i][j]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int **buf1 = get_buf1 (); - int *buf2 = get_buf2 (); - wr(10, buf1, buf2); - rd(10, 0, buf1); - rd(10, 99, buf1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-pointer-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/return-pointer-1-ubv.c deleted file mode 100644 index 4658aef1714..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-pointer-1-ubv.c +++ /dev/null @@ -1,43 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int *_buf1[100]; -int _buf2[100]; - -int **get_buf1 () -{ - return _buf1; -} - -int *get_buf2 () -{ - return _buf2; -} - -void wr (int i, int **buf1, int *buf2) -{ - buf1[i] = buf2; -} - -int rd (int i, int j, int **buf) -{ - int res = buf[i][j]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - int **buf1 = get_buf1 (); - int *buf2 = get_buf2 (); - wr(10, buf1, buf2); - rd(10, 100, buf1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-1-lbv.c deleted file mode 100644 index ef29427fff3..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-1-lbv.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; -} s1; - -int buf[100]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-1-nov.c deleted file mode 100644 index 12e1edd6c4c..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-1-nov.c +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - int *p; -} s1; - -int buf[100]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, 0); - rd (s, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-1-ubv.c deleted file mode 100644 index dda908b2203..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-1-ubv.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; -} s1; - -int buf[100]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-2-lbv.c deleted file mode 100644 index bf370669d1c..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-2-lbv.c +++ /dev/null @@ -1,41 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int *p1; -} s1; - -int buf[100]; -int buf1[10]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - s.p1 = buf1; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-2-nov.c deleted file mode 100644 index 577e3ab5dc1..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-2-nov.c +++ /dev/null @@ -1,39 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int *p1; -} s1; - -int buf[100]; -int buf1[10]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - s.p1 = buf1; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, 0); - rd (s, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-2-ubv.c deleted file mode 100644 index c5a7ad002af..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-2-ubv.c +++ /dev/null @@ -1,41 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int *p1; -} s1; - -int buf[100]; -int buf1[10]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - s.p1 = buf1; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-3-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-3-lbv.c deleted file mode 100644 index 1802ca837cf..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-3-lbv.c +++ /dev/null @@ -1,41 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p1; - int *p; -} s1; - -int buf[100]; -int buf1[10]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - s.p1 = buf1; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-3-nov.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-3-nov.c deleted file mode 100644 index 2e5214a8278..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-3-nov.c +++ /dev/null @@ -1,39 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - int *p1; - int *p; -} s1; - -int buf[100]; -int buf1[10]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - s.p1 = buf1; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, 0); - rd (s, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-3-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-3-ubv.c deleted file mode 100644 index 83b81da8390..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-3-ubv.c +++ /dev/null @@ -1,41 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p1; - int *p; -} s1; - -int buf[100]; -int buf1[10]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - s.p1 = buf1; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-4-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-4-lbv.c deleted file mode 100644 index 7937514d67c..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-4-lbv.c +++ /dev/null @@ -1,40 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int buf[100]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-4-nov.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-4-nov.c deleted file mode 100644 index 352b5723266..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-4-nov.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int buf[100]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, 0); - rd (s, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-4-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-4-ubv.c deleted file mode 100644 index 14ba0bddb26..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-4-ubv.c +++ /dev/null @@ -1,40 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int buf[100]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-5-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-5-lbv.c deleted file mode 100644 index 2bd871a8562..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-5-lbv.c +++ /dev/null @@ -1,40 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int i1; - int i2; - int *p; -} s1; - -int buf[100]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-5-nov.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-5-nov.c deleted file mode 100644 index 978b4930675..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-5-nov.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - int i1; - int i2; - int *p; -} s1; - -int buf[100]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, 0); - rd (s, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-5-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-5-ubv.c deleted file mode 100644 index 633e15dbe67..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-5-ubv.c +++ /dev/null @@ -1,40 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int i1; - int i2; - int *p; -} s1; - -int buf[100]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-6-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-6-lbv.c deleted file mode 100644 index 9e2cf2cc26a..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-6-lbv.c +++ /dev/null @@ -1,42 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int i1; - int i2; - int *p; - int i3; - int i4; -} s1; - -int buf[100]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-6-nov.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-6-nov.c deleted file mode 100644 index f2d60f470f3..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-6-nov.c +++ /dev/null @@ -1,40 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - int i1; - int i2; - int *p; - int i3; - int i4; -} s1; - -int buf[100]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, 0); - rd (s, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/return-struct-6-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/return-struct-6-ubv.c deleted file mode 100644 index 637051238b6..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/return-struct-6-ubv.c +++ /dev/null @@ -1,42 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int i1; - int i2; - int *p; - int i3; - int i4; -} s1; - -int buf[100]; - -struct s1 __attribute__((noinline)) get () -{ - struct s1 s; - s.p = buf; - return s; -} - -int __attribute__((noinline)) rd (struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = get (); - - rd (s, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/sincos-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/sincos-1-nov.c deleted file mode 100644 index da5f301a19a..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/sincos-1-nov.c +++ /dev/null @@ -1,18 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ -/* { dg-additional-options "-lm" } */ - - -#include "mpx-check.h" -#include "math.h" - -int mpx_test (int argc, const char **argv) -{ - double d1, d2; - d1 = sin(argc); - d2 = cos(argc); - - printf ("%f %f\n", d1, d2); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-array-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/static-array-1-lbv.c deleted file mode 100644 index cc1cf8ddd83..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-array-1-lbv.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - printf("%d\n", buf[-1]); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-array-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/static-array-1-nov.c deleted file mode 100644 index 13d30c55ae5..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-array-1-nov.c +++ /dev/null @@ -1,14 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - printf("%d\n", buf[0]); - printf("%d\n", buf[99]); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-array-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/static-array-1-ubv.c deleted file mode 100644 index e3cac3cfa5d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-array-1-ubv.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - printf("%d\n", buf[100]); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-1-lbv.c deleted file mode 100644 index 7c0367e01e7..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-1-lbv.c +++ /dev/null @@ -1,18 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; -int *p = buf; - -int mpx_test (int argc, const char *argv[]) -{ - printf ("%d\n", p[-1]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-1-nov.c deleted file mode 100644 index 0c91615239a..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-1-nov.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; -int *p = buf; - -int mpx_test (int argc, const char *argv[]) -{ - printf ("%d\n", p[0]); - printf ("%d\n", p[99]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-1-ubv.c deleted file mode 100644 index a19d92708d6..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-1-ubv.c +++ /dev/null @@ -1,18 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; -int *p = buf; - -int mpx_test (int argc, const char *argv[]) -{ - printf ("%d\n", p[100]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-2-lbv.c deleted file mode 100644 index 1ad3be8ff63..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-2-lbv.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s { - int a; - int *p; -} s; - -int buf[100]; - -struct s s1 = {0, buf}; - -int mpx_test (int argc, const char *argv[]) -{ - printf ("%d\n", s1.p[-1]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-2-nov.c deleted file mode 100644 index 6ef755f8971..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-2-nov.c +++ /dev/null @@ -1,22 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s { - int a; - int *p; -} s; - -int buf[100]; - -struct s s1 = {0, buf}; - -int mpx_test (int argc, const char *argv[]) -{ - printf ("%d\n", s1.p[0]); - printf ("%d\n", s1.p[99]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-2-ubv.c deleted file mode 100644 index 3681ebe03ea..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-2-ubv.c +++ /dev/null @@ -1,24 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s { - int a; - int *p; -} s; - -int buf[100]; - -struct s s1 = {0, buf}; - -int mpx_test (int argc, const char *argv[]) -{ - printf ("%d\n", s1.p[100]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-3-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-3-lbv.c deleted file mode 100644 index 3aa21ca3619..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-3-lbv.c +++ /dev/null @@ -1,25 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; -int *p = buf; - -int foo (int i) -{ - static int **pp = &p; - - return (*pp)[i]; -} - -int mpx_test (int argc, const char *argv[]) -{ - printf ("%d\n", foo (-1)); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-3-nov.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-3-nov.c deleted file mode 100644 index 7bdc5af0911..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-3-nov.c +++ /dev/null @@ -1,23 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; -int *p = buf; - -int foo (int i) -{ - static int **pp = &p; - - return (*pp)[i]; -} - -int mpx_test (int argc, const char *argv[]) -{ - printf ("%d\n", foo (0)); - printf ("%d\n", foo (99)); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-3-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-3-ubv.c deleted file mode 100644 index fb8411aa4cb..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-3-ubv.c +++ /dev/null @@ -1,25 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; -int *p = buf; - -int foo (int i) -{ - static int **pp = &p; - - return (*pp)[i]; -} - -int mpx_test (int argc, const char *argv[]) -{ - printf ("%d\n", foo (100)); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-4-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-4-lbv.c deleted file mode 100644 index 896838ec0ab..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-4-lbv.c +++ /dev/null @@ -1,18 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; -int *p[1] = { buf }; - -int mpx_test (int argc, const char *argv[]) -{ - printf ("%d\n", p[0][-1]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-4-nov.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-4-nov.c deleted file mode 100644 index 3bdb5ec5162..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-4-nov.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf[100]; -int *p[1] = { buf }; - -int mpx_test (int argc, const char *argv[]) -{ - printf ("%d\n", p[0][0]); - printf ("%d\n", p[0][99]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-4-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-4-ubv.c deleted file mode 100644 index 47bca2fc07f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-4-ubv.c +++ /dev/null @@ -1,18 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf[100]; -int *p[1] = { buf }; - -int mpx_test (int argc, const char *argv[]) -{ - printf ("%d\n", p[0][100]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-5-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-5-lbv.c deleted file mode 100644 index bd47a4a73aa..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-5-lbv.c +++ /dev/null @@ -1,30 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf1[100]; -int buf2[200]; - -struct s1 { - int a; - int *p[2]; -} s1; - -struct s2 { - int a; - struct s1 b[2]; -} s2; - -struct s2 s = { 1, { {1, { buf1, buf2 }}, {2, { buf2, buf1} } } }; - -int mpx_test (int argc, const char **argv) -{ - printf ("%d\n", s.b[0].p[0][-1]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-5-nov.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-5-nov.c deleted file mode 100644 index 87fe35d4742..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-5-nov.c +++ /dev/null @@ -1,34 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf1[100]; -int buf2[200]; - -struct s1 { - int a; - int *p[2]; -} s1; - -struct s2 { - int a; - struct s1 b[2]; -} s2; - -struct s2 s = { 1, { {1, { buf1, buf2 }}, {2, { buf2, buf1} } } }; - -int mpx_test (int argc, const char **argv) -{ - printf ("%d\n", s.b[0].p[0][0]); - printf ("%d\n", s.b[0].p[0][99]); - printf ("%d\n", s.b[0].p[1][0]); - printf ("%d\n", s.b[0].p[1][199]); - printf ("%d\n", s.b[1].p[0][0]); - printf ("%d\n", s.b[1].p[0][199]); - printf ("%d\n", s.b[1].p[1][0]); - printf ("%d\n", s.b[1].p[1][99]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-5-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-5-ubv.c deleted file mode 100644 index 7f136253b0e..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-5-ubv.c +++ /dev/null @@ -1,30 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf1[100]; -int buf2[200]; - -struct s1 { - int a; - int *p[2]; -} s1; - -struct s2 { - int a; - struct s1 b[2]; -} s2; - -struct s2 s = { 1, { {1, { buf1, buf2 }}, {2, { buf2, buf1} } } }; - -int mpx_test (int argc, const char **argv) -{ - printf ("%d\n", s.b[0].p[0][100]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-6-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-6-lbv.c deleted file mode 100644 index 9b90cee6a14..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-6-lbv.c +++ /dev/null @@ -1,30 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf1[100]; -int buf2[200]; - -struct s1 { - int a; - int *p[2]; -} s1; - -struct s2 { - int a; - struct s1 b[2]; -} s2; - -int mpx_test (int argc, const char **argv) -{ - struct s2 s = { 1, { {1, { buf1, buf2 }}, {2, { buf2, buf1} } } }; - - printf ("%d\n", s.b[0].p[0][-1]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-6-nov.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-6-nov.c deleted file mode 100644 index a125024ecc3..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-6-nov.c +++ /dev/null @@ -1,28 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf1[100]; -int buf2[200]; - -struct s1 { - int a; - int *p[2]; -} s1; - -struct s2 { - int a; - struct s1 b[2]; -} s2; - -int mpx_test (int argc, const char **argv) -{ - struct s2 s = { 1, { {1, { buf1, buf2 }}, {2, { buf2, buf1} } } }; - - printf ("%d\n", s.b[0].p[0][0]); - printf ("%d\n", s.b[0].p[0][99]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-init-6-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/static-init-6-ubv.c deleted file mode 100644 index a60c4e0befc..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-init-6-ubv.c +++ /dev/null @@ -1,30 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf1[100]; -int buf2[200]; - -struct s1 { - int a; - int *p[2]; -} s1; - -struct s2 { - int a; - struct s1 b[2]; -} s2; - -int mpx_test (int argc, const char **argv) -{ - struct s2 s = { 1, { {1, { buf1, buf2 }}, {2, { buf2, buf1} } } }; - - printf ("%d\n", s.b[0].p[0][100]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-string-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/static-string-1-lbv.c deleted file mode 100644 index e2443804f74..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-string-1-lbv.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -char *str="dddd"; - -int foo1 (char** ptr) -{ - *ptr=str; -} - -int foo (char *ptr) -{ - char *tmp = 0; - foo1 (&ptr); - tmp = ptr; - return tmp[-1]; -} - -int mpx_test (int argc, const char **argv) -{ - printf ("%d\n", foo ("ddddd")); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-string-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/static-string-1-nov.c deleted file mode 100644 index d513638688f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-string-1-nov.c +++ /dev/null @@ -1,26 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -char *str="dddd"; - -int foo1 (char** ptr) -{ - *ptr=str; -} - -int foo (char *ptr) -{ - char *tmp = 0; - foo1 (&ptr); - tmp = ptr; - return tmp[0] + tmp[4]; -} - -int mpx_test (int argc, const char **argv) -{ - printf ("%d\n", foo ("ddddd")); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/static-string-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/static-string-1-ubv.c deleted file mode 100644 index e0f3634c324..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/static-string-1-ubv.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -char *str="dddd"; - -int foo1 (char** ptr) -{ - *ptr=str; -} - -int foo (char *ptr) -{ - char *tmp = 0; - foo1 (&ptr); - tmp = ptr; - return tmp[5]; -} - -int mpx_test (int argc, const char **argv) -{ - printf ("%d\n", foo ("ddddd")); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-1-lbv.c deleted file mode 100644 index a9e1890b18e..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-1-lbv.c +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = -51; - - rd (s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-1-nov.c deleted file mode 100644 index b1cfeacafbb..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-1-nov.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = -50; - - rd (s); - - s.i1 = 50; - s.i2 = 49; - - rd (s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-1-ubv.c deleted file mode 100644 index c4ca68d682a..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-1-ubv.c +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = 51; - - rd (s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-10-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-10-lbv.c deleted file mode 100644 index 8375aa1b820..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-10-lbv.c +++ /dev/null @@ -1,33 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; -} s1; - -int rd (int *p1, int *p2, int *p3, int *p4, int *p5, int *p6, struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - - rd (buf1, buf1, buf1, buf1, buf1, buf1, s, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-10-nov.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-10-nov.c deleted file mode 100644 index b246448346d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-10-nov.c +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - int *p; -} s1; - -int rd (int *p1, int *p2, int *p3, int *p4, int *p5, int *p6, struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - - rd (buf1, buf1, buf1, buf1, buf1, buf1, s, 0); - rd (buf1, buf1, buf1, buf1, buf1, buf1, s, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-10-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-10-ubv.c deleted file mode 100644 index b3b13f86672..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-10-ubv.c +++ /dev/null @@ -1,33 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; -} s1; - -int rd (int *p1, int *p2, int *p3, int *p4, int *p5, int *p6, struct s1 s, int i) -{ - int res = s.p[i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - - rd (buf1, buf1, buf1, buf1, buf1, buf1, s, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-2-lbv.c deleted file mode 100644 index d796ced340d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-2-lbv.c +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int i1; - int i2; - int *p; -} s1; - -int rd (struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = -51; - - rd (s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-2-nov.c deleted file mode 100644 index 6a1a087b23f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-2-nov.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - int i1; - int i2; - int *p; -} s1; - -int rd (struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = -50; - - rd (s); - - s.i1 = 50; - s.i2 = 49; - - rd (s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-2-ubv.c deleted file mode 100644 index b285cbc8320..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-2-ubv.c +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int i1; - int i2; - int *p; -} s1; - -int rd (struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = 51; - - rd (s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-3-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-3-lbv.c deleted file mode 100644 index 34d4ab18581..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-3-lbv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = -51; - - rd (buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-3-nov.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-3-nov.c deleted file mode 100644 index 8e238ef657e..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-3-nov.c +++ /dev/null @@ -1,39 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = -50; - - rd (buf1, s); - - s.i1 = 50; - s.i2 = 49; - - rd (buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-3-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-3-ubv.c deleted file mode 100644 index bd947e5859d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-3-ubv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = 50; - - rd (buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-4-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-4-lbv.c deleted file mode 100644 index c0666d389a1..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-4-lbv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, int *p2, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = -51; - - rd (buf1, buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-4-nov.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-4-nov.c deleted file mode 100644 index 17366c55ca7..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-4-nov.c +++ /dev/null @@ -1,39 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, int *p2, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = -50; - - rd (buf1, buf1, s); - - s.i1 = 50; - s.i2 = 49; - - rd (buf1, buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-4-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-4-ubv.c deleted file mode 100644 index f2f8281dc36..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-4-ubv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, int *p2, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = 50; - - rd (buf1, buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-5-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-5-lbv.c deleted file mode 100644 index 357bb6ac746..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-5-lbv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, int *p2, int *p3, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = -51; - - rd (buf1, buf1, buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-5-nov.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-5-nov.c deleted file mode 100644 index a4acd38939e..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-5-nov.c +++ /dev/null @@ -1,39 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, int *p2, int *p3, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = -50; - - rd (buf1, buf1, buf1, s); - - s.i1 = 50; - s.i2 = 49; - - rd (buf1, buf1, buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-5-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-5-ubv.c deleted file mode 100644 index c94ae1c24aa..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-5-ubv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, int *p2, int *p3, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = 50; - - rd (buf1, buf1, buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-6-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-6-lbv.c deleted file mode 100644 index ceee8d0c69d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-6-lbv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, int *p2, int *p3, int *p4, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = -51; - - rd (buf1, buf1, buf1, buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-6-nov.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-6-nov.c deleted file mode 100644 index 913f5a28dc2..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-6-nov.c +++ /dev/null @@ -1,39 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, int *p2, int *p3, int *p4, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = -50; - - rd (buf1, buf1, buf1, buf1, s); - - s.i1 = 50; - s.i2 = 49; - - rd (buf1, buf1, buf1, buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-6-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-6-ubv.c deleted file mode 100644 index f92476a7854..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-6-ubv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, int *p2, int *p3, int *p4, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = 50; - - rd (buf1, buf1, buf1, buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-7-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-7-lbv.c deleted file mode 100644 index b0ecc176cd5..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-7-lbv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, int *p2, int *p3, int *p4, int *p5, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = -51; - - rd (buf1, buf1, buf1, buf1, buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-7-nov.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-7-nov.c deleted file mode 100644 index ec63dc7ef47..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-7-nov.c +++ /dev/null @@ -1,39 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, int *p2, int *p3, int *p4, int *p5, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = -50; - - rd (buf1, buf1, buf1, buf1, buf1, s); - - s.i1 = 50; - s.i2 = 49; - - rd (buf1, buf1, buf1, buf1, buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-7-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-7-ubv.c deleted file mode 100644 index c9e682252c1..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-7-ubv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - int *p; - int i1; - int i2; -} s1; - -int rd (int *p1, int *p2, int *p3, int *p4, int *p5, struct s1 s) -{ - int res = s.p[s.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.p = buf; - s.i1 = 50; - s.i2 = 50; - - rd (buf1, buf1, buf1, buf1, buf1, s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-8-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-8-lbv.c deleted file mode 100644 index 58d03e783d8..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-8-lbv.c +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 { - int *p[2]; -} s1; - -int rd (struct s1 s, int i) -{ - int res = s.p[0][i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[100]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = { {buf, buf1} }; - - rd (s, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-8-nov.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-8-nov.c deleted file mode 100644 index d9072ec49c9..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-8-nov.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 { - int *p[2]; -} s1; - -int rd (struct s1 s, int i) -{ - int res = s.p[0][i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[100]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = { {buf, buf1} }; - - rd (s, 0); - rd (s, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-8-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-8-ubv.c deleted file mode 100644 index fdcfc9ffb39..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-8-ubv.c +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 { - int *p[2]; -} s1; - -int rd (struct s1 s, int i) -{ - int res = s.p[0][i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[100]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = { {buf, buf1} }; - - rd (s, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-9-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-9-lbv.c deleted file mode 100644 index acce18334ad..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-9-lbv.c +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 { - int *p[2]; -} s1; - -int rd (struct s1 s, int i) -{ - int res = s.p[1][i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[100]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = { {buf, buf1} }; - - rd (s, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-9-nov.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-9-nov.c deleted file mode 100644 index 03ce6687f62..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-9-nov.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 { - int *p[2]; -} s1; - -int rd (struct s1 s, int i) -{ - int res = s.p[1][i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[100]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = { {buf, buf1} }; - - rd (s, 0); - rd (s, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-9-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-arg-9-ubv.c deleted file mode 100644 index 449b2c5dd58..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-arg-9-ubv.c +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 { - int *p[2]; -} s1; - -int rd (struct s1 s, int i) -{ - int res = s.p[1][i]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[100]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s = { {buf, buf1} }; - - rd (s, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-copy-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-copy-1-lbv.c deleted file mode 100644 index 3f1ac74d9a7..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-copy-1-lbv.c +++ /dev/null @@ -1,32 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf1[100]; -int buf2[200]; - -struct s1 { - int a; - int *p[2]; -} s1; - -struct s2 { - int a; - struct s1 b[2]; -} s2; - -struct s2 s = { 1, { {1, { buf1, buf2 }}, {2, { buf2, buf1} } } }; - -int mpx_test (int argc, const char *argv[]) -{ - struct s2 ss = s; - - printf ("%d\n", ss.b[0].p[0][-1]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-copy-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/struct-copy-1-nov.c deleted file mode 100644 index 5a709bc8546..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-copy-1-nov.c +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -int buf1[100]; -int buf2[200]; - -struct s1 { - int a; - int *p[2]; -} s1; - -struct s2 { - int a; - struct s1 b[2]; -} s2; - -struct s2 s = { 1, { {1, { buf1, buf2 }}, {2, { buf2, buf1} } } }; - -int mpx_test (int argc, const char *argv[]) -{ - struct s2 ss = s; - - printf("%d\n", ss.b[0].p[0][0]); - printf("%d\n", ss.b[0].p[0][99]); - printf("%d\n", ss.b[0].p[1][0]); - printf("%d\n", ss.b[0].p[1][199]); - printf("%d\n", ss.b[1].p[0][0]); - printf("%d\n", ss.b[1].p[0][199]); - printf("%d\n", ss.b[1].p[1][0]); - printf("%d\n", ss.b[1].p[1][99]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-copy-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-copy-1-ubv.c deleted file mode 100644 index b0fe8f46143..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-copy-1-ubv.c +++ /dev/null @@ -1,32 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -int buf1[100]; -int buf2[200]; - -struct s1 { - int a; - int *p[2]; -} s1; - -struct s2 { - int a; - struct s1 b[2]; -} s2; - -struct s2 s = { 1, { {1, { buf1, buf2 }}, {2, { buf2, buf1} } } }; - -int mpx_test (int argc, const char *argv[]) -{ - struct s2 ss = s; - - printf ("%d\n", ss.b[0].p[0][100]); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-copy-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-copy-2-lbv.c deleted file mode 100644 index 0cb6440a1d6..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-copy-2-lbv.c +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -int foo (void *p, int k) -{ - struct S *s = (struct S*)p; - int res = s->b[k]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct S s; - - foo (&s.a, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-copy-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/struct-copy-2-nov.c deleted file mode 100644 index 01f5b679faf..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-copy-2-nov.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -int foo (void *p, int k) -{ - struct S *s = (struct S*)p; - int res = s->b[k]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct S s; - - foo (&s.a, 0); - foo (&s.a, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/struct-copy-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/struct-copy-2-ubv.c deleted file mode 100644 index c500bb4b77b..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/struct-copy-2-ubv.c +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S { - int a; - int b[100]; - int c; -} S; - -int foo (void *p, int k) -{ - struct S *s = (struct S*)p; - int res = s->b[k]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct S s; - - foo (&s.a, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/thread-local-var-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/thread-local-var-1-lbv.c deleted file mode 100644 index 3275fe03db8..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/thread-local-var-1-lbv.c +++ /dev/null @@ -1,34 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-lpthread" } */ - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "pthread.h" - -__thread int prebuf[100]; -__thread int buf[100]; -__thread int postbuf[100]; - -int rd (int *p, int i) -{ - int res = p[i]; - printf("%d\n", res); - return res; -} - -void *thred_func (void *ptr) -{ - rd (buf, -1); -} - -int mpx_test (int argc, const char **argv) -{ - pthread_t thread; - pthread_create (&thread, NULL, thred_func, 0); - pthread_join (thread, NULL); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/thread-local-var-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/thread-local-var-1-nov.c deleted file mode 100644 index 2e0483b1c29..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/thread-local-var-1-nov.c +++ /dev/null @@ -1,33 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-lpthread" } */ - - -#include "mpx-check.h" -#include "pthread.h" - -__thread int prebuf[100]; -__thread int buf[100]; -__thread int postbuf[100]; - -int rd (int *p, int i) -{ - int res = p[i]; - printf("%d\n", res); - return res; -} - -void *thred_func (void *ptr) -{ - rd (buf, 0); - rd (buf, 99); -} - -int mpx_test (int argc, const char **argv) -{ - pthread_t thread; - pthread_create (&thread, NULL, thred_func, 0); - pthread_join (thread, NULL); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/thread-local-var-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/thread-local-var-1-ubv.c deleted file mode 100644 index 86116e87e4d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/thread-local-var-1-ubv.c +++ /dev/null @@ -1,34 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-lpthread" } */ - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "pthread.h" - -__thread int prebuf[100]; -__thread int buf[100]; -__thread int postbuf[100]; - -int rd (int *p, int i) -{ - int res = p[i]; - printf("%d\n", res); - return res; -} - -void *thred_func (void *ptr) -{ - rd (buf, 100); -} - -int mpx_test (int argc, const char **argv) -{ - pthread_t thread; - pthread_create (&thread, NULL, thred_func, 0); - pthread_join (thread, NULL); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/union-arg-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/union-arg-1-lbv.c deleted file mode 100644 index c2559829bfd..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/union-arg-1-lbv.c +++ /dev/null @@ -1,43 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - union { - int i1; - int i3; - } v; - int i2; - union { - int *p; - int p2; - } u; -} s1; - -int rd (struct s1 s) -{ - int res = s.u.p[s.v.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.u.p = buf; - s.v.i1 = 50; - s.i2 = -51; - - rd (s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/union-arg-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/union-arg-1-nov.c deleted file mode 100644 index f96689f479a..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/union-arg-1-nov.c +++ /dev/null @@ -1,45 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct s1 -{ - union { - int i1; - int i3; - } v; - int i2; - union { - int *p; - int p2; - } u; -} s1; - -int rd (struct s1 s) -{ - int res = s.u.p[s.v.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.u.p = buf; - s.v.i1 = 50; - s.i2 = -50; - - rd (s); - - s.v.i1 = 50; - s.i2 = 49; - - rd (s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/union-arg-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/union-arg-1-ubv.c deleted file mode 100644 index 6d65e5a73fe..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/union-arg-1-ubv.c +++ /dev/null @@ -1,43 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct s1 -{ - union { - int i1; - int i3; - } v; - int i2; - union { - int *p; - int p2; - } u; -} s1; - -int rd (struct s1 s) -{ - int res = s.u.p[s.v.i1 + s.i2]; - printf ("%d\n", res); - return res; -} - -int buf[100]; -int buf1[10]; - -int mpx_test (int argc, const char **argv) -{ - struct s1 s; - s.u.p = buf; - s.v.i1 = 50; - s.i2 = 50; - - rd (s); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-lbv.c deleted file mode 100644 index bbbb256ae30..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-lbv.c +++ /dev/null @@ -1,42 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-Wno-attributes" } */ - -#define SHOULDFAIL - -#include "mpx-check.h" -#include <stdarg.h> - -int -foo2 (int i1, int *p1, ...) -{ - va_list argp; - int i; - int res; - - va_start(argp, p1); - i = va_arg(argp, int); - - res = p1[i + i1]; - printf("%d\n", res); - - return res; -} - -static __attribute__((always_inline)) int -foo1 (int *p1, ...) -{ - return foo2 (10, p1, __builtin_va_arg_pack ()); -} - -int prebuf[100]; -int buf[100]; -int postbuf[100]; - -int mpx_test (int argc, const char **argv) -{ - foo1 (buf, -11); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-nov.c deleted file mode 100644 index 4beda02b951..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-nov.c +++ /dev/null @@ -1,40 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-Wno-attributes" } */ - -#include "mpx-check.h" -#include <stdarg.h> - -int -foo2 (int i1, int *p1, ...) -{ - va_list argp; - int i; - int res; - - va_start(argp, p1); - i = va_arg(argp, int); - - res = p1[i + i1]; - printf("%d\n", res); - - return res; -} - -static __attribute__((always_inline)) int -foo1 (int *p1, ...) -{ - return foo2 (10, p1, __builtin_va_arg_pack ()); -} - -int prebuf[100]; -int buf[100]; -int postbuf[100]; - -int mpx_test (int argc, const char **argv) -{ - foo1 (buf, 89); - foo1 (buf, -9); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-ubv.c deleted file mode 100644 index 4b763842755..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-1-ubv.c +++ /dev/null @@ -1,42 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-Wno-attributes" } */ - -#define SHOULDFAIL - -#include "mpx-check.h" -#include <stdarg.h> - -int -foo2 (int i1, int *p1, ...) -{ - va_list argp; - int i; - int res; - - va_start(argp, p1); - i = va_arg(argp, int); - - res = p1[i + i1]; - printf("%d\n", res); - - return res; -} - -static __attribute__((always_inline)) int -foo1 (int *p1, ...) -{ - return foo2 (10, p1, __builtin_va_arg_pack ()); -} - -int prebuf[100]; -int buf[100]; -int postbuf[100]; - -int mpx_test (int argc, const char **argv) -{ - foo1 (buf, 90); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-lbv.c deleted file mode 100644 index dab1dc86792..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-lbv.c +++ /dev/null @@ -1,45 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-Wno-attributes" } */ - -#define SHOULDFAIL - -#include "mpx-check.h" -#include <stdarg.h> - -int -foo2 (int i1, int *p1, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start(argp, p1); - p = va_arg(argp, int *); - i = va_arg(argp, int); - - res = p[i + i1]; - printf("%d\n", res); - - return res; -} - -static __attribute__((always_inline)) int -foo1 (int *p1, ...) -{ - return foo2 (10, p1, __builtin_va_arg_pack ()); -} - -int prebuf[100]; -int buf[100]; -int buf1[100]; -int postbuf[100]; - -int mpx_test (int argc, const char **argv) -{ - foo1 (buf, buf1, -11); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-nov.c deleted file mode 100644 index 6bf4721f75a..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-nov.c +++ /dev/null @@ -1,43 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-Wno-attributes" } */ - -#include "mpx-check.h" -#include <stdarg.h> - -int -foo2 (int i1, int *p1, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start(argp, p1); - p = va_arg(argp, int *); - i = va_arg(argp, int); - - res = p[i + i1]; - printf("%d\n", res); - - return res; -} - -static __attribute__((always_inline)) int -foo1 (int *p1, ...) -{ - return foo2 (10, p1, __builtin_va_arg_pack ()); -} - -int prebuf[100]; -int buf[100]; -int buf1[100]; -int postbuf[100]; - -int mpx_test (int argc, const char **argv) -{ - foo1 (buf, buf1, 89); - foo1 (buf, buf1, -9); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-ubv.c deleted file mode 100644 index 4af59758fb0..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/va-arg-pack-2-ubv.c +++ /dev/null @@ -1,45 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -/* { dg-additional-options "-Wno-attributes" } */ - -#define SHOULDFAIL - -#include "mpx-check.h" -#include <stdarg.h> - -int -foo2 (int i1, int *p1, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start(argp, p1); - p = va_arg(argp, int *); - i = va_arg(argp, int); - - res = p[i + i1]; - printf("%d\n", res); - - return res; -} - -static __attribute__((always_inline)) int -foo1 (int *p1, ...) -{ - return foo2 (10, p1, __builtin_va_arg_pack ()); -} - -int prebuf[100]; -int buf[100]; -int buf1[100]; -int postbuf[100]; - -int mpx_test (int argc, const char **argv) -{ - foo1 (buf, buf1, 90); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-1-lbv.c deleted file mode 100644 index 89faa9281e8..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-1-lbv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 0, buf, -1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-1-nov.c deleted file mode 100644 index e1e12a6d70b..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-1-nov.c +++ /dev/null @@ -1,35 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 0, buf, 0); - rd (buf1, 0, buf, 99); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-1-ubv.c deleted file mode 100644 index 14206a0f5a9..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-1-ubv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 0, buf, 100); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-2-lbv.c deleted file mode 100644 index 8af925f45a3..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-2-lbv.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int -rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 1, buf1, buf, -1, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-2-nov.c deleted file mode 100644 index 5c2f422dc3f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-2-nov.c +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int -rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 1, buf1, buf, 0, buf1); - rd (buf1, 1, buf1, buf, 99, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-2-ubv.c deleted file mode 100644 index b4463712e2b..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-2-ubv.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int -rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 1, buf1, buf, 100, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-3-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-3-lbv.c deleted file mode 100644 index b1f9f240622..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-3-lbv.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int -rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 2, buf1, buf1, buf, -1, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-3-nov.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-3-nov.c deleted file mode 100644 index 93f9eb810b4..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-3-nov.c +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int -rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 2, buf1, buf1, buf, 0, buf1); - rd (buf1, 2, buf1, buf1, buf, 99, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-3-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-3-ubv.c deleted file mode 100644 index dddf3563599..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-3-ubv.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int -rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 2, buf1, buf1, buf, 100, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-4-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-4-lbv.c deleted file mode 100644 index 274ccc2469e..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-4-lbv.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int -rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 3, buf1, buf1, buf1, buf, -1, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-4-nov.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-4-nov.c deleted file mode 100644 index 5412d113223..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-4-nov.c +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int -rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 3, buf1, buf1, buf1, buf, 0, buf1); - rd (buf1, 3, buf1, buf1, buf1, buf, 99, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-4-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-4-ubv.c deleted file mode 100644 index e8f06e36a3a..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-4-ubv.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int -rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 3, buf1, buf1, buf1, buf, 100, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-5-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-5-lbv.c deleted file mode 100644 index 1dae013f0ec..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-5-lbv.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int -rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 4, buf1, buf1, buf1, buf1, buf, -1, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-5-nov.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-5-nov.c deleted file mode 100644 index bd15e0fde6f..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-5-nov.c +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int -rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 4, buf1, buf1, buf1, buf1, buf, 0, buf1); - rd (buf1, 4, buf1, buf1, buf1, buf1, buf, 99, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-5-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-5-ubv.c deleted file mode 100644 index de3721dfdd5..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-5-ubv.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int -rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 4, buf1, buf1, buf1, buf1, buf, 100, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-6-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-6-lbv.c deleted file mode 100644 index 822d32a7b7b..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-6-lbv.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int rd (int *pp, ...) -{ - va_list argp; - int *p; - int i; - int res; - int n = 4; - - va_start (argp, pp); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, buf1, buf1, buf1, buf1, buf, -1, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-6-nov.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-6-nov.c deleted file mode 100644 index c5c4b125725..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-6-nov.c +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int rd (int *pp, ...) -{ - va_list argp; - int *p; - int i; - int res; - int n = 4; - - va_start (argp, pp); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, buf1, buf1, buf1, buf1, buf, 0, buf1); - rd (buf1, buf1, buf1, buf1, buf1, buf, 99, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-6-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-6-ubv.c deleted file mode 100644 index 635a48fc16d..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-6-ubv.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int rd (int *pp, ...) -{ - va_list argp; - int *p; - int i; - int res; - int n = 4; - - va_start (argp, pp); - for (; n > 0; n--) - va_arg (argp, int *); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, buf1, buf1, buf1, buf1, buf, 100, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-7-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-7-lbv.c deleted file mode 100644 index 1121577f912..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-7-lbv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, double); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 2, 10.0d, 10.0d, buf, -1, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-7-nov.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-7-nov.c deleted file mode 100644 index 525a93d9d87..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-7-nov.c +++ /dev/null @@ -1,35 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, double); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 2, 10.0d, 10.0d, buf, 0, buf1); - rd (buf1, 2, 10.0d, 10.0d, buf, 99, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-7-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-7-ubv.c deleted file mode 100644 index 0e8d21e9940..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-7-ubv.c +++ /dev/null @@ -1,37 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include "stdarg.h" - -int buf[100]; -int buf1[10]; - -int rd (int *pppp, int n, ...) -{ - va_list argp; - int *p; - int i; - int res; - - va_start (argp, n); - for (; n > 0; n--) - va_arg (argp, double); - p = va_arg (argp, int *); - i = va_arg (argp, int); - - res = p[i]; - printf ("%d\n", res); - - return res; -} - -int mpx_test (int argc, const char **argv) -{ - rd (buf1, 2, 10.0d, 10.0d, buf, 100, buf1); - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-8-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-8-lbv.c deleted file mode 100644 index bb58ac594b9..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-8-lbv.c +++ /dev/null @@ -1,40 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include <stdarg.h> - -int buf[100]; -int buf1[10]; - -void vararg (int *p, va_list al) -{ - int i; - int res; - - p = va_arg (al, int *); - i = va_arg (al, int); - - res = p[i]; - printf ("%d\n", res); -} - -void foo (int *p, ...) -{ - va_list args; - - va_start (args, p); - vararg (p, args); - va_end (args); -} - -int mpx_test (int argc, const char **argv) -{ - foo (buf1, buf, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-8-nov.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-8-nov.c deleted file mode 100644 index 59596f27166..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-8-nov.c +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" -#include <stdarg.h> - -int buf[100]; -int buf1[10]; - -void vararg (int *p, va_list al) -{ - int i; - int res; - - p = va_arg (al, int *); - i = va_arg (al, int); - - res = p[i]; - printf ("%d\n", res); -} - -void foo (int *p, ...) -{ - va_list args; - - va_start (args, p); - vararg (p, args); - va_end (args); -} - -int mpx_test (int argc, const char **argv) -{ - foo (buf1, buf, 0); - foo (buf1, buf, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vararg-8-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/vararg-8-ubv.c deleted file mode 100644 index c03bcef08ec..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vararg-8-ubv.c +++ /dev/null @@ -1,40 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" -#include <stdarg.h> - -int buf[100]; -int buf1[10]; - -void vararg (int *p, va_list al) -{ - int i; - int res; - - p = va_arg (al, int *); - i = va_arg (al, int); - - res = p[i]; - printf ("%d\n", res); -} - -void foo (int *p, ...) -{ - va_list args; - - va_start (args, p); - vararg (p, args); - va_end (args); -} - -int mpx_test (int argc, const char **argv) -{ - foo (buf1, buf, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vla-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/vla-1-lbv.c deleted file mode 100644 index 1994df9d0a1..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vla-1-lbv.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S -{ - int a; - int p[0]; -}; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct S *s = (struct S *)alloca (sizeof(struct S) + sizeof (int)*100); - rd (s->p, -2); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vla-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/vla-1-nov.c deleted file mode 100644 index 1a828495833..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vla-1-nov.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct S -{ - int a; - int p[0]; -}; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct S *s = (struct S *)alloca (sizeof(struct S) + sizeof (int)*100); - rd (s->p, 0); - rd (s->p, 99); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vla-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/vla-1-ubv.c deleted file mode 100644 index b0f6d456e35..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vla-1-ubv.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S -{ - int a; - int p[0]; -}; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct S *s = (struct S *)alloca (sizeof(struct S) + sizeof (int)*100); - rd (s->p, 100); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vla-2-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/vla-2-lbv.c deleted file mode 100644 index 128f13980af..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vla-2-lbv.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct Foo { - int buf[10] __attribute__((bnd_variable_size)); -}; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) { - struct Foo *foo = (struct Foo *) alloca (20 * sizeof(int)); - - rd (foo->buf, -1); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vla-2-nov.c b/gcc/testsuite/gcc.target/i386/mpx/vla-2-nov.c deleted file mode 100644 index 2469b7da2b1..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vla-2-nov.c +++ /dev/null @@ -1,25 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#include "mpx-check.h" - -struct Foo { - int buf[10] __attribute__((bnd_variable_size)); -}; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) { - struct Foo *foo = (struct Foo *) alloca (20 * sizeof(int)); - - rd (foo->buf, 0); - rd (foo->buf, 19); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vla-2-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/vla-2-ubv.c deleted file mode 100644 index 63a6b279215..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vla-2-ubv.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct Foo { - int buf[10] __attribute__((bnd_variable_size)); -}; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) { - struct Foo *foo = (struct Foo *) alloca (20 * sizeof(int)); - - rd (foo->buf, 20); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vla-trailing-1-lbv.c b/gcc/testsuite/gcc.target/i386/mpx/vla-trailing-1-lbv.c deleted file mode 100644 index 9739920c705..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vla-trailing-1-lbv.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -fchkp-flexible-struct-trailing-arrays" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S -{ - int a; - int p[10]; -}; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct S *s = (struct S *)alloca (sizeof(struct S) + sizeof (int)*100); - rd (s->p, -2); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vla-trailing-1-nov.c b/gcc/testsuite/gcc.target/i386/mpx/vla-trailing-1-nov.c deleted file mode 100644 index f5c8f95cda5..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vla-trailing-1-nov.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -fchkp-flexible-struct-trailing-arrays" } */ - - -#include "mpx-check.h" - -struct S -{ - int a; - int p[10]; -}; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct S *s = (struct S *)alloca (sizeof(struct S) + sizeof (int)*100); - rd (s->p, 0); - rd (s->p, 99); - s->p[0]; - s->p[99]; - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/mpx/vla-trailing-1-ubv.c b/gcc/testsuite/gcc.target/i386/mpx/vla-trailing-1-ubv.c deleted file mode 100644 index 8385a5a631b..00000000000 --- a/gcc/testsuite/gcc.target/i386/mpx/vla-trailing-1-ubv.c +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do run } */ -/* { dg-shouldfail "bounds violation" } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -fchkp-flexible-struct-trailing-arrays" } */ - - -#define SHOULDFAIL - -#include "mpx-check.h" - -struct S -{ - int a; - int p[10]; -}; - -int rd (int *p, int i) -{ - int res = p[i]; - printf ("%d\n", res); - return res; -} - -int mpx_test (int argc, const char **argv) -{ - struct S *s = (struct S *)alloca (sizeof(struct S) + sizeof (int)*100); - rd (s->p, 110); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/pr63995-2.c b/gcc/testsuite/gcc.target/i386/pr63995-2.c deleted file mode 100644 index 89b429e7f55..00000000000 --- a/gcc/testsuite/gcc.target/i386/pr63995-2.c +++ /dev/null @@ -1,27 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-O2 -g -fcheck-pointer-bounds -mmpx -fcompare-debug" } */ - -struct ts -{ - int field; -}; - -extern void test1 (); -extern void test2 (struct ts *); - -static void -init (struct ts *c) -{ - c->field = -1; -} - -struct ts -test3 (const struct ts *other) -{ - struct ts r; - if (other->field != 0) - test1 (); - init (&r); - test2 (&r); - return r; -} diff --git a/gcc/testsuite/gcc.target/i386/pr64805.c b/gcc/testsuite/gcc.target/i386/pr64805.c deleted file mode 100644 index 3c8d6668dfa..00000000000 --- a/gcc/testsuite/gcc.target/i386/pr64805.c +++ /dev/null @@ -1,21 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -#include <stdio.h> - -static inline void __attribute ((always_inline)) functionA(void) -{ - return; -} - -static inline void __attribute ((always_inline)) functionB(void) -{ - functionA(); -} - -int test(void) -{ - functionB(); - - return 0; -} diff --git a/gcc/testsuite/gcc.target/i386/pr65044.c b/gcc/testsuite/gcc.target/i386/pr65044.c deleted file mode 100644 index d5cfecd15a9..00000000000 --- a/gcc/testsuite/gcc.target/i386/pr65044.c +++ /dev/null @@ -1,11 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -fsanitize=address" } */ -/* { dg-error ".-fcheck-pointer-bounds. is not supported with Address Sanitizer" "" { target *-*-* } 0 } */ - -extern int x[]; - -void -foo () -{ - x[0] = 0; -} diff --git a/gcc/testsuite/gcc.target/i386/pr65167.c b/gcc/testsuite/gcc.target/i386/pr65167.c deleted file mode 100644 index 64cc7aef520..00000000000 --- a/gcc/testsuite/gcc.target/i386/pr65167.c +++ /dev/null @@ -1,10 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-O -fschedule-insns -fcheck-pointer-bounds -mmpx" } */ - -void bar(int *a, int *b, int *c, int *d, int *e, int *f); - -int foo (int *a, int *b, int *c, int *d, int *e, int *f) -{ - bar (a, b, c, d, e, f); - return *f; -} diff --git a/gcc/testsuite/gcc.target/i386/pr65183.c b/gcc/testsuite/gcc.target/i386/pr65183.c deleted file mode 100644 index 4d62267fc0d..00000000000 --- a/gcc/testsuite/gcc.target/i386/pr65183.c +++ /dev/null @@ -1,19 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-O -fcheck-pointer-bounds -fchkp-use-nochk-string-functions -mmpx" } */ - -extern void bar(void *); -extern void baz(void); - -static int lc[32]; - -void foobar(void *c) -{ - bar(&c); - __builtin_memcpy (lc, c, lc[0]); -} - -void foo () -{ - baz (); - foobar(0); -} diff --git a/gcc/testsuite/gcc.target/i386/pr65184.c b/gcc/testsuite/gcc.target/i386/pr65184.c deleted file mode 100644 index e12b8a922f1..00000000000 --- a/gcc/testsuite/gcc.target/i386/pr65184.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-O2 -mabi=ms -fcheck-pointer-bounds -mmpx" } */ - -void -foo (int *a) -{ - if (a[0] != a[1] * 2333) - __builtin_abort (); -} - -void -bar (int *a) -{ - if (a[0] != a[1] * 2333) - __builtin_abort (); -} diff --git a/gcc/testsuite/gcc.target/i386/pr65523.c b/gcc/testsuite/gcc.target/i386/pr65523.c deleted file mode 100644 index 20e715237fc..00000000000 --- a/gcc/testsuite/gcc.target/i386/pr65523.c +++ /dev/null @@ -1,11 +0,0 @@ -/* PR target/65523 */ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -void *memmove (); - -void * -bar () -{ - return memmove (); -} diff --git a/gcc/testsuite/gcc.target/i386/pr70876.c b/gcc/testsuite/gcc.target/i386/pr70876.c deleted file mode 100644 index c9bab690b33..00000000000 --- a/gcc/testsuite/gcc.target/i386/pr70876.c +++ /dev/null @@ -1,13 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -Wno-implicit-function-declaration" } */ - -void f (char *s1, char *s2) -{ - int z = 5; - - struct { char a[z]; } x; - - s1[0] = s2[0]; - - foo (x, x); -} diff --git a/gcc/testsuite/gcc.target/i386/pr70877.c b/gcc/testsuite/gcc.target/i386/pr70877.c deleted file mode 100644 index 4269e84daff..00000000000 --- a/gcc/testsuite/gcc.target/i386/pr70877.c +++ /dev/null @@ -1,14 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx" } */ - -int foo(int); - -typedef struct { - double d; - int a; -} str_t; - -void bar(double d, int i, str_t s) -{ - d = ((double (*) (int)) foo) (i); /* { dg-warning "function called through a non-compatible type" } */ -} diff --git a/gcc/testsuite/gcc.target/i386/pr71458.c b/gcc/testsuite/gcc.target/i386/pr71458.c deleted file mode 100644 index d36b61cbe02..00000000000 --- a/gcc/testsuite/gcc.target/i386/pr71458.c +++ /dev/null @@ -1,7 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-fcheck-pointer-bounds -mmpx -fsanitize=bounds" } */ -/* { dg-error "'-fcheck-pointer-bounds' is not supported with '-fsanitize=bounds'" "" { target *-*-* } 0 } */ - -enum {} a[0]; -void fn1(int); -void fn2() { fn1(a[-1]); } diff --git a/gcc/testsuite/gcc.target/i386/pr80880.c b/gcc/testsuite/gcc.target/i386/pr80880.c deleted file mode 100644 index 674a587dd26..00000000000 --- a/gcc/testsuite/gcc.target/i386/pr80880.c +++ /dev/null @@ -1,10 +0,0 @@ -/* PR target/65523 */ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-O -fcheck-pointer-bounds -mmpx" } */ - -int *fn1() -{ - int *r = fn1(); - if (r == (void *)0) - return r; -} diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-25.c b/gcc/testsuite/gcc.target/i386/ret-thunk-25.c deleted file mode 100644 index f73553c9a9f..00000000000 --- a/gcc/testsuite/gcc.target/i386/ret-thunk-25.c +++ /dev/null @@ -1,15 +0,0 @@ -/* PR target/r84530 */ -/* { dg-do compile { target ia32 } } */ -/* { dg-options "-O2 -mfunction-return=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */ - -struct s { _Complex unsigned short x; }; -struct s gs = { 100 + 200i }; -struct s __attribute__((noinline)) foo (void) { return gs; } - -/* { dg-final { scan-assembler-times "popl\[\\t \]*%ecx" 1 } } */ -/* { dg-final { scan-assembler "lea\[l\]?\[\\t \]*4\\(%esp\\), %esp" } } */ -/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk_bnd_ecx" } } */ -/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */ -/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */ -/* { dg-final { scan-assembler {\tpause} } } */ -/* { dg-final { scan-assembler {\tlfence} } } */ diff --git a/gcc/testsuite/gcc.target/i386/thunk-retbnd.c b/gcc/testsuite/gcc.target/i386/thunk-retbnd.c deleted file mode 100644 index dcce6baf104..00000000000 --- a/gcc/testsuite/gcc.target/i386/thunk-retbnd.c +++ /dev/null @@ -1,17 +0,0 @@ -/* { dg-do compile { target { ! x32 } } } */ -/* { dg-options "-O2 -fcheck-pointer-bounds -mmpx -fdump-tree-optimized" } */ -/* { dg-final { scan-tree-dump-times "return &glob," 2 "optimized" } } */ - -int glob; - -int * -test1 (void) -{ - return &glob; -} - -int * -test2 (void) -{ - return test1 (); -} |