1. 06 Jul, 2014 1 commit
    • re PR c/6940 (taking sizeof array parameter should trigger a warning) · 773ec47f
      	PR c/6940
      	* doc/invoke.texi: Document -Wsizeof-array-argument.
      c-family/
      	* c.opt (Wsizeof-array-argument): New option.
      c/
      	* c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
      	* c-tree.h (C_ARRAY_PARAMETER): Define.
      	* c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
      	function parameter.
      cp/
      	* cp-tree.h (DECL_ARRAY_PARAMETER_P): Define.
      	* decl.c (grokdeclarator): Set DECL_ARRAY_PARAMETER_P.
      	* typeck.c (cxx_sizeof_expr): Warn when using sizeof on an array
      	function parameter.
      testsuite/
      	* c-c++-common/Wsizeof-pointer-memaccess1.c: Use
      	-Wno-sizeof-array-argument.
      	* c-c++-common/Wsizeof-pointer-memaccess2.c: Likewise.
      	* g++.dg/warn/Wsizeof-pointer-memaccess-1.C: Likewise.
      	* gcc.dg/Wsizeof-pointer-memaccess1.c: Likewise.
      	* g++.dg/torture/Wsizeof-pointer-memaccess1.C: Likewise.
      	* g++.dg/torture/Wsizeof-pointer-memaccess2.C: Likewise.
      	* gcc.dg/torture/Wsizeof-pointer-memaccess1.c: Likewise.
      	* c-c++-common/sizeof-array-argument.c: New test.
      	* gcc.dg/vla-5.c: Add dg-warnings.
      ../libgomp/	* testsuite/libgomp.c/appendix-a/a.29.1.c (f): Add dg-warnings.
      
      From-SVN: r212312
      Marek Polacek committed
  2. 02 Jul, 2014 1 commit
  3. 01 Jul, 2014 2 commits
  4. 30 Jun, 2014 9 commits
  5. 28 Jun, 2014 1 commit
  6. 27 Jun, 2014 3 commits
  7. 26 Jun, 2014 4 commits
  8. 25 Jun, 2014 2 commits
    • DR 178 PR c++/49132 · c69c2835
      /cp
      2014-06-25  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	DR 178
      	PR c++/49132
      	* typeck2.c (process_init_constructor_record): Do not complain about
      	uninitialized const members, because within aggregate-initialization,
      	members without explicit initializers are value-initialized.
      
      /testsuite
      2014-06-25  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	DR 178
      	PR c++/49132
      	* g++.dg/cpp0x/aggr1.C: New.
      	* g++.dg/cpp0x/aggr2.C: Likewise.
      	* g++.dg/init/aggr11.C: Likewise.
      	* g++.dg/init/aggr12.C: Likewise.
      
      From-SVN: r211981
      Paolo Carlini committed
    • langhooks-def.h (LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR): Define. · da6f124d
      	* langhooks-def.h (LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR): Define.
      	(LANG_HOOKS_DECLS): Add it.
      	* gimplify.c (gimplify_omp_for): Make sure OMP_CLAUSE_LINEAR_STEP
      	has correct type.
      	* tree.h (OMP_CLAUSE_LINEAR_ARRAY): Define.
      	* langhooks.h (struct lang_hooks_for_decls): Add
      	omp_clause_linear_ctor hook.
      	* omp-low.c (lower_rec_input_clauses): Set max_vf even if
      	OMP_CLAUSE_LINEAR_ARRAY is set.  Don't fold_convert
      	OMP_CLAUSE_LINEAR_STEP.  For OMP_CLAUSE_LINEAR_ARRAY in
      	combined simd loop use omp_clause_linear_ctor hook.
      gcc/c/
      	* c-typeck.c (c_finish_omp_clauses): Make sure
      	OMP_CLAUSE_LINEAR_STEP has correct type.
      gcc/cp/
      	* semantics.c (finish_omp_clauses): Make sure
      	OMP_CLAUSE_LINEAR_STEP has correct type.
      gcc/fortran/
      	* trans.h (gfc_omp_clause_linear_ctor): New prototype.
      	* trans-openmp.c (gfc_omp_linear_clause_add_loop,
      	gfc_omp_clause_linear_ctor): New functions.
      	(gfc_trans_omp_clauses): Make sure OMP_CLAUSE_LINEAR_STEP has
      	correct type.  Set OMP_CLAUSE_LINEAR_ARRAY flag if needed.
      	* f95-lang.c (LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR): Redefine.
      libgomp/
      	* testsuite/libgomp.fortran/simd5.f90: New test.
      	* testsuite/libgomp.fortran/simd6.f90: New test.
      	* testsuite/libgomp.fortran/simd7.f90: New test.
      
      From-SVN: r211971
      Jakub Jelinek committed
  9. 24 Jun, 2014 4 commits
    • class.c (check_methods, [...]): Guard VINDEX checks by FUNCTION_DECL check. · aaf8a23e
      	* class.c (check_methods, create_vtable_ptr, determine_key_method,
      	add_vcall_offset_vtbl_entries_1): Guard VINDEX checks by FUNCTION_DECL check.
      	* cp-tree.h (lang_decl_ns): Add ns_using and ns_users.
      	(DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): Use lang_decl_ns.
      	(DECL_NAMESPACE_ASSOCIATIONS): Use DECL_INITIAL.
      	(DECL_TEMPLATE_INSTANTIATIONS): Use DECL_SIZE_UNIT.
      	* tree.c (find_decls_types_r): Do not check DECL_VINDEX for TYPE_DECL.
      	* tree.h (DECL_VINDEX, DECL_SAVED_TREE): Restrict to DECL_FUNCTION.
      	* tree-core.h (tree_decl_non_common): Move saved_tree and vindex...
      	(tree_function_decl): ... here.
      	* tree-streamer-out.c (write_ts_decl_non_common_tree_pointers): Move
      	streaming of vindex to ...
      	(write_ts_function_decl_tree_pointers): ... here.
      
      	* tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
      	Do not stream DECL_VINDEX.
      	(lto_input_ts_function_decl_tree_pointers): Stream it here.
      
      	* lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
      	(mentions_vars_p_function): ... here.
      	(compare_tree_sccs_1): Update VINDEX checks.
      	(lto_fixup_prevailing_decls): Likewise.
      
      From-SVN: r211960
      Jan Hubicka committed
    • re PR c++/33972 (Cannot declare operator() using function typedef) · d1307360
      /cp
      2014-06-24  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/33972
      	* decl.c (grokdeclarator): Do not early check for operator-function-id
      	as non-function.
      
      /testsuite
      2014-06-24  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/33972
      	* g++.dg/other/operator3.C: New.
      	* g++.dg/template/operator8.C: Adjust.
      	* g++.dg/template/operator9.C: Likewise.
      
      From-SVN: r211944
      Paolo Carlini committed
    • Remove a layer of indirection from hash_table · c203e8a7
      gcc/
      
      	* hash-table.h: Remove a layer of indirection from hash_table so that
      	it contains the hash table's data instead of a pointer to the data.
      	* alloc-pool.c, asan.c, attribs.c, bitmap.c, cfg.c,
      	config/arm/arm.c, config/i386/winnt.c, config/ia64/ia64.c,
      	config/mips/mips.c, config/sol2.c, coverage.c, cselib.c,
      	data-streamer-out.c, dse.c, dwarf2cfi.c, dwarf2out.c, except.c,
      	fold-const.c, gcse.c, ggc-common.c,
      	gimple-ssa-strength-reduction.c, gimplify.c,
      	graphite-clast-to-gimple.c, graphite-dependences.c,
      	graphite-htab.h, graphite.c, haifa-sched.c, ipa-devirt.c,
      	ipa-profile.c, ira-color.c, ira-costs.c, loop-invariant.c,
      	loop-iv.c, loop-unroll.c, lto-streamer-in.c, lto-streamer-out.c,
      	lto-streamer.c, lto-streamer.h, passes.c, plugin.c,
      	postreload-gcse.c, sese.c, statistics.c, store-motion.c,
      	trans-mem.c, tree-browser.c, tree-cfg.c, tree-complex.c,
      	tree-eh.c, tree-into-ssa.c, tree-parloops.c, tree-sra.c,
      	tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-dom.c,
      	tree-ssa-live.c, tree-ssa-loop-im.c,
      	tree-ssa-loop-ivopts.c, tree-ssa-phiopt.c, tree-ssa-pre.c,
      	tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-ssa-strlen.c,
      	tree-ssa-structalias.c, tree-ssa-tail-merge.c,
      	tree-ssa-threadupdate.c, tree-ssa-uncprop.c,
      tree-vect-data-refs.c, tree-vect-loop.c, tree-vectorizer.c,
      tree-vectorizer.h, valtrack.c, valtrack.h, var-tracking.c,
      vtable-verify.c, vtable-verify.h: Adjust.
      
      gcc/c/
      
      	* c-decl.c: Adjust.
      
      gcc/cp/
      
      	* class.c, semantics.c, tree.c, vtable-class-hierarchy.c:
      	Adjust.
      
      gcc/java/
      
      	* jcf-io.c: Adjust.
      
      gcc/lto/
      
      	* lto.c: Adjust.
      
      gcc/objc/
      
      	* objc-act.c: Adjust.
      
      From-SVN: r211936
      Trevor Saunders committed
    • gimplify.c (gimplify_omp_for): For #pragma omp for simd iterator not mentioned… · 56ad0e38
      gimplify.c (gimplify_omp_for): For #pragma omp for simd iterator not mentioned in clauses use private clause if...
      
      	* gimplify.c (gimplify_omp_for): For #pragma omp for simd iterator
      	not mentioned in clauses use private clause if the iterator is
      	declared in #pragma omp for simd, and when adding lastprivate
      	instead, add it to the outer #pragma omp for too.  Diagnose
      	if the variable is private in outer context.  For simd collapse > 1
      	loops, replace all iterators with temporaries.
      	* omp-low.c (lower_rec_input_clauses): Handle LINEAR clause the
      	same even in collapse > 1 loops.
      gcc/c/
      	* c-parser.c (c_parser_omp_for_loop): For
      	#pragma omp parallel for simd move lastprivate clause from parallel
      	to for rather than simd.
      gcc/cp/
      	* parser.c (cp_parser_omp_for_loop): For
      	#pragma omp parallel for simd move lastprivate clause from parallel
      	to for rather than simd.
      libgomp/
      	* testsuite/libgomp.c/for-2.c: Define SC to static for
      	#pragma omp for simd testing.
      	* testsuite/libgomp.c/for-2.h (SC): Define if not defined.
      	(N(f5), N(f6), N(f7), N(f8), N(f10), N(f12), N(f14)): Use
      	SC macro.
      	* testsuite/libgomp.c/simd-14.c: New test.
      	* testsuite/libgomp.c/simd-15.c: New test.
      	* testsuite/libgomp.c/simd-16.c: New test.
      	* testsuite/libgomp.c/simd-17.c: New test.
      	* testsuite/libgomp.c++/for-10.C: Define SC to static for
      	#pragma omp for simd testing.
      	* testsuite/libgomp.c++/simd10.C: New test.
      	* testsuite/libgomp.c++/simd11.C: New test.
      	* testsuite/libgomp.c++/simd12.C: New test.
      	* testsuite/libgomp.c++/simd13.C: New test.
      
      From-SVN: r211930
      Jakub Jelinek committed
  10. 23 Jun, 2014 1 commit
    • DR 577 PR c++/33101 · e7402b3a
      /cp
      2014-06-23  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	DR 577
      	PR c++/33101
      	* decl.c (grokparms): Accept a single parameter of type 'void'.
      
      /testsuite
      2014-06-23  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	DR 577
      	PR c++/33101
      	* g++.dg/other/void1.C: Adjust.
      	* g++.dg/other/void3.C: Likewise.
      
      From-SVN: r211906
      Paolo Carlini committed
  11. 20 Jun, 2014 2 commits
  12. 19 Jun, 2014 1 commit
  13. 18 Jun, 2014 3 commits
    • re PR c++/59296 ([c++11] ref-qualified member function is ambiguous) · 74f4bbb7
      	PR c++/59296
      	* call.c (add_function_candidate): Set LOOKUP_NO_RVAL_BIND for
      	ref-qualifier handling.
      
      From-SVN: r211809
      Jason Merrill committed
    • re PR c++/61507 (GCC does not compile function with parameter pack.) · e3dc80be
      	PR c++/61507
      	* pt.c (resolve_overloaded_unification): Preserve
      	ARGUMENT_PACK_EXPLICIT_ARGS.
      
      From-SVN: r211808
      Jason Merrill committed
    • gimplify.c (omp_notice_variable): If n is non-NULL and no flags change in… · f014c653
      gimplify.c (omp_notice_variable): If n is non-NULL and no flags change in ORT_TARGET region, don't jump to do_outer.
      
      	* gimplify.c (omp_notice_variable): If n is non-NULL
      	and no flags change in ORT_TARGET region, don't jump to
      	do_outer.
      	(struct gimplify_adjust_omp_clauses_data): New type.
      	(gimplify_adjust_omp_clauses_1): Adjust for data being
      	a struct gimplify_adjust_omp_clauses_data pointer instead
      	of tree *.  Pass pre_p as a new argument to
      	lang_hooks.decls.omp_finish_clause hook.
      	(gimplify_adjust_omp_clauses): Add pre_p argument, adjust
      	splay_tree_foreach to pass both list_p and pre_p.
      	(gimplify_omp_parallel, gimplify_omp_task, gimplify_omp_for,
      	gimplify_omp_workshare, gimplify_omp_target_update): Adjust
      	gimplify_adjust_omp_clauses callers.
      	* langhooks.c (lhd_omp_finish_clause): New function.
      	* langhooks-def.h (lhd_omp_finish_clause): New prototype.
      	(LANG_HOOKS_OMP_FINISH_CLAUSE): Define to lhd_omp_finish_clause.
      	* langhooks.h (struct lang_hooks_for_decls): Add a new
      	gimple_seq * argument to omp_finish_clause hook.
      	* omp-low.c (scan_sharing_clauses): Call scan_omp_op on
      	non-DECL_P OMP_CLAUSE_DECL if ctx->outer.
      	(scan_omp_parallel, lower_omp_for): When adding
      	_LOOPTEMP_ clause var, add it to outer ctx's decl_map
      	as identity.
      	* tree-core.h (OMP_CLAUSE_MAP_TO_PSET): New map kind.
      	* tree-nested.c (convert_nonlocal_omp_clauses,
      	convert_local_omp_clauses): Handle various OpenMP 4.0 clauses.
      	* tree-pretty-print.c (dump_omp_clause): Handle
      	OMP_CLAUSE_MAP_TO_PSET.
      gcc/cp/
      	* cp-gimplify.c (cxx_omp_finish_clause): Add a gimple_seq *
      	argument.
      	* cp-tree.h (cxx_omp_finish_clause): Adjust prototype.
      gcc/fortran/
      	* cpp.c (cpp_define_builtins): Change _OPENMP macro to
      	201307.
      	* dump-parse-tree.c (show_omp_namelist): Add list_type
      	argument.  Adjust for rop being u.reduction_op now,
      	handle depend_op or map_op.
      	(show_omp_node): Adjust callers.  Print some new
      	OpenMP 4.0 clauses, adjust for OMP_LIST_DEPEND_{IN,OUT}
      	becoming a single OMP_LIST_DEPEND.
      	* f95-lang.c (gfc_handle_omp_declare_target_attribute): New
      	function.
      	(gfc_attribute_table): New variable.
      	(LANG_HOOKS_OMP_FINISH_CLAUSE, LANG_HOOKS_ATTRIBUTE_TABLE): Redefine.
      	* frontend-passes.c (gfc_code_walker): Handle new OpenMP target
      	EXEC_OMP_* codes and new clauses.
      	* gfortran.h (gfc_statement): Add ST_OMP_TARGET, ST_OMP_END_TARGET,
      	ST_OMP_TARGET_DATA, ST_OMP_END_TARGET_DATA, ST_OMP_TARGET_UPDATE,
      	ST_OMP_DECLARE_TARGET, ST_OMP_TEAMS, ST_OMP_END_TEAMS,
      	ST_OMP_DISTRIBUTE, ST_OMP_END_DISTRIBUTE, ST_OMP_DISTRIBUTE_SIMD,
      	ST_OMP_END_DISTRIBUTE_SIMD, ST_OMP_DISTRIBUTE_PARALLEL_DO,
      	ST_OMP_END_DISTRIBUTE_PARALLEL_DO, ST_OMP_DISTRIBUTE_PARALLEL_DO_SIMD,
      	ST_OMP_END_DISTRIBUTE_PARALLEL_DO_SIMD, ST_OMP_TARGET_TEAMS,
      	ST_OMP_END_TARGET_TEAMS, ST_OMP_TEAMS_DISTRIBUTE,
      	ST_OMP_END_TEAMS_DISTRIBUTE, ST_OMP_TEAMS_DISTRIBUTE_SIMD,
      	ST_OMP_END_TEAMS_DISTRIBUTE_SIMD, ST_OMP_TARGET_TEAMS_DISTRIBUTE,
      	ST_OMP_END_TARGET_TEAMS_DISTRIBUTE,
      	ST_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD,
      	ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_SIMD,
      	ST_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO,
      	ST_OMP_END_TEAMS_DISTRIBUTE_PARALLEL_DO,
      	ST_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO,
      	ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO,
      	ST_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
      	ST_OMP_END_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
      	ST_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD and
      	ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD.
      	(symbol_attribute): Add omp_declare_target field.
      	(gfc_omp_depend_op, gfc_omp_map_op): New enums.
      	(gfc_omp_namelist): Replace rop field with union
      	containing reduction_op, depend_op and map_op.
      	(OMP_LIST_DEPEND_IN, OMP_LIST_DEPEND_OUT): Remove.
      	(OMP_LIST_DEPEND, OMP_LIST_MAP, OMP_LIST_TO, OMP_LIST_FROM): New.
      	(gfc_omp_clauses): Add num_teams, device, thread_limit,
      	dist_sched_kind, dist_chunk_size fields.
      	(gfc_common_head): Add omp_declare_target field.
      	(gfc_exec_op): Add EXEC_OMP_TARGET, EXEC_OMP_TARGET_DATA,
      	EXEC_OMP_TEAMS, EXEC_OMP_DISTRIBUTE, EXEC_OMP_DISTRIBUTE_SIMD,
      	EXEC_OMP_DISTRIBUTE_PARALLEL_DO, EXEC_OMP_DISTRIBUTE_PARALLEL_DO_SIMD,
      	EXEC_OMP_TARGET_TEAMS, EXEC_OMP_TEAMS_DISTRIBUTE,
      	EXEC_OMP_TEAMS_DISTRIBUTE_SIMD, EXEC_OMP_TARGET_TEAMS_DISTRIBUTE,
      	EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD,
      	EXEC_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO,
      	EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO,
      	EXEC_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
      	EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD and
      	EXEC_OMP_TARGET_UPDATE.
      	(gfc_add_omp_declare_target): New prototype.
      	* match.h (gfc_match_omp_declare_target, gfc_match_omp_distribute,
      	gfc_match_omp_distribute_parallel_do,
      	gfc_match_omp_distribute_parallel_do_simd,
      	gfc_match_omp_distribute_simd, gfc_match_omp_target,
      	gfc_match_omp_target_data, gfc_match_omp_target_teams,
      	gfc_match_omp_target_teams_distribute,
      	gfc_match_omp_target_teams_distribute_parallel_do,
      	gfc_match_omp_target_teams_distribute_parallel_do_simd,
      	gfc_match_omp_target_teams_distribute_simd,
      	gfc_match_omp_target_update, gfc_match_omp_teams,
      	gfc_match_omp_teams_distribute,
      	gfc_match_omp_teams_distribute_parallel_do,
      	gfc_match_omp_teams_distribute_parallel_do_simd,
      	gfc_match_omp_teams_distribute_simd): New prototypes.
      	* module.c (ab_attribute): Add AB_OMP_DECLARE_TARGET.
      	(attr_bits): Likewise.
      	(mio_symbol_attribute): Handle omp_declare_target attribute.
      	(gfc_free_omp_clauses): Free num_teams, device, thread_limit
      	and dist_chunk_size expressions.
      	(OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE, OMP_CLAUSE_LASTPRIVATE,
      	OMP_CLAUSE_COPYPRIVATE, OMP_CLAUSE_SHARED, OMP_CLAUSE_COPYIN,
      	OMP_CLAUSE_REDUCTION, OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS,
      	OMP_CLAUSE_SCHEDULE, OMP_CLAUSE_DEFAULT, OMP_CLAUSE_ORDERED,
      	OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL,
      	OMP_CLAUSE_MERGEABLE, OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND,
      	OMP_CLAUSE_INBRANCH, OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH,
      	OMP_CLAUSE_PROC_BIND, OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN,
      	OMP_CLAUSE_UNIFORM): Use 1U instead of 1.
      	(OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP, OMP_CLAUSE_TO, OMP_CLAUSE_FROM,
      	OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_THREAD_LIMIT,
      	OMP_CLAUSE_DIST_SCHEDULE): Define.
      	(gfc_match_omp_clauses): Change mask parameter to unsigned int.
      	Adjust for rop becoming u.reduction_op.  Disallow inbranch with
      	notinbranch.  For depend clause, always create OMP_LIST_DEPEND
      	and fill in u.depend_op.  Handle num_teams, device, map,
      	to, from, thread_limit and dist_schedule clauses.
      	(OMP_DECLARE_SIMD_CLAUSES): Or in OMP_CLAUSE_INBRANCH and
      	OMP_CLAUSE_NOTINBRANCH.
      	(OMP_TARGET_CLAUSES, OMP_TARGET_DATA_CLAUSES,
      	OMP_TARGET_UPDATE_CLAUSES, OMP_TEAMS_CLAUSES,
      	OMP_DISTRIBUTE_CLAUSES): Define.
      	(match_omp): New function.
      	(gfc_match_omp_do, gfc_match_omp_do_simd, gfc_match_omp_parallel,
      	gfc_match_omp_parallel_do, gfc_match_omp_parallel_do_simd,
      	gfc_match_omp_parallel_sections, gfc_match_omp_parallel_workshare,
      	gfc_match_omp_sections, gfc_match_omp_simd, gfc_match_omp_single,
      	gfc_match_omp_task): Rewritten using match_omp.
      	(gfc_match_omp_threadprivate, gfc_match_omp_declare_reduction):
      	Diagnose if the directives are followed by unexpected junk.
      	(gfc_match_omp_distribute, gfc_match_omp_distribute_parallel_do,
      	gfc_match_omp_distribute_parallel_do_simd,
      	gfc_match_omp_distrbute_simd, gfc_match_omp_declare_target,
      	gfc_match_omp_target, gfc_match_omp_target_data,
      	gfc_match_omp_target_teams, gfc_match_omp_target_teams_distribute,
      	gfc_match_omp_target_teams_distribute_parallel_do,
      	gfc_match_omp_target_teams_distribute_parallel_do_simd,
      	gfc_match_omp_target_teams_distrbute_simd, gfc_match_omp_target_update,
      	gfc_match_omp_teams, gfc_match_omp_teams_distribute,
      	gfc_match_omp_teams_distribute_parallel_do,
      	gfc_match_omp_teams_distribute_parallel_do_simd,
      	gfc_match_omp_teams_distrbute_simd): New functions.
      	* openmp.c (resolve_omp_clauses): Adjust for
      	OMP_LIST_DEPEND_{IN,OUT} being changed to OMP_LIST_DEPEND.  Handle
      	OMP_LIST_MAP, OMP_LIST_FROM, OMP_LIST_TO, num_teams, device,
      	dist_chunk_size and thread_limit.
      	(gfc_resolve_omp_parallel_blocks): Only put sharing clauses into
      	ctx.sharing_clauses.  Call gfc_resolve_omp_do_blocks for various
      	new EXEC_OMP_* codes.
      	(resolve_omp_do): Handle various new EXEC_OMP_* codes.
      	(gfc_resolve_omp_directive): Likewise.
      	(gfc_resolve_omp_declare_simd): Add missing space to diagnostics.
      	* parse.c (decode_omp_directive): Handle parsing of OpenMP 4.0
      	offloading related directives.
      	(case_executable): Add ST_OMP_TARGET_UPDATE.
      	(case_exec_markers): Add ST_OMP_TARGET*, ST_OMP_TEAMS*,
      	ST_OMP_DISTRIBUTE*.
      	(case_decl): Add ST_OMP_DECLARE_TARGET.
      	(gfc_ascii_statement): Handle new ST_OMP_* codes.
      	(parse_omp_do): Handle various new ST_OMP_* codes.
      	(parse_executable): Likewise.
      	* resolve.c (gfc_resolve_blocks): Handle various new EXEC_OMP_*
      	codes.
      	(resolve_code): Likewise.
      	(resolve_symbol): Change that !$OMP DECLARE TARGET variables
      	are saved.
      	* st.c (gfc_free_statement): Handle various new EXEC_OMP_* codes.
      	* symbol.c (check_conflict): Check omp_declare_target conflicts.
      	(gfc_add_omp_declare_target): New function.
      	(gfc_copy_attr): Copy omp_declare_target.
      	* trans.c (trans_code): Handle various new EXEC_OMP_* codes.
      	* trans-common.c (build_common_decl): Add "omp declare target"
      	attribute if needed.
      	* trans-decl.c (add_attributes_to_decl): Likewise.
      	* trans.h (gfc_omp_finish_clause): New prototype.
      	* trans-openmp.c (gfc_omp_finish_clause): New function.
      	(gfc_trans_omp_reduction_list): Adjust for rop being renamed
      	to u.reduction_op.
      	(gfc_trans_omp_clauses): Adjust for OMP_LIST_DEPEND_{IN,OUT}
      	change to OMP_LIST_DEPEND and fix up depend handling.
      	Handle OMP_LIST_MAP, OMP_LIST_TO, OMP_LIST_FROM, num_teams,
      	thread_limit, device, dist_chunk_size and dist_sched_kind.
      	(gfc_trans_omp_do): Handle EXEC_OMP_DISTRIBUTE.
      	(GFC_OMP_SPLIT_DISTRIBUTE, GFC_OMP_SPLIT_TEAMS,
      	GFC_OMP_SPLIT_TARGET, GFC_OMP_SPLIT_NUM, GFC_OMP_MASK_DISTRIBUTE,
      	GFC_OMP_MASK_TEAMS, GFC_OMP_MASK_TARGET, GFC_OMP_MASK_NUM): New.
      	(gfc_split_omp_clauses): Handle splitting of clauses for new
      	EXEC_OMP_* codes.
      	(gfc_trans_omp_do_simd): Add pblock argument, adjust for being
      	callable for combined constructs.
      	(gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_do_simd): Likewise.
      	(gfc_trans_omp_distribute, gfc_trans_omp_teams,
      	gfc_trans_omp_target, gfc_trans_omp_target_data,
      	gfc_trans_omp_target_update): New functions.
      	(gfc_trans_omp_directive): Adjust gfc_trans_omp_* callers, handle
      	new EXEC_OMP_* codes.
      gcc/testsuite/
      	* gfortran.dg/gomp/declare-simd-1.f90: New test.
      	* gfortran.dg/gomp/depend-1.f90: New test.
      	* gfortran.dg/gomp/target1.f90: New test.
      	* gfortran.dg/gomp/target2.f90: New test.
      	* gfortran.dg/gomp/target3.f90: New test.
      	* gfortran.dg/gomp/udr4.f90: Adjust expected diagnostics.
      	* gfortran.dg/openmp-define-3.f90: Expect _OPENMP 201307 instead of
      	201107.
      libgomp/
      	* omp_lib.f90.in (openmp_version): Set to 201307.
      	* omp_lib.h.in (openmp_version): Likewise.
      	* testsuite/libgomp.c/target-8.c: New test.
      	* testsuite/libgomp.fortran/declare-simd-1.f90: Add notinbranch
      	and inbranch clauses.
      	* testsuite/libgomp.fortran/depend-3.f90: New test.
      	* testsuite/libgomp.fortran/openmp_version-1.f: Adjust for new
      	openmp_version.
      	* testsuite/libgomp.fortran/openmp_version-2.f90: Likewise.
      	* testsuite/libgomp.fortran/target1.f90: New test.
      	* testsuite/libgomp.fortran/target2.f90: New test.
      	* testsuite/libgomp.fortran/target3.f90: New test.
      	* testsuite/libgomp.fortran/target4.f90: New test.
      	* testsuite/libgomp.fortran/target5.f90: New test.
      	* testsuite/libgomp.fortran/target6.f90: New test.
      	* testsuite/libgomp.fortran/target7.f90: New test.
      
      From-SVN: r211768
      Jakub Jelinek committed
  14. 17 Jun, 2014 1 commit
  15. 16 Jun, 2014 4 commits
  16. 15 Jun, 2014 1 commit
    • c-common.c (handle_tls_model_attribute): Use set_decl_tls_model. · 56363ffd
      	* c-family/c-common.c (handle_tls_model_attribute): Use set_decl_tls_model.
      	* cgraph.h (struct varpool_node): Add tls_model.
      	* tree.c (decl_tls_model, set_decl_tls_model): New functions.
      	* tree.h (DECL_TLS_MODEL): Update.
      	(DECL_THREAD_LOCAL_P): Check that variable is static.
      	(decl_tls_model): Declare.
      	(set_decl_tls_model): Declare.
      	* tree-emutls.c (get_emutls_init_templ_addr): First build decl and then
      	set symbol prorperties.
      	(get_emutls_init_templ_addr): Cleanup.
      	(new_emutls_decl): Update.
      	* lto-cgraph.c (lto_output_varpool_node): Stream TLS model
      	(lto_input_varpool_node): Likewise.
      	* lto-streamer-out.c (hash_tree): Likewise.
      	* tree-streamer-in.c (unpack_ts_decl_with_vis_value_fields): Do
      	not stream DECL_TLS_MODEL.
      	* tree-profile.c (init_ic_make_global_vars): Use
      	set_decl_tls_model.
      	* tree-core.h (tree_decl_with_vis): Remove tls_model;
      	update comments.
      
      	* c-parser.c (c_parser_omp_threadprivate): Likewise.
      	* c-decl.c (merge_decls): Likewise.
      
      	* decl.c (duplicate_decls): Use set_decl_tls_model.
      	(grokdeclarator): Likewise.
      	* semantics.c (finish_id_expression): Check TLS only for
      	static variables.
      	(finish_omp_threadprivate): Use decl_default_tls_model.
      	* decl2.c (get_guard): Likewise.
      	* call.c (make_temporary_var_for_ref_to_temp): Likewise.
      
      	* gcc-interface/utils.c (process_attributes): Use
      	set_decl_tls_model.
      
      	* trans-common.c (build_common_decl): Use
      	set_decl_tls_model.
      	* trans-decl.c (gfc_finish_var_decl): Likewise.
      	(get_proc_pointer_decl): Likewise.
      
      	* lto.c (compare_tree_sccs_1): Do not compare DECL_TLS_MODEL.
      
      From-SVN: r211689
      Jan Hubicka committed