[multiple changes]

2006-01-18  Richard Henderson  <rth@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>
            Diego Novillo  <dnovillo@redhat.com>

	* libgomp: New directory.
	* Makefile.def: Add target_module libgomp.
	* Makefile.in: Regenerate.
	* configure.in (target_libraries): Add target-libgomp.
	* configure: Regenerate.


contrib/

2006-01-18  Richard Henderson  <rth@redhat.com>
            Diego Novillo  <dnovillo@redhat.com>

	* gcc_update (files_and_dependencies): Add libgomp files.


gcc/

2006-01-18  Richard Henderson  <rth@redhat.com>
            Aldy Hernandez  <aldyh@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>
            Diego Novillo  <dnovillo@redhat.com>

	* omp-low.c: New file.
	* c-omp.c: New file.

2006-01-18  Richard Henderson  <rth@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>
            Diego Novillo  <dnovillo@redhat.com>

	* doc/invoke.texi: Document -fopenmp.
	* tree-dump.h (debug_function): Declare.

	* hooks.c (hook_bool_tree_bool_false): New function.
	(hook_tree_tree_null): Remove.
	(hook_tree_tree_tree_null): New.
	* hooks.h: Update to match.

	* tree-pretty-print.c (debug_tree_chain): New.
	(print_generic_expr): Handle TDF_CHAIN.
	(dump_generic_node): Handle BLOCK.
	Do not abort with incomplete SWITCH_EXPRs.
	Do not dump body of an OpenMP directive if TDF_SLIM is given.
	<case OMP_PARALLEL, OMP_FOR, OMP_SECTIONS>: Don't
	print space after directive name.
	<OMP_FOR>: Handle printing OMP_FOR_PRE_BODY.
	Handle OMP_MASTER and OMP_ORDERED.
	Handle printing of OMP_BODY just in one place, goto
	dump_omp_body in the rest of OMP_* nodes that have
	OMP_BODY.
	Don't handle clause nodes here.  Update omp statements to
	use dump_omp_clauses.
	Handle OMP_SINGLE, OMP_SECTIONS, OMP_SECTION,
	OMP_CLAUSE_ORDERED, OMP_CLAUSE_SCHEDULE, OMP_ATOMIC,
	OMP_CRITICAL, OMP_CLAUSE_NOWAIT, GOMP_CLAUSE_IF,
	GOMP_CLAUSE_NUM_THREADS, GOMP_FOR, GOMP_CLAUSE_SHARED,
	GOMP_CLAUSE_FIRSTPRIVATE, GOMP_CLAUSE_LASTPRIVATE,
	GOMP_CLAUSE_COPYIN and GOMP_CLAUSE_COPYPRIVATE.
	Adjust output for GOMP_PARALLEL.
	(dump_omp_clauses): New.
	(print_declaration): Dump DECL_VALUE_EXPR.
	(op_symbol_1): Split out of op_symbol.
	(dumping_stmts): Remove.  Update all users.

	* cgraph.c (cgraph_analyze_queue): New.
	(cgraph_add_new_function): New.
	* cgraph.h (cgraph_analyze_queue): Declare.
	(cgraph_add_new_function): Declare.
	(cgraph_lower_function): Remove.

	* tree.c (walk_tree): Walk OMP_CLAUSE_CHAIN of OMP_CLAUSE_*
	nodes.  Use switch for all nodes, handle most of IS_EXPR_CODE_CLASS
	and TYPE_P nodes in its default clause.
	(empty_body_p): New.
	(tree_range_check_failed): New.
	(build5_stat): New.

	* tree.h (OMP_CLAUSE_REDUCTION_INIT,
	OMP_CLAUSE_REDUCTION_MERGE,
	OMP_CLAUSE_REDUCTION_PLACEHOLDER,
	OMP_CLAUSE_PRIVATE_DEBUG,
	OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE, OMP_FOR_PRE_BODY,
	OMP_MASTER_BODY, OMP_ORDERED_BODY OMP_BODY,
	OMP_CLAUSES, OMP_CLAUSE_DECL, OMP_CLAUSE_DEFAULT_KIND,
	OMP_CLAUSE_CHAIN, OMP_CLAUSE_OUTER_DECL,
	OMP_CLAUSE_INNER_DECL, OMP_CLAUSE_NUM_THREADS_EXPR,
	OMP_CLAUSE_IF_EXPR, OMP_CLAUSE_SCHEDULE_CHUNK_EXPR,
	OMP_CLAUSE_SCHEDULE_CHUNK_SIZE. OMP_PARALLEL_VAR_INIT,
	OMP_PARALLEL_VAR_REDUC, OMP_FOR_VAR_INIT,
	OMP_FOR_VAR_LAST, OMP_FOR_VAR_REDUC,
	OMP_SECTIONS_VAR_INIT, OMP_SECTIONS_VAR_LAST,
	OMP_SECTIONS_VAR_REDUC, OMP_CLAUSE_REDUCTION_CODE
	OMP_SINGLE_CLAUSES, OMP_SINGLE_BODY,
	OMP_CLAUSE_SCHEDULE_CHUNK_SIZE, OMP_SECTION_BODY,
	OMP_CRITICAL_NAME, OMP_CRITICAL_BODY): New.
	(TREE_RANGE_CHECK): New.
	(empty_body_p): Declare.
	(enum omp_clause_default_kind): New.
	(build_string_literal): Declare.
	(enum omp_clause_schedule_kind, OMP_CLAUSE_SCHEDULE_KIND): New.
	(build5_stat, build5): Declare.

	* tree-pass.h (TDF_CHAIN): Define.
	* tree-pass.h (PROP_gimple_lomp): Define.
	(pass_lower_omp): Declare.

	* diagnostic.h (debug_tree_chain): Declare.

	* builtins.c (get_builtin_sync_mode): Use 0 as last argument to
	mode_for_size.
	(expand_builtin): Handle sync BUILT_IN_*_16 builtins.
	* builtins.c (build_string_literal): Make extern.

	* gcc.c (include_spec_function): New.
	(static_spec_functions): Add it.
	(main): Move load of libgomp.spec ...
	(LINK_COMMAND_SPEC): ... here.
	(link_gomp_spec): New.
	(static_specs): Include it.
	(LINK_COMMAND_SPEC): Add link_gomp.
	(GOMP_SELF_SPECS): New.
	(driver_self_specs): Include it.
	(switch_matches): Don't mark inline.
	(main): Load libgomp.spec.

	* tree-gimple.c (is_gimple_stmt): True for OMP_MASTER,
	OMP_ORDERED, OMP_CRITICAL, OMP_SECTIONS, OMP_SECTION,
	and OMP_SINGLE, OMP_FOR and OMP_PARALLEL.

	* tree-gimple.h (enum omp_parallel): Declare.
	(determine_parallel_type): Declare.
	(omp_firstprivatize_variable): Declare.
	(omp_reduction_init): Declare.
	(diagnose_omp_structured_block_errors): Declare.
	(struct walk_stmt_info): Add want_return_expr.
	(struct walk_stmt_info): Add want_bind_expr, want_locations.
	(find_omp_clause): Declare.
	(insert_field_into_struct): Declare.
	(struct walk_stmt_info): Move from tree-nested.c
	(walk_stmts): Declare.

	* c-cppbuiltin.c (c_cpp_builtins): If -fopenmp, #define _OPENMP
	to 200505.

	* cgraphunit.c (cgraph_lower_function): Make static.
	(cgraph_finalize_pending_functions): New.
	(cgraph_finalize_function): Call it.
	(cgraph_finalize_compilation_unit): Likewise.

	* builtin-types.def (BT_I16, BT_FN_I16_VPTR_I16,
	BT_FN_BOOL_VPTR_I16_I16, BT_FN_I16_VPTR_I16_I16): Add.
	(BT_FN_UINT_UINT): New.
	(DEF_FUNCTION_TYPE_6, DEF_FUNCTION_TYPE_7,
	DEF_FUNCTION_TYPE_VAR_4): Document.
	(BT_PTR_LONG, BT_PTR_PTR, BT_FN_BOOL, BT_FN_INT,
	BT_FN_VOID_PTRPTR, BT_PTR_FN_VOID_PTR,
	BT_FN_BOOL_LONGPTR_LONGPTR, BT_FN_VOID_OMPFN_PTR_UINT,
	BT_FN_VOID_OMPFN_PTR_UINT_UINT,
	BT_FN_BOOL_LONG_LONG_LONG_LONGPTR_LONGPTR,
	BT_FN_BOOL_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG): New.

	* builtins.def: Update DEF_BUILTIN comment to include COND argument.
	Move all DEF_SYNC_BUILTIN () and DEF_GOMP_BUILTIN () builtins
	into separate files.
	(DEF_GOMP_BUILTIN): New.
	(BUILT_IN_OMP_GET_THREAD_NUM, BUILT_IN_GOMP_BARRIER,
	BUILT_IN_GOMP_CRITICAL_START, BUILT_IN_GOMP_CRITICAL_END,
	BUILT_IN_GOMP_CRITICAL_NAME_START, BUILT_IN_GOMP_CRITICAL_NAME_END,
	BUILT_IN_GOMP_LOOP_STATIC_START, BUILT_IN_GOMP_LOOP_DYNAMIC_START,
	BUILT_IN_GOMP_LOOP_GUIDED_START, BUILT_IN_GOMP_LOOP_RUNTIME_START,
	BUILT_IN_GOMP_LOOP_ORDERED_STATIC_START,
	BUILT_IN_GOMP_LOOP_ORDERED_DYNAMIC_START,
	BUILT_IN_GOMP_LOOP_ORDERED_GUIDED_START,
	BUILT_IN_GOMP_LOOP_ORDERED_RUNTIME_START,
	BUILT_IN_GOMP_LOOP_STATIC_NEXT, BUILT_IN_GOMP_LOOP_DYNAMIC_NEXT,
	BUILT_IN_GOMP_LOOP_GUIDED_NEXT, BUILT_IN_GOMP_LOOP_RUNTIME_NEXT,
	BUILT_IN_GOMP_LOOP_ORDERED_STATIC_NEXT,
	BUILT_IN_GOMP_LOOP_ORDERED_DYNAMIC_NEXT,
	BUILT_IN_GOMP_LOOP_ORDERED_GUIDED_NEXT,
	BUILT_IN_GOMP_LOOP_ORDERED_RUNTIME_NEXT,
	BUILT_IN_GOMP_PARALLEL_LOOP_STATIC_START,
	BUILT_IN_GOMP_PARALLEL_LOOP_DYNAMIC_START,
	BUILT_IN_GOMP_PARALLEL_LOOP_GUIDED_START,
	BUILT_IN_GOMP_PARALLEL_LOOP_RUNTIME_START,
	BUILT_IN_GOMP_LOOP_END, BUILT_IN_GOMP_LOOP_END_NOWAIT,
	BUILT_IN_GOMP_ORDERED_START, BUILT_IN_GOMP_ORDERED_END,
	BUILT_IN_GOMP_PARALLEL_START, BUILT_IN_GOMP_PARALLEL_END,
	BUILT_IN_GOMP_SECTIONS_START, BUILT_IN_GOMP_SECTIONS_NEXT,
	BUILT_IN_GOMP_PARALLEL_SECTIONS_START, BUILT_IN_GOMP_SECTIONS_END,
	BUILT_IN_GOMP_SECTIONS_END_NOWAIT, BUILT_IN_GOMP_SINGLE_START,
	BUILT_IN_GOMP_SINGLE_COPY_START, BUILT_IN_GOMP_SINGLE_COPY_END): New.
	* sync-builtins.def: New file, moved from builtins.def.
	* omp-builtins.def: New file, moved from builtins.def.

	* c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_SHARING): Redefine.

	* gimple-low.c (lower_function_body): Clear data.
	(lower_stmt): Do not handle COMPOUND_EXPR.
	Remove call to print_node_brief.

	* c-tree.h (c_finish_omp_clauses): New prototype.
	(C_DECL_THREADPRIVATE_P): Define.
	(lookup_name_no_remap, c_omp_remap_private): Remove
	(c_begin_omp_parallel, c_finish_omp_parallel): Update.
	(check_for_loop_decls): Update decl.
	(lookup_name_no_remap, c_omp_remap_private): Declare.
	(build_indirect_ref, build_modify_expr, pushdecl,
	pushdecl_top_level): Move to c-common.h.

	* dwarf2out.c (loc_descriptor_from_tree_1): Don't set unsignedp
	before the switch, but just in the 2 places that need it.

	* c-decl.c (diagnose_mismatched_decls): Do not check for
	mismatched thread-local attributes when OLDDECL is marked
	threadprivate and NEWDECL has no thread-local attributes.
	(merge_decls): Merge C_DECL_THREADPRIVATE_P.
	(c_gimple_diagnostics_recursively): Rename from
	c_warn_unused_result_recursively.  Invoke
	diagnose_omp_structured_block_errors.
	(check_for_loop_decls): Return a singular decl found.

	* langhooks.c (lhd_omp_predetermined_sharing): Return
	OMP_CLAUSE_DEFAULT_SHARED for DECL_ARTIFICIAL decls.
	(lhd_omp_firstprivatize_type_sizes): New.
	(lhd_omp_assignment): New.
	(lhd_omp_predetermined_sharing): New.

	* langhooks.h (struct gimplify_omp_ctx): Forward declare.
	(struct lang_hooks_for_types): Add
	omp_firstprivatize_type_sizes, omp_privatize_by_reference,
	omp_predetermined_sharing, omp_disregard_value_expr,
	omp_private_debug_clause, omp_clause_default_ctor,
	omp_clause_copy_ctor, omp_clause_assign_op, omp_clause_dtor.

	(c_finish_omp_clauses): New.
	(c_finish_bc_stmt): Diagnose break within omp for.
	(c_begin_omp_parallel, c_finish_omp_parallel): New.
	(build_unary_op): Return error_mark after reporting
	a readonly_error.
	(build_modify_expr): Likewise.

	* gimplify.c: Include optabs.h and pointer-set.h.
	(enum gimplify_omp_var_data): Declare.
	(struct gimplify_omp_ctx): Declare.
	(struct gimplify_ctx): Add fields prev_context, combined_pre_p
	and combined_ctxp.
	(gimplify_ctxp, gimplify_omp_ctxp): New local variables.
	(push_gimplify_context, pop_gimplify_context): Allow nesting.
	(splay_tree_compare_decl_uid): New.
	(new_omp_context): New.
	(delete_omp_context): New.
	(gimple_add_tmp_var): Call omp_add_variable.
	(gimplify_bind_expr): Likewise.
	(gimplify_var_or_parm_decl): If omp_notice_variable returned
	true, disregard DECL_VALUE_EXPR on the decl if any.
	(gimplify_expr_in_ctx): New.
	(omp_firstprivatize_variable, omp_firstprivatize_type_sizes
	omp_add_variable, omp_notice_variable, omp_is_private
	gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses_1
	gimplify_adjust_omp_clauses, gimplify_omp_parallel
	gimplify_omp_for, gimplify_omp_workshare, goa_lhs_expr_p
	gimplify_omp_atomic_fetch_op, goa_stabilize_expr
	gimplify_omp_atomic_pipeline, gimplify_omp_atomic_mutex
	gimplify_omp_atomic): New.
	(gimplify_expr): Handle OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
	OMP_SINGLE, OMP_SECTION, OMP_MASTER, OMP_ORDERED,
	OMP_CRITICAL and OMP_ATOMIC.
	(gimplify_body): Verify gimplify_ctxp is empty after gimplification.

	* c-pragma.h (enum pragma_kind): Add
	PRAGMA_OMP_ATOMIC, PRAGMA_OMP_BARRIER,
	PRAGMA_OMP_CRITICAL, PRAGMA_OMP_FLUSH, PRAGMA_OMP_FOR,
	PRAGMA_OMP_MASTER, PRAGMA_OMP_ORDERED,
	PRAGMA_OMP_PARALLEL, PRAGMA_OMP_PARALLEL_FOR,
	PRAGMA_OMP_PARALLEL_SECTIONS, PRAGMA_OMP_SECTION,
	PRAGMA_OMP_SECTIONS, PRAGMA_OMP_SINGLE,
	PRAGMA_OMP_THREADPRIVATE.

	* tree.def (OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
	OMP_SINGLE, OMP_SECTION, OMP_MASTER, OMP_ORDERED,
	OMP_CRITICAL, OMP_ATOMIC, OMP_CLAUSE_PRIVATE,
	OMP_CLAUSE_SHARED, OMP_CLAUSE_FIRSTPRIVATE,
	OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_REDUCTION,
	OMP_CLAUSE_COPYIN, OMP_CLAUSE_COPYPRIVATE,
	OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS,
	OMP_CLAUSE_SCHEDULE, OMP_CLAUSE_NOWAIT,
	OMP_CLAUSE_ORDERED, OMP_CLAUSE_DEFAULT): Define.

	* print-tree.c (print_node): Dump DECL_VALUE_EXPR.

	* tree-ssa-dce.c (find_control_dependence): Do not assume that
	ENTRY_BLOCK_PTR->next_bb == single_succ (ENTRY_BLOCK_PTR).

	* tree-nested.c (convert_call_expr): Call walk_body on OMP_BODY for
	OpenMP directives.
	(struct nesting_info): Add field_map,
	suppress_expansion, debug_var_chain.
	(create_nesting_tree): Initialize them.
	(lookup_field_for_decl): Use field_map.
	(get_nonlocal_debug_decl, get_local_debug_decl): New.
	(convert_local_omp_clauses): New.
	(finalize_nesting_tree_1): Add debug_var_chain to toplevel block.
	(walk_body): Split out of walk_function.
	(convert_nonlocal_omp_clauses, convert_local_omp_clauses): New.
	(convert_nonlocal_reference): Handle omp statements.
	(convert_local_reference): Likewise.
	(unnest_nesting_tree_1): Split out of finalize_nesting_tree_1.
	(unnest_nesting_tree): New.
	(lower_nested_functions): Call it.
	(insert_field_into_struct): Make extern.
	(struct walk_stmt_info): Move to tree-gimple.h.
	(walk_stmts): Make extern.

	* omp-builtins.def: New file.

	* tree-iterator.c (expr_only): Clarify comment.

	* c-common.h (pushdecl_top_level, pushdecl,
	build_modify_expr, build_indirect_ref,
	c_finish_omp_master, c_finish_omp_critical,
	c_finish_omp_ordered, c_finish_omp_barrier,
	c_finish_omp_atomic, c_finish_omp_flush,
	c_finish_omp_for, c_split_parallel_clauses,
	omp_clause_default_kind, c_omp_sharing_predetermined,
	c_omp_remap_decl): Declare.

	* Makefile.in (BUILTINS_DEF): Add omp-builtins.def.
	(OBJS-common): Add omp-low.o.
	(c-omp.o, omp-low.o): Add.
	(gimplify.o): Add dependency on $(OPTABS_H).
	(GTFILES): Add omp-low.c.
	(gt-stringpool.h): Add.

	* tree-cfg.c (set_bb_for_stmt): Do not update the
	block-to-labels map if we are currently expanding to RTL.
	(tree_node_can_be_shared): Remove unnecessary CONSTANT_CLASS_P
	checks.
	Handle IDENTIFIER_NODE.
	(tree_verify_flow_info): Do not ICE when emitting error
	messages about invalid labels.
	(dump_function_to_file): Reset CFUN before emitting the body
	of the function.
	(debug_function): New.

	* passes.c (init_optimization_passes): Schedule
	pass_lower_omp.

	* langhooks-def.h (lhd_omp_predetermined_sharing,
	lhd_omp_assignment, lhd_omp_firstprivatize_type_sizes):
	Declare.
	(LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES): Define.
	(LANG_HOOKS_FOR_TYPES_INITIALIZER): Use it.
	(LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE,
	LANG_HOOKS_OMP_PREDETERMINED_SHARING,
	LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR,
	LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE,
	LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR,
	LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
	LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP,
	LANG_HOOKS_OMP_CLAUSE_DTOR): Define.
	(LANG_HOOK_DECLS): Use them.


2006-01-18  Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
	    Richard Henderson  <rth@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>
            Diego Novillo  <dnovillo@redhat.com>

	* c-parser.c (pragma_omp_clause): Define.
	(c_parser_declaration_or_fndef): Document OpenMP syntax.
	(c_parser_compound_statement): Likewise.
	(c_parser_statement): Likewise.
	(c_parser_pragma): Handle omp pragmas.
	(OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
	OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK): Define.
	(c_parser_omp_clause_name, check_no_duplicate_clause,
	c_parser_omp_variable_list,
	c_parser_omp_var_list_parens, c_parser_omp_clause_copyin,
	c_parser_omp_clause_copyprivate,
	c_parser_omp_clause_default,
	c_parser_omp_clause_firstprivate, c_parser_omp_clause_if,
	c_parser_omp_clause_lastprivate,
	c_parser_omp_clause_nowait,
	c_parser_omp_clause_num_threads,
	c_parser_omp_clause_ordered, c_parser_omp_clause_private,
	c_parser_omp_clause_reduction,
	c_parser_omp_clause_schedule, c_parser_omp_clause_shared,
	c_parser_omp_all_clauses, c_parser_omp_structured_block,
	c_parser_omp_atomic, c_parser_omp_barrier,
	c_parser_omp_critical, c_parser_omp_flush,
	c_parser_omp_for_loop, c_parser_omp_for,
	c_parser_omp_master, c_parser_omp_ordered,
	c_parser_omp_sections_scope, c_parser_omp_sections,
	c_parser_omp_parallel, c_parser_omp_single,
	c_parser_omp_construct, c_parser_omp_threadprivate): New.
	* c-pragma.c (init_pragma): Do omp pragma registration here.
	* c.opt (fopenmp): New flag.


2006-01-18  Eric Christopher  <echristo@apple.com>

	* gcc.c (GOMP_SELF_SPECS): Bracket in #ifndef/#endif.
	* config/darwin.h (GOMP_SELF_SPECS): Define.


testsuite/

2006-01-18  Richard Henderson  <rth@redhat.com>
            Aldy Hernandez  <aldyh@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>
            Diego Novillo  <dnovillo@redhat.com>
            Uros Bizjak  <uros@kss-loka.si>

	* testsuite/gcc.dg/gomp: New directory.

From-SVN: r109902
This commit is contained in:
Diego Novillo 2006-01-18 14:21:25 -05:00
parent 1902704eb7
commit 953ff28998
296 changed files with 33168 additions and 517 deletions

View File

@ -1,3 +1,13 @@
2006-01-18 Richard Henderson <rth@redhat.com>
Jakub Jelinek <jakub@redhat.com>
Diego Novillo <dnovillo@redhat.com>
* libgomp: New directory.
* Makefile.def: Add target_module libgomp.
* Makefile.in: Regenerate.
* configure.in (target_libraries): Add target-libgomp.
* configure: Regenerate.
2006-01-05 Alexandre Oliva <aoliva@redhat.com>
* Makefile.tpl (clean-stage[+id+]-[+prefix+][+module+]): Remove
@ -17,10 +27,10 @@
(EXTRA_HOST_FLAGS): Add it.
(EXTRA_GCC_FLAGS): Remove flags already specified in flags_to_pass.
* Makefile.tpl (stage[+id+]-start, stage[+id+]-end): Do not try
to use symbolic links between directories. Avoid race conditions
or make them harmless.
* configure.in: Do not try to use symbolic links between directories.
* Makefile.tpl (stage[+id+]-start, stage[+id+]-end): Do not try
to use symbolic links between directories. Avoid race conditions
or make them harmless.
* configure.in: Do not try to use symbolic links between directories.
* Makefile.def (LEAN): Pass.
* Makefile.tpl (LEAN): Define.
@ -33,8 +43,8 @@
([+bootstrap-target+]-lean): New.
* configure.in: Remove lean bootstrap support from here.
* Makefile.in: Regenerate.
* configure: Regenerate.
* Makefile.in: Regenerate.
* configure: Regenerate.
2006-01-04 Ben Elliston <bje@au.ibm.com>

View File

@ -137,6 +137,7 @@ target_modules = { module= boehm-gc; };
target_modules = { module= qthreads; };
target_modules = { module= rda; };
target_modules = { module= libada; };
target_modules = { module= libgomp; lib_path=.libs; };
// These are (some of) the make targets to be done in each subdirectory.
// Not all; these are the ones which don't have special options.

View File

@ -356,7 +356,7 @@ all:
# This is the list of directories that may be needed in RPATH_ENVVAR
# so that prorgams built for the target machine work.
TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libmudflap)$(TARGET_LIB_PATH_libssp)$(HOST_LIB_PATH_gcc)
TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libmudflap)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libgomp)$(HOST_LIB_PATH_gcc)
@if target-libstdc++-v3
TARGET_LIB_PATH_libstdc++-v3 = $$r/$(TARGET_SUBDIR)/libstdc++-v3/.libs:
@ -370,6 +370,10 @@ TARGET_LIB_PATH_libmudflap = $$r/$(TARGET_SUBDIR)/libmudflap/.libs:
TARGET_LIB_PATH_libssp = $$r/$(TARGET_SUBDIR)/libssp/.libs:
@endif target-libssp
@if target-libgomp
TARGET_LIB_PATH_libgomp = $$r/$(TARGET_SUBDIR)/libgomp/.libs:
@endif target-libgomp
# This is the list of directories that may be needed in RPATH_ENVVAR
@ -633,7 +637,8 @@ configure-target: \
maybe-configure-target-boehm-gc \
maybe-configure-target-qthreads \
maybe-configure-target-rda \
maybe-configure-target-libada
maybe-configure-target-libada \
maybe-configure-target-libgomp
# The target built for a native non-bootstrap build.
.PHONY: all
@ -752,7 +757,8 @@ all-target: \
maybe-all-target-boehm-gc \
maybe-all-target-qthreads \
maybe-all-target-rda \
maybe-all-target-libada
maybe-all-target-libada \
maybe-all-target-libgomp
# Do a target for all the subdirectories. A ``make do-X'' will do a
# ``make X'' in all subdirectories (because, in general, there is a
@ -859,7 +865,8 @@ info-target: \
maybe-info-target-boehm-gc \
maybe-info-target-qthreads \
maybe-info-target-rda \
maybe-info-target-libada
maybe-info-target-libada \
maybe-info-target-libgomp
.PHONY: do-dvi
do-dvi:
@ -961,7 +968,8 @@ dvi-target: \
maybe-dvi-target-boehm-gc \
maybe-dvi-target-qthreads \
maybe-dvi-target-rda \
maybe-dvi-target-libada
maybe-dvi-target-libada \
maybe-dvi-target-libgomp
.PHONY: do-html
do-html:
@ -1063,7 +1071,8 @@ html-target: \
maybe-html-target-boehm-gc \
maybe-html-target-qthreads \
maybe-html-target-rda \
maybe-html-target-libada
maybe-html-target-libada \
maybe-html-target-libgomp
.PHONY: do-TAGS
do-TAGS:
@ -1165,7 +1174,8 @@ TAGS-target: \
maybe-TAGS-target-boehm-gc \
maybe-TAGS-target-qthreads \
maybe-TAGS-target-rda \
maybe-TAGS-target-libada
maybe-TAGS-target-libada \
maybe-TAGS-target-libgomp
.PHONY: do-install-info
do-install-info:
@ -1267,7 +1277,8 @@ install-info-target: \
maybe-install-info-target-boehm-gc \
maybe-install-info-target-qthreads \
maybe-install-info-target-rda \
maybe-install-info-target-libada
maybe-install-info-target-libada \
maybe-install-info-target-libgomp
.PHONY: do-installcheck
do-installcheck:
@ -1369,7 +1380,8 @@ installcheck-target: \
maybe-installcheck-target-boehm-gc \
maybe-installcheck-target-qthreads \
maybe-installcheck-target-rda \
maybe-installcheck-target-libada
maybe-installcheck-target-libada \
maybe-installcheck-target-libgomp
.PHONY: do-mostlyclean
do-mostlyclean:
@ -1471,7 +1483,8 @@ mostlyclean-target: \
maybe-mostlyclean-target-boehm-gc \
maybe-mostlyclean-target-qthreads \
maybe-mostlyclean-target-rda \
maybe-mostlyclean-target-libada
maybe-mostlyclean-target-libada \
maybe-mostlyclean-target-libgomp
.PHONY: do-clean
do-clean:
@ -1573,7 +1586,8 @@ clean-target: \
maybe-clean-target-boehm-gc \
maybe-clean-target-qthreads \
maybe-clean-target-rda \
maybe-clean-target-libada
maybe-clean-target-libada \
maybe-clean-target-libgomp
.PHONY: do-distclean
do-distclean:
@ -1675,7 +1689,8 @@ distclean-target: \
maybe-distclean-target-boehm-gc \
maybe-distclean-target-qthreads \
maybe-distclean-target-rda \
maybe-distclean-target-libada
maybe-distclean-target-libada \
maybe-distclean-target-libgomp
.PHONY: do-maintainer-clean
do-maintainer-clean:
@ -1777,7 +1792,8 @@ maintainer-clean-target: \
maybe-maintainer-clean-target-boehm-gc \
maybe-maintainer-clean-target-qthreads \
maybe-maintainer-clean-target-rda \
maybe-maintainer-clean-target-libada
maybe-maintainer-clean-target-libada \
maybe-maintainer-clean-target-libgomp
# Here are the targets which correspond to the do-X targets.
@ -1932,7 +1948,8 @@ check-target: \
maybe-check-target-boehm-gc \
maybe-check-target-qthreads \
maybe-check-target-rda \
maybe-check-target-libada
maybe-check-target-libada \
maybe-check-target-libgomp
do-check:
@: $(MAKE); $(unstage)
@ -2131,7 +2148,8 @@ install-target: \
maybe-install-target-boehm-gc \
maybe-install-target-qthreads \
maybe-install-target-rda \
maybe-install-target-libada
maybe-install-target-libada \
maybe-install-target-libgomp
uninstall:
@echo "the uninstall target is not supported in this tree"
@ -35545,6 +35563,362 @@ maintainer-clean-target-libada:
.PHONY: configure-target-libgomp maybe-configure-target-libgomp
maybe-configure-target-libgomp:
@if target-libgomp
maybe-configure-target-libgomp: configure-target-libgomp
configure-target-libgomp:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
echo "Checking multilib configuration for libgomp..."; \
$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgomp ; \
$(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgomp/multilib.tmp 2> /dev/null ; \
if test -r $(TARGET_SUBDIR)/libgomp/multilib.out; then \
if cmp -s $(TARGET_SUBDIR)/libgomp/multilib.tmp $(TARGET_SUBDIR)/libgomp/multilib.out; then \
rm -f $(TARGET_SUBDIR)/libgomp/multilib.tmp; \
else \
rm -f $(TARGET_SUBDIR)/libgomp/Makefile; \
mv $(TARGET_SUBDIR)/libgomp/multilib.tmp $(TARGET_SUBDIR)/libgomp/multilib.out; \
fi; \
else \
mv $(TARGET_SUBDIR)/libgomp/multilib.tmp $(TARGET_SUBDIR)/libgomp/multilib.out; \
fi
@test ! -f $(TARGET_SUBDIR)/libgomp/Makefile || exit 0; \
$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgomp ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo Configuring in $(TARGET_SUBDIR)/libgomp; \
cd "$(TARGET_SUBDIR)/libgomp" || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
*) topdir=`echo $(TARGET_SUBDIR)/libgomp/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
srcdiroption="--srcdir=$${topdir}/libgomp"; \
libsrcdir="$$s/libgomp"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) $${srcdiroption} \
|| exit 1
@endif target-libgomp
.PHONY: all-target-libgomp maybe-all-target-libgomp
maybe-all-target-libgomp:
@if target-libgomp
TARGET-target-libgomp=all
maybe-all-target-libgomp: all-target-libgomp
all-target-libgomp: configure-target-libgomp
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libgomp && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libgomp))
@endif target-libgomp
.PHONY: check-target-libgomp maybe-check-target-libgomp
maybe-check-target-libgomp:
@if target-libgomp
maybe-check-target-libgomp: check-target-libgomp
check-target-libgomp:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libgomp && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) check)
@endif target-libgomp
.PHONY: install-target-libgomp maybe-install-target-libgomp
maybe-install-target-libgomp:
@if target-libgomp
maybe-install-target-libgomp: install-target-libgomp
install-target-libgomp: installdirs
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
(cd $(TARGET_SUBDIR)/libgomp && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) install)
@endif target-libgomp
# Other targets (info, dvi, etc.)
.PHONY: maybe-info-target-libgomp info-target-libgomp
maybe-info-target-libgomp:
@if target-libgomp
maybe-info-target-libgomp: info-target-libgomp
info-target-libgomp: \
configure-target-libgomp
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing info in $(TARGET_SUBDIR)/libgomp" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libgomp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
info) \
|| exit 1
@endif target-libgomp
.PHONY: maybe-dvi-target-libgomp dvi-target-libgomp
maybe-dvi-target-libgomp:
@if target-libgomp
maybe-dvi-target-libgomp: dvi-target-libgomp
dvi-target-libgomp: \
configure-target-libgomp
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing dvi in $(TARGET_SUBDIR)/libgomp" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libgomp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
dvi) \
|| exit 1
@endif target-libgomp
.PHONY: maybe-html-target-libgomp html-target-libgomp
maybe-html-target-libgomp:
@if target-libgomp
maybe-html-target-libgomp: html-target-libgomp
html-target-libgomp: \
configure-target-libgomp
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing html in $(TARGET_SUBDIR)/libgomp" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libgomp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
html) \
|| exit 1
@endif target-libgomp
.PHONY: maybe-TAGS-target-libgomp TAGS-target-libgomp
maybe-TAGS-target-libgomp:
@if target-libgomp
maybe-TAGS-target-libgomp: TAGS-target-libgomp
TAGS-target-libgomp: \
configure-target-libgomp
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing TAGS in $(TARGET_SUBDIR)/libgomp" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libgomp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
TAGS) \
|| exit 1
@endif target-libgomp
.PHONY: maybe-install-info-target-libgomp install-info-target-libgomp
maybe-install-info-target-libgomp:
@if target-libgomp
maybe-install-info-target-libgomp: install-info-target-libgomp
install-info-target-libgomp: \
configure-target-libgomp \
info-target-libgomp
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing install-info in $(TARGET_SUBDIR)/libgomp" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libgomp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
install-info) \
|| exit 1
@endif target-libgomp
.PHONY: maybe-installcheck-target-libgomp installcheck-target-libgomp
maybe-installcheck-target-libgomp:
@if target-libgomp
maybe-installcheck-target-libgomp: installcheck-target-libgomp
installcheck-target-libgomp: \
configure-target-libgomp
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing installcheck in $(TARGET_SUBDIR)/libgomp" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libgomp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
installcheck) \
|| exit 1
@endif target-libgomp
.PHONY: maybe-mostlyclean-target-libgomp mostlyclean-target-libgomp
maybe-mostlyclean-target-libgomp:
@if target-libgomp
maybe-mostlyclean-target-libgomp: mostlyclean-target-libgomp
mostlyclean-target-libgomp:
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgomp" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libgomp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
mostlyclean) \
|| exit 1
@endif target-libgomp
.PHONY: maybe-clean-target-libgomp clean-target-libgomp
maybe-clean-target-libgomp:
@if target-libgomp
maybe-clean-target-libgomp: clean-target-libgomp
clean-target-libgomp:
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing clean in $(TARGET_SUBDIR)/libgomp" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libgomp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
clean) \
|| exit 1
@endif target-libgomp
.PHONY: maybe-distclean-target-libgomp distclean-target-libgomp
maybe-distclean-target-libgomp:
@if target-libgomp
maybe-distclean-target-libgomp: distclean-target-libgomp
distclean-target-libgomp:
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing distclean in $(TARGET_SUBDIR)/libgomp" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libgomp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
distclean) \
|| exit 1
@endif target-libgomp
.PHONY: maybe-maintainer-clean-target-libgomp maintainer-clean-target-libgomp
maybe-maintainer-clean-target-libgomp:
@if target-libgomp
maybe-maintainer-clean-target-libgomp: maintainer-clean-target-libgomp
maintainer-clean-target-libgomp:
@: $(MAKE); $(unstage)
@[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgomp" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
(cd $(TARGET_SUBDIR)/libgomp && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
maintainer-clean) \
|| exit 1
@endif target-libgomp
# ----------
# GCC module
# ----------
@ -37054,6 +37428,8 @@ configure-target-rda: maybe-all-gcc
configure-target-libada: maybe-all-gcc
configure-target-libgomp: maybe-all-gcc
configure-target-boehm-gc: maybe-all-target-newlib maybe-all-target-libgloss

258
configure vendored
View File

@ -909,7 +909,8 @@ target_libraries="target-libiberty \
target-libgfortran \
${libgcj} \
target-libobjc \
target-libada"
target-libada \
target-libgomp"
# these tools are built using the target libraries, and are intended to
# run only in the target environment
@ -1146,6 +1147,30 @@ no)
esac
esac
# Allow --disable-libgomp to exclude target-libgomp
case $enable_libgomp in
yes)
;;
no)
noconfigdirs="$noconfigdirs target-libgomp"
;;
"")
# Enable libgomp by default on hosted POSIX systems.
case "${target}" in
*-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
;;
*-*-netbsd* | *-*-freebsd* | *-*-openbsd*)
;;
*-*-solaris2* | *-*-sysv4* | *-*-irix* | *-*-osf* | *-*-hpux*)
;;
*-*-darwin*)
;;
*)
noconfigdirs="$noconfigdirs target-libgomp"
;;
esac
esac
case "${target}" in
*-*-chorusos)
@ -1827,7 +1852,7 @@ else
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1831: checking for $ac_word" >&5
echo "configure:1856: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1857,7 +1882,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1861: checking for $ac_word" >&5
echo "configure:1886: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1908,7 +1933,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1912: checking for $ac_word" >&5
echo "configure:1937: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1940,7 +1965,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1944: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
echo "configure:1969: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@ -1951,12 +1976,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
#line 1955 "configure"
#line 1980 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:1960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@ -1982,12 +2007,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1986: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "configure:2011: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:1991: checking whether we are using GNU C" >&5
echo "configure:2016: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1996,7 +2021,7 @@ else
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@ -2015,7 +2040,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:2019: checking whether ${CC-cc} accepts -g" >&5
echo "configure:2044: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2082,7 +2107,7 @@ fi
# Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2086: checking for $ac_word" >&5
echo "configure:2111: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2114,7 +2139,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "gnatbind", so it can be a program name with args.
set dummy gnatbind; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2118: checking for $ac_word" >&5
echo "configure:2143: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2147,7 +2172,7 @@ fi
fi
echo $ac_n "checking whether compiler driver understands Ada""... $ac_c" 1>&6
echo "configure:2151: checking whether compiler driver understands Ada" >&5
echo "configure:2176: checking whether compiler driver understands Ada" >&5
if eval "test \"`echo '$''{'acx_cv_cc_gcc_supports_ada'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2179,7 +2204,7 @@ else
fi
echo $ac_n "checking how to compare bootstrapped objects""... $ac_c" 1>&6
echo "configure:2183: checking how to compare bootstrapped objects" >&5
echo "configure:2208: checking how to compare bootstrapped objects" >&5
if eval "test \"`echo '$''{'gcc_cv_prog_cmp_skip'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2277,9 +2302,9 @@ saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $gmpinc"
# Check GMP actually works
echo $ac_n "checking for correct version of gmp.h""... $ac_c" 1>&6
echo "configure:2281: checking for correct version of gmp.h" >&5
echo "configure:2306: checking for correct version of gmp.h" >&5
cat > conftest.$ac_ext <<EOF
#line 2283 "configure"
#line 2308 "configure"
#include "confdefs.h"
#include "gmp.h"
int main() {
@ -2290,7 +2315,7 @@ choke me
; return 0; }
EOF
if { (eval echo configure:2294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
else
@ -2303,12 +2328,12 @@ rm -f conftest*
if test x"$have_gmp" = xyes; then
echo $ac_n "checking for MPFR""... $ac_c" 1>&6
echo "configure:2307: checking for MPFR" >&5
echo "configure:2332: checking for MPFR" >&5
saved_LIBS="$LIBS"
LIBS="$LIBS $gmplibs"
cat > conftest.$ac_ext <<EOF
#line 2312 "configure"
#line 2337 "configure"
#include "confdefs.h"
#include <gmp.h>
#include <mpfr.h>
@ -2316,7 +2341,7 @@ int main() {
mpfr_t n; mpfr_init(n);
; return 0; }
EOF
if { (eval echo configure:2320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
else
@ -3312,7 +3337,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3316: checking for $ac_word" >&5
echo "configure:3341: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3352,7 +3377,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3356: checking for $ac_word" >&5
echo "configure:3381: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3391,7 +3416,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3395: checking for $ac_word" >&5
echo "configure:3420: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_M4'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3430,7 +3455,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3434: checking for $ac_word" >&5
echo "configure:3459: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3470,7 +3495,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3474: checking for $ac_word" >&5
echo "configure:3499: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3509,7 +3534,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3513: checking for $ac_word" >&5
echo "configure:3538: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3562,7 +3587,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3566: checking for $ac_word" >&5
echo "configure:3591: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_EXPECT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3603,7 +3628,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3607: checking for $ac_word" >&5
echo "configure:3632: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RUNTEST'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3651,7 +3676,7 @@ test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3655: checking for $ac_word" >&5
echo "configure:3680: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3682,7 +3707,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3686: checking for $ac_word" >&5
echo "configure:3711: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3726,7 +3751,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3730: checking for $ac_word" >&5
echo "configure:3755: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3757,7 +3782,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3761: checking for $ac_word" >&5
echo "configure:3786: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3801,7 +3826,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3805: checking for $ac_word" >&5
echo "configure:3830: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3832,7 +3857,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3836: checking for $ac_word" >&5
echo "configure:3861: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3876,7 +3901,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3880: checking for $ac_word" >&5
echo "configure:3905: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3907,7 +3932,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3911: checking for $ac_word" >&5
echo "configure:3936: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3951,7 +3976,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3955: checking for $ac_word" >&5
echo "configure:3980: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LIPO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -3982,7 +4007,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3986: checking for $ac_word" >&5
echo "configure:4011: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LIPO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4026,7 +4051,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4030: checking for $ac_word" >&5
echo "configure:4055: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4057,7 +4082,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4061: checking for $ac_word" >&5
echo "configure:4086: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4101,7 +4126,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4105: checking for $ac_word" >&5
echo "configure:4130: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4132,7 +4157,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4136: checking for $ac_word" >&5
echo "configure:4161: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4171,7 +4196,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4175: checking for $ac_word" >&5
echo "configure:4200: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4202,7 +4227,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4206: checking for $ac_word" >&5
echo "configure:4231: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4241,7 +4266,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4245: checking for $ac_word" >&5
echo "configure:4270: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4272,7 +4297,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4276: checking for $ac_word" >&5
echo "configure:4301: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4316,7 +4341,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4320: checking for $ac_word" >&5
echo "configure:4345: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4347,7 +4372,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4351: checking for $ac_word" >&5
echo "configure:4376: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4391,7 +4416,7 @@ fi
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4395: checking for $ac_word" >&5
echo "configure:4420: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4422,7 +4447,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4426: checking for $ac_word" >&5
echo "configure:4451: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4473,7 +4498,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4477: checking for $ac_word" >&5
echo "configure:4502: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4504,7 +4529,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4508: checking for $ac_word" >&5
echo "configure:4533: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4548,7 +4573,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4552: checking for $ac_word" >&5
echo "configure:4577: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4579,7 +4604,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4583: checking for $ac_word" >&5
echo "configure:4608: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4623,7 +4648,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4627: checking for $ac_word" >&5
echo "configure:4652: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4654,7 +4679,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4658: checking for $ac_word" >&5
echo "configure:4683: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4698,7 +4723,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4702: checking for $ac_word" >&5
echo "configure:4727: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4729,7 +4754,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4733: checking for $ac_word" >&5
echo "configure:4758: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4773,7 +4798,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4777: checking for $ac_word" >&5
echo "configure:4802: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4804,7 +4829,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4808: checking for $ac_word" >&5
echo "configure:4833: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4848,7 +4873,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4852: checking for $ac_word" >&5
echo "configure:4877: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4879,7 +4904,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4883: checking for $ac_word" >&5
echo "configure:4908: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4918,7 +4943,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4922: checking for $ac_word" >&5
echo "configure:4947: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4949,7 +4974,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4953: checking for $ac_word" >&5
echo "configure:4978: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -4993,7 +5018,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4997: checking for $ac_word" >&5
echo "configure:5022: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -5024,7 +5049,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5028: checking for $ac_word" >&5
echo "configure:5053: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -5068,7 +5093,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5072: checking for $ac_word" >&5
echo "configure:5097: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -5099,7 +5124,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5103: checking for $ac_word" >&5
echo "configure:5128: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -5143,7 +5168,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5147: checking for $ac_word" >&5
echo "configure:5172: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LIPO_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -5174,7 +5199,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5178: checking for $ac_word" >&5
echo "configure:5203: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LIPO_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -5218,7 +5243,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5222: checking for $ac_word" >&5
echo "configure:5247: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -5249,7 +5274,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5253: checking for $ac_word" >&5
echo "configure:5278: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -5293,7 +5318,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5297: checking for $ac_word" >&5
echo "configure:5322: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -5324,7 +5349,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5328: checking for $ac_word" >&5
echo "configure:5353: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -5368,7 +5393,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5372: checking for $ac_word" >&5
echo "configure:5397: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -5399,7 +5424,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5403: checking for $ac_word" >&5
echo "configure:5428: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -5438,7 +5463,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5442: checking for $ac_word" >&5
echo "configure:5467: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -5469,7 +5494,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5473: checking for $ac_word" >&5
echo "configure:5498: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -5513,7 +5538,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5517: checking for $ac_word" >&5
echo "configure:5542: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -5544,7 +5569,7 @@ fi
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5548: checking for $ac_word" >&5
echo "configure:5573: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -5587,7 +5612,7 @@ fi
RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET"
echo $ac_n "checking where to find the target ar""... $ac_c" 1>&6
echo "configure:5591: checking where to find the target ar" >&5
echo "configure:5616: checking where to find the target ar" >&5
if test "x${build}" != "x${host}" ; then
# Canadian cross, just use what we found
echo "$ac_t""pre-installed" 1>&6
@ -5612,7 +5637,7 @@ else
fi
fi
echo $ac_n "checking where to find the target as""... $ac_c" 1>&6
echo "configure:5616: checking where to find the target as" >&5
echo "configure:5641: checking where to find the target as" >&5
if test "x${build}" != "x${host}" ; then
# Canadian cross, just use what we found
echo "$ac_t""pre-installed" 1>&6
@ -5637,7 +5662,7 @@ else
fi
fi
echo $ac_n "checking where to find the target cc""... $ac_c" 1>&6
echo "configure:5641: checking where to find the target cc" >&5
echo "configure:5666: checking where to find the target cc" >&5
if test "x${build}" != "x${host}" ; then
# Canadian cross, just use what we found
echo "$ac_t""pre-installed" 1>&6
@ -5662,7 +5687,7 @@ else
fi
fi
echo $ac_n "checking where to find the target c++""... $ac_c" 1>&6
echo "configure:5666: checking where to find the target c++" >&5
echo "configure:5691: checking where to find the target c++" >&5
if test "x${build}" != "x${host}" ; then
# Canadian cross, just use what we found
echo "$ac_t""pre-installed" 1>&6
@ -5690,7 +5715,7 @@ else
fi
fi
echo $ac_n "checking where to find the target c++ for libstdc++""... $ac_c" 1>&6
echo "configure:5694: checking where to find the target c++ for libstdc++" >&5
echo "configure:5719: checking where to find the target c++ for libstdc++" >&5
if test "x${build}" != "x${host}" ; then
# Canadian cross, just use what we found
echo "$ac_t""pre-installed" 1>&6
@ -5718,7 +5743,7 @@ else
fi
fi
echo $ac_n "checking where to find the target dlltool""... $ac_c" 1>&6
echo "configure:5722: checking where to find the target dlltool" >&5
echo "configure:5747: checking where to find the target dlltool" >&5
if test "x${build}" != "x${host}" ; then
# Canadian cross, just use what we found
echo "$ac_t""pre-installed" 1>&6
@ -5743,7 +5768,7 @@ else
fi
fi
echo $ac_n "checking where to find the target gcc""... $ac_c" 1>&6
echo "configure:5747: checking where to find the target gcc" >&5
echo "configure:5772: checking where to find the target gcc" >&5
if test "x${build}" != "x${host}" ; then
# Canadian cross, just use what we found
echo "$ac_t""pre-installed" 1>&6
@ -5768,7 +5793,7 @@ else
fi
fi
echo $ac_n "checking where to find the target gcj""... $ac_c" 1>&6
echo "configure:5772: checking where to find the target gcj" >&5
echo "configure:5797: checking where to find the target gcj" >&5
if test "x${build}" != "x${host}" ; then
# Canadian cross, just use what we found
echo "$ac_t""pre-installed" 1>&6
@ -5796,7 +5821,7 @@ else
fi
fi
echo $ac_n "checking where to find the target gfortran""... $ac_c" 1>&6
echo "configure:5800: checking where to find the target gfortran" >&5
echo "configure:5825: checking where to find the target gfortran" >&5
if test "x${build}" != "x${host}" ; then
# Canadian cross, just use what we found
echo "$ac_t""pre-installed" 1>&6
@ -5824,7 +5849,7 @@ else
fi
fi
echo $ac_n "checking where to find the target ld""... $ac_c" 1>&6
echo "configure:5828: checking where to find the target ld" >&5
echo "configure:5853: checking where to find the target ld" >&5
if test "x${build}" != "x${host}" ; then
# Canadian cross, just use what we found
echo "$ac_t""pre-installed" 1>&6
@ -5849,7 +5874,7 @@ else
fi
fi
echo $ac_n "checking where to find the target lipo""... $ac_c" 1>&6
echo "configure:5853: checking where to find the target lipo" >&5
echo "configure:5878: checking where to find the target lipo" >&5
if test "x${build}" != "x${host}" ; then
# Canadian cross, just use what we found
echo "$ac_t""pre-installed" 1>&6
@ -5864,7 +5889,7 @@ else
fi
fi
echo $ac_n "checking where to find the target nm""... $ac_c" 1>&6
echo "configure:5868: checking where to find the target nm" >&5
echo "configure:5893: checking where to find the target nm" >&5
if test "x${build}" != "x${host}" ; then
# Canadian cross, just use what we found
echo "$ac_t""pre-installed" 1>&6
@ -5889,7 +5914,7 @@ else
fi
fi
echo $ac_n "checking where to find the target objdump""... $ac_c" 1>&6
echo "configure:5893: checking where to find the target objdump" >&5
echo "configure:5918: checking where to find the target objdump" >&5
if test "x${build}" != "x${host}" ; then
# Canadian cross, just use what we found
echo "$ac_t""pre-installed" 1>&6
@ -5914,7 +5939,7 @@ else
fi
fi
echo $ac_n "checking where to find the target ranlib""... $ac_c" 1>&6
echo "configure:5918: checking where to find the target ranlib" >&5
echo "configure:5943: checking where to find the target ranlib" >&5
if test "x${build}" != "x${host}" ; then
# Canadian cross, just use what we found
echo "$ac_t""pre-installed" 1>&6
@ -5939,7 +5964,7 @@ else
fi
fi
echo $ac_n "checking where to find the target strip""... $ac_c" 1>&6
echo "configure:5943: checking where to find the target strip" >&5
echo "configure:5968: checking where to find the target strip" >&5
if test "x${build}" != "x${host}" ; then
# Canadian cross, just use what we found
echo "$ac_t""pre-installed" 1>&6
@ -5964,7 +5989,7 @@ else
fi
fi
echo $ac_n "checking where to find the target windres""... $ac_c" 1>&6
echo "configure:5968: checking where to find the target windres" >&5
echo "configure:5993: checking where to find the target windres" >&5
if test "x${build}" != "x${host}" ; then
# Canadian cross, just use what we found
echo "$ac_t""pre-installed" 1>&6
@ -6017,7 +6042,7 @@ fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
echo "configure:6021: checking whether to enable maintainer-specific portions of Makefiles" >&5
echo "configure:6046: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
@ -6142,15 +6167,34 @@ trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
cat > conftest.defs <<\EOF
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
s%\[%\\&%g
s%\]%\\&%g
s%\$%$$%g
EOF
DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
rm -f conftest.defs
#
# If the first sed substitution is executed (which looks for macros that
# take arguments), then we branch to the quote section. Otherwise,
# look for a macro that doesn't take arguments.
cat >confdef2opt.sed <<\_ACEOF
t clear
: clear
s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
t quote
s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
t quote
d
: quote
s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
s,\[,\\&,g
s,\],\\&,g
s,\$,$$,g
p
_ACEOF
# We use echo to avoid assuming a particular line-breaking character.
# The extra dot is to prevent the shell from consuming trailing
# line-breaks from the sub-command output. A line-break within
# single-quotes doesn't work because, if this script is created in a
# platform that uses two characters for line-breaks (e.g., DOS), tr
# would break.
ac_LF_and_DOT=`echo; echo .`
DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
rm -f confdef2opt.sed
# Without the "./", some shells look in PATH for config.status.

View File

@ -151,7 +151,8 @@ target_libraries="target-libiberty \
target-libgfortran \
${libgcj} \
target-libobjc \
target-libada"
target-libada \
target-libgomp"
# these tools are built using the target libraries, and are intended to
# run only in the target environment
@ -341,7 +342,7 @@ no)
;;
"")
case "${target}" in
*-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
# Enable libmudflap by default in GNU and friends.
;;
*-*-freebsd*)
@ -354,6 +355,30 @@ no)
esac
esac
# Allow --disable-libgomp to exclude target-libgomp
case $enable_libgomp in
yes)
;;
no)
noconfigdirs="$noconfigdirs target-libgomp"
;;
"")
# Enable libgomp by default on hosted POSIX systems.
case "${target}" in
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
;;
*-*-netbsd* | *-*-freebsd* | *-*-openbsd*)
;;
*-*-solaris2* | *-*-sysv4* | *-*-irix* | *-*-osf* | *-*-hpux*)
;;
*-*-darwin*)
;;
*)
noconfigdirs="$noconfigdirs target-libgomp"
;;
esac
esac
case "${target}" in
*-*-chorusos)

View File

@ -1,3 +1,8 @@
2006-01-18 Richard Henderson <rth@redhat.com>
Diego Novillo <dnovillo@redhat.com>
* gcc_update (files_and_dependencies): Add libgomp files.
2005-12-06 Ben Elliston <bje@au.ibm.com>
* newcvsroot: Remove.

View File

@ -112,6 +112,10 @@ libjava/libltdl/config-h.in: libjava/libltdl/configure.ac libjava/libltdl/acloca
libcpp/aclocal.m4: libcpp/configure.ac
libcpp/Makefile.in: libcpp/configure.ac libcpp/aclocal.m4
libcpp/configure: libcpp/configure.ac libcpp/aclocal.m4
libgomp/aclocal.m4: libgomp/configure.ac libgomp/acinclude.m4
libgomp/Makefile.in: libgomp/Makefile.am libgomp/aclocal.m4
libgomp/configure: libgomp/configure.ac libgomp/aclocal.m4
libgomp/config.h.in: libgomp/configure.ac libgomp/aclocal.m4
# Top level
Makefile.in: Makefile.tpl Makefile.def
configure: configure.in config/acx.m4

View File

@ -1,3 +1,353 @@
2006-01-18 Richard Henderson <rth@redhat.com>
Aldy Hernandez <aldyh@redhat.com>
Jakub Jelinek <jakub@redhat.com>
Diego Novillo <dnovillo@redhat.com>
* omp-low.c: New file.
* c-omp.c: New file.
2006-01-18 Richard Henderson <rth@redhat.com>
Jakub Jelinek <jakub@redhat.com>
Diego Novillo <dnovillo@redhat.com>
* doc/invoke.texi: Document -fopenmp.
* tree-dump.h (debug_function): Declare.
* hooks.c (hook_bool_tree_bool_false): New function.
(hook_tree_tree_null): Remove.
(hook_tree_tree_tree_null): New.
* hooks.h: Update to match.
* tree-pretty-print.c (debug_tree_chain): New.
(print_generic_expr): Handle TDF_CHAIN.
(dump_generic_node): Handle BLOCK.
Do not abort with incomplete SWITCH_EXPRs.
Do not dump body of an OpenMP directive if TDF_SLIM is given.
<case OMP_PARALLEL, OMP_FOR, OMP_SECTIONS>: Don't
print space after directive name.
<OMP_FOR>: Handle printing OMP_FOR_PRE_BODY.
Handle OMP_MASTER and OMP_ORDERED.
Handle printing of OMP_BODY just in one place, goto
dump_omp_body in the rest of OMP_* nodes that have
OMP_BODY.
Don't handle clause nodes here. Update omp statements to
use dump_omp_clauses.
Handle OMP_SINGLE, OMP_SECTIONS, OMP_SECTION,
OMP_CLAUSE_ORDERED, OMP_CLAUSE_SCHEDULE, OMP_ATOMIC,
OMP_CRITICAL, OMP_CLAUSE_NOWAIT, GOMP_CLAUSE_IF,
GOMP_CLAUSE_NUM_THREADS, GOMP_FOR, GOMP_CLAUSE_SHARED,
GOMP_CLAUSE_FIRSTPRIVATE, GOMP_CLAUSE_LASTPRIVATE,
GOMP_CLAUSE_COPYIN and GOMP_CLAUSE_COPYPRIVATE.
Adjust output for GOMP_PARALLEL.
(dump_omp_clauses): New.
(print_declaration): Dump DECL_VALUE_EXPR.
(op_symbol_1): Split out of op_symbol.
(dumping_stmts): Remove. Update all users.
* cgraph.c (cgraph_analyze_queue): New.
(cgraph_add_new_function): New.
* cgraph.h (cgraph_analyze_queue): Declare.
(cgraph_add_new_function): Declare.
(cgraph_lower_function): Remove.
* tree.c (walk_tree): Walk OMP_CLAUSE_CHAIN of OMP_CLAUSE_*
nodes. Use switch for all nodes, handle most of IS_EXPR_CODE_CLASS
and TYPE_P nodes in its default clause.
(empty_body_p): New.
(tree_range_check_failed): New.
(build5_stat): New.
* tree.h (OMP_CLAUSE_REDUCTION_INIT,
OMP_CLAUSE_REDUCTION_MERGE,
OMP_CLAUSE_REDUCTION_PLACEHOLDER,
OMP_CLAUSE_PRIVATE_DEBUG,
OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE, OMP_FOR_PRE_BODY,
OMP_MASTER_BODY, OMP_ORDERED_BODY OMP_BODY,
OMP_CLAUSES, OMP_CLAUSE_DECL, OMP_CLAUSE_DEFAULT_KIND,
OMP_CLAUSE_CHAIN, OMP_CLAUSE_OUTER_DECL,
OMP_CLAUSE_INNER_DECL, OMP_CLAUSE_NUM_THREADS_EXPR,
OMP_CLAUSE_IF_EXPR, OMP_CLAUSE_SCHEDULE_CHUNK_EXPR,
OMP_CLAUSE_SCHEDULE_CHUNK_SIZE. OMP_PARALLEL_VAR_INIT,
OMP_PARALLEL_VAR_REDUC, OMP_FOR_VAR_INIT,
OMP_FOR_VAR_LAST, OMP_FOR_VAR_REDUC,
OMP_SECTIONS_VAR_INIT, OMP_SECTIONS_VAR_LAST,
OMP_SECTIONS_VAR_REDUC, OMP_CLAUSE_REDUCTION_CODE
OMP_SINGLE_CLAUSES, OMP_SINGLE_BODY,
OMP_CLAUSE_SCHEDULE_CHUNK_SIZE, OMP_SECTION_BODY,
OMP_CRITICAL_NAME, OMP_CRITICAL_BODY): New.
(TREE_RANGE_CHECK): New.
(empty_body_p): Declare.
(enum omp_clause_default_kind): New.
(build_string_literal): Declare.
(enum omp_clause_schedule_kind, OMP_CLAUSE_SCHEDULE_KIND): New.
(build5_stat, build5): Declare.
* tree-pass.h (TDF_CHAIN): Define.
* tree-pass.h (PROP_gimple_lomp): Define.
(pass_lower_omp): Declare.
* diagnostic.h (debug_tree_chain): Declare.
* builtins.c (get_builtin_sync_mode): Use 0 as last argument to
mode_for_size.
(expand_builtin): Handle sync BUILT_IN_*_16 builtins.
* builtins.c (build_string_literal): Make extern.
* gcc.c (include_spec_function): New.
(static_spec_functions): Add it.
(main): Move load of libgomp.spec ...
(LINK_COMMAND_SPEC): ... here.
(link_gomp_spec): New.
(static_specs): Include it.
(LINK_COMMAND_SPEC): Add link_gomp.
(GOMP_SELF_SPECS): New.
(driver_self_specs): Include it.
(switch_matches): Don't mark inline.
(main): Load libgomp.spec.
* tree-gimple.c (is_gimple_stmt): True for OMP_MASTER,
OMP_ORDERED, OMP_CRITICAL, OMP_SECTIONS, OMP_SECTION,
and OMP_SINGLE, OMP_FOR and OMP_PARALLEL.
* tree-gimple.h (enum omp_parallel): Declare.
(determine_parallel_type): Declare.
(omp_firstprivatize_variable): Declare.
(omp_reduction_init): Declare.
(diagnose_omp_structured_block_errors): Declare.
(struct walk_stmt_info): Add want_return_expr.
(struct walk_stmt_info): Add want_bind_expr, want_locations.
(find_omp_clause): Declare.
(insert_field_into_struct): Declare.
(struct walk_stmt_info): Move from tree-nested.c
(walk_stmts): Declare.
* c-cppbuiltin.c (c_cpp_builtins): If -fopenmp, #define _OPENMP
to 200505.
* cgraphunit.c (cgraph_lower_function): Make static.
(cgraph_finalize_pending_functions): New.
(cgraph_finalize_function): Call it.
(cgraph_finalize_compilation_unit): Likewise.
* builtin-types.def (BT_I16, BT_FN_I16_VPTR_I16,
BT_FN_BOOL_VPTR_I16_I16, BT_FN_I16_VPTR_I16_I16): Add.
(BT_FN_UINT_UINT): New.
(DEF_FUNCTION_TYPE_6, DEF_FUNCTION_TYPE_7,
DEF_FUNCTION_TYPE_VAR_4): Document.
(BT_PTR_LONG, BT_PTR_PTR, BT_FN_BOOL, BT_FN_INT,
BT_FN_VOID_PTRPTR, BT_PTR_FN_VOID_PTR,
BT_FN_BOOL_LONGPTR_LONGPTR, BT_FN_VOID_OMPFN_PTR_UINT,
BT_FN_VOID_OMPFN_PTR_UINT_UINT,
BT_FN_BOOL_LONG_LONG_LONG_LONGPTR_LONGPTR,
BT_FN_BOOL_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR,
BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG,
BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG): New.
* builtins.def: Update DEF_BUILTIN comment to include COND argument.
Move all DEF_SYNC_BUILTIN () and DEF_GOMP_BUILTIN () builtins
into separate files.
(DEF_GOMP_BUILTIN): New.
(BUILT_IN_OMP_GET_THREAD_NUM, BUILT_IN_GOMP_BARRIER,
BUILT_IN_GOMP_CRITICAL_START, BUILT_IN_GOMP_CRITICAL_END,
BUILT_IN_GOMP_CRITICAL_NAME_START, BUILT_IN_GOMP_CRITICAL_NAME_END,
BUILT_IN_GOMP_LOOP_STATIC_START, BUILT_IN_GOMP_LOOP_DYNAMIC_START,
BUILT_IN_GOMP_LOOP_GUIDED_START, BUILT_IN_GOMP_LOOP_RUNTIME_START,
BUILT_IN_GOMP_LOOP_ORDERED_STATIC_START,
BUILT_IN_GOMP_LOOP_ORDERED_DYNAMIC_START,
BUILT_IN_GOMP_LOOP_ORDERED_GUIDED_START,
BUILT_IN_GOMP_LOOP_ORDERED_RUNTIME_START,
BUILT_IN_GOMP_LOOP_STATIC_NEXT, BUILT_IN_GOMP_LOOP_DYNAMIC_NEXT,
BUILT_IN_GOMP_LOOP_GUIDED_NEXT, BUILT_IN_GOMP_LOOP_RUNTIME_NEXT,
BUILT_IN_GOMP_LOOP_ORDERED_STATIC_NEXT,
BUILT_IN_GOMP_LOOP_ORDERED_DYNAMIC_NEXT,
BUILT_IN_GOMP_LOOP_ORDERED_GUIDED_NEXT,
BUILT_IN_GOMP_LOOP_ORDERED_RUNTIME_NEXT,
BUILT_IN_GOMP_PARALLEL_LOOP_STATIC_START,
BUILT_IN_GOMP_PARALLEL_LOOP_DYNAMIC_START,
BUILT_IN_GOMP_PARALLEL_LOOP_GUIDED_START,
BUILT_IN_GOMP_PARALLEL_LOOP_RUNTIME_START,
BUILT_IN_GOMP_LOOP_END, BUILT_IN_GOMP_LOOP_END_NOWAIT,
BUILT_IN_GOMP_ORDERED_START, BUILT_IN_GOMP_ORDERED_END,
BUILT_IN_GOMP_PARALLEL_START, BUILT_IN_GOMP_PARALLEL_END,
BUILT_IN_GOMP_SECTIONS_START, BUILT_IN_GOMP_SECTIONS_NEXT,
BUILT_IN_GOMP_PARALLEL_SECTIONS_START, BUILT_IN_GOMP_SECTIONS_END,
BUILT_IN_GOMP_SECTIONS_END_NOWAIT, BUILT_IN_GOMP_SINGLE_START,
BUILT_IN_GOMP_SINGLE_COPY_START, BUILT_IN_GOMP_SINGLE_COPY_END): New.
* sync-builtins.def: New file, moved from builtins.def.
* omp-builtins.def: New file, moved from builtins.def.
* c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_SHARING): Redefine.
* gimple-low.c (lower_function_body): Clear data.
(lower_stmt): Do not handle COMPOUND_EXPR.
Remove call to print_node_brief.
* c-tree.h (c_finish_omp_clauses): New prototype.
(C_DECL_THREADPRIVATE_P): Define.
(lookup_name_no_remap, c_omp_remap_private): Remove
(c_begin_omp_parallel, c_finish_omp_parallel): Update.
(check_for_loop_decls): Update decl.
(lookup_name_no_remap, c_omp_remap_private): Declare.
(build_indirect_ref, build_modify_expr, pushdecl,
pushdecl_top_level): Move to c-common.h.
* dwarf2out.c (loc_descriptor_from_tree_1): Don't set unsignedp
before the switch, but just in the 2 places that need it.
* c-decl.c (diagnose_mismatched_decls): Do not check for
mismatched thread-local attributes when OLDDECL is marked
threadprivate and NEWDECL has no thread-local attributes.
(merge_decls): Merge C_DECL_THREADPRIVATE_P.
(c_gimple_diagnostics_recursively): Rename from
c_warn_unused_result_recursively. Invoke
diagnose_omp_structured_block_errors.
(check_for_loop_decls): Return a singular decl found.
* langhooks.c (lhd_omp_predetermined_sharing): Return
OMP_CLAUSE_DEFAULT_SHARED for DECL_ARTIFICIAL decls.
(lhd_omp_firstprivatize_type_sizes): New.
(lhd_omp_assignment): New.
(lhd_omp_predetermined_sharing): New.
* langhooks.h (struct gimplify_omp_ctx): Forward declare.
(struct lang_hooks_for_types): Add
omp_firstprivatize_type_sizes, omp_privatize_by_reference,
omp_predetermined_sharing, omp_disregard_value_expr,
omp_private_debug_clause, omp_clause_default_ctor,
omp_clause_copy_ctor, omp_clause_assign_op, omp_clause_dtor.
(c_finish_omp_clauses): New.
(c_finish_bc_stmt): Diagnose break within omp for.
(c_begin_omp_parallel, c_finish_omp_parallel): New.
(build_unary_op): Return error_mark after reporting
a readonly_error.
(build_modify_expr): Likewise.
* gimplify.c: Include optabs.h and pointer-set.h.
(enum gimplify_omp_var_data): Declare.
(struct gimplify_omp_ctx): Declare.
(struct gimplify_ctx): Add fields prev_context, combined_pre_p
and combined_ctxp.
(gimplify_ctxp, gimplify_omp_ctxp): New local variables.
(push_gimplify_context, pop_gimplify_context): Allow nesting.
(splay_tree_compare_decl_uid): New.
(new_omp_context): New.
(delete_omp_context): New.
(gimple_add_tmp_var): Call omp_add_variable.
(gimplify_bind_expr): Likewise.
(gimplify_var_or_parm_decl): If omp_notice_variable returned
true, disregard DECL_VALUE_EXPR on the decl if any.
(gimplify_expr_in_ctx): New.
(omp_firstprivatize_variable, omp_firstprivatize_type_sizes
omp_add_variable, omp_notice_variable, omp_is_private
gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses_1
gimplify_adjust_omp_clauses, gimplify_omp_parallel
gimplify_omp_for, gimplify_omp_workshare, goa_lhs_expr_p
gimplify_omp_atomic_fetch_op, goa_stabilize_expr
gimplify_omp_atomic_pipeline, gimplify_omp_atomic_mutex
gimplify_omp_atomic): New.
(gimplify_expr): Handle OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
OMP_SINGLE, OMP_SECTION, OMP_MASTER, OMP_ORDERED,
OMP_CRITICAL and OMP_ATOMIC.
(gimplify_body): Verify gimplify_ctxp is empty after gimplification.
* c-pragma.h (enum pragma_kind): Add
PRAGMA_OMP_ATOMIC, PRAGMA_OMP_BARRIER,
PRAGMA_OMP_CRITICAL, PRAGMA_OMP_FLUSH, PRAGMA_OMP_FOR,
PRAGMA_OMP_MASTER, PRAGMA_OMP_ORDERED,
PRAGMA_OMP_PARALLEL, PRAGMA_OMP_PARALLEL_FOR,
PRAGMA_OMP_PARALLEL_SECTIONS, PRAGMA_OMP_SECTION,
PRAGMA_OMP_SECTIONS, PRAGMA_OMP_SINGLE,
PRAGMA_OMP_THREADPRIVATE.
* tree.def (OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
OMP_SINGLE, OMP_SECTION, OMP_MASTER, OMP_ORDERED,
OMP_CRITICAL, OMP_ATOMIC, OMP_CLAUSE_PRIVATE,
OMP_CLAUSE_SHARED, OMP_CLAUSE_FIRSTPRIVATE,
OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_REDUCTION,
OMP_CLAUSE_COPYIN, OMP_CLAUSE_COPYPRIVATE,
OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS,
OMP_CLAUSE_SCHEDULE, OMP_CLAUSE_NOWAIT,
OMP_CLAUSE_ORDERED, OMP_CLAUSE_DEFAULT): Define.
* print-tree.c (print_node): Dump DECL_VALUE_EXPR.
* tree-ssa-dce.c (find_control_dependence): Do not assume that
ENTRY_BLOCK_PTR->next_bb == single_succ (ENTRY_BLOCK_PTR).
* tree-nested.c (convert_call_expr): Call walk_body on OMP_BODY for
OpenMP directives.
(struct nesting_info): Add field_map,
suppress_expansion, debug_var_chain.
(create_nesting_tree): Initialize them.
(lookup_field_for_decl): Use field_map.
(get_nonlocal_debug_decl, get_local_debug_decl): New.
(convert_local_omp_clauses): New.
(finalize_nesting_tree_1): Add debug_var_chain to toplevel block.
(walk_body): Split out of walk_function.
(convert_nonlocal_omp_clauses, convert_local_omp_clauses): New.
(convert_nonlocal_reference): Handle omp statements.
(convert_local_reference): Likewise.
(unnest_nesting_tree_1): Split out of finalize_nesting_tree_1.
(unnest_nesting_tree): New.
(lower_nested_functions): Call it.
(insert_field_into_struct): Make extern.
(struct walk_stmt_info): Move to tree-gimple.h.
(walk_stmts): Make extern.
* omp-builtins.def: New file.
* tree-iterator.c (expr_only): Clarify comment.
* c-common.h (pushdecl_top_level, pushdecl,
build_modify_expr, build_indirect_ref,
c_finish_omp_master, c_finish_omp_critical,
c_finish_omp_ordered, c_finish_omp_barrier,
c_finish_omp_atomic, c_finish_omp_flush,
c_finish_omp_for, c_split_parallel_clauses,
omp_clause_default_kind, c_omp_sharing_predetermined,
c_omp_remap_decl): Declare.
* Makefile.in (BUILTINS_DEF): Add omp-builtins.def.
(OBJS-common): Add omp-low.o.
(c-omp.o, omp-low.o): Add.
(gimplify.o): Add dependency on $(OPTABS_H).
(GTFILES): Add omp-low.c.
(gt-stringpool.h): Add.
* tree-cfg.c (set_bb_for_stmt): Do not update the
block-to-labels map if we are currently expanding to RTL.
(tree_node_can_be_shared): Remove unnecessary CONSTANT_CLASS_P
checks.
Handle IDENTIFIER_NODE.
(tree_verify_flow_info): Do not ICE when emitting error
messages about invalid labels.
(dump_function_to_file): Reset CFUN before emitting the body
of the function.
(debug_function): New.
* passes.c (init_optimization_passes): Schedule
pass_lower_omp.
* langhooks-def.h (lhd_omp_predetermined_sharing,
lhd_omp_assignment, lhd_omp_firstprivatize_type_sizes):
Declare.
(LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES): Define.
(LANG_HOOKS_FOR_TYPES_INITIALIZER): Use it.
(LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE,
LANG_HOOKS_OMP_PREDETERMINED_SHARING,
LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR,
LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE,
LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR,
LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP,
LANG_HOOKS_OMP_CLAUSE_DTOR): Define.
(LANG_HOOK_DECLS): Use them.
2006-01-18 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
Richard Henderson <rth@redhat.com>
Jakub Jelinek <jakub@redhat.com>
Diego Novillo <dnovillo@redhat.com>
* c-parser.c (pragma_omp_clause): Define.
(c_parser_declaration_or_fndef): Document OpenMP syntax.
(c_parser_compound_statement): Likewise.
(c_parser_statement): Likewise.
(c_parser_pragma): Handle omp pragmas.
(OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK): Define.
(c_parser_omp_clause_name, check_no_duplicate_clause,
c_parser_omp_variable_list,
c_parser_omp_var_list_parens, c_parser_omp_clause_copyin,
c_parser_omp_clause_copyprivate,
c_parser_omp_clause_default,
c_parser_omp_clause_firstprivate, c_parser_omp_clause_if,
c_parser_omp_clause_lastprivate,
c_parser_omp_clause_nowait,
c_parser_omp_clause_num_threads,
c_parser_omp_clause_ordered, c_parser_omp_clause_private,
c_parser_omp_clause_reduction,
c_parser_omp_clause_schedule, c_parser_omp_clause_shared,
c_parser_omp_all_clauses, c_parser_omp_structured_block,
c_parser_omp_atomic, c_parser_omp_barrier,
c_parser_omp_critical, c_parser_omp_flush,
c_parser_omp_for_loop, c_parser_omp_for,
c_parser_omp_master, c_parser_omp_ordered,
c_parser_omp_sections_scope, c_parser_omp_sections,
c_parser_omp_parallel, c_parser_omp_single,
c_parser_omp_construct, c_parser_omp_threadprivate): New.
* c-pragma.c (init_pragma): Do omp pragma registration here.
* c.opt (fopenmp): New flag.
2006-01-18 Eric Christopher <echristo@apple.com>
* gcc.c (GOMP_SELF_SPECS): Bracket in #ifndef/#endif.
* config/darwin.h (GOMP_SELF_SPECS): Define.
2006-01-18 Kazu Hirata <kazu@codesourcery.com>
* rtl.h: Remove the prototype for reg_alloc.

View File

@ -737,7 +737,7 @@ RTL_BASE_H = rtl.h rtl.def $(MACHMODE_H) reg-notes.def insn-notes.def \
input.h real.h statistics.h
RTL_H = $(RTL_BASE_H) genrtl.h
PARAMS_H = params.h params.def
BUILTINS_DEF = builtins.def sync-builtins.def
BUILTINS_DEF = builtins.def sync-builtins.def omp-builtins.def
TREE_H = tree.h tree.def $(MACHMODE_H) tree-check.h $(BUILTINS_DEF) \
input.h statistics.h vec.h treestruct.def
BASIC_BLOCK_H = basic-block.h bitmap.h sbitmap.h varray.h $(PARTITION_H) \
@ -948,7 +948,7 @@ C_AND_OBJC_OBJS = attribs.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o \
c-convert.o c-aux-info.o c-common.o c-opts.o c-format.o c-semantics.o \
c-incpath.o cppdefault.o c-ppoutput.o c-cppbuiltin.o prefix.o \
c-objc-common.o c-dump.o c-pch.o c-parser.o $(C_TARGET_OBJS) \
c-gimplify.o tree-mudflap.o c-pretty-print.o
c-gimplify.o tree-mudflap.o c-pretty-print.o c-omp.o
# Language-specific object files for C.
C_OBJS = c-lang.o stub-objc.o $(C_AND_OBJC_OBJS)
@ -963,7 +963,7 @@ OBJS-common = \
tree-ssa-pre.o tree-ssa-live.o tree-ssa-operands.o tree-ssa-alias.o \
tree-ssa-phiopt.o tree-ssa-forwprop.o tree-nested.o tree-ssa-dse.o \
tree-ssa-dom.o domwalk.o tree-tailcall.o gimple-low.o tree-iterator.o \
tree-phinodes.o tree-ssanames.o tree-sra.o tree-complex.o \
omp-low.o tree-phinodes.o tree-ssanames.o tree-sra.o tree-complex.o \
tree-vect-generic.o tree-ssa-loop.o tree-ssa-loop-niter.o \
tree-ssa-loop-manip.o tree-ssa-threadupdate.o \
tree-vectorizer.o tree-vect-analyze.o tree-vect-transform.o \
@ -1671,6 +1671,9 @@ c-pch.o : c-pch.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(CPPLIB_H) $(TREE_H) \
-DHOST_MACHINE=\"$(host)\" -DTARGET_MACHINE=\"$(target)\" \
$< $(OUTPUT_OPTION)
c-omp.o : c-omp.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(FUNCTION_H) $(C_COMMON_H) toplev.h $(TREE_GIMPLE_H)
# Language-independent files.
DRIVER_DEFINES = \
@ -2034,12 +2037,16 @@ gimplify.o : gimplify.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
$(DIAGNOSTIC_H) $(TREE_GIMPLE_H) $(TREE_INLINE_H) $(VARRAY_H) langhooks.h \
$(LANGHOOKS_DEF_H) $(TREE_FLOW_H) $(CGRAPH_H) $(TIMEVAR_H) $(TM_H) \
coretypes.h except.h $(FLAGS_H) $(RTL_H) $(FUNCTION_H) $(EXPR_H) output.h \
$(GGC_H) gt-gimplify.h $(HASHTAB_H) real.h $(TARGET_H) toplev.h
$(GGC_H) gt-gimplify.h $(HASHTAB_H) real.h $(TARGET_H) toplev.h $(OPTABS_H)
gimple-low.o : gimple-low.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
$(DIAGNOSTIC_H) $(TREE_GIMPLE_H) $(TREE_INLINE_H) $(VARRAY_H) langhooks.h \
$(LANGHOOKS_DEF_H) $(TREE_FLOW_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
except.h $(FLAGS_H) $(RTL_H) $(FUNCTION_H) $(EXPR_H) tree-pass.h \
$(HASHTAB_H) toplev.h
omp-low.o : omp-low.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(RTL_H) $(TREE_GIMPLE_H) $(TREE_INLINE_H) langhooks.h $(DIAGNOSTIC_H) \
$(TREE_FLOW_H) $(TIMEVAR_H) $(FLAGS_H) $(EXPR_H) toplev.h tree-pass.h \
$(GGC_H)
tree-browser.o : tree-browser.c tree-browser.def $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(TREE_INLINE_H) $(DIAGNOSTIC_H) $(HASHTAB_H) \
$(TM_H) coretypes.h
@ -2859,7 +2866,7 @@ GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h \
$(srcdir)/tree-profile.c $(srcdir)/tree-nested.c \
$(srcdir)/ipa-reference.c $(srcdir)/tree-ssa-structalias.h \
$(srcdir)/tree-ssa-structalias.c \
$(srcdir)/c-pragma.h \
$(srcdir)/c-pragma.h $(srcdir)/omp-low.c \
$(srcdir)/targhooks.c $(out_file) \
@all_gtfiles@
@ -2893,7 +2900,7 @@ gt-tree-ssanames.h gt-tree-iterator.h gt-gimplify.h \
gt-tree-phinodes.h gt-tree-nested.h \
gt-tree-ssa-operands.h gt-tree-ssa-propagate.h \
gt-tree-ssa-structalias.h \
gt-stringpool.h gt-targhooks.h : s-gtype ; @true
gt-stringpool.h gt-targhooks.h gt-omp-low.h : s-gtype ; @true
define echo_quoted_to_gtyp
echo "\"$(gtyp)\", " >> tmp-gtyp.h

View File

@ -33,6 +33,8 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
DEF_FUNCTION_TYPE_3 (ENUM, RETURN, ARG1, ARG2, ARG3)
DEF_FUNCTION_TYPE_4 (ENUM, RETURN, ARG1, ARG2, ARG3, ARG4)
DEF_FUNCTION_TYPE_5 (ENUM, RETURN, ARG1, ARG2, ARG3, ARG4, ARG5)
DEF_FUNCTION_TYPE_6 (ENUM, RETURN, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6)
DEF_FUNCTION_TYPE_7 (ENUM, RETURN, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7)
These macros describe function types. ENUM is as above. The
RETURN type is one of the enumerals already defined. ARG1, ARG2,
@ -43,6 +45,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
DEF_FUNCTION_TYPE_VAR_2 (ENUM, RETURN, ARG1, ARG2)
DEF_FUNCTION_TYPE_VAR_3 (ENUM, RETURN, ARG1, ARG2, ARG3)
DEF_FUNCTION_TYPE_VAR_4 (ENUM, RETURN, ARG1, ARG2, ARG3, ARG4)
DEF_FUNCTION_TYPE_VAR_4 (ENUM, RETURN, ARG1, ARG2, ARG3, ARG4, ARG5)
Similar, but for function types that take variable arguments.
For example:
@ -115,10 +118,14 @@ DEF_PRIMITIVE_TYPE (BT_I8, builtin_type_for_size (BITS_PER_UNIT*8, 1))
DEF_PRIMITIVE_TYPE (BT_I16, builtin_type_for_size (BITS_PER_UNIT*16, 1))
DEF_POINTER_TYPE (BT_PTR_CONST_STRING, BT_CONST_STRING)
DEF_POINTER_TYPE (BT_PTR_LONG, BT_LONG)
DEF_POINTER_TYPE (BT_PTR_PTR, BT_PTR)
DEF_FUNCTION_TYPE_0 (BT_FN_VOID, BT_VOID)
DEF_FUNCTION_TYPE_0 (BT_FN_BOOL, BT_BOOL)
DEF_FUNCTION_TYPE_0 (BT_FN_PTR, BT_PTR)
DEF_FUNCTION_TYPE_0 (BT_FN_PID, BT_PID)
DEF_FUNCTION_TYPE_0 (BT_FN_INT, BT_INT)
DEF_FUNCTION_TYPE_0 (BT_FN_UINT, BT_UINT)
DEF_FUNCTION_TYPE_0 (BT_FN_FLOAT, BT_FLOAT)
DEF_FUNCTION_TYPE_0 (BT_FN_DOUBLE, BT_DOUBLE)
@ -194,6 +201,10 @@ DEF_FUNCTION_TYPE_1 (BT_FN_DFLOAT32_DFLOAT32, BT_DFLOAT32, BT_DFLOAT32)
DEF_FUNCTION_TYPE_1 (BT_FN_DFLOAT64_DFLOAT64, BT_DFLOAT64, BT_DFLOAT64)
DEF_FUNCTION_TYPE_1 (BT_FN_DFLOAT128_DFLOAT128, BT_DFLOAT128, BT_DFLOAT128)
DEF_FUNCTION_TYPE_1 (BT_FN_VOID_VPTR, BT_VOID, BT_VOLATILE_PTR)
DEF_FUNCTION_TYPE_1 (BT_FN_VOID_PTRPTR, BT_VOID, BT_PTR_PTR)
DEF_FUNCTION_TYPE_1 (BT_FN_UINT_UINT, BT_UINT, BT_UINT)
DEF_POINTER_TYPE (BT_PTR_FN_VOID_PTR, BT_FN_VOID_PTR)
DEF_FUNCTION_TYPE_2 (BT_FN_VOID_PTR_INT, BT_VOID, BT_PTR, BT_INT)
DEF_FUNCTION_TYPE_2 (BT_FN_STRING_STRING_CONST_STRING,
@ -281,6 +292,8 @@ DEF_FUNCTION_TYPE_2 (BT_FN_I2_VPTR_I2, BT_I2, BT_VOLATILE_PTR, BT_I2)
DEF_FUNCTION_TYPE_2 (BT_FN_I4_VPTR_I4, BT_I4, BT_VOLATILE_PTR, BT_I4)
DEF_FUNCTION_TYPE_2 (BT_FN_I8_VPTR_I8, BT_I8, BT_VOLATILE_PTR, BT_I8)
DEF_FUNCTION_TYPE_2 (BT_FN_I16_VPTR_I16, BT_I16, BT_VOLATILE_PTR, BT_I16)
DEF_FUNCTION_TYPE_2 (BT_FN_BOOL_LONGPTR_LONGPTR,
BT_BOOL, BT_PTR_LONG, BT_PTR_LONG)
DEF_FUNCTION_TYPE_3 (BT_FN_STRING_STRING_CONST_STRING_SIZE,
BT_STRING, BT_STRING, BT_CONST_STRING, BT_SIZE)
@ -343,6 +356,8 @@ DEF_FUNCTION_TYPE_3 (BT_FN_I4_VPTR_I4_I4, BT_I4, BT_VOLATILE_PTR, BT_I4, BT_I4)
DEF_FUNCTION_TYPE_3 (BT_FN_I8_VPTR_I8_I8, BT_I8, BT_VOLATILE_PTR, BT_I8, BT_I8)
DEF_FUNCTION_TYPE_3 (BT_FN_I16_VPTR_I16_I16, BT_I16, BT_VOLATILE_PTR,
BT_I16, BT_I16)
DEF_FUNCTION_TYPE_3 (BT_FN_VOID_OMPFN_PTR_UINT, BT_VOID, BT_PTR_FN_VOID_PTR,
BT_PTR, BT_UINT)
DEF_FUNCTION_TYPE_4 (BT_FN_SIZE_CONST_PTR_SIZE_SIZE_FILEPTR,
BT_SIZE, BT_CONST_PTR, BT_SIZE, BT_SIZE, BT_FILEPTR)
@ -358,14 +373,29 @@ DEF_FUNCTION_TYPE_4 (BT_FN_STRING_STRING_CONST_STRING_SIZE_SIZE,
BT_STRING, BT_STRING, BT_CONST_STRING, BT_SIZE, BT_SIZE)
DEF_FUNCTION_TYPE_4 (BT_FN_INT_FILEPTR_INT_CONST_STRING_VALIST_ARG,
BT_INT, BT_FILEPTR, BT_INT, BT_CONST_STRING, BT_VALIST_ARG)
DEF_FUNCTION_TYPE_4 (BT_FN_VOID_OMPFN_PTR_UINT_UINT,
BT_VOID, BT_PTR_FN_VOID_PTR, BT_PTR, BT_UINT, BT_UINT)
DEF_FUNCTION_TYPE_5 (BT_FN_INT_STRING_INT_SIZE_CONST_STRING_VALIST_ARG,
BT_INT, BT_STRING, BT_INT, BT_SIZE, BT_CONST_STRING,
BT_VALIST_ARG)
DEF_FUNCTION_TYPE_5 (BT_FN_BOOL_LONG_LONG_LONG_LONGPTR_LONGPTR,
BT_BOOL, BT_LONG, BT_LONG, BT_LONG,
BT_PTR_LONG, BT_PTR_LONG)
DEF_FUNCTION_TYPE_6 (BT_FN_INT_STRING_SIZE_INT_SIZE_CONST_STRING_VALIST_ARG,
BT_INT, BT_STRING, BT_SIZE, BT_INT, BT_SIZE,
BT_CONST_STRING, BT_VALIST_ARG)
DEF_FUNCTION_TYPE_6 (BT_FN_BOOL_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR,
BT_BOOL, BT_LONG, BT_LONG, BT_LONG, BT_LONG,
BT_PTR_LONG, BT_PTR_LONG)
DEF_FUNCTION_TYPE_6 (BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG,
BT_VOID, BT_PTR_FN_VOID_PTR, BT_PTR, BT_UINT,
BT_LONG, BT_LONG, BT_LONG)
DEF_FUNCTION_TYPE_7 (BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG,
BT_VOID, BT_PTR_FN_VOID_PTR, BT_PTR, BT_UINT,
BT_LONG, BT_LONG, BT_LONG, BT_LONG)
DEF_FUNCTION_TYPE_VAR_0 (BT_FN_VOID_VAR, BT_VOID)
DEF_FUNCTION_TYPE_VAR_0 (BT_FN_INT_VAR, BT_INT)
@ -404,3 +434,4 @@ DEF_FUNCTION_TYPE_VAR_5 (BT_FN_INT_STRING_SIZE_INT_SIZE_CONST_STRING_VAR,
DEF_POINTER_TYPE (BT_PTR_FN_VOID_VAR, BT_FN_VOID_VAR)
DEF_FUNCTION_TYPE_3 (BT_FN_PTR_PTR_FN_VOID_VAR_PTR_SIZE,
BT_PTR, BT_PTR_FN_VOID_VAR, BT_PTR, BT_SIZE)

View File

@ -76,7 +76,6 @@ static const char *c_getstr (tree);
static rtx c_readstr (const char *, enum machine_mode);
static int target_char_cast (tree, char *);
static rtx get_memory_rtx (tree, tree);
static tree build_string_literal (int, const char *);
static int apply_args_size (void);
static int apply_result_size (void);
#if defined (HAVE_untyped_call) || defined (HAVE_untyped_return)
@ -4785,7 +4784,7 @@ expand_builtin_copysign (tree arglist, rtx target, rtx subtarget)
/* Create a new constant string literal and return a char* pointer to it.
The STRING_CST value is the LEN characters at STR. */
static tree
tree
build_string_literal (int len, const char *str)
{
tree t, elem, index, type;

View File

@ -23,7 +23,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
/* Before including this file, you should define a macro:
DEF_BUILTIN (ENUM, NAME, CLASS, TYPE, LIBTYPE, BOTH_P,
FALLBACK_P, NONANSI_P, ATTRS, IMPLICIT)
FALLBACK_P, NONANSI_P, ATTRS, IMPLICIT, COND)
This macro will be called once for each builtin function. The
ENUM will be of type `enum built_in_function', and will indicate
@ -61,8 +61,10 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
define it's meaning. When user uses floorf we may assume that the
floorf has the meaning we expect, but we can't produce floorf by
simplifying floor((double)float) since the runtime need not implement
it. */
it.
The builtins is registered only if COND is true. */
/* A GCC builtin (like __builtin_saveregs) is provided by the
compiler, but does not correspond to a function in the standard
library. */
@ -133,6 +135,13 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, 0, 0, false, false, \
false, 0, false, false)
/* Builtin used by the implementation of GNU OpenMP. None of these are
actually implemented in the compiler; they're all in libgomp. */
#undef DEF_GOMP_BUILTIN
#define DEF_GOMP_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \
false, true, true, ATTRS, false, flag_openmp)
/* Define an attribute list for math functions that are normally
"impure" because some of them may write into global memory for
`errno'. If !flag_errno_math they are instead "const". */
@ -711,3 +720,6 @@ DEF_BUILTIN_STUB (BUILT_IN_PROFILE_FUNC_EXIT, "profile_func_exit")
/* Synchronization Primitives. */
#include "sync-builtins.def"
/* OpenMP builtins. */
#include "omp-builtins.def"

View File

@ -296,6 +296,10 @@ extern tree push_stmt_list (void);
extern tree pop_stmt_list (tree);
extern tree add_stmt (tree);
extern void push_cleanup (tree, tree, bool);
extern tree pushdecl_top_level (tree);
extern tree pushdecl (tree);
extern tree build_modify_expr (tree, enum tree_code, tree);
extern tree build_indirect_ref (tree, const char *);
extern int c_expand_decl (tree);
@ -934,6 +938,21 @@ extern void pp_file_change (const struct line_map *);
extern void pp_dir_change (cpp_reader *, const char *);
extern bool check_missing_format_attribute (tree, tree);
/* In c-omp.c */
extern tree c_finish_omp_master (tree);
extern tree c_finish_omp_critical (tree, tree);
extern tree c_finish_omp_ordered (tree);
extern void c_finish_omp_barrier (void);
extern void c_finish_omp_atomic (enum tree_code, tree, tree);
extern void c_finish_omp_flush (void);
extern tree c_finish_omp_for (location_t, tree, tree, tree, tree, tree, tree);
extern void c_split_parallel_clauses (tree, tree *, tree *);
extern enum omp_clause_default_kind c_omp_predetermined_sharing (tree);
/* Not in c-omp.c; provided by the front end. */
extern bool c_omp_sharing_predetermined (tree);
extern tree c_omp_remap_decl (tree, bool);
/* In order for the format checking to accept the C frontend
diagnostic framework extensions, you must include this file before
toplev.h, not after. The C front end formats are a subset of those

View File

@ -544,6 +544,9 @@ c_cpp_builtins (cpp_reader *pfile)
else if (flag_stack_protect == 1)
cpp_define (pfile, "__SSP__=1");
if (flag_openmp)
cpp_define (pfile, "_OPENMP=200505");
/* A straightforward target hook doesn't work, because of problems
linking that hook's body when part of non-C front ends. */
# define preprocessing_asm_p() (cpp_get_options (pfile)->lang == CLK_ASM)

View File

@ -1385,7 +1385,14 @@ diagnose_mismatched_decls (tree newdecl, tree olddecl,
{
/* Only variables can be thread-local, and all declarations must
agree on this property. */
if (DECL_THREAD_LOCAL_P (newdecl) != DECL_THREAD_LOCAL_P (olddecl))
if (C_DECL_THREADPRIVATE_P (olddecl) && !DECL_THREAD_LOCAL_P (newdecl))
{
/* Nothing to check. Since OLDDECL is marked threadprivate
and NEWDECL does not have a thread-local attribute, we
will merge the threadprivate attribute into NEWDECL. */
;
}
else if (DECL_THREAD_LOCAL_P (newdecl) != DECL_THREAD_LOCAL_P (olddecl))
{
if (DECL_THREAD_LOCAL_P (newdecl))
error ("thread-local declaration of %q+D follows "
@ -1672,6 +1679,13 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype)
if (DECL_INITIAL (newdecl) == 0)
DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl);
/* Merge the threadprivate attribute. */
if (TREE_CODE (olddecl) == VAR_DECL && C_DECL_THREADPRIVATE_P (olddecl))
{
DECL_TLS_MODEL (newdecl) = DECL_TLS_MODEL (olddecl);
C_DECL_THREADPRIVATE_P (newdecl) = 1;
}
if (CODE_CONTAINS_STRUCT (TREE_CODE (olddecl), TS_DECL_WITH_VIS))
{
/* Merge the unused-warning information. */
@ -6454,21 +6468,25 @@ store_parm_decls (void)
cfun->x_dont_save_pending_sizes_p = 1;
}
/* Handle attribute((warn_unused_result)) on FNDECL and all its nested
functions. */
/* Emit diagnostics that require gimple input for detection. Operate on
FNDECL and all its nested functions. */
static void
c_warn_unused_result_recursively (tree fndecl)
c_gimple_diagnostics_recursively (tree fndecl)
{
struct cgraph_node *cgn;
/* Handle attribute((warn_unused_result)). Relies on gimple input. */
c_warn_unused_result (&DECL_SAVED_TREE (fndecl));
/* Notice when OpenMP structured block constraints are violated. */
if (flag_openmp)
diagnose_omp_structured_block_errors (fndecl);
/* Finalize all nested functions now. */
cgn = cgraph_node (fndecl);
for (cgn = cgn->nested; cgn ; cgn = cgn->next_nested)
c_warn_unused_result_recursively (cgn->decl);
c_gimple_diagnostics_recursively (cgn->decl);
}
/* Finish up a function declaration and compile that function
@ -6596,7 +6614,7 @@ finish_function (void)
if (!decl_function_context (fndecl))
{
c_genericize (fndecl);
c_warn_unused_result_recursively (fndecl);
c_gimple_diagnostics_recursively (fndecl);
/* ??? Objc emits functions after finalizing the compilation unit.
This should be cleaned up later and this conditional removed. */
@ -6650,11 +6668,15 @@ c_expand_body (tree fndecl)
}
/* Check the declarations given in a for-loop for satisfying the C99
constraints. */
void
constraints. If exactly one such decl is found, return it. */
tree
check_for_loop_decls (void)
{
struct c_binding *b;
tree one_decl = NULL_TREE;
int n_decls = 0;
if (!flag_isoc99)
{
@ -6662,7 +6684,7 @@ check_for_loop_decls (void)
the C99 for loop scope. This doesn't make much sense, so don't
allow it. */
error ("%<for%> loop initial declaration used outside C99 mode");
return;
return NULL_TREE;
}
/* C99 subclause 6.8.5 paragraph 3:
@ -6713,7 +6735,12 @@ check_for_loop_decls (void)
error ("declaration of non-variable %q+D in %<for%> loop "
"initial declaration", decl);
}
n_decls++;
one_decl = decl;
}
return n_decls == 1 ? one_decl : NULL_TREE;
}
/* Save and reinitialize the variables

View File

@ -134,4 +134,7 @@ extern void c_initialize_diagnostics (diagnostic_context *);
#undef LANG_HOOKS_GIMPLIFY_EXPR
#define LANG_HOOKS_GIMPLIFY_EXPR c_gimplify_expr
#undef LANG_HOOKS_OMP_PREDETERMINED_SHARING
#define LANG_HOOKS_OMP_PREDETERMINED_SHARING c_omp_predetermined_sharing
#endif /* GCC_C_OBJC_COMMON */

429
gcc/c-omp.c Normal file
View File

@ -0,0 +1,429 @@
/* This file contains routines to construct GNU OpenMP constructs,
called from parsing in the C and C++ front ends.
Copyright (C) 2005 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@redhat.com>,
Diego Novillo <dnovillo@redhat.com>.
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 2, 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 COPYING. If not, write to the Free
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "function.h"
#include "c-common.h"
#include "toplev.h"
#include "tree-gimple.h"
#include "bitmap.h"
#include "langhooks.h"
/* Complete a #pragma omp master construct. STMT is the structured-block
that follows the pragma. */
tree
c_finish_omp_master (tree stmt)
{
return add_stmt (build1 (OMP_MASTER, void_type_node, stmt));
}
/* Complete a #pragma omp critical construct. STMT is the structured-block
that follows the pragma, NAME is the identifier in the pragma, or null
if it was omitted. */
tree
c_finish_omp_critical (tree body, tree name)
{
tree stmt = make_node (OMP_CRITICAL);
TREE_TYPE (stmt) = void_type_node;
OMP_CRITICAL_BODY (stmt) = body;
OMP_CRITICAL_NAME (stmt) = name;
return add_stmt (stmt);
}
/* Complete a #pragma omp ordered construct. STMT is the structured-block
that follows the pragma. */
tree
c_finish_omp_ordered (tree stmt)
{
return add_stmt (build1 (OMP_ORDERED, void_type_node, stmt));
}
/* Complete a #pragma omp barrier construct. */
void
c_finish_omp_barrier (void)
{
tree x;
x = built_in_decls[BUILT_IN_GOMP_BARRIER];
x = build_function_call_expr (x, NULL);
add_stmt (x);
}
/* Complete a #pragma omp atomic construct. The expression to be
implemented atomically is LHS code= RHS. */
void
c_finish_omp_atomic (enum tree_code code, tree lhs, tree rhs)
{
tree x, type, addr;
if (lhs == error_mark_node || rhs == error_mark_node)
return;
/* ??? According to one reading of the OpenMP spec, complex type are
supported, but there are no atomic stores for any architecture.
But at least icc 9.0 doesn't support complex types here either.
And lets not even talk about vector types... */
type = TREE_TYPE (lhs);
if (!INTEGRAL_TYPE_P (type)
&& !POINTER_TYPE_P (type)
&& !SCALAR_FLOAT_TYPE_P (type))
{
error ("invalid expression type for %<#pragma omp atomic%>");
return;
}
/* ??? Validate that rhs does not overlap lhs. */
/* Take and save the address of the lhs. From then on we'll reference it
via indirection. */
addr = build_unary_op (ADDR_EXPR, lhs, 0);
if (addr == error_mark_node)
return;
addr = save_expr (addr);
lhs = build_indirect_ref (addr, NULL);
/* There are lots of warnings, errors, and conversions that need to happen
in the course of interpreting a statement. Use the normal mechanisms
to do this, and then take it apart again. */
x = build_modify_expr (lhs, code, rhs);
if (x == error_mark_node)
return;
gcc_assert (TREE_CODE (x) == MODIFY_EXPR);
rhs = TREE_OPERAND (x, 1);
/* Punt the actual generation of atomic operations to common code. */
add_stmt (build2 (OMP_ATOMIC, void_type_node, addr, rhs));
}
/* Complete a #pragma omp flush construct. We don't do anything with the
variable list that the syntax allows. */
void
c_finish_omp_flush (void)
{
tree x;
x = built_in_decls[BUILT_IN_SYNCHRONIZE];
x = build_function_call_expr (x, NULL);
add_stmt (x);
}
/* Check and canonicalize #pragma omp for increment expression.
Helper function for c_finish_omp_for. */
static tree
check_omp_for_incr_expr (tree exp, tree decl)
{
tree t;
if (!INTEGRAL_TYPE_P (TREE_TYPE (exp))
|| TYPE_PRECISION (TREE_TYPE (exp)) < TYPE_PRECISION (TREE_TYPE (decl)))
return error_mark_node;
if (exp == decl)
return build_int_cst (TREE_TYPE (exp), 0);
switch (TREE_CODE (exp))
{
case NOP_EXPR:
t = check_omp_for_incr_expr (TREE_OPERAND (exp, 0), decl);
if (t != error_mark_node)
return fold_convert (TREE_TYPE (exp), t);
break;
case MINUS_EXPR:
t = check_omp_for_incr_expr (TREE_OPERAND (exp, 0), decl);
if (t != error_mark_node)
return fold_build2 (MINUS_EXPR, TREE_TYPE (exp), t, TREE_OPERAND (exp, 1));
break;
case PLUS_EXPR:
t = check_omp_for_incr_expr (TREE_OPERAND (exp, 0), decl);
if (t != error_mark_node)
return fold_build2 (PLUS_EXPR, TREE_TYPE (exp), t, TREE_OPERAND (exp, 1));
t = check_omp_for_incr_expr (TREE_OPERAND (exp, 1), decl);
if (t != error_mark_node)
return fold_build2 (PLUS_EXPR, TREE_TYPE (exp), TREE_OPERAND (exp, 0), t);
break;
default:
break;
}
return error_mark_node;
}
/* Validate and emit code for the OpenMP directive #pragma omp for.
INIT, COND, INCR, BODY and PRE_BODY are the five basic elements
of the loop (initialization expression, controlling predicate, increment
expression, body of the loop and statements to go before the loop).
DECL is the iteration variable. */
tree
c_finish_omp_for (location_t locus, tree decl, tree init, tree cond,
tree incr, tree body, tree pre_body)
{
location_t elocus = locus;
bool fail = false;
if (EXPR_HAS_LOCATION (init))
elocus = EXPR_LOCATION (init);
/* Validate the iteration variable. */
if (!INTEGRAL_TYPE_P (TREE_TYPE (decl)))
{
error ("%Hinvalid type for iteration variable %qE", &elocus, decl);
fail = true;
}
if (TYPE_UNSIGNED (TREE_TYPE (decl)))
warning (0, "%Hiteration variable %qE is unsigned", &elocus, decl);
/* In the case of "for (int i = 0...)", init will be a decl. It should
have a DECL_INITIAL that we can turn into an assignment. */
if (init == decl)
{
elocus = DECL_SOURCE_LOCATION (decl);
init = DECL_INITIAL (decl);
if (init == NULL)
{
error ("%H%qE is not initialized", &elocus, decl);
init = integer_zero_node;
fail = true;
}
init = build_modify_expr (decl, NOP_EXPR, init);
SET_EXPR_LOCATION (init, elocus);
}
gcc_assert (TREE_CODE (init) == MODIFY_EXPR);
gcc_assert (TREE_OPERAND (init, 0) == decl);
if (cond == NULL_TREE)
{
error ("%Hmissing controlling predicate", &elocus);
fail = true;
}
else
{
bool cond_ok = false;
if (EXPR_HAS_LOCATION (cond))
elocus = EXPR_LOCATION (cond);
if (TREE_CODE (cond) == LT_EXPR
|| TREE_CODE (cond) == LE_EXPR
|| TREE_CODE (cond) == GT_EXPR
|| TREE_CODE (cond) == GE_EXPR)
{
tree op0 = TREE_OPERAND (cond, 0);
tree op1 = TREE_OPERAND (cond, 1);
/* 2.5.1. The comparison in the condition is computed in the type
of DECL, otherwise the behavior is undefined.
For example:
long n; int i;
i < n;
according to ISO will be evaluated as:
(long)i < n;
We want to force:
i < (int)n; */
if (TREE_CODE (op0) == NOP_EXPR
&& decl == TREE_OPERAND (op0, 0))
{
TREE_OPERAND (cond, 0) = TREE_OPERAND (op0, 0);
TREE_OPERAND (cond, 1) = fold_build1 (NOP_EXPR, TREE_TYPE (decl),
TREE_OPERAND (cond, 1));
}
else if (TREE_CODE (op1) == NOP_EXPR
&& decl == TREE_OPERAND (op1, 0))
{
TREE_OPERAND (cond, 1) = TREE_OPERAND (op1, 0);
TREE_OPERAND (cond, 0) = fold_build1 (NOP_EXPR, TREE_TYPE (decl),
TREE_OPERAND (cond, 0));
}
if (decl == TREE_OPERAND (cond, 0))
cond_ok = true;
else if (decl == TREE_OPERAND (cond, 1))
{
TREE_SET_CODE (cond, swap_tree_comparison (TREE_CODE (cond)));
TREE_OPERAND (cond, 1) = TREE_OPERAND (cond, 0);
TREE_OPERAND (cond, 0) = decl;
cond_ok = true;
}
}
if (!cond_ok)
{
error ("%Hinvalid controlling predicate", &elocus);
fail = true;
}
}
if (incr == NULL_TREE)
{
error ("%Hmissing increment expression", &elocus);
fail = true;
}
else
{
bool incr_ok = false;
if (EXPR_HAS_LOCATION (incr))
elocus = EXPR_LOCATION (incr);
/* Check all the valid increment expressions: v++, v--, ++v, --v,
v = v + incr, v = incr + v and v = v - incr. */
switch (TREE_CODE (incr))
{
case POSTINCREMENT_EXPR:
case PREINCREMENT_EXPR:
case POSTDECREMENT_EXPR:
case PREDECREMENT_EXPR:
incr_ok = (TREE_OPERAND (incr, 0) == decl);
break;
case MODIFY_EXPR:
if (TREE_OPERAND (incr, 0) != decl)
break;
if (TREE_OPERAND (incr, 1) == decl)
break;
if (TREE_CODE (TREE_OPERAND (incr, 1)) == PLUS_EXPR
&& (TREE_OPERAND (TREE_OPERAND (incr, 1), 0) == decl
|| TREE_OPERAND (TREE_OPERAND (incr, 1), 1) == decl))
incr_ok = true;
else if (TREE_CODE (TREE_OPERAND (incr, 1)) == MINUS_EXPR
&& TREE_OPERAND (TREE_OPERAND (incr, 1), 0) == decl)
incr_ok = true;
else
{
tree t = check_omp_for_incr_expr (TREE_OPERAND (incr, 1), decl);
if (t != error_mark_node)
{
incr_ok = true;
t = build2 (PLUS_EXPR, TREE_TYPE (decl), decl, t);
incr = build2 (MODIFY_EXPR, void_type_node, decl, t);
}
}
break;
default:
break;
}
if (!incr_ok)
{
error ("%Hinvalid increment expression", &elocus);
fail = true;
}
}
if (fail)
return NULL;
else
{
tree t = make_node (OMP_FOR);
TREE_TYPE (t) = void_type_node;
OMP_FOR_INIT (t) = init;
OMP_FOR_COND (t) = cond;
OMP_FOR_INCR (t) = incr;
OMP_FOR_BODY (t) = body;
OMP_FOR_PRE_BODY (t) = pre_body;
SET_EXPR_LOCATION (t, locus);
return add_stmt (t);
}
}
/* Divide CLAUSES into two lists: those that apply to a parallel construct,
and those that apply to a work-sharing construct. Place the results in
*PAR_CLAUSES and *WS_CLAUSES respectively. In addition, add a nowait
clause to the work-sharing list. */
void
c_split_parallel_clauses (tree clauses, tree *par_clauses, tree *ws_clauses)
{
tree next;
*par_clauses = NULL;
*ws_clauses = make_node (OMP_CLAUSE_NOWAIT);
for (; clauses ; clauses = next)
{
next = OMP_CLAUSE_CHAIN (clauses);
switch (TREE_CODE (clauses))
{
case OMP_CLAUSE_PRIVATE:
case OMP_CLAUSE_SHARED:
case OMP_CLAUSE_FIRSTPRIVATE:
case OMP_CLAUSE_LASTPRIVATE:
case OMP_CLAUSE_REDUCTION:
case OMP_CLAUSE_COPYIN:
case OMP_CLAUSE_IF:
case OMP_CLAUSE_NUM_THREADS:
case OMP_CLAUSE_DEFAULT:
OMP_CLAUSE_CHAIN (clauses) = *par_clauses;
*par_clauses = clauses;
break;
case OMP_CLAUSE_SCHEDULE:
case OMP_CLAUSE_ORDERED:
OMP_CLAUSE_CHAIN (clauses) = *ws_clauses;
*ws_clauses = clauses;
break;
default:
gcc_unreachable ();
}
}
}
/* True if OpenMP sharing attribute of DECL is predetermined. */
enum omp_clause_default_kind
c_omp_predetermined_sharing (tree decl)
{
/* Variables with const-qualified type having no mutable member
are predetermined shared. */
if (TREE_READONLY (decl))
return OMP_CLAUSE_DEFAULT_SHARED;
return OMP_CLAUSE_DEFAULT_UNSPECIFIED;
}

File diff suppressed because it is too large Load Diff

View File

@ -724,6 +724,32 @@ c_invoke_pragma_handler (unsigned int id)
void
init_pragma (void)
{
if (flag_openmp && !flag_preprocess_only)
{
struct omp_pragma_def { const char *name; unsigned int id; };
static const struct omp_pragma_def omp_pragmas[] = {
{ "atomic", PRAGMA_OMP_ATOMIC },
{ "barrier", PRAGMA_OMP_BARRIER },
{ "critical", PRAGMA_OMP_CRITICAL },
{ "flush", PRAGMA_OMP_FLUSH },
{ "for", PRAGMA_OMP_FOR },
{ "master", PRAGMA_OMP_MASTER },
{ "ordered", PRAGMA_OMP_ORDERED },
{ "parallel", PRAGMA_OMP_PARALLEL },
{ "section", PRAGMA_OMP_SECTION },
{ "sections", PRAGMA_OMP_SECTIONS },
{ "single", PRAGMA_OMP_SINGLE },
{ "threadprivate", PRAGMA_OMP_THREADPRIVATE }
};
const int n_omp_pragmas = sizeof (omp_pragmas) / sizeof (*omp_pragmas);
int i;
for (i = 0; i < n_omp_pragmas; ++i)
cpp_register_deferred_pragma (parse_in, "omp", omp_pragmas[i].name,
omp_pragmas[i].id, true, true);
}
cpp_register_deferred_pragma (parse_in, "GCC", "pch_preprocess",
PRAGMA_GCC_PCH_PREPROCESS, false, false);

View File

@ -29,6 +29,21 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
typedef enum pragma_kind {
PRAGMA_NONE = 0,
PRAGMA_OMP_ATOMIC,
PRAGMA_OMP_BARRIER,
PRAGMA_OMP_CRITICAL,
PRAGMA_OMP_FLUSH,
PRAGMA_OMP_FOR,
PRAGMA_OMP_MASTER,
PRAGMA_OMP_ORDERED,
PRAGMA_OMP_PARALLEL,
PRAGMA_OMP_PARALLEL_FOR,
PRAGMA_OMP_PARALLEL_SECTIONS,
PRAGMA_OMP_SECTION,
PRAGMA_OMP_SECTIONS,
PRAGMA_OMP_SINGLE,
PRAGMA_OMP_THREADPRIVATE,
PRAGMA_GCC_PCH_PREPROCESS,
PRAGMA_FIRST_EXTERNAL

View File

@ -129,6 +129,10 @@ struct lang_type GTY(())
#define C_DECL_UNDEFINABLE_VM(EXP) \
DECL_LANG_FLAG_5 (LABEL_DECL_CHECK (EXP))
/* Record whether a variable has been declared threadprivate by
#pragma omp threadprivate. */
#define C_DECL_THREADPRIVATE_P(DECL) DECL_LANG_FLAG_3 (VAR_DECL_CHECK (DECL))
/* Nonzero for a decl which either doesn't exist or isn't a prototype.
N.B. Could be simplified if all built-in decls had complete prototypes
(but this is presently difficult because some of them need FILE*). */
@ -431,7 +435,6 @@ extern int global_bindings_p (void);
extern void push_scope (void);
extern tree pop_scope (void);
extern void insert_block (tree);
extern tree pushdecl (tree);
extern void c_expand_body (tree);
extern void c_init_decl_processing (void);
@ -441,7 +444,7 @@ extern int quals_from_declspecs (const struct c_declspecs *);
extern struct c_declarator *build_array_declarator (tree, struct c_declspecs *,
bool, bool);
extern tree build_enumerator (tree, tree);
extern void check_for_loop_decls (void);
extern tree check_for_loop_decls (void);
extern void mark_forward_parm_decls (void);
extern void declare_parm_level (void);
extern void undeclared_variable (tree, location_t);
@ -461,7 +464,6 @@ extern void pending_xref_error (void);
extern void c_push_function_context (struct function *);
extern void c_pop_function_context (struct function *);
extern void push_parm_decl (const struct c_parm *);
extern tree pushdecl_top_level (tree);
extern struct c_declarator *set_array_declarator_inner (struct c_declarator *,
struct c_declarator *,
bool);
@ -529,7 +531,6 @@ extern tree default_conversion (tree);
extern struct c_expr default_function_array_conversion (struct c_expr);
extern tree composite_type (tree, tree);
extern tree build_component_ref (tree, tree);
extern tree build_indirect_ref (tree, const char *);
extern tree build_array_ref (tree, tree);
extern tree build_external_ref (tree, int, location_t);
extern void pop_maybe_used (bool);
@ -542,7 +543,6 @@ extern tree build_conditional_expr (tree, tree, tree);
extern tree build_compound_expr (tree, tree);
extern tree c_cast_expr (struct c_type_name *, tree);
extern tree build_c_cast (tree, tree);
extern tree build_modify_expr (tree, enum tree_code, tree);
extern void store_init_value (tree, tree);
extern void error_init (const char *);
extern void pedwarn_init (const char *);
@ -577,6 +577,9 @@ extern tree c_finish_goto_ptr (tree);
extern void c_begin_vm_scope (unsigned int);
extern void c_end_vm_scope (unsigned int);
extern tree c_expr_to_decl (tree, bool *, bool *, bool *);
extern tree c_begin_omp_parallel (void);
extern tree c_finish_omp_parallel (tree, tree);
extern tree c_finish_omp_clauses (tree);
/* Set to 0 at beginning of a function definition, set to 1 if
a return statement that specifies a return value is seen. */

View File

@ -2931,10 +2931,13 @@ build_unary_op (enum tree_code code, tree xarg, int flag)
/* Report a read-only lvalue. */
if (TREE_READONLY (arg))
readonly_error (arg,
((code == PREINCREMENT_EXPR
|| code == POSTINCREMENT_EXPR)
? lv_increment : lv_decrement));
{
readonly_error (arg,
((code == PREINCREMENT_EXPR
|| code == POSTINCREMENT_EXPR)
? lv_increment : lv_decrement));
return error_mark_node;
}
if (TREE_CODE (TREE_TYPE (arg)) == BOOLEAN_TYPE)
val = boolean_increment (code, arg);
@ -3645,7 +3648,10 @@ build_modify_expr (tree lhs, enum tree_code modifycode, tree rhs)
|| ((TREE_CODE (lhstype) == RECORD_TYPE
|| TREE_CODE (lhstype) == UNION_TYPE)
&& C_TYPE_FIELDS_READONLY (lhstype)))
readonly_error (lhs, lv_assign);
{
readonly_error (lhs, lv_assign);
return error_mark_node;
}
/* If storing into a structure or union member,
it has probably been given type `int'.
@ -7310,13 +7316,24 @@ c_finish_bc_stmt (tree *label_p, bool is_break)
if (!skip)
*label_p = label = create_artificial_label ();
}
else if (TREE_CODE (label) != LABEL_DECL)
else if (TREE_CODE (label) == LABEL_DECL)
;
else switch (TREE_INT_CST_LOW (label))
{
case 0:
if (is_break)
error ("break statement not within loop or switch");
else
error ("continue statement not within a loop");
return NULL_TREE;
case 1:
gcc_assert (is_break);
error ("break statement used with OpenMP for loop");
return NULL_TREE;
default:
gcc_unreachable ();
}
if (skip)
@ -8443,3 +8460,248 @@ c_expr_to_decl (tree expr, bool *tc ATTRIBUTE_UNUSED,
else
return expr;
}
/* Like c_begin_compound_stmt, except force the retension of the BLOCK. */
tree
c_begin_omp_parallel (void)
{
tree block;
keep_next_level ();
block = c_begin_compound_stmt (true);
return block;
}
tree
c_finish_omp_parallel (tree clauses, tree block)
{
tree stmt;
block = c_end_compound_stmt (block, true);
stmt = make_node (OMP_PARALLEL);
TREE_TYPE (stmt) = void_type_node;
OMP_PARALLEL_CLAUSES (stmt) = clauses;
OMP_PARALLEL_BODY (stmt) = block;
return add_stmt (stmt);
}
/* For all elements of CLAUSES, validate them vs OpenMP constraints.
Remove any elements from the list that are invalid. */
tree
c_finish_omp_clauses (tree clauses)
{
bitmap_head generic_head, firstprivate_head, lastprivate_head;
tree c, t, *pc = &clauses;
const char *name;
bitmap_obstack_initialize (NULL);
bitmap_initialize (&generic_head, &bitmap_default_obstack);
bitmap_initialize (&firstprivate_head, &bitmap_default_obstack);
bitmap_initialize (&lastprivate_head, &bitmap_default_obstack);
for (pc = &clauses, c = clauses; c ; c = *pc)
{
bool remove = false;
bool need_complete = false;
bool need_implicitly_determined = false;
switch (TREE_CODE (c))
{
case OMP_CLAUSE_SHARED:
name = "shared";
need_implicitly_determined = true;
goto check_dup_generic;
case OMP_CLAUSE_PRIVATE:
name = "private";
need_complete = true;
need_implicitly_determined = true;
goto check_dup_generic;
case OMP_CLAUSE_REDUCTION:
name = "reduction";
need_implicitly_determined = true;
t = OMP_CLAUSE_DECL (c);
if (AGGREGATE_TYPE_P (TREE_TYPE (t))
|| POINTER_TYPE_P (TREE_TYPE (t)))
{
error ("%qE has invalid type for %<reduction%>", t);
remove = true;
}
else if (FLOAT_TYPE_P (TREE_TYPE (t)))
{
enum tree_code r_code = OMP_CLAUSE_REDUCTION_CODE (c);
const char *r_name = NULL;
switch (r_code)
{
case PLUS_EXPR:
case MULT_EXPR:
case MINUS_EXPR:
break;
case BIT_AND_EXPR:
r_name = "&";
break;
case BIT_XOR_EXPR:
r_name = "^";
break;
case BIT_IOR_EXPR:
r_name = "|";
break;
case TRUTH_ANDIF_EXPR:
r_name = "&&";
break;
case TRUTH_ORIF_EXPR:
r_name = "||";
break;
default:
gcc_unreachable ();
}
if (r_name)
{
error ("%qE has invalid type for %<reduction(%s)%>",
t, r_name);
remove = true;
}
}
goto check_dup_generic;
case OMP_CLAUSE_COPYPRIVATE:
name = "copyprivate";
goto check_dup_generic;
case OMP_CLAUSE_COPYIN:
name = "copyin";
t = OMP_CLAUSE_DECL (c);
if (TREE_CODE (t) != VAR_DECL || !DECL_THREAD_LOCAL_P (t))
{
error ("%qE must be %<threadprivate%> for %<copyin%>", t);
remove = true;
}
goto check_dup_generic;
check_dup_generic:
t = OMP_CLAUSE_DECL (c);
if (TREE_CODE (t) != VAR_DECL && TREE_CODE (t) != PARM_DECL)
{
error ("%qE is not a variable in clause %qs", t, name);
remove = true;
}
else if (bitmap_bit_p (&generic_head, DECL_UID (t))
|| bitmap_bit_p (&firstprivate_head, DECL_UID (t))
|| bitmap_bit_p (&lastprivate_head, DECL_UID (t)))
{
error ("%qE appears more than once in data clauses", t);
remove = true;
}
else
bitmap_set_bit (&generic_head, DECL_UID (t));
break;
case OMP_CLAUSE_FIRSTPRIVATE:
name = "firstprivate";
t = OMP_CLAUSE_DECL (c);
need_complete = true;
need_implicitly_determined = true;
if (TREE_CODE (t) != VAR_DECL && TREE_CODE (t) != PARM_DECL)
{
error ("%qE is not a variable in clause %<firstprivate%>", t);
remove = true;
}
else if (bitmap_bit_p (&generic_head, DECL_UID (t))
|| bitmap_bit_p (&firstprivate_head, DECL_UID (t)))
{
error ("%qE appears more than once in data clauses", t);
remove = true;
}
else
bitmap_set_bit (&firstprivate_head, DECL_UID (t));
break;
case OMP_CLAUSE_LASTPRIVATE:
name = "lastprivate";
t = OMP_CLAUSE_DECL (c);
need_complete = true;
need_implicitly_determined = true;
if (TREE_CODE (t) != VAR_DECL && TREE_CODE (t) != PARM_DECL)
{
error ("%qE is not a variable in clause %<lastprivate%>", t);
remove = true;
}
else if (bitmap_bit_p (&generic_head, DECL_UID (t))
|| bitmap_bit_p (&lastprivate_head, DECL_UID (t)))
{
error ("%qE appears more than once in data clauses", t);
remove = true;
}
else
bitmap_set_bit (&lastprivate_head, DECL_UID (t));
break;
case OMP_CLAUSE_IF:
case OMP_CLAUSE_NUM_THREADS:
case OMP_CLAUSE_SCHEDULE:
case OMP_CLAUSE_NOWAIT:
case OMP_CLAUSE_ORDERED:
case OMP_CLAUSE_DEFAULT:
pc = &OMP_CLAUSE_CHAIN (c);
continue;
default:
gcc_unreachable ();
}
if (!remove)
{
t = OMP_CLAUSE_DECL (c);
if (need_complete)
{
t = require_complete_type (t);
if (t == error_mark_node)
remove = true;
}
if (need_implicitly_determined)
{
const char *share_name = NULL;
if (TREE_CODE (t) == VAR_DECL && DECL_THREAD_LOCAL_P (t))
share_name = "threadprivate";
else switch (c_omp_predetermined_sharing (t))
{
case OMP_CLAUSE_DEFAULT_UNSPECIFIED:
break;
case OMP_CLAUSE_DEFAULT_SHARED:
share_name = "shared";
break;
case OMP_CLAUSE_DEFAULT_PRIVATE:
share_name = "private";
break;
default:
gcc_unreachable ();
}
if (share_name)
{
error ("%qE is predetermined %qs for %qs",
t, share_name, name);
remove = true;
}
}
}
if (remove)
*pc = OMP_CLAUSE_CHAIN (c);
else
pc = &OMP_CLAUSE_CHAIN (c);
}
bitmap_obstack_release (NULL);
return clauses;
}

View File

@ -617,6 +617,10 @@ fobjc-sjlj-exceptions
ObjC ObjC++ Var(flag_objc_sjlj_exceptions) Init(-1)
Enable Objective-C setjmp exception handling runtime
fopenmp
C ObjC C++ ObjC++ Var(flag_openmp)
Enable OpenMP
foperator-names
C++ ObjC++
Recognize C++ kewords like \"compl\" and \"xor\"

View File

@ -113,6 +113,9 @@ struct cgraph_node *cgraph_nodes;
/* Queue of cgraph nodes scheduled to be lowered. */
struct cgraph_node *cgraph_nodes_queue;
/* Queue of cgraph nodes scheduled to be analyzed. */
struct cgraph_node *cgraph_analyze_queue;
/* Number of nodes in existence. */
int cgraph_n_nodes;
@ -1091,4 +1094,20 @@ cgraph_variable_initializer_availability (struct cgraph_varpool_node *node)
return AVAIL_AVAILABLE;
}
/* Add the function FNDECL to the call graph. This assumes that the
body of FNDECL is in GENERIC form and ready to be processed by
cgraph_finalize_function. */
void
cgraph_add_new_function (tree fndecl)
{
/* We're called while lowering another function. We can't do anything
at this time without recursing. Which would cause a GC at an
inappropriate time. */
struct cgraph_node *n = cgraph_node (fndecl);
n->next_needed = cgraph_analyze_queue;
cgraph_analyze_queue = n;
}
#include "gt-cgraph.h"

View File

@ -239,6 +239,7 @@ extern GTY(()) int cgraph_max_uid;
extern bool cgraph_global_info_ready;
extern bool cgraph_function_flags_ready;
extern GTY(()) struct cgraph_node *cgraph_nodes_queue;
extern GTY(()) struct cgraph_node *cgraph_analyze_queue;
extern GTY(()) struct cgraph_varpool_node *cgraph_varpool_first_unanalyzed_node;
extern GTY(()) struct cgraph_varpool_node *cgraph_varpool_nodes_queue;
@ -288,12 +289,12 @@ enum availability cgraph_function_body_availability (struct cgraph_node *);
enum availability cgraph_variable_initializer_availability (struct cgraph_varpool_node *);
bool cgraph_is_master_clone (struct cgraph_node *);
struct cgraph_node *cgraph_master_clone (struct cgraph_node *);
void cgraph_add_new_function (tree);
/* In cgraphunit.c */
bool cgraph_assemble_pending_functions (void);
bool cgraph_varpool_assemble_pending_decls (void);
void cgraph_finalize_function (tree, bool);
void cgraph_lower_function (struct cgraph_node *);
void cgraph_finalize_compilation_unit (void);
void cgraph_optimize (void);
void cgraph_mark_needed_node (struct cgraph_node *);
@ -307,6 +308,7 @@ void cgraph_reset_static_var_maps (void);
void init_cgraph (void);
struct cgraph_node *cgraph_function_versioning (struct cgraph_node *,
varray_type, varray_type);
void cgraph_analyze_function (struct cgraph_node *);
struct cgraph_node *save_inline_function_body (struct cgraph_node *);
/* In ipa.c */

View File

@ -171,7 +171,6 @@ static void cgraph_expand_all_functions (void);
static void cgraph_mark_functions_to_output (void);
static void cgraph_expand_function (struct cgraph_node *);
static tree record_reference (tree *, int *, void *);
static void cgraph_analyze_function (struct cgraph_node *node);
/* Records tree nodes seen in record_reference. Simply using
walk_tree_without_duplicates doesn't guarantee each node is visited
@ -410,6 +409,29 @@ cgraph_reset_node (struct cgraph_node *node)
}
}
static void
cgraph_lower_function (struct cgraph_node *node)
{
if (node->lowered)
return;
tree_lowering_passes (node->decl);
node->lowered = true;
}
static void
cgraph_finalize_pending_functions (void)
{
struct cgraph_node *next, *node = cgraph_analyze_queue;
cgraph_analyze_queue = NULL;
for (; node ; node = next)
{
next = node->next_needed;
node->next_needed = NULL;
cgraph_finalize_function (node->decl, true);
}
}
/* DECL has been parsed. Take it, queue it, compile it at the whim of the
logic in effect. If NESTED is true, then our caller cannot stand to have
the garbage collector run at the moment. We would need to either create
@ -436,6 +458,7 @@ cgraph_finalize_function (tree decl, bool nested)
if (!flag_unit_at_a_time)
{
cgraph_analyze_function (node);
cgraph_finalize_pending_functions ();
cgraph_decide_inlining_incrementally (node, false);
}
@ -465,15 +488,6 @@ cgraph_finalize_function (tree decl, bool nested)
do_warn_unused_parameter (decl);
}
void
cgraph_lower_function (struct cgraph_node *node)
{
if (node->lowered)
return;
tree_lowering_passes (node->decl);
node->lowered = true;
}
/* Walk tree and record all calls. Called via walk_tree. */
static tree
record_reference (tree *tp, int *walk_subtrees, void *data)
@ -878,7 +892,7 @@ cgraph_output_pending_asms (void)
}
/* Analyze the function scheduled to be output. */
static void
void
cgraph_analyze_function (struct cgraph_node *node)
{
tree decl = node->decl;
@ -968,6 +982,7 @@ cgraph_finalize_compilation_unit (void)
gcc_assert (DECL_SAVED_TREE (decl));
cgraph_analyze_function (node);
cgraph_finalize_pending_functions ();
for (edge = node->callees; edge; edge = edge->next_callee)
if (!edge->callee->reachable)

View File

@ -834,4 +834,10 @@ void add_framework_path (char *);
#define WINT_TYPE "int"
/* Every program on darwin links against libSystem which contains the pthread
routines, so there's no need to explicitly call out when doing threaded
work. */
#undef GOMP_SELF_SPECS
#define GOMP_SELF_SPECS ""
#endif /* CONFIG_DARWIN_H */

View File

@ -203,5 +203,6 @@ extern void print_generic_decl (FILE *, tree, int);
extern void debug_generic_expr (tree);
extern void debug_generic_stmt (tree);
extern void debug_tree_chain (tree);
extern void debug_c_tree (tree);
#endif /* ! GCC_DIAGNOSTIC_H */

View File

@ -765,7 +765,7 @@ See S/390 and zSeries Options.
-fargument-noalias-global -fleading-underscore @gol
-ftls-model=@var{model} @gol
-ftrapv -fwrapv -fbounds-check @gol
-fvisibility}
-fvisibility -fopenmp}
@end table
@menu
@ -4701,6 +4701,15 @@ instrumentation (and therefore faster execution) and still provides
some protection against outright memory corrupting writes, but allows
erroneously read data to propagate within a program.
@item -fopenmp
@opindex fopenmp
@cindex openmp parallel
Enable handling of OpenMP directives @code{#pragma omp} in C/C++ and
@code{!$omp} in Fortran. When @option{-fopenmp} is specified, the
compiler generates parallel code according to the OpenMP Application
Program Interface v2.5. To generate the final exectuable, the runtime
library @code{libgomp} must be linked in using @option{-lgomp}.
@item -fstrength-reduce
@opindex fstrength-reduce
Perform the optimizations of loop strength reduction and

View File

@ -9015,7 +9015,6 @@ loc_descriptor_from_tree_1 (tree loc, int want_address)
{
dw_loc_descr_ref ret, ret1;
int have_address = 0;
int unsignedp = TYPE_UNSIGNED (TREE_TYPE (loc));
enum dwarf_location_atom op;
/* ??? Most of the time we do not take proper care for sign/zero
@ -9159,6 +9158,7 @@ loc_descriptor_from_tree_1 (tree loc, int want_address)
HOST_WIDE_INT bitsize, bitpos, bytepos;
enum machine_mode mode;
int volatilep;
int unsignedp = TYPE_UNSIGNED (TREE_TYPE (loc));
obj = get_inner_reference (loc, &bitsize, &bitpos, &offset, &mode,
&unsignedp, &volatilep, false);
@ -9257,7 +9257,7 @@ loc_descriptor_from_tree_1 (tree loc, int want_address)
goto do_binop;
case RSHIFT_EXPR:
op = (unsignedp ? DW_OP_shr : DW_OP_shra);
op = (TYPE_UNSIGNED (TREE_TYPE (loc)) ? DW_OP_shr : DW_OP_shra);
goto do_binop;
case PLUS_EXPR:

View File

@ -352,6 +352,7 @@ static const char *if_exists_spec_function (int, const char **);
static const char *if_exists_else_spec_function (int, const char **);
static const char *replace_outfile_spec_function (int, const char **);
static const char *version_compare_spec_function (int, const char **);
static const char *include_spec_function (int, const char **);
/* The Specs Language
@ -698,7 +699,8 @@ proper position among the other output files. */
%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
%(linker) %l " LINK_PIE_SPEC "%X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}\
%{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
%{static:} %{L*} %(mfwrap) %(link_libgcc) %o %(mflib)\
%{static:} %{L*} %(mfwrap) %{fopenmp:%:include(libgomp.spec)%(link_gomp)}\
%(link_libgcc) %o %(mflib)\
%{fprofile-arcs|fprofile-generate|coverage:-lgcov}\
%{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\
%{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} }}}}}}"
@ -737,6 +739,7 @@ static const char *link_spec = LINK_SPEC;
static const char *lib_spec = LIB_SPEC;
static const char *mfwrap_spec = MFWRAP_SPEC;
static const char *mflib_spec = MFLIB_SPEC;
static const char *link_gomp_spec = "";
static const char *libgcc_spec = LIBGCC_SPEC;
static const char *endfile_spec = ENDFILE_SPEC;
static const char *startfile_spec = STARTFILE_SPEC;
@ -835,7 +838,15 @@ static const char *const multilib_defaults_raw[] = MULTILIB_DEFAULTS;
#define DRIVER_SELF_SPECS ""
#endif
static const char *const driver_self_specs[] = { DRIVER_SELF_SPECS };
/* Adding -fopenmp should imply pthreads. This is particularly important
for targets that use different start files and suchlike. */
#ifndef GOMP_SELF_SPECS
#define GOMP_SELF_SPECS "%{fopenmp: -pthread}"
#endif
static const char *const driver_self_specs[] = {
DRIVER_SELF_SPECS, GOMP_SELF_SPECS
};
#ifndef OPTION_DEFAULT_SPECS
#define OPTION_DEFAULT_SPECS { "", "" }
@ -1534,6 +1545,7 @@ static struct spec_list static_specs[] =
INIT_STATIC_SPEC ("lib", &lib_spec),
INIT_STATIC_SPEC ("mfwrap", &mfwrap_spec),
INIT_STATIC_SPEC ("mflib", &mflib_spec),
INIT_STATIC_SPEC ("link_gomp", &link_gomp_spec),
INIT_STATIC_SPEC ("libgcc", &libgcc_spec),
INIT_STATIC_SPEC ("startfile", &startfile_spec),
INIT_STATIC_SPEC ("switches_need_spaces", &switches_need_spaces),
@ -1581,6 +1593,7 @@ static const struct spec_function static_spec_functions[] =
{ "if-exists-else", if_exists_else_spec_function },
{ "replace-outfile", replace_outfile_spec_function },
{ "version-compare", version_compare_spec_function },
{ "include", include_spec_function },
{ 0, 0 }
};
@ -3281,11 +3294,11 @@ process_command (int argc, const char **argv)
}
/* If there is a -V or -b option (or both), process it now, before
trying to interpret the rest of the command line.
trying to interpret the rest of the command line.
Use heuristic that all configuration names must have at least
one dash '-'. This allows us to pass options starting with -b. */
if (argc > 1 && argv[1][0] == '-'
&& (argv[1][1] == 'V' ||
&& (argv[1][1] == 'V' ||
((argv[1][1] == 'b') && (NULL != strchr(argv[1] + 2,'-')))))
{
const char *new_version = DEFAULT_TARGET_VERSION;
@ -5518,10 +5531,10 @@ input_suffix_matches (const char *atom, const char *end_atom)
&& input_suffix[end_atom - atom] == '\0');
}
/* Inline subroutine of handle_braces. Returns true if a switch
/* Subroutine of handle_braces. Returns true if a switch
matching the atom bracketed by ATOM and END_ATOM appeared on the
command line. */
static inline bool
static bool
switch_matches (const char *atom, const char *end_atom, int starred)
{
int i;
@ -6458,7 +6471,7 @@ main (int argc, char **argv)
if (combine_flag)
combine_inputs = true;
else
combine_inputs = false;
combine_inputs = false;
for (i = 0; (int) i < n_infiles; i++)
{
@ -6489,7 +6502,7 @@ main (int argc, char **argv)
infiles[i].compiled = false;
infiles[i].preprocessed = false;
}
if (!combine_inputs && have_c && have_o && lang_n_infiles > 1)
fatal ("cannot specify -o with -c or -S with multiple files");
@ -7780,3 +7793,22 @@ version_compare_spec_function (int argc, const char **argv)
return argv[nargs + 2];
}
/* %:include builtin spec function. This differs from %include in that it
can be nested inside a spec, and thus be conditionalized. It takes
one argument, the filename, and looks for it in the startfile path.
The result is always NULL, i.e. an empty expansion. */
static const char *
include_spec_function (int argc, const char **argv)
{
char *file;
if (argc != 1)
abort ();
file = find_a_file (&startfile_prefixes, argv[0], R_OK, 0);
read_specs (file ? file : argv[0], FALSE);
return NULL;
}

View File

@ -69,13 +69,12 @@ lower_function_body (void)
gcc_assert (TREE_CODE (bind) == BIND_EXPR);
memset (&data, 0, sizeof (data));
data.block = DECL_INITIAL (current_function_decl);
BLOCK_SUBBLOCKS (data.block) = NULL_TREE;
BLOCK_CHAIN (data.block) = NULL_TREE;
TREE_ASM_WRITTEN (data.block) = 1;
data.return_statements = NULL_TREE;
*body_p = alloc_stmt_list ();
i = tsi_start (*body_p);
tsi_link_after (&i, bind, TSI_NEW_STMT);
@ -196,11 +195,6 @@ lower_stmt (tree_stmt_iterator *tsi, struct lower_data *data)
break;
default:
#ifdef ENABLE_CHECKING
print_node_brief (stderr, "", stmt, 0);
internal_error ("unexpected node");
#endif
case COMPOUND_EXPR:
gcc_unreachable ();
}

File diff suppressed because it is too large Load Diff

View File

@ -185,6 +185,12 @@ hook_bool_tree_tree_false (tree a ATTRIBUTE_UNUSED, tree b ATTRIBUTE_UNUSED)
return false;
}
bool
hook_bool_tree_bool_false (tree a ATTRIBUTE_UNUSED, bool b ATTRIBUTE_UNUSED)
{
return false;
}
bool
hook_bool_rtx_false (rtx a ATTRIBUTE_UNUSED)
{
@ -256,6 +262,12 @@ hook_tree_tree_tree_bool_null (tree t0 ATTRIBUTE_UNUSED, tree t1 ATTRIBUTE_UNUSE
return NULL;
}
tree
hook_tree_tree_tree_null (tree t0 ATTRIBUTE_UNUSED, tree t1 ATTRIBUTE_UNUSED)
{
return NULL;
}
/* Generic hook that takes a rtx and returns a NULL string. */
const char *
hook_constcharptr_rtx_null (rtx r ATTRIBUTE_UNUSED)

View File

@ -40,6 +40,8 @@ extern bool hook_bool_uintp_uintp_false (unsigned int *, unsigned int *);
extern bool hook_bool_rtx_int_int_intp_false (rtx, int, int, int *);
extern bool hook_bool_constcharptr_size_t_false (const char *, size_t);
extern bool hook_bool_size_t_constcharptr_int_true (size_t, const char *, int);
extern bool hook_bool_tree_tree_false (tree, tree);
extern bool hook_bool_tree_bool_false (tree, bool);
extern void hook_void_void (void);
extern void hook_void_constcharptr (const char *);
@ -53,19 +55,20 @@ extern int hook_int_rtx_0 (rtx);
extern int hook_int_size_t_constcharptr_int_0 (size_t, const char *, int);
extern int hook_int_void_no_regs (void);
extern tree hook_tree_tree_tree_null (tree, tree);
extern tree hook_tree_tree_tree_tree_3rd_identity (tree, tree, tree);
extern tree hook_tree_tree_tree_bool_null (tree, tree, bool);
extern unsigned hook_uint_uint_constcharptrptr_0 (unsigned, const char **);
extern bool default_can_output_mi_thunk_no_vcall (tree, HOST_WIDE_INT,
HOST_WIDE_INT, tree);
extern bool hook_bool_tree_tree_false (tree, tree);
extern rtx hook_rtx_rtx_identity (rtx);
extern rtx hook_rtx_rtx_null (rtx);
extern rtx hook_rtx_tree_int_null (tree, int);
extern tree hook_tree_tree_tree_tree_3rd_identity (tree, tree, tree);
extern const char *hook_constcharptr_tree_null (tree);
extern tree hook_tree_tree_tree_bool_null (tree, tree, bool);
extern const char *hook_constcharptr_rtx_null (rtx);
extern const char *hook_constcharptr_tree_tree_null (tree, tree);
extern const char *hook_constcharptr_int_tree_null (int, tree);

View File

@ -88,6 +88,11 @@ extern tree lhd_callgraph_analyze_expr (tree *, int *, tree);
/* Declarations for tree gimplification hooks. */
extern int lhd_gimplify_expr (tree *, tree *, tree *);
extern enum omp_clause_default_kind lhd_omp_predetermined_sharing (tree);
extern tree lhd_omp_assignment (tree, tree, tree);
struct gimplify_omp_ctx;
extern void lhd_omp_firstprivatize_type_sizes (struct gimplify_omp_ctx *,
tree);
#define LANG_HOOKS_NAME "GNU unknown"
#define LANG_HOOKS_IDENTIFIER_SIZE sizeof (struct lang_identifier)
@ -213,6 +218,8 @@ extern tree lhd_make_node (enum tree_code);
#define LANG_HOOKS_TYPE_PROMOTES_TO lhd_type_promotes_to
#define LANG_HOOKS_REGISTER_BUILTIN_TYPE lhd_register_builtin_type
#define LANG_HOOKS_TYPE_MAX_SIZE lhd_return_null_tree
#define LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES \
lhd_omp_firstprivatize_type_sizes
#define LANG_HOOKS_HASH_TYPES true
#define LANG_HOOKS_FOR_TYPES_INITIALIZER { \
@ -226,6 +233,7 @@ extern tree lhd_make_node (enum tree_code);
LANG_HOOKS_REGISTER_BUILTIN_TYPE, \
LANG_HOOKS_INCOMPLETE_TYPE_ERROR, \
LANG_HOOKS_TYPE_MAX_SIZE, \
LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES, \
LANG_HOOKS_HASH_TYPES \
}
@ -239,6 +247,14 @@ extern tree lhd_make_node (enum tree_code);
#define LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE NULL
#define LANG_HOOKS_DECL_OK_FOR_SIBCALL lhd_decl_ok_for_sibcall
#define LANG_HOOKS_COMDAT_GROUP lhd_comdat_group
#define LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE hook_bool_tree_false
#define LANG_HOOKS_OMP_PREDETERMINED_SHARING lhd_omp_predetermined_sharing
#define LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR hook_bool_tree_bool_false
#define LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE hook_bool_tree_bool_false
#define LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR hook_tree_tree_tree_null
#define LANG_HOOKS_OMP_CLAUSE_COPY_CTOR lhd_omp_assignment
#define LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP lhd_omp_assignment
#define LANG_HOOKS_OMP_CLAUSE_DTOR hook_tree_tree_tree_null
#define LANG_HOOKS_DECLS { \
LANG_HOOKS_GLOBAL_BINDINGS_P, \
@ -249,7 +265,15 @@ extern tree lhd_make_node (enum tree_code);
LANG_HOOKS_WRITE_GLOBALS, \
LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE, \
LANG_HOOKS_DECL_OK_FOR_SIBCALL, \
LANG_HOOKS_COMDAT_GROUP \
LANG_HOOKS_COMDAT_GROUP, \
LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE, \
LANG_HOOKS_OMP_PREDETERMINED_SHARING, \
LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR, \
LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE, \
LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR, \
LANG_HOOKS_OMP_CLAUSE_COPY_CTOR, \
LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, \
LANG_HOOKS_OMP_CLAUSE_DTOR \
}
/* The whole thing. The structure is defined in langhooks.h. */

View File

@ -550,3 +550,31 @@ lhd_expr_to_decl (tree expr, bool *tc ATTRIBUTE_UNUSED,
{
return expr;
}
/* Return sharing kind if OpenMP sharing attribute of DECL is
predetermined, OMP_CLAUSE_DEFAULT_UNSPECIFIED otherwise. */
enum omp_clause_default_kind
lhd_omp_predetermined_sharing (tree decl ATTRIBUTE_UNUSED)
{
if (DECL_ARTIFICIAL (decl))
return OMP_CLAUSE_DEFAULT_SHARED;
return OMP_CLAUSE_DEFAULT_UNSPECIFIED;
}
/* Generate code to copy SRC to DST. */
tree
lhd_omp_assignment (tree clause ATTRIBUTE_UNUSED, tree dst, tree src)
{
return build2 (MODIFY_EXPR, void_type_node, dst, src);
}
/* Register language specific type size variables as potentially OpenMP
firstprivate variables. */
void
lhd_omp_firstprivatize_type_sizes (struct gimplify_omp_ctx *c ATTRIBUTE_UNUSED,
tree t ATTRIBUTE_UNUSED)
{
}

View File

@ -25,6 +25,8 @@ Boston, MA 02110-1301, USA. */
struct diagnostic_context;
struct gimplify_omp_ctx;
/* A print hook for print_tree (). */
typedef void (*lang_print_tree_hook) (FILE *, tree, int indent);
@ -142,6 +144,10 @@ struct lang_hooks_for_types
for a type. */
tree (*max_size) (tree);
/* Register language specific type size variables as potentially OpenMP
firstprivate variables. */
void (*omp_firstprivatize_type_sizes) (struct gimplify_omp_ctx *, tree);
/* Nonzero if types that are identical are to be hashed so that only
one copy is kept. If a language requires unique types for each
user-specified type, such as Ada, this should be set to TRUE. */
@ -192,6 +198,38 @@ struct lang_hooks_for_decls
value will be the string already stored in an
IDENTIFIER_NODE.) */
const char * (*comdat_group) (tree);
/* True if OpenMP should privatize what this DECL points to rather
than the DECL itself. */
bool (*omp_privatize_by_reference) (tree);
/* Return sharing kind if OpenMP sharing attribute of DECL is
predetermined, OMP_CLAUSE_DEFAULT_UNSPECIFIED otherwise. */
enum omp_clause_default_kind (*omp_predetermined_sharing) (tree);
/* Return true if DECL's DECL_VALUE_EXPR (if any) should be
disregarded in OpenMP construct, because it is going to be
remapped during OpenMP lowering. SHARED is true if DECL
is going to be shared, false if it is going to be privatized. */
bool (*omp_disregard_value_expr) (tree, bool);
/* Return true if DECL that is shared iff SHARED is true should
be put into OMP_CLAUSE_PRIVATE_DEBUG. */
bool (*omp_private_debug_clause) (tree, bool);
/* Build and return code for a default constructor for DECL in
response to CLAUSE. Return NULL if nothing to be done. */
tree (*omp_clause_default_ctor) (tree clause, tree decl);
/* Build and return code for a copy constructor from SRC to DST. */
tree (*omp_clause_copy_ctor) (tree clause, tree dst, tree src);
/* Similarly, except use an assignment operator instead. */
tree (*omp_clause_assign_op) (tree clause, tree dst, tree src);
/* Build and return code destructing DECL. Return NULL if nothing
to be done. */
tree (*omp_clause_dtor) (tree clause, tree decl);
};
/* Language-specific hooks. See langhooks-def.h for defaults. */

152
gcc/omp-builtins.def Normal file
View File

@ -0,0 +1,152 @@
/* This file contains the definitions and documentation for the
OpenMP builtins used in the GNU compiler.
Copyright (C) 2005 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 2, 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 COPYING. If not, write to the Free
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
/* Before including this file, you should define a macro:
DEF_GOMP_BUILTIN (ENUM, NAME, TYPE, ATTRS)
See builtins.def for details. */
DEF_GOMP_BUILTIN (BUILT_IN_OMP_GET_THREAD_NUM, "omp_get_thread_num",
BT_FN_INT, ATTR_CONST_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_OMP_GET_NUM_THREADS, "omp_get_num_threads",
BT_FN_INT, ATTR_CONST_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_ATOMIC_START, "GOMP_atomic_start",
BT_FN_VOID, ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_ATOMIC_END, "GOMP_atomic_end",
BT_FN_VOID, ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_BARRIER, "GOMP_barrier",
BT_FN_VOID, ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_CRITICAL_START, "GOMP_critical_start",
BT_FN_VOID, ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_CRITICAL_END, "GOMP_critical_end",
BT_FN_VOID, ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_CRITICAL_NAME_START,
"GOMP_critical_name_start",
BT_FN_VOID_PTRPTR, ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_CRITICAL_NAME_END,
"GOMP_critical_name_end",
BT_FN_VOID_PTRPTR, ATTR_NOTHROW_LIST)
/* NOTE: Do not change the order of BUILT_IN_GOMP_LOOP_*_START. They
are used in index arithmetic with enum omp_clause_schedule_kind
in omp-low.c. */
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_STATIC_START,
"GOMP_loop_static_start",
BT_FN_BOOL_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR,
ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_DYNAMIC_START,
"GOMP_loop_dynamic_start",
BT_FN_BOOL_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR,
ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_GUIDED_START,
"GOMP_loop_guided_start",
BT_FN_BOOL_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR,
ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_RUNTIME_START,
"GOMP_loop_runtime_start",
BT_FN_BOOL_LONG_LONG_LONG_LONGPTR_LONGPTR,
ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_ORDERED_STATIC_START,
"GOMP_loop_ordered_static_start",
BT_FN_BOOL_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR,
ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_ORDERED_DYNAMIC_START,
"GOMP_loop_ordered_dynamic_start",
BT_FN_BOOL_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR,
ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_ORDERED_GUIDED_START,
"GOMP_loop_ordered_guided_start",
BT_FN_BOOL_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR,
ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_ORDERED_RUNTIME_START,
"GOMP_loop_ordered_runtime_start",
BT_FN_BOOL_LONG_LONG_LONG_LONGPTR_LONGPTR,
ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_STATIC_NEXT, "GOMP_loop_static_next",
BT_FN_BOOL_LONGPTR_LONGPTR, ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_DYNAMIC_NEXT, "GOMP_loop_dynamic_next",
BT_FN_BOOL_LONGPTR_LONGPTR, ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_GUIDED_NEXT, "GOMP_loop_guided_next",
BT_FN_BOOL_LONGPTR_LONGPTR, ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_RUNTIME_NEXT, "GOMP_loop_runtime_next",
BT_FN_BOOL_LONGPTR_LONGPTR, ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_ORDERED_STATIC_NEXT,
"GOMP_loop_ordered_static_next",
BT_FN_BOOL_LONGPTR_LONGPTR, ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_ORDERED_DYNAMIC_NEXT,
"GOMP_loop_ordered_dynamic_next",
BT_FN_BOOL_LONGPTR_LONGPTR, ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_ORDERED_GUIDED_NEXT,
"GOMP_loop_ordered_guided_next",
BT_FN_BOOL_LONGPTR_LONGPTR, ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_ORDERED_RUNTIME_NEXT,
"GOMP_loop_ordered_runtime_next",
BT_FN_BOOL_LONGPTR_LONGPTR, ATTR_NOTHROW_LIST)
/* NOTE: Do not change the order of BUILT_IN_GOMP_PARALLEL_LOOP_*_START.
They are used in index arithmetic with enum omp_clause_schedule_kind
in omp-low.c. */
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_PARALLEL_LOOP_STATIC_START,
"GOMP_parallel_loop_static_start",
BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG,
ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_PARALLEL_LOOP_DYNAMIC_START,
"GOMP_parallel_loop_dynamic_start",
BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG,
ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_PARALLEL_LOOP_GUIDED_START,
"GOMP_parallel_loop_guided_start",
BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG,
ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_PARALLEL_LOOP_RUNTIME_START,
"GOMP_parallel_loop_runtime_start",
BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG,
ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_END, "GOMP_loop_end",
BT_FN_VOID, ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_END_NOWAIT, "GOMP_loop_end_nowait",
BT_FN_VOID, ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_ORDERED_START, "GOMP_ordered_start",
BT_FN_VOID, ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_ORDERED_END, "GOMP_ordered_end",
BT_FN_VOID, ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_PARALLEL_START, "GOMP_parallel_start",
BT_FN_VOID_OMPFN_PTR_UINT, ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_PARALLEL_END, "GOMP_parallel_end",
BT_FN_VOID, ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_SECTIONS_START, "GOMP_sections_start",
BT_FN_UINT_UINT, ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_SECTIONS_NEXT, "GOMP_sections_next",
BT_FN_UINT, ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_PARALLEL_SECTIONS_START,
"GOMP_parallel_sections_start",
BT_FN_VOID_OMPFN_PTR_UINT_UINT, ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_SECTIONS_END, "GOMP_sections_end",
BT_FN_VOID, ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_SECTIONS_END_NOWAIT,
"GOMP_sections_end_nowait",
BT_FN_VOID, ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_SINGLE_START, "GOMP_single_start",
BT_FN_BOOL, ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_SINGLE_COPY_START, "GOMP_single_copy_start",
BT_FN_PTR, ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_SINGLE_COPY_END, "GOMP_single_copy_end",
BT_FN_VOID_PTR, ATTR_NOTHROW_LIST)

3309
gcc/omp-low.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -462,6 +462,7 @@ init_optimization_passes (void)
p = &all_lowering_passes;
NEXT_PASS (pass_remove_useless_stmts);
NEXT_PASS (pass_mudflap_1);
NEXT_PASS (pass_lower_omp);
NEXT_PASS (pass_lower_cf);
NEXT_PASS (pass_lower_eh);
NEXT_PASS (pass_build_cfg);

View File

@ -506,6 +506,10 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
(void *) DECL_STRUCT_FUNCTION (node));
}
if ((TREE_CODE (node) == VAR_DECL || TREE_CODE (node) == PARM_DECL)
&& DECL_HAS_VALUE_EXPR_P (node))
print_node (file, "value-expr", DECL_VALUE_EXPR (node), indent + 4);
/* Print the decl chain only if decl is at second level. */
if (indent == 4)
print_node (file, "chain", TREE_CHAIN (node), indent + 4);

View File

@ -1,3 +1,11 @@
2006-01-18 Richard Henderson <rth@redhat.com>
Aldy Hernandez <aldyh@redhat.com>
Jakub Jelinek <jakub@redhat.com>
Diego Novillo <dnovillo@redhat.com>
Uros Bizjak <uros@kss-loka.si>
* testsuite/gcc.dg/gomp: New directory.
2006-01-18 Paul Thomas <pault@gcc.gnu.org>
Steven G. Kargl <kargls@comcast.net>

View File

@ -0,0 +1,10 @@
/* { dg-do compile } */
void
a1 (int n, float *a, float *b)
{
int i;
#pragma omp parallel for
for (i = 1; i < n; i++) /* i is private by default */
b[i] = (a[i] + a[i - 1]) / 2.0;
}

View File

@ -0,0 +1,27 @@
/* { dg-do compile } */
#include <stdio.h>
void
work1 ()
{
}
void
work2 ()
{
}
void
a10 ()
{
#pragma omp parallel
{
#pragma omp single
printf ("Beginning work1.\n");
work1 ();
#pragma omp single
printf ("Finishing work1.\n");
#pragma omp single nowait
printf ("Finished work1 and beginning work2.\n");
work2 ();
}
}

View File

@ -0,0 +1,41 @@
/* { dg-do compile } */
#include <stdio.h>
extern float average (float, float, float);
void
a12 (float *x, float *xold, int n, float tol)
{
int c, i, toobig;
float error, y;
c = 0;
#pragma omp parallel
{
do
{
#pragma omp for private(i)
for (i = 1; i < n - 1; ++i)
{
xold[i] = x[i];
}
#pragma omp single
{
toobig = 0;
}
#pragma omp for private(i,y,error) reduction(+:toobig)
for (i = 1; i < n - 1; ++i)
{
y = x[i];
x[i] = average (xold[i - 1], x[i], xold[i + 1]);
error = y - x[i];
if (error > tol || error < -tol)
++toobig;
}
#pragma omp master
{
++c;
printf ("iteration %d, toobig=%d\n", c, toobig);
}
}
while (toobig > 0);
}
}

View File

@ -0,0 +1,18 @@
/* { dg-do compile } */
int dequeue (float *a);
void work (int i, float *a);
void
a13 (float *x, float *y)
{
int ix_next, iy_next;
#pragma omp parallel shared(x, y) private(ix_next, iy_next)
{
#pragma omp critical (xaxis)
ix_next = dequeue (x);
work (ix_next, x);
#pragma omp critical (yaxis)
iy_next = dequeue (y);
work (iy_next, y);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
void
a14 ()
{
int i = 1;
#pragma omp parallel sections
{
#pragma omp section
{
#pragma omp critical (name)
{
#pragma omp parallel
{
#pragma omp single
{
i++;
}
}
}
}
}
}

View File

@ -0,0 +1,20 @@
/* { dg-do compile } */
void
a17_1_wrong ()
{
union
{
int n;
float x;
} u;
#pragma omp parallel
{
#pragma omp atomic
u.n++;
#pragma omp atomic
u.x += 1.0;
/* Incorrect because the atomic constructs reference the same location
through incompatible types */
}
}

View File

@ -0,0 +1,20 @@
/* { dg-do compile } */
void
a17_2_wrong ()
{
int x;
int *i;
float *r;
i = &x;
r = (float *) &x;
#pragma omp parallel
{
#pragma omp atomic
*i += 1;
#pragma omp atomic
*r += 1.0;
/* Incorrect because the atomic constructs reference the same location
through incompatible types */
}
}

View File

@ -0,0 +1,18 @@
/* { dg-do compile } */
void
a20_wrong ()
{
int a = 1;
#pragma omp parallel
{
if (a != 0)
#pragma omp flush(a) /* { dg-error "'#pragma omp flush' may only" } */
/* incorrect as flush cannot be immediate substatement
of if statement */
if (a != 0)
#pragma omp barrier /* { dg-error "'#pragma omp barrier' may only" } */
/* incorrect as barrier cannot be immediate substatement
of if statement */
}
}

View File

@ -0,0 +1,18 @@
/* { dg-do compile } */
void
a20 ()
{
int a = 1;
#pragma omp parallel
{
if (a != 0)
{
#pragma omp flush(a)
}
if (a != 0)
{
#pragma omp barrier
}
}
}

View File

@ -0,0 +1,22 @@
/* { dg-do compile } */
void
work (int i)
{
}
void
a21_wrong (int n)
{
int i;
#pragma omp for ordered
for (i = 0; i < n; i++)
{
/* incorrect because an iteration may not execute more than one
ordered region */
#pragma omp ordered
work (i);
#pragma omp ordered
work (i + 1);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
void work (int);
void
a21_good (int n)
{
int i;
#pragma omp for ordered
for (i = 0; i < n; i++)
{
if (i <= 10)
{
#pragma omp ordered
work (i);
}
if (i > 10)
{
#pragma omp ordered
work (i + 1);
}
}
}

View File

@ -0,0 +1,11 @@
/* { dg-do compile } */
/* { dg-require-effective-target tls } */
int counter = 0;
#pragma omp threadprivate(counter)
int
increment_counter ()
{
counter++;
return (counter);
}

View File

@ -0,0 +1,11 @@
/* { dg-do compile } */
/* { dg-require-effective-target tls } */
int
increment_counter_2 ()
{
static int counter = 0;
#pragma omp threadprivate(counter)
counter++;
return (counter);
}

View File

@ -0,0 +1,35 @@
/* { dg-do compile } */
/* { dg-require-effective-target tls } */
extern int omp_get_num_threads (void);
int x, y, t, z[1000];
#pragma omp threadprivate(x)
void
a24 (int a)
{
const int c = 1;
int i = 0;
int l = 0;
#pragma omp parallel default(none) private(a) shared(z)
{
int j = omp_get_num_threads ();
/* O.K. - j is declared within parallel region */
/* O.K. - a is listed in private clause */
/* - z is listed in shared clause */
x = c; /* O.K. - x is threadprivate */
/* - c has const-qualified type */
z[i] = y;
/* { dg-error "'i' not specified" "" { target *-*-* } 21 } */
/* { dg-error "enclosing parallel" "" { target *-*-* } 13 } */
/* { dg-error "'y' not specified" "" { target *-*-* } 21 } */
#pragma omp for firstprivate(y)
for (i = 0; i < 10; i++)
{
z[i] = y; /* O.K. - i is the loop iteration variable */
/* - y is listed in firstprivate clause */
}
z[l] = t;
/* { dg-error "'l' not specified" "" { target *-*-* } 31 } */
/* { dg-error "'t' not specified" "" { target *-*-* } 31 } */
}
}

View File

@ -0,0 +1,21 @@
/* { dg-do compile } */
/* { dg-options "-fopenmp -std=c99" } */
int a;
void
g (int k)
{
a = k; /* The global "a", not the private "a" in f */
}
void
f (int n)
{
int a = 0;
#pragma omp parallel for private(a)
for (int i = 1; i < n; i++)
{
a = i;
g (a * 2); /* Private copy of "a" */
}
}

View File

@ -0,0 +1,15 @@
/* { dg-do compile } */
void
a27 ()
{
int i, a;
#pragma omp parallel private(a)
{
#pragma omp parallel for private(a)
for (i = 0; i < 10; i++)
{
/* do work here */
}
}
}

View File

@ -0,0 +1,14 @@
/* { dg-do compile } */
void
a30 (int n, float *a, float *b)
{
int i;
#pragma omp parallel
{
#pragma omp for lastprivate(i)
for (i = 0; i < n - 1; i++)
a[i] = b[i] + b[i + 1];
}
a[i] = b[i]; /* i == n-1 here */
}

View File

@ -0,0 +1,17 @@
/* { dg-do compile } */
void
a31_1 (float *x, int *y, int n)
{
int i, b;
float a;
a = 0.0;
b = 0;
#pragma omp parallel for private(i) shared(x, y, n) \
reduction(+:a) reduction(^:b)
for (i = 0; i < n; i++)
{
a += x[i];
b ^= y[i];
}
}

View File

@ -0,0 +1,27 @@
/* { dg-do compile } */
void
a31_2 (float *x, int *y, int n)
{
int i, b, b_p;
float a, a_p;
a = 0.0;
b = 0;
#pragma omp parallel shared(a, b, x, y, n) \
private(a_p, b_p)
{
a_p = 0.0;
b_p = 0;
#pragma omp for private(i)
for (i = 0; i < n; i++)
{
a_p += x[i];
b_p ^= y[i];
}
#pragma omp critical
{
a += a_p;
b ^= b_p;
}
}
}

View File

@ -0,0 +1,27 @@
/* { dg-do compile } */
/* { dg-require-effective-target tls } */
#include <stdlib.h>
float *work;
int size;
float tol;
void build (void);
#pragma omp threadprivate(work,size,tol)
void
a32 (float t, int n)
{
tol = t;
size = n;
#pragma omp parallel copyin(tol,size)
{
build ();
}
}
void
build ()
{
int i;
work = (float *) malloc (sizeof (float) * size);
for (i = 0; i < size; ++i)
work[i] = tol;
}

View File

@ -0,0 +1,14 @@
/* { dg-do compile } */
/* { dg-require-effective-target tls } */
#include <stdio.h>
float x, y;
#pragma omp threadprivate(x, y)
void
init (float a, float b)
{
#pragma omp single copyprivate(a,b,x,y)
{
scanf ("%f %f %f %f", &a, &b, &x, &y);
}
}

View File

@ -0,0 +1,26 @@
/* { dg-do compile } */
#include <stdio.h>
#include <stdlib.h>
float
read_next ()
{
float *tmp;
float return_val;
#pragma omp single copyprivate(tmp)
{
tmp = (float *) malloc (sizeof (float));
} /* copies the pointer only */
#pragma omp master
{
scanf ("%f", tmp);
}
#pragma omp barrier
return_val = *tmp;
#pragma omp barrier
#pragma omp single nowait
{
free (tmp);
}
return return_val;
}

View File

@ -0,0 +1,25 @@
/* { dg-do compile } */
void
work (int i, int j)
{
}
void
good_nesting (int n)
{
int i, j;
#pragma omp parallel default(shared)
{
#pragma omp for
for (i = 0; i < n; i++)
{
#pragma omp parallel shared(i, n)
{
#pragma omp for
for (j = 0; j < n; j++)
work (i, j);
}
}
}
}

View File

@ -0,0 +1,29 @@
/* { dg-do compile } */
void
work (int i, int j)
{
}
void
work1 (int i, int n)
{
int j;
#pragma omp parallel default(shared)
{
#pragma omp for
for (j = 0; j < n; j++)
work (i, j);
}
}
void
good_nesting2 (int n)
{
int i;
#pragma omp parallel default(shared)
{
#pragma omp for
for (i = 0; i < n; i++)
work1 (i, n);
}
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
void
work (int i, int j)
{
}
void
wrong1 (int n)
{
#pragma omp parallel default(shared)
{
int i, j;
#pragma omp for
for (i = 0; i < n; i++)
{
/* incorrect nesting of loop regions */
#pragma omp for
for (j = 0; j < n; j++)
work (i, j);
}
}
}

View File

@ -0,0 +1,25 @@
/* { dg-do compile } */
void work (int, int);
void
work1 (int i, int n)
{
int j;
/* incorrect nesting of loop regions */
#pragma omp for
for (j = 0; j < n; j++)
work (i, j);
}
void
wrong2 (int n)
{
#pragma omp parallel default(shared)
{
int i;
#pragma omp for
for (i = 0; i < n; i++)
work1 (i, n);
}
}

View File

@ -0,0 +1,19 @@
/* { dg-do compile } */
void work (int, int);
void
wrong3 (int n)
{
#pragma omp parallel default(shared)
{
int i;
#pragma omp for
for (i = 0; i < n; i++)
{
/* incorrect nesting of regions */
#pragma omp single
work (i, 0);
}
}
}

View File

@ -0,0 +1,18 @@
/* { dg-do compile } */
void
wrong4 (int n)
{
#pragma omp parallel default(shared)
{
int i;
#pragma omp for
for (i = 0; i < n; i++)
{
work (i, 0);
/* incorrect nesting of barrier region in a loop region */
#pragma omp barrier
work (i, 1);
}
}
}

View File

@ -0,0 +1,16 @@
/* { dg-do compile } */
void
wrong5 (int n)
{
#pragma omp parallel
{
#pragma omp critical
{
work (n, 0);
/* incorrect nesting of barrier region in a critical region */
#pragma omp barrier
work (n, 1);
}
}
}

View File

@ -0,0 +1,16 @@
/* { dg-do compile } */
void
wrong6 (int n)
{
#pragma omp parallel
{
#pragma omp single
{
work (n, 0);
/* incorrect nesting of barrier region in a single region */
#pragma omp barrier
work (n, 1);
}
}
}

View File

@ -0,0 +1,13 @@
/* { dg-do compile } */
extern int omp_get_num_threads (void);
void work (int i);
void
incorrect ()
{
int np, i;
np = omp_get_num_threads (); /* misplaced */
#pragma omp parallel for schedule(static)
for (i = 0; i < np; i++)
work (i);
}

View File

@ -0,0 +1,14 @@
/* { dg-do compile } */
extern int omp_get_thread_num (void);
void work (int i);
void
correct ()
{
int i;
#pragma omp parallel private(i)
{
i = omp_get_thread_num ();
work (i);
}
}

View File

@ -0,0 +1,17 @@
/* { dg-do compile } */
#include <math.h>
void
a8 (int n, int m, float *a, float *b, float *y, float *z)
{
int i;
#pragma omp parallel
{
#pragma omp for nowait
for (i = 1; i < n; i++)
b[i] = (a[i] + a[i - 1]) / 2.0;
#pragma omp for nowait
for (i = 0; i < m; i++)
y[i] = sqrt (z[i]);
}
}

View File

@ -0,0 +1,18 @@
/* { dg-do compile } */
void XAXIS ();
void YAXIS ();
void ZAXIS ();
void
a9 ()
{
#pragma omp parallel sections
{
#pragma omp section
XAXIS ();
#pragma omp section
YAXIS ();
#pragma omp section
ZAXIS ();
}
}

View File

@ -0,0 +1,99 @@
/* { dg-do compile } */
int x;
volatile int y;
volatile unsigned char z;
void f1(void)
{
#pragma omp atomic
x++;
#pragma omp atomic
x--;
#pragma omp atomic
++x;
#pragma omp atomic
--x;
#pragma omp atomic
x += 1;
#pragma omp atomic
x -= y;
#pragma omp atomic
x |= 1;
#pragma omp atomic
x &= 1;
#pragma omp atomic
x ^= 1;
#pragma omp atomic
x *= 3;
#pragma omp atomic
x /= 3;
#pragma omp atomic
x /= 3;
#pragma omp atomic
x <<= 3;
#pragma omp atomic
x >>= 3;
}
void f2(void)
{
#pragma omp atomic
y++;
#pragma omp atomic
y--;
#pragma omp atomic
++y;
#pragma omp atomic
--y;
#pragma omp atomic
y += 1;
#pragma omp atomic
y -= x;
#pragma omp atomic
y |= 1;
#pragma omp atomic
y &= 1;
#pragma omp atomic
y ^= 1;
#pragma omp atomic
y *= 3;
#pragma omp atomic
y /= 3;
#pragma omp atomic
y /= 3;
#pragma omp atomic
y <<= 3;
#pragma omp atomic
y >>= 3;
}
void f3(void)
{
#pragma omp atomic
z++;
#pragma omp atomic
z--;
#pragma omp atomic
++z;
#pragma omp atomic
--z;
#pragma omp atomic
z += 1;
#pragma omp atomic
z |= 1;
#pragma omp atomic
z &= 1;
#pragma omp atomic
z ^= 1;
#pragma omp atomic
z *= 3;
#pragma omp atomic
z /= 3;
#pragma omp atomic
z /= 3;
#pragma omp atomic
z <<= 3;
#pragma omp atomic
z >>= 3;
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
float x, y;
void f1(void)
{
#pragma omp atomic
x++;
#pragma omp atomic
x--;
#pragma omp atomic
++x;
#pragma omp atomic
--x;
#pragma omp atomic
x += 1;
#pragma omp atomic
x -= y;
#pragma omp atomic
x *= 3;
#pragma omp atomic
x /= 3;
}

View File

@ -0,0 +1,13 @@
/* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-gimple" } */
int *xyzzy;
void f1(void)
{
#pragma omp atomic
xyzzy++;
}
/* { dg-final { scan-tree-dump-times "xyzzy, 4" 1 "gimple" { target i?86-*-* x86_64-*-* ia64-*-* powerpc*-*-* alpha*-*-* } } } */
/* { dg-final { cleanup-tree-dump "gimple" } } */

View File

@ -0,0 +1,24 @@
/* { dg-do compile } */
int a[4];
int *p;
struct S { int x; int y[4]; } s;
int *bar(void);
void f1(void)
{
#pragma omp atomic
a[4] += 1;
#pragma omp atomic
*p += 1;
#pragma omp atomic
s.x += 1;
#pragma omp atomic
s.y[*p] += 1;
#pragma omp atomic
s.y[*p] *= 42;
#pragma omp atomic
*bar() += 1;
#pragma omp atomic
*bar() *= 42;
}

View File

@ -0,0 +1,38 @@
/* { dg-do compile } */
int x;
const int y;
int bar(void);
void f1(void)
{
register int z;
#pragma omp atomic
x %= 2; /* { dg-error "invalid operator" } */
#pragma omp atomic
x = x + 1; /* { dg-error "invalid operator" } */
#pragma omp atomic
x = 1; /* { dg-error "invalid operator" } */
#pragma omp atomic
++y; /* { dg-error "read-only variable" } */
#pragma omp atomic
y--; /* { dg-error "read-only variable" } */
#pragma omp atomic
y += 1; /* { dg-error "read-only variable" } */
#pragma omp atomic
z += 1; /* { dg-error "register variable" } */
#pragma omp atomic
bar(); /* { dg-error "invalid operator" } */
#pragma omp atomic
bar() += 1; /* { dg-error "lvalue required" } */
#pragma omp atomic a /* { dg-error "expected end of line" } */
x++;
#pragma omp atomic
; /* { dg-error "expected expression" } */
#pragma omp atomic
#pragma omp atomic /* { dg-error "expected expression" } */
;
/* Check that we didn't get stuck on the pragma eol marker. */
undef; /* { dg-error "" } */
}

View File

@ -0,0 +1,10 @@
/* { dg-do compile } */
int x[10], z;
double y[10];
void f1(void)
{
#pragma omp atomic
x[z] /= y[z];
}

View File

@ -0,0 +1,23 @@
/* { dg-do compile } */
double x, y;
void f2(void)
{
#pragma omp atomic
y++;
#pragma omp atomic
y--;
#pragma omp atomic
++y;
#pragma omp atomic
--y;
#pragma omp atomic
y += 1;
#pragma omp atomic
y -= x;
#pragma omp atomic
y *= 3;
#pragma omp atomic
y /= 3;
}

View File

@ -0,0 +1,21 @@
/* { dg-do compile } */
long double z;
void f3(void)
{
#pragma omp atomic
z++;
#pragma omp atomic
z--;
#pragma omp atomic
++z;
#pragma omp atomic
--z;
#pragma omp atomic
z += 1;
#pragma omp atomic
z *= 3;
#pragma omp atomic
z /= 3;
}

View File

@ -0,0 +1,13 @@
/* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-gimple" } */
volatile int *bar(void);
void f1(void)
{
#pragma omp atomic
*bar() += 1;
}
/* { dg-final { scan-tree-dump-times "__sync_fetch_and_add" 1 "gimple" { target i?86-*-* x86_64-*-* ia64-*-* powerpc*-*-* alpha*-*-* } } } */
/* { dg-final { cleanup-tree-dump "gimple" } } */

View File

@ -0,0 +1,18 @@
/* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-gimple" } */
void f1(void)
{
#pragma omp barrier
}
void f2(_Bool p)
{
if (p)
{
#pragma omp barrier
}
}
/* { dg-final { scan-tree-dump-times "GOMP_barrier" 2 "gimple" } } */
/* { dg-final { cleanup-tree-dump "gimple" } } */

View File

@ -0,0 +1,26 @@
/* { dg-do compile } */
void f1(void)
{
#pragma omp barrier a /* { dg-error "expected end of line" } */
}
/* OpenMP 2.5, section 2.7.3:
Note that because the barrier construct does not have a C language
statement as part of its syntax, there are some restrictions on its
placement within a program. The barrier directive may only be placed
in the program at a position where ignoring or deleting the directive
would result in a program with correct syntax. */
void f2(void)
{
label:
#pragma omp barrier
} /* { dg-error "label at end of compound statement" } */
void f3(_Bool p)
{
if (p)
#pragma omp barrier /* { dg-error "compound statements" } */
}

View File

@ -0,0 +1,22 @@
// { dg-do compile }
void foo()
{
bad1:
#pragma omp parallel
goto bad1; // { dg-error "invalid exit" }
goto bad2; // { dg-error "invalid entry" }
#pragma omp parallel
{
bad2: ;
}
#pragma omp parallel
{
int i;
goto ok1;
for (i = 0; i < 10; ++i)
{ ok1: break; }
}
}

View File

@ -0,0 +1,40 @@
// { dg-do compile }
void foo(int i)
{
int j;
switch (i) // { dg-error "invalid entry" }
{
#pragma omp parallel
{ case 0:; }
}
switch (i) // { dg-error "invalid entry" }
{
#pragma omp for
for (j = 0; j < 10; ++ j)
{ case 1:; }
}
switch (i) // { dg-error "invalid entry" }
{
#pragma omp critical
{ case 2:; }
}
switch (i) // { dg-error "invalid entry" }
{
#pragma omp master
{ case 3:; }
}
switch (i) // { dg-error "invalid entry" }
{
#pragma omp sections
{ case 4:;
#pragma omp section
{ case 5:; }
}
}
switch (i) // { dg-error "invalid entry" }
{
#pragma omp ordered
{ default:; }
}
}

View File

@ -0,0 +1,19 @@
/* PR c++/24516 */
/* { dg-do compile } */
void
bar (int *p)
{
int m;
#pragma omp parallel for
for (m = 0; m < 1000; ++m)
switch (p[m])
{
case 1:
p[m] = 2;
break;
default:
p[m] = 3;
break;
}
}

View File

@ -0,0 +1,32 @@
// { dg-do compile }
void foo()
{
int i, j;
#pragma omp for
for (i = 0; i < 10; ++i)
break; // { dg-error "break" }
bad1:
#pragma omp for
for (i = 0; i < 10; ++i)
goto bad1; // { dg-error "invalid exit" }
goto bad2; // { dg-error "invalid entry" }
#pragma omp for
for (i = 0; i < 10; ++i)
{
bad2: ;
}
#pragma omp for
for (i = 0; i < 10; ++i)
for (j = 0; j < 10; ++j)
if (i == j)
break;
#pragma omp for
for (i = 0; i < 10; ++i)
continue;
}

View File

@ -0,0 +1,57 @@
// { dg-do compile }
extern int test(int);
void foo()
{
int i;
for (i = 0; i < 10; ++i)
{
#pragma omp sections
{
continue; // { dg-error "invalid exit" }
}
}
#pragma omp sections
{
#pragma omp section
{ bad1: ; }
#pragma omp section
goto bad1; // { dg-error "invalid exit" }
}
#pragma omp sections
{
goto bad2; // { dg-error "invalid exit" }
}
bad2:;
goto bad3; // { dg-error "invalid entry" }
#pragma omp sections
{
bad3: ;
}
#pragma omp sections
{
goto ok1;
ok1:;
#pragma omp section
for (i = 0; i < 10; ++i)
if (test(i))
break;
else
continue;
#pragma omp section
switch (i)
{
case 0:
break;
default:
test(i);
}
}
}

View File

@ -0,0 +1,9 @@
// { dg-do compile }
void foo()
{
#pragma omp critical
{
return; // { dg-error "invalid exit" }
}
}

View File

@ -0,0 +1,15 @@
// { dg-do compile }
void foo()
{
#pragma omp master
{
goto bad1; // { dg-error "invalid exit" }
}
#pragma omp master
{
bad1:
return; // { dg-error "invalid exit" }
}
}

View File

@ -0,0 +1,9 @@
// { dg-do compile }
void foo()
{
#pragma omp ordered
{
return; // { dg-error "invalid exit" }
}
}

View File

@ -0,0 +1,20 @@
// { dg-do compile }
void foo()
{
int i, j;
for (i = 0; i < 10; ++i)
{
#pragma omp for
for (j = ({ continue; 0; }); // { dg-error "invalid exit" }
j < ({ continue; 10; }); // { dg-error "invalid exit" }
j += ({ continue; 1; })) // { dg-error "invalid exit" }
continue;
#pragma omp for
for (j = ({ break; 0; }); // { dg-error "invalid exit" }
j < ({ break; 10; }); // { dg-error "invalid exit" }
j += ({ break; 1; })) // { dg-error "invalid exit" }
break; // { dg-error "break" }
}
}

View File

@ -0,0 +1,11 @@
// { dg-do compile }
// PR 24451
int foo()
{
int i;
#pragma omp parallel for
for (i = 0; i < 10; ++i)
return 0; // { dg-error "invalid exit" }
}

View File

@ -0,0 +1,25 @@
// { dg-do compile }
void foo(int i)
{
int j;
switch (i) // { dg-error "invalid entry" }
{
#pragma omp parallel
{ case 0:; }
#pragma omp for
for (j = 0; j < 10; ++ j)
{ case 1:; }
#pragma omp critical
{ case 2:; }
#pragma omp master
{ case 3:; }
#pragma omp sections
{ case 4:;
#pragma omp section
{ case 5:; }
}
#pragma omp ordered
{ default:; }
}
}

View File

@ -0,0 +1,94 @@
/* { dg-do compile } */
/* { dg-require-effective-target tls } */
#define p parallel
extern void bar (void);
extern char q[];
int t;
#pragma omp threadprivate (t)
void
foo (int x)
{
char *p;
struct S { int i; int j; } s;
char a[32];
double d;
int i;
const int c = 8;
#pragma omp p shared (x, x) /* { dg-error "more than once" } */
;
#pragma omp p private (x) private (x) /* { dg-error "more than once" } */
;
#pragma omp p shared (x) firstprivate (x) /* { dg-error "more than once" } */
;
#pragma omp p firstprivate (x, x) /* { dg-error "more than once" } */
;
#pragma omp p for shared (x) lastprivate (x) /* { dg-error "more than" } */
for (i = 0; i < 10; i++)
;
#pragma omp p for private (x) lastprivate (x) /* { dg-error "more than" } */
for (i = 0; i < 10; i++)
;
#pragma omp p for lastprivate (x, x) /* { dg-error "more than once" } */
for (i = 0; i < 10; i++)
;
#pragma omp single private (x) copyprivate (x) /* { dg-error "more than" } */
;
#pragma omp p shared (bar) /* { dg-error "is not a variable" } */
;
#pragma omp p private (bar) /* { dg-error "is not a variable" } */
;
#pragma omp p firstprivate (bar) /* { dg-error "is not a variable" } */
;
#pragma omp p reduction (+:p) /* { dg-error "has invalid type for" } */
;
#pragma omp p reduction (*:s) /* { dg-error "has invalid type for" } */
;
#pragma omp p reduction (-:a) /* { dg-error "has invalid type for" } */
;
d = 0;
#pragma omp p reduction (*:d)
;
#pragma omp p reduction (|:d) /* { dg-error "has invalid type for" } */
;
#pragma omp p reduction (&&:d) /* { dg-error "has invalid type for" } */
;
#pragma omp p copyin (d) /* { dg-error "must be 'threadprivate'" } */
;
#pragma omp p copyin (x) /* { dg-error "must be 'threadprivate'" } */
;
#pragma omp p for firstprivate (x) lastprivate (x)
for (i = 0; i < 10; i++)
;
#pragma omp p private (q) /* { dg-error "incomplete type" } */
;
#pragma omp p firstprivate (q) /* { dg-error "incomplete type" } */
;
#pragma omp p for lastprivate (q) /* { dg-error "incomplete type" } */
for (i = 0; i < 10; i++)
;
#pragma omp p shared (t) /* { dg-error "predetermined 'threadprivate'" } */
;
#pragma omp p private (t) /* { dg-error "predetermined 'threadprivate'" } */
;
#pragma omp p firstprivate (t) /* { dg-error "predetermined 'threadpriv" } */
;
#pragma omp p for lastprivate (t) /* { dg-error "predetermined 'threadpr" } */
for (i = 0; i < 10; i++)
;
#pragma omp p reduction (*:t) /* { dg-error "predetermined 'threadprivate" } */
;
#pragma omp p shared (c) /* { dg-error "predetermined 'shared'" } */
;
#pragma omp p private (c) /* { dg-error "predetermined 'shared'" } */
;
#pragma omp p firstprivate (c) /* { dg-error "predetermined 'shared'" } */
;
#pragma omp p for lastprivate (c) /* { dg-error "predetermined 'shared'" } */
for (i = 0; i < 10; i++)
;
#pragma omp p reduction (*:c) /* { dg-error "predetermined 'shared'" } */
;
}

Some files were not shown because too many files have changed in this diff Show More