Commit Graph

1316 Commits

Author SHA1 Message Date
Alexandre Oliva 8db29d88f3 Introduce C++ support in libcc1
Extend libcc1's with an API for C++ support.

Extend libcc1's C API to distinguish between integral types with the
same width, as in C++.  Likewise for float types.

Export small bits of functionality from the C++ front-end for use in
libcc1.  Add support for the C++ front-end to look up names and
addresses using a libcc1-registered binding oracle.  Add support for
global friends.


for  gcc/cp/ChangeLog

	Introduce C++ support in libcc1.
	* cp-tree.h (struct lang_identifier): Add oracle_looked_up.
	(ansi_opname): Rename to...
	(cp_operator_id): ... this.  Adjust all callers.
	(ansi_assopname): Rename to...
	(cp_assignment_operator_id): ... this.  Adjust all callers.
	(cp_literal_operator_id): Declare.
	(set_global_friend): Declare.
	(is_global_friend): Declare.
	(enum cp_oracle_request): New type.
	(cp_binding_oracle_function): New type.
	(cp_binding_oracle): Declare.
	(cp_finish_injected_record_type): Declare.
	* friend.c (global_friend): New var.
	(set_global_friend): New fn.
	(is_global_friend): New fn.
	(is_friend): Call is_global_friend.
	* name-lookup.c (cp_binding_oracle): New var.
	(query_oracle): New fn.
	(qualified_lookup_using_namespace): Call query_oracle.
	(lookup_name_real_1): Likewise.
	* parser.c (cp_literal_operator_id): Drop static.
	* search.c (friend_accessible_p): Call is_global_friend.
	* semantics.c (is_this_parameter): Accept a variable if the
	binding oracle is enabled.

for  include/ChangeLog

	Introduce C++ support in libcc1.
	* gcc-c-fe.def (int_type_v0): Rename from...
	(int_type): ... this.  Introduce new version.
	(float_type_v0): Rename from...
	(float_type): ... this.  Introduce new version.
	(char_type): New.
	* gcc-c-interface.h (gcc_c_api_version): Add GCC_C_FE_VERSION_1.
	(gcc_type_array): Move...
	* gcc-interface.h: ... here.
	* gcc-cp-fe.def: New.
	* gcc-cp-interface.h: New.

for  libcc1/ChangeLog

	Introduce C++ support.
	* Makefile.am (AM_CPPFLAGS): Move some -I flags to...
	(CPPFLAGS_FOR_C_FAMILY, CPPFLAGS_FOR_C, CPPFLAGS_FOR_CXX): ...
	new macros.
	(plugin_LTLIBRARIES): Add libcp1plugin.la.
	(BUILT_SOURCES, MOSTLYCLEANFILES): Add...
	(cp-compiler-name.h): ... this.  New.
	(c-compiler-name.h): Rename all over from...
	(compiler-name.h): ... this.  Create it atomically.
	(marshall_c_source, marshall_cxx_source): New macros.
	(libcc1plugin_la_SOURCES): Rename plugin.cc to libcc1plugin.cc.
	Add marshall_c_source expansion.
	(libcc1plugin.lo_CPPFLAGS): New macro.
	(libcp1plugin_la_LDFLAGS): Likewise.
	(libcp1plugin_la_SOURCES): Likewise.
	(libcp1plugin.lo_CPPFLAGS): Likewise.
	(libcp1plugin_la_LIBADD): Likewise.
	(libcp1plugin_la_DEPENDENCIES): Likewise.
	(libcp1plugin_la_LINK): Likewise.
	(libcc1_la_SOURCES): Added marshall_c_source and
	marshall_cxx_source expansions.
	* Makefile.in: Rebuild.
	* compiler-name.h: Rename all over to...
	* c-compiler-name.h: ... this.  Define C_COMPILER_NAME instead
	of COMPILER_NAME.
	* plugin.cc: Rename all over to...
	* libcc1plugin.cc: ... this.  Include marshall-c.hh.
	(address_rewriter): Drop cleaning up of VLA sizes.
	(plugin_build_decl): Mark decls as external.
	(plugin_tagbind): Propagate name to all variants.
	(build_anonymous_node): New.
	(plugin_build_record_type): Use it instead of make_node.
	(plugin_build_union_type): Likewise.
	(plugin_build_enum_type): Likewise.
	(plugin_finish_record_or_union): Update all type variants.
	(safe_lookup_builtin_type): New.
	(plugin_int_check): Factor out of, and add checks to, ...
	(plugin_int_type): ... this.  Rename to...
	(plugin_int_type_v0): ... this.
	(plugin_int_type): New interface, new implementation.
	(plugin_char_type): New.
	(plugin_float_type_v0): Rename from...
	(plugin_float_type): ... this.  New interface, new implementation.
	(plugin_init): Bump handshake version.
	* libcc1.cc: Include marshall-c.hh.  Drop gcc-interface.h.
	(call_binding_oracle): Rename to...
	(c_call_binding_oracle): ... this, into anonymous namespace.
	(call_symbol_address): Rename to...
	(c_call_symbol_address): ... this, likewise.
	(GCC_METHOD#): Move methods into cc1plugin::c:: namespace.
	(libcc1::compiler::find): Refer to C_COMPILER_NAME.
	(fork_exec): Bump to GCC_C_FE_VERSION_1.
	(libcc1_compile): Prefix callbacks with c_.
	(gcc_c_fe_context): Accept GCC_C_FE_VERSION_1.
	* libcc1.sym: Export gcc_cp_fe_context.
	* libcp1.cc: New, mostly copied and adjusted from libcc1.cc.
	* libcp1plugin.cc: New, initially copied from libcc1plugin.cc.
	* libcp1plugin.sym: New.
	* marshall-c.hh: New.  Move C-specific types from...
	* marshall.cc: ... this.
	(cc1_plugin::marshall_array_start): New.
	(cc1_plugin::marshall_array_elmts): New.
	(cc1_plugin::marshall for gcc_type_array): Use the above.
	(cc1_plugin::unmarshall_array_start): New.
	(cc1_plugin::unmarshall_array_elmts): New.
	(cc1_plugin::unmarshall for gcc_type_array): Use the above.
	* marshall.hh: Declare the new array building blocks.
	Drop C-specific unmarshall declarations.
	* marshall-cp.hh: New.
	* names.cc (GCC_METHOD#): Add LANG:: to method names.
	(LANG): Define while including gcc-c-fe.def and gcc-cp-fe.def.
	* names.hh: Include gcc-c-fe.def and gcc-cp-fe.def in the
	corresponding namespaces.
	* rpc.hh: Don't include marshall.hh.
	[GCC_CP_INTERFACE_H] (argument_wrapper): Specialize for
	gcc_vbase_array, gcc_cp_template_args, gcc_cp_function_args.

From-SVN: r245051
2017-01-31 01:02:03 +00:00
Jason Merrill effdaefed3 PR c++/79176 - lambda ICE with -flto -Os
* decl2.c (vague_linkage_p): Handle decloned 'tors.
	* tree.c (decl_linkage): Likewise.

From-SVN: r244935
2017-01-26 10:30:43 -05:00
Jakub Jelinek 6b5b4e9cec re PR c++/72813 (atomic header cannot be compiled into translation unit with -fkeep-inline-functions)
PR c++/72813
	* gcc.c (default_compilers): Don't add -o %g.s for -S -save-temps
	of c-header.

	* c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
	PCH file.

	* decl2.c (c_parse_final_cleanups): Set flag_syntax_only to 1 after
	writing PCH file.

From-SVN: r244328
2017-01-11 19:08:57 +01:00
Jason Merrill 38285dd719 PR c++/78948 - instantiation from discarded statement
PR c++/78948 - instantiation from discarded statement
	* parser.h (struct cp_parser): Remove in_discarded_stmt field.
	* cp-tree.h (in_discarded_stmt): Declare it.
	(struct saved_scope): Add discarded_stmt bitfield.
	(in_discarded_stmt): New macro.
	* decl2.c (mark_used): Check it.
	* parser.c (cp_parser_selection_statement): Adjust.
	(cp_parser_jump_statement): Adjust.

From-SVN: r244206
2017-01-08 01:36:10 -05:00
Jakub Jelinek cbe34bb5ed Update copyright years.
From-SVN: r243994
2017-01-01 13:07:43 +01:00
Jason Merrill fd338b1364 Allow references in constant-expressions.
* decl2.c (decl_maybe_constant_var_p): References qualify.
	* constexpr.c (non_const_var_error): Handle references.
	* init.c (constant_value_1): Always check decl_constant_var_p.
	* cp-gimplify.c (cp_fold_maybe_rvalue): Don't fold references.
	* error.c (dump_decl_name): Split out from dump_decl.

From-SVN: r242422
2016-11-15 09:55:52 -05:00
Jason Merrill f065303fcf PR c++/77337 - auto return and lambda
* pt.c (tsubst_friend_function): Don't set DECL_INITIAL.
	(instantiate_decl): It's OK to defer a constexpr function.
	* cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): Check
	DECL_LANG_SPECIFIC.
	* decl2.c (decl_defined_p): Use it.  No longer static.
	* decl.c (redeclaration_error_message): Use decl_defined_p.
	* constexpr.c (cxx_eval_call_expression): Set input_location around
	call to instantiate_decl.

From-SVN: r242056
2016-11-10 16:42:36 -05:00
Jason Merrill 14a2c9aac0 Implement P0386R2 - C++17 inline variables
2016-10-11  Jakub Jelinek  <jakub@redhat.com>

	* dwarf2out.c (gen_member_die): Handle inline static data member
	definitions.
c-family/
	* c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
cp/
	* cp-tree.h (struct lang_type): Shrink language field to 1 bit
	from 4.  Add var_declared_inline_p field.  Mention 2 spare bits.
	(DECL_VAR_DECLARED_INLINE_P): Define.
	(SET_DECL_VAR_DECLARED_INLINE_P): Define.
	(DECL_INLINE_VAR_P): Define.
	(diagnose_inline_vars_for_namespace): Declare.
	* decl.c (diagnose_inline_vars_for_namespace): New function.
	(duplicate_decls): For static data members copy
	DECL_DECLARED_CONSTEXPR_P.
	(redeclaration_error_message): Handle C++17 redundant redeclaration
	of constexpr static data member outside of class.
	(maybe_commonize_var): Handle inline variables.
	(check_initializer): Ignore inline variables for diagnostics.
	Adjust diagnostic wording for C++17.
	(make_rtl_for_nonlocal_decl): Allow in-class definition of
	inline static data members.
	(bad_specifiers): Don't diagnose inline on variables here.
	(grokvardecl): Add inlinep argument, non-static const inline variables
	are TREE_PUBLIC.
	(check_static_variable_definition): Return early also for inline
	variables.
	(grokdeclarator): Handle inline variables and inline static data
	members.
	* typeck2.c (store_init_value): Don't diagnose non-constant
	initializers for non-constexpr inline static data members.
	* decl2.c (vague_linkage_p): Return true for inline variables.
	(c_parse_final_cleanups): In-class declaration of inline static
	data members is a definition.  Call diagnose_inline_vars_for_namespace
	through walk_namespaces.
	* pt.c (instantiate_decl): Set pattern_defined for in-class definitions
	of inline static data members.

From-SVN: r241137
2016-10-13 15:26:54 -04:00
Thomas Preud'homme 4d0cdd0ce6 Move MEMMODEL_* from coretypes.h to memmodel.h
2016-10-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    * coretypes.h: Move MEMMODEL_* macros and enum memmodel definition
    into ...
    * memmodel.h: This file.
    * alias.c, asan.c, auto-inc-dec.c, bb-reorder.c, bt-load.c,
      caller-save.c, calls.c, ccmp.c, cfgbuild.c, cfgcleanup.c,
      cfgexpand.c, cfgloopanal.c, cfgrtl.c, cilk-common.c, combine.c,
      combine-stack-adj.c, common/config/aarch64/aarch64-common.c,
      common/config/arm/arm-common.c, common/config/bfin/bfin-common.c,
      common/config/c6x/c6x-common.c, common/config/i386/i386-common.c,
      common/config/ia64/ia64-common.c, common/config/nvptx/nvptx-common.c,
      compare-elim.c, config/aarch64/aarch64-builtins.c,
      config/aarch64/aarch64-c.c, config/aarch64/cortex-a57-fma-steering.c,
      config/arc/arc.c, config/arc/arc-c.c, config/arm/arm-builtins.c,
      config/arm/arm-c.c, config/avr/avr.c, config/avr/avr-c.c,
      config/avr/avr-log.c, config/bfin/bfin.c, config/c6x/c6x.c,
      config/cr16/cr16.c, config/cris/cris.c, config/darwin-c.c,
      config/darwin.c, config/epiphany/epiphany.c,
      config/epiphany/mode-switch-use.c,
      config/epiphany/resolve-sw-modes.c, config/fr30/fr30.c,
      config/frv/frv.c, config/ft32/ft32.c, config/h8300/h8300.c,
      config/i386/i386-c.c, config/i386/winnt.c, config/iq2000/iq2000.c,
      config/lm32/lm32.c, config/m32c/m32c.c, config/m32r/m32r.c,
      config/m68k/m68k.c, config/mcore/mcore.c,
      config/microblaze/microblaze.c, config/mmix/mmix.c,
      config/mn10300/mn10300.c, config/moxie/moxie.c,
      config/msp430/msp430.c, config/nds32/nds32-cost.c,
      config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c,
      config/nds32/nds32-memory-manipulation.c,
      config/nds32/nds32-predicates.c, config/nds32/nds32.c,
      config/nios2/nios2.c, config/nvptx/nvptx.c, config/pa/pa.c,
      config/pdp11/pdp11.c, config/rl78/rl78.c, config/rs6000/rs6000-c.c,
      config/rx/rx.c, config/s390/s390-c.c, config/s390/s390.c,
      config/sh/sh.c, config/sh/sh-c.c, config/sh/sh-mem.cc,
      config/sh/sh_treg_combine.cc, config/sol2.c, config/spu/spu.c,
      config/stormy16/stormy16.c, config/tilegx/tilegx.c,
      config/tilepro/tilepro.c, config/v850/v850.c, config/vax/vax.c,
      config/visium/visium.c, config/vms/vms-c.c, config/xtensa/xtensa.c,
      coverage.c, cppbuiltin.c, cprop.c, cse.c, cselib.c, dbxout.c, dce.c,
      df-core.c, df-problems.c, df-scan.c, dojump.c, dse.c, dwarf2asm.c,
      dwarf2cfi.c, dwarf2out.c, emit-rtl.c, except.c, explow.c, expmed.c,
      expr.c, final.c, fold-const.c, function.c, fwprop.c, gcse.c,
      ggc-page.c, haifa-sched.c, hsa-brig.c, hsa-gen.c, hw-doloop.c,
      ifcvt.c, init-regs.c, internal-fn.c, ira-build.c, ira-color.c,
      ira-conflicts.c, ira-costs.c, ira-emit.c, ira-lives.c, ira.c, jump.c,
      loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c,
      lower-subreg.c, lra.c, lra-assigns.c, lra-coalesce.c,
      lra-constraints.c, lra-eliminations.c, lra-lives.c, lra-remat.c,
      lra-spills.c, mode-switching.c, modulo-sched.c, omp-low.c, passes.c,
      postreload-gcse.c, postreload.c, predict.c, print-rtl-function.c,
      recog.c, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c,
      reload.c, reload1.c, reorg.c, resource.c, rtl-chkp.c, rtl-tests.c,
      rtlanal.c, rtlhooks.c, sched-deps.c, sched-rgn.c, sdbout.c,
      sel-sched-ir.c, sel-sched.c, shrink-wrap.c, simplify-rtx.c,
      stack-ptr-mod.c, stmt.c, stor-layout.c, target-globals.c,
      targhooks.c, toplev.c, tree-nested.c, tree-outof-ssa.c,
      tree-profile.c, tree-ssa-coalesce.c, tree-ssa-ifcombine.c,
      tree-ssa-loop-ivopts.c, tree-ssa-loop.c, tree-ssa-reassoc.c,
      tree-ssa-sccvn.c, tree-vect-data-refs.c, ubsan.c, valtrack.c,
      var-tracking.c, varasm.c: Include memmodel.h.
    * genattrtab.c (write_header): Include memmodel.h in generated file.
    * genautomata.c (main): Likewise.
    * gengtype.c (open_base_files): Likewise.
    * genopinit.c (main): Likewise.
    * genconditions.c (write_header): Include memmodel.h earlier in
    generated file.
    * genemit.c (main): Likewise.
    * genoutput.c (output_prologue): Likewise.
    * genpeep.c (main): Likewise.
    * genpreds.c (write_insn_preds_c): Likewise.
    * genrecog.c (write_header): Likewise.
    * Makefile.in (PLUGIN_HEADERS): Include memmodel.h

    gcc/ada/
    * gcc-interface/utils2.c: Include memmodel.h.

    gcc/c-family/
    * c-cppbuiltin.c: Include memmodel.h.
    * c-opts.c: Likewise.
    * c-pragma.c: Likewise.
    * c-warn.c: Likewise.

    gcc/c/
    * c-typeck.c: Include memmodel.h.

    gcc/cp/
    * decl2.c: Include memmodel.h.
    * rtti.c: Likewise.

    gcc/fortran/
    * trans-intrinsic.c: Include memmodel.h.

    gcc/go/
    * go-backend.c: Include memmodel.h.

    libgcc/
    * libgcov-profiler.c: Replace MEMMODEL_* macros by their __ATOMIC_*
    equivalent.
    * config/tilepro/atomic.c: Likewise and stop casting model to
    enum memmodel.

From-SVN: r241121
2016-10-13 14:17:52 +00:00
Jakub Jelinek bfecd57cd4 extend.texi (Java Exceptions): Remove.
* doc/extend.texi (Java Exceptions): Remove.
	(java_interface): Remove.
cp/
	* cp-tree.h (enum cp_tree_index): Remove CPTI_JAVA_*,
	CPTI_LANG_NAME_JAVA and CPTI_JCLASS.
	(java_byte_type_node, java_short_type_node, java_int_type_node,
	java_long_type_node, java_float_type_node, java_double_type_node,
	java_char_type_node, java_boolean_type_node, lang_name_java,
	jclass_node): Remove.
	(enum languages): Remove lang_java.
	(TYPE_FOR_JAVA): Remove.
	(struct lang_type_class): Remove java_interface bit-field.
	(TYPE_JAVA_INTERFACE): Remove.
	(pragma_java_exceptions): Remove.
	(check_java_method, build_java_class_ref): Remove prototypes.
	* name-lookup.c (pushtag_1): Don't set TYPE_FOR_JAVA.
	* decl2.c (acceptable_java_type, check_java_method): Remove.
	(import_export_decl): Remove TYPE_FOR_JAVA handling.
	(build_java_method_aliases): Remove.
	(c_parse_final_cleanups): Don't call build_java_method_aliases.
	(possibly_inlined_p): Don't test pragma_java_exceptions.
	* init.c (build_new_1): Remove TYPE_FOR_JAVA handling.
	(build_java_class_ref): Remove.
	* pt.c (maybe_new_partial_specialization, lookup_template_class_1,
	instantiate_class_template_1): Don't copy TYPE_FOR_JAVA.
	* except.c (eh_type_info): Remove java type handling.
	(decl_is_java_type, choose_personality_routine): Remove.
	(initialize_handler_parm): Don't call choose_personality_routine.
	(expand_start_catch_block): Don't handle java types.
	(build_throw): Likewise.
	* cp-lang.c (cp_eh_personality): Don't handle pragma_java_exceptions.
	* typeck.c (structural_comptypes): Don't compare TYPE_FOR_JAVA.
	* call.c (build_over_call): Don't handle TYPE_JAVA_INTERFACE.
	(java_iface_lookup_fn): Remove.
	(build_java_interface_fn_ref): Remove.
	* tree.c (cxx_attribute_table): Remove java_interface.
	(handle_java_interface_attribute): Remove.
	* lex.c (pragma_java_exceptions): Remove.
	(init_cp_pragma): Don't register GCC java_exceptions pragma.
	(handle_pragma_java_exceptions): Remove.
	(retrofit_lang_decl): Don't handle lang_name_java.
	* method.c (implicitly_declare_fn): Don't handle TYPE_FOR_JAVA.
	* error.c (language_to_string): Don't handle lang_java.
	* decl.c (record_builtin_java_type): Remove.
	(initialize_predefined_identifiers): Remove Java.
	(cxx_init_decl_processing): Remove java_*_type_node.
	(cp_finish_decl): Don't handle TYPE_FOR_JAVA.
	(grokfndecl): Likewise.
	(check_special_function_return_type): Likewise.
	(grokdeclarator): Don't set TYPE_FOR_JAVA.
	(grokparms): Don't handle TYPE_FOR_JAVA.
	(xref_basetypes): Likewise.
	(check_function_type): Likewise.
	(finish_constructor_body): Likewise.
	* mangle.c (write_builtin_type): Don't handle TYPE_FOR_JAVA
	and java_*_type_node.
	(write_bare_function_type): Don't handle TYPE_FOR_JAVA.
	(write_java_integer_type_codes): Remove.
	* class.c (add_method): Don't handle TYPE_FOR_JAVA.
	(add_implicitly_declared_members, determine_key_method,
	finish_struct_1): Likewise.
	(push_lang_context): Don't handle lang_name_java.
testsuite/
	* g++.dg/other/java3.C: Remove.
	* g++.dg/other/java1.C: Remove.
	* g++.dg/other/error12.C: Remove.
	* g++.dg/other/java2.C: Remove.
	* g++.dg/warn/Wnvdtor.C: Remove.
	* g++.dg/lookup/java1.C: Remove.
	* g++.dg/lookup/java2.C: Remove.
	* g++.dg/ext/pr34829.C: Remove.
	* g++.dg/ext/java-3.C: Remove.
	* g++.dg/ext/java-1.C: Remove.
	* g++.dg/ext/java-2.C: Remove.
	* g++.old-deja/g++.oliva/dwarf2.C: Remove.

From-SVN: r240750
2016-10-04 17:32:31 +02:00
Marek Polacek e51fbec3ff c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
* c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
	* c-common.h (build_unary_op): Change nonconvert parameter type to bool.
	* c-omp.c (c_finish_omp_atomic): Use false instead of 0.

	* c-array-notation.c (create_cmp_incr): Use false instead of 0.
	(fix_array_notation_expr): Likewise.
	* c-decl.c (finish_decl): Likewise.
	* c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
	* c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
	(function_to_pointer_conversion): Use false instead of 0.
	(convert_lvalue_to_rvalue): Likewise.
	(parser_build_unary_op): Likewise.
	(build_atomic_assign): Likewise.
	(build_unary_op): Change nonconvert parameter type to bool, use
	true/false instead of 1/0.
	(build_binary_op): Use true instead of 1.

	* cp-tree.h (cp_build_unary_op): Change nonconvert parameter type to
	bool.
	* decl2.c (one_static_initialization_or_destruction): Use true instead
	of 1.
	* init.c (build_vec_init): Use false instead of 0.
	* pt.c (tsubst_copy_and_build): Likewise.
	* semantics.c (simplify_loop_decl_cond): Likewise.
	* typeck.c (rationalize_conditional_expr): Likewise.
	(cp_build_binary_op): Use true instead of 1.
	(cp_build_unary_op): Change nonconvert parameter type to bool.  Use true
	instead of 1.
	(build_unary_op): Change nonconvert parameter type to bool.
	(unary_complex_lvalue): Use false instead of 0.

From-SVN: r240137
2016-09-14 15:05:00 +00:00
Jason Merrill af63ba4b30 Implement P0035R4, C++17 new of over-aligned types.
gcc/cp/
	* cp-tree.h (enum cp_tree_index): Add CPTI_ALIGN_TYPE.
	(align_type_node): New macro.
	* call.c (build_operator_new_call): Handle C++17 aligned new.
	(second_parm_is_size_t, build_op_delete_call): Likewise.
	(non_placement_deallocation_fn_p): Likewise. Rename to
	usual_deallocation_fn_p.
	(aligned_allocation_fn_p, aligned_deallocation_fn_p): New.
	* decl.c (cxx_init_decl_processing): Add aligned new support.
	* init.c (type_has_new_extended_alignment): New.
	(build_new_1): Handle aligned new.
	* tree.c (vec_copy_and_insert): New.
gcc/c-family/
	* c.opt: Add -faligned-new and -Waligned-new.
	* c-common.c (max_align_t_align): Split out from...
	(cxx_fundamental_alignment_p): ...here.
	* c-common.h: Declare it.
	* c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
libstdc++-v3/
	* libsupc++/new: Declare aligned new/delete operators.
	* config/abi/pre/gnu.ver: Export them.
	* configure.ac: Check for aligned_alloc, posix_memalign, memalign,
	_aligned_malloc.
	* libsupc++/new_opa.cc: New.
	* libsupc++/new_opant.cc: New.
	* libsupc++/new_opva.cc: New.
	* libsupc++/new_opva.cc: New.
	* libsupc++/del_opa.cc: New.
	* libsupc++/del_opant.cc: New.
	* libsupc++/del_opsa.cc: New.
	* libsupc++/del_opva.cc: New.
	* libsupc++/del_opvant.cc: New.
	* libsupc++/del_opvsa.cc: New.
	* libsupc++/Makefile.am: Build them.

From-SVN: r240056
2016-09-09 17:22:15 -04:00
Jakub Jelinek 94087e88e0 re PR sanitizer/77396 (address sanitizer crashes if all static global variables are optimized)
PR sanitizer/77396
	* sanopt.c: Include gimple-ssa.h, tree-phinodes.h and ssa-iterators.h.
	(sanopt_optimize_walker): Optimize away
	__asan_before_dynamic_init (...) followed by
	__asan_after_dynamic_init () without intervening memory loads/stores.
	* ipa-pure-const.c (special_builtin_state): Handle
	BUILT_IN_ASAN_BEFORE_DYNAMIC_INIT and
	BUILT_IN_ASAN_AFTER_DYNAMIC_INIT.

	* decl2.c (do_static_initialization_or_destruction): Only
	call asan_dynamic_init_call if INITP is true.

	* g++.dg/asan/pr77396.C: New test.

From-SVN: r239961
2016-09-02 19:11:42 +02:00
Jason Merrill f3365c1201 PR c++/68703 - bogus error with dependent vector length
gcc/c-family/
	* c-common.c (c_common_attribute_table): vector_size affects type
	identity.
gcc/cp/
	* decl2.c (any_dependent_type_attributes_p): New.
	* pt.c (dependent_type_p_r, type_dependent_expression_p): Check it.
	* semantics.c (finish_id_expression): Check it.
	* typeck.c (finish_class_member_access_expr): Check it.

From-SVN: r239309
2016-08-09 18:03:07 -04:00
Jason Merrill 6a7b92036b Rename TYPE_ANONYMOUS_P to TYPE_UNNAMED_P.
* cp-tree.h (TYPE_UNNAMED_P): Rename from TYPE_ANONYMOUS_P.
	(TYPE_WAS_UNNAMED): Rename from TYPE_WAS_ANONYMOUS.
	* class.c, decl.c, decl2.c, error.c, lambda.c, mangle.c,
	name-lookup.c, parser.c, pt.c, semantics.c, tree.c: Adjust.

From-SVN: r239137
2016-08-04 12:06:17 -04:00
Jason Merrill 94ced5b494 PR c++/71274 - deprecated warning without use.
* decl2.c (maybe_instantiate_decl): Split out from mark_used.
	(decl_constant_var_p): Use it instead.

From-SVN: r238623
2016-07-21 23:45:48 -04:00
Marek Polacek 4f2e1536a3 re PR c/70756 (Wrong column number shown for "error: invalid use of flexible array member")
PR c/70756
	* c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
	size_in_bytes and pass LOC to it.

	* c-decl.c (build_compound_literal): Pass LOC down to
	c_incomplete_type_error.
	* c-tree.h (require_complete_type): Adjust declaration.
	(c_incomplete_type_error): Likewise.
	* c-typeck.c (require_complete_type): Add location parameter, pass it
	down to c_incomplete_type_error.
	(c_incomplete_type_error): Add location parameter, pass it down to
	error_at.
	(build_component_ref): Pass location down to c_incomplete_type_error.
	(default_conversion): Pass location down to require_complete_type.
	(build_array_ref): Likewise.
	(build_function_call_vec): Likewise.
	(convert_arguments): Likewise.
	(build_unary_op): Likewise.
	(build_c_cast): Likewise.
	(build_modify_expr): Likewise.
	(convert_for_assignment): Likewise.
	(c_finish_omp_clauses): Likewise.

	* call.c (build_new_op_1): Pass LOC to cp_build_modify_expr.
	* cp-tree.h (cp_build_modify_expr): Update declaration.
	(cxx_incomplete_type_error, cxx_incomplete_type_diagnostic): New inline
	overloads.
	* cp-ubsan.c (cp_ubsan_dfs_initialize_vtbl_ptrs): Pass INPUT_LOCATION to
	cp_build_modify_expr.
	* decl2.c (set_guard): Likewise.
	(handle_tls_init): Likewise.
	* init.c (perform_member_init): Likewise.
	(expand_virtual_init): Likewise.
	(build_new_1): Likewise.
	(build_vec_delete_1): Likewise.
	(get_temp_regvar): Likewise.
	(build_vec_init): Likewise.
	* method.c (do_build_copy_assign): Likewise.
	(assignable_expr): Likewise.
	* semantics.c (finish_omp_for): Likewise.
	* typeck.c (cp_build_binary_op): Pass LOCATION to pointer_diff and
	cp_pointer_int_sum.
	(cp_pointer_int_sum): Add location parameter.  Pass it down to
	pointer_int_sum.
	(pointer_diff): Add location parameter.  Use it.
	(build_modify_expr): Pass location down to cp_build_modify_expr.
	(cp_build_modify_expr): Add location parameter.  Use it.
	(build_x_modify_expr): Pass location down to cp_build_modify_expr.
	* typeck2.c (cxx_incomplete_type_diagnostic,
	cxx_incomplete_type_error): Add location parameter.

	* langhooks-def.h (lhd_incomplete_type_error): Adjust declaration.
	* langhooks.c (lhd_incomplete_type_error): Add location parameter.
	* langhooks.h (incomplete_type_error): Likewise.
	* tree.c (size_in_bytes_loc): Renamed from size_in_bytes.  Add location
	parameter, pass it down to incomplete_type_error.
	* tree.h (size_in_bytes): New inline overload.
	(size_in_bytes_loc): Renamed from size_in_bytes.

	* c-c++-common/pr70756-2.c: New test.
	* c-c++-common/pr70756.c: New test.

From-SVN: r236180
2016-05-12 15:28:08 +00:00
Jason Merrill 97f3003f6f re PR c++/70594 (-fcompare-debug failure)
PR c++/70594
	* constexpr.c (constexpr_call_table): Preserve in GC.
	(struct fundef_copy, struct fundef_copies_table_t):	Delete.
	(fundef_copies_table): Preserve in GC. Change to pointer to
	tree->tree hash.
	(maybe_initialize_fundef_copies_table): Adjust.
	(get_fundef_copy): Return a TREE_LIST.  Use non-inserting search.
	(save_fundef_copy): Adjust for a TREE_LIST.
	(cxx_eval_call_expression): Adjust for a fundef_copy TREE_LIST.
	(fini_constexpr): New.
	* cp-tree.h (fini_constexpr): Declare.
	* decl2.c (c_parse_final_cleanups): Call fini_constexpr.

Co-Authored-By: Nathan Sidwell <nathan@acm.org>

From-SVN: r235033
2016-04-15 16:51:06 +02:00
Alexandre Oliva 05aca4e73c re PR c++/69315 (ICE in finish_function with constexpr and templates)
PR c++/69315
	* cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): Remove.
	* decl.c (defer_mark_used_calls, deferred_mark_used_calls): Remove.
	(finish_function): Don't set or test them.
	* decl2.c (mark_used): Don't handle defer_mark_used_calls.

	* g++.dg/cpp0x/constexpr-69315.C: New test.
	* g++.dg/cpp0x/variadic122.C: Change one dg-warning into dg-bogus.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
Co-Authored-By: Jason Merrill <jason@redhat.com>

From-SVN: r234436
2016-03-23 19:36:25 +01:00
Jason Merrill 50ccdf5bc2 re PR c++/68679 (gcc-5.2.1 ICE in C++11 anon union of structs with template fns, OK in gcc <= 4.9.3)
PR c++/68679
	* decl2.c (reset_type_linkage_2): Look through member templates.

From-SVN: r233512
2016-02-18 00:07:55 -05:00
Patrick Palka 20a0c6f9bd Fix PR c++/69283 (auto deduction fails when ADL is required)
gcc/cp/ChangeLog:

	PR c++/69283
	PR c++/67835
	* decl2.c (mark_used): When given a TEMPLATE_DECL, return after
	setting its TREE_USED flag.

gcc/testsuite/ChangeLog:

	PR c++/69283
	PR c++/67835
	* g++.dg/cpp1y/auto-fn29.C: New test.
	* g++.dg/cpp1y/auto-fn30.C: New test.

From-SVN: r233230
2016-02-08 23:02:50 +00:00
Martin Sebor 69da78025e PR c++/58109 - alignas() fails to compile with constant expression
PR c++/58109 - alignas() fails to compile with constant expression
PR c++/69022 - attribute vector_size ignored with dependent bytes
    
gcc/testsuite/ChangeLog:
2016-01-23  Martin Sebor  <msebor@redhat.com>
    
	PR c++/58109
	PR c++/69022
	* g++.dg/cpp0x/alignas5.C: New test.
	* g++.dg/ext/vector29.C: Same.
    
gcc/cp/ChangeLog:
2016-01-23  Martin Sebor  <msebor@redhat.com>
    
	PR c++/58109
	PR c++/69022
	* decl2.c (is_late_template_attribute): Handle dependent argument
 	to attribute align and attribute vector_size.

From-SVN: r232766
2016-01-23 09:01:47 -07:00
Marek Polacek 73f0dae2a4 re PR c++/69113 (ICE: in vague_linkage_p, at cp/decl2.c:1875 with -fno-weak)
PR c++/69113
	* decl2.c (comdat_linkage): Only set DECL_COMDAT if TREE_PUBLIC is set.

	* g++.dg/pr69113.C: New test.

From-SVN: r232189
2016-01-09 11:15:26 +00:00
Jakub Jelinek 818ab71a41 Update copyright years.
From-SVN: r232055
2016-01-04 15:30:50 +01:00
Jason Merrill 58688a4ec0 re PR c++/67411 (internal compiler error: in tsubst_copy, at cp/pt.c:13473)
PR c++/67411
	* decl2.c (decl_maybe_constant_var_p): Use DECL_HAS_VALUE_EXPR_P.

From-SVN: r231869
2015-12-20 22:04:08 -05:00
Jason Merrill b6b9902193 re PR c++/67411 (internal compiler error: in tsubst_copy, at cp/pt.c:13473)
PR c++/67411

	* decl2.c (decl_maybe_constant_var_p): A proxy isn't constant.

From-SVN: r231862
2015-12-20 13:38:30 -05:00
Patrick Palka fcb9363eb9 Fix PR c++/21802 (two-stage name lookup fails for operators)
gcc/cp/ChangeLog:

	PR c++/21802
	PR c++/53223
	* cp-tree.h (cp_tree_code_length): Declare.
	(build_min_non_dep_op_overload): Declare.
	* tree.c (cp_tree_code_length): Define.
	(build_min_non_dep_op_overload): Define.
	(build_win_non_dep_call_vec): Copy the KOENIG_LOOKUP_P flag.
	* typeck.c (build_x_indirect_ref): Use
	build_min_non_dep_op_overload when the given expression
	has been resolved to an operator overload.
	(build_x_binary_op): Likewise.
	(build_x_array_ref): Likewise.
	(build_x_unary_op): Likewise.
	(build_x_compound_expr): Likewise.
	(build_x_modify_expr): Likewise.
	* decl2.c (grok_array_decl): Likewise.
	* call.c (build_new_op_1): If during template processing we
	chose an operator overload that is a hidden friend function, set
	the call's KOENIG_LOOKUP_P flag to 1.

gcc/testsuite/ChangeLog:

	PR c++/21802
	PR c++/53223
	* g++.dg/cpp0x/pr53223.C: New test.
	* g++.dg/lookup/pr21802.C: New test.
	* g++.dg/lookup/two-stage4.C: Remove XFAIL.

From-SVN: r231640
2015-12-15 03:33:53 +00:00
Jakub Jelinek ec5a0fe042 re PR c++/67354 (internal compiler error: in add_to_same_comdat_group, at symtab.c:421)
PR c++/67354
	* cp-tree.h (defer_mangling_aliases): Declare.
	(generate_mangling_aliases): New prototype.
	* decl2.c (defer_mangling_aliases): New variable.
	(note_mangling_alias): Use !defer_mangling_aliases
	instead of at_eof.
	(generate_mangling_aliases): No longer static. Clear
	defer_mangling_aliases.
	* optimize.c (maybe_thunk_body): Defer emitting mangling aliases
	if !defer_mangling_aliases until the fns are put into the same
	comdat group.

	* g++.dg/abi/mangle67.C: New test.

From-SVN: r230646
2015-11-20 10:03:45 +01:00
Jason Merrill cda0a029f4 Merge C++ delayed folding branch.
* call.c (build_conditional_expr_1, convert_like_real)
	(convert_arg_to_ellipsis, convert_for_arg_passing): Don't fold.
	(build_new_op_1, build_over_call, build_cxx_call): Fold for warnings.
	* class.c (build_base_path, determine_primary_bases)
	(update_vtable_entry_for_fn, check_bitfield_decl)
	(layout_nonempty_base_or_field, layout_empty_base)
	(propagate_binfo_offsets, include_empty_classes)
	(layout_class_type, build_vbase_offset_vtbl_entries): Use
	fold_convert.
	* constexpr.c (cxx_eval_builtin_function_call): Fold away the NOP_EXPR.
	(cxx_eval_call_expression): Handle MEM_REF.
	(cxx_eval_pointer_plus_expression): Fold the second operand.
	(cxx_eval_constant_expression): Handle MEM_REF, UNARY_PLUS_EXPR.
	(fold_simple_1, fold_simple): New.
	(maybe_constant_value_1): Factor out from maybe_constant_value.
	(cv_cache, maybe_constant_value): Cache results.
	(maybe_constant_init): Handle null input.
	(potential_constant_expression_1): Handle RESULT_DECL, EMPTY_CLASS_EXPR.
	* cp-array-notation.c (build_array_notation_ref): Fold operands.
	* cp-gimplify.c (cp_fold_r, cp_fold): New.
	(cp_genericize_r): Use fold_convert.  Don't fold SIZEOF_EXPR.
	(cp_genericize): Fold everything.
	(contains_label_1, contains_label_p): New.
	(cp_fold, cp_fully_fold): New.
	* cp-tree.h (class cache_map): New.
	* cvt.c (cp_convert_to_pointer, ocp_convert): Use convert_to_*_nofold.
	(cp_convert_and_check): Use cp_fully_fold.
	(convert, convert_force): Don't fold.
	* decl.c (fold_sizeof_expr): Change from fold_sizeof_expr_r.
	(compute_array_index_type): Use cp_fully_fold.
	(build_enumerator): Use fold_convert.
	* decl2.c (get_guard_cond, set_guard): Use fold_convert.
	* init.c (build_zero_init_1): Fold zero-initializers.
	(build_new_1): Fold nelts calculations.
	(build_vec_delete_1): Fold conversions.
	(build_vec_init): Fold maxindex.
	* parser.c (cp_parser_binary_expression): Fold LHS of || and &&.
	(cp_parser_question_colon_clause): Fold LHS.
	* pt.c (convert_nontype_argument): Fold nullptr conversion.
	* semantics.c (finish_unary_op_expr): Fold for warnings.
	(handle_omp_array_sections_1): Fold length and low bound.
	(handle_omp_for_class_iterator): Fold various things.
	* tree.c (builtin_valid_in_constant_expr_p): Add
	BUILT_IN_ATOMIC_ALWAYS_LOCK_FREE.
	(convert_bitfield_to_declared_type): Don't fold.
	(handle_init_priority_attribute): Fold.
	(fold_if_not_in_template): Remove.
	* typeck.c (decay_conversion, build_class_member_access_expr)
	(build_simple_component_ref, cp_build_array_ref, build_vec_cmp)
	(cp_pointer_int_sum, pointer_diff): Don't fold.
	(cp_build_binary_op): Fold for warnings and PMF ops.
	(cp_build_unary_op): Fold negation of a constant, nothing else.
	(expand_ptrmemfunc_cst): Fold operations.
	* typeck2.c (split_nonconstant_init): Fold initializer.
	(store_init_value): Likewise.
	(check_narrowing): Try folding.
	* config-lang.in (gtfiles): Add cp-gimplify.c.

From-SVN: r230365
2015-11-13 19:08:05 -05:00
Andrew MacLeod 69f293c908 decl.c: Remove unused header files.
ada

	* gcc-interface/decl.c: Remove unused header files.
	* gcc-interface/misc.c: Likewise.
	* gcc-interface/targtyps.c: Likewise.
	* gcc-interface/trans.c: Likewise.
	* gcc-interface/utils.c: Likewise.
c

	* c-array-notation.c: Remove unused header files.
	* c-aux-info.c: Likewise.
	* c-convert.c: Likewise.
	* c-decl.c: Likewise.
	* c-errors.c: Likewise.
	* c-lang.c: Likewise.
	* c-objc-common.c: Likewise.
	* c-parser.c: Likewise.
	* c-typeck.c: Likewise.
	* gccspec.c: Likewise.

c-family

	* array-notation-common.c: Remove unused header files.
	* c-ada-spec.c: Likewise.
	* c-cilkplus.c: Likewise.
	* c-common.c: Likewise.
	* c-cppbuiltin.c: Likewise.
	* c-dump.c: Likewise.
	* c-format.c: Likewise.
	* c-gimplify.c: Likewise.
	* c-indentation.c: Likewise.
	* c-lex.c: Likewise.
	* c-omp.c: Likewise.
	* c-opts.c: Likewise.
	* c-pch.c: Likewise.
	* c-ppoutput.c: Likewise.
	* c-pragma.c: Likewise.
	* c-pretty-print.c: Likewise.
	* c-semantics.c: Likewise.
	* c-ubsan.c: Likewise.
	* cilk.c: Likewise.
	* stub-objc.c: Likewise.

cp

	* call.c: Remove unused header files.
	* class.c: Likewise.
	* constexpr.c: Likewise.
	* cp-array-notation.c: Likewise.
	* cp-cilkplus.c: Likewise.
	* cp-gimplify.c: Likewise.
	* cp-lang.c: Likewise.
	* cp-objcp-common.c: Likewise.
	* cp-ubsan.c: Likewise.
	* cvt.c: Likewise.
	* cxx-pretty-print.c: Likewise.
	* decl.c: Likewise.
	* decl2.c: Likewise.
	* dump.c: Likewise.
	* error.c: Likewise.
	* except.c: Likewise.
	* expr.c: Likewise.
	* friend.c: Likewise.
	* g++spec.c: Likewise.
	* init.c: Likewise.
	* lambda.c: Likewise.
	* lex.c: Likewise.
	* mangle.c: Likewise.
	* method.c: Likewise.
	* name-lookup.c: Likewise.
	* optimize.c: Likewise.
	* parser.c: Likewise.
	* pt.c: Likewise.
	* ptree.c: Likewise.
	* repo.c: Likewise.
	* rtti.c: Likewise.
	* search.c: Likewise.
	* semantics.c: Likewise.
	* tree.c: Likewise.
	* typeck.c: Likewise.
	* typeck2.c: Likewise.
	* vtable-class-hierarchy.c: Likewise.

Fortran

	* array.c: Remove unused header files.
	* convert.c: Likewise.
	* cpp.c: Likewise.
	* decl.c: Likewise.
	* f95-lang.c: Likewise.
	* frontend-passes.c: Likewise.
	* iresolve.c: Likewise.
	* match.c: Likewise.
	* module.c: Likewise.
	* options.c: Likewise.
	* parse.c: Likewise.
	* target-memory.c: Likewise.
	* trans-array.c: Likewise.
	* trans-common.c: Likewise.
	* trans-const.c: Likewise.
	* trans-decl.c: Likewise.
	* trans-expr.c: Likewise.
	* trans-intrinsic.c: Likewise.
	* trans-io.c: Likewise.
	* trans-openmp.c: Likewise.
	* trans-stmt.c: Likewise.
	* trans-types.c: Likewise.
	* trans.c: Likewise.

go

	* go-backend.c: Remove unused header files.
	* go-gcc.cc: Likewise.
	* go-lang.c: Likewise.
	* gospec.c: Likewise.

Java

	* boehm.c: Remove unused header files.
	* builtins.c: Likewise.
	* class.c: Likewise.
	* constants.c: Likewise.
	* decl.c: Likewise.
	* except.c: Likewise.
	* expr.c: Likewise.
	* java-gimplify.c: Likewise.
	* jcf-dump.c: Likewise.
	* jcf-io.c: Likewise.
	* jcf-parse.c: Likewise.
	* jvgenmain.c: Likewise.
	* lang.c: Likewise.
	* mangle.c: Likewise.
	* mangle_name.c: Likewise.
	* resource.c: Likewise.
	* typeck.c: Likewise.
	* verify-glue.c: Likewise.
	* verify-impl.c: Likewise.
	* zextract.c: Likewise.

jit

	* dummy-frontend.c: Remove unused header files.
	* jit-builtins.c: Likewise.
	* jit-playback.c: Likewise.
	* jit-recording.c: Likewise.
	* jit-spec.c: Likewise.
	* libgccjit.c: Likewise.

lto

	* lto-lang.c: Remove unused header files.
	* lto-object.c: Likewise.
	* lto-partition.c: Likewise.
	* lto-symtab.c: Likewise.
	* lto.c: Likewise.

objc

	* objc-act.c: Remove unused header files.
	* objc-encoding.c: Likewise.
	* objc-gnu-runtime-abi-01.c: Likewise.
	* objc-lang.c: Likewise.
	* objc-map.c: Likewise.
	* objc-next-runtime-abi-01.c: Likewise.
	* objc-next-runtime-abi-02.c: Likewise.
	* objc-runtime-shared-support.c: Likewise.

objcp

	* objcp-decl.c: Remove unused header files.
	* objcp-lang.c: Likewise.

From-SVN: r230166
2015-11-11 14:18:08 +00:00
Jakub Jelinek e01d41e553 gcc/
2015-11-05  Jakub Jelinek  <jakub@redhat.com>
	    Ilya Verbin  <ilya.verbin@intel.com>

	* builtin-types.def
	(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR): Remove.
	(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): New.
	* cgraph.h (enum cgraph_simd_clone_arg_type): Add
	SIMD_CLONE_ARG_TYPE_LINEAR_REF_VARIABLE_STEP,
	SIMD_CLONE_ARG_TYPE_LINEAR_UVAL_VARIABLE_STEP and
	SIMD_CLONE_ARG_TYPE_LINEAR_VAL_VARIABLE_STEP.
	(struct cgraph_simd_clone_arg): Adjust comment.
	* omp-builtins.def (BUILT_IN_GOMP_TARGET): Rename GOMP_target_41
	to GOMP_target_ext.  Add num_teams and thread_limit arguments.
	(BUILT_IN_GOMP_TARGET_DATA): Rename GOMP_target_data_41
	to GOMP_target_data_ext.
	(BUILT_IN_GOMP_TARGET_UPDATE): Rename GOMP_target_update_41
	to GOMP_target_update_ext.
	(BUILT_IN_GOMP_LOOP_NONMONOTONIC_DYNAMIC_START,
	BUILT_IN_GOMP_LOOP_NONMONOTONIC_GUIDED_START,
	BUILT_IN_GOMP_LOOP_NONMONOTONIC_DYNAMIC_NEXT,
	BUILT_IN_GOMP_LOOP_NONMONOTONIC_GUIDED_NEXT,
	BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_DYNAMIC_START,
	BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_GUIDED_START,
	BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_DYNAMIC_NEXT,
	BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_GUIDED_NEXT,
	BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_DYNAMIC,
	BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_GUIDED): New built-ins.
	* tree-core.h (enum omp_clause_schedule_kind): Add
	OMP_CLAUSE_SCHEDULE_MASK, OMP_CLAUSE_SCHEDULE_MONOTONIC,
	OMP_CLAUSE_SCHEDULE_NONMONOTONIC and change
	OMP_CLAUSE_SCHEDULE_LAST value.
	* tree.def (OMP_SIMD, CILK_SIMD, CILK_FOR, OMP_DISTRIBUTE,
	OMP_TASKLOOP, OACC_LOOP): Add OMP_FOR_ORIG_DECLS argument.
	* tree.h (OMP_FOR_ORIG_DECLS): Use OMP_LOOP_CHECK instead of
	OMP_FOR_CHECK.  Remove comment.
	* tree-pretty-print.c (dump_omp_clause): Handle
	GOMP_MAP_FIRSTPRIVATE_REFERENCE and GOMP_MAP_ALWAYS_POINTER.
	Simplify.  Print schedule clause modifiers.
	* tree-vect-stmts.c (vectorizable_simd_clone_call): Add
	SIMD_CLONE_ARG_TYPE_LINEAR_{REF,VAL,UVAL}_VARIABLE_STEP
	cases.
	* gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALWAYS_TO.
	(omp_default_clause): Tweak for
	private/firstprivate/is_device_ptr variables on target
	construct and use_device_ptr on target data.
	(omp_check_private): Likewise.
	(omp_notice_variable): For references check whether what it refers
	to has mappable type, rather than the reference itself.
	(omp_is_private): Diagnose linear iteration variables on non-simd
	constructs.
	(omp_no_lastprivate): Return true only for Fortran.
	(gimplify_scan_omp_clauses): Or in GOVD_MAP_ALWAYS_TO for
	GOMP_MAP_ALWAYS_TO or GOMP_MAP_ALWAYS_TOFROM kinds.
	Add support for GOMP_MAP_FIRSTPRIVATE_REFERENCE and
	GOMP_MAP_ALWAYS_POINTER, remove old handling of structure element
	based array sections.  Use GOMP_MAP_ALWAYS_P.  Fix up handling of
	lastprivate and linear when combined with distribute.  Gimplify
	variable low-bound for array reduction.  Look through
	POINTER_PLUS_EXPR when looking for ADDR_EXPR for array section
	reductions.
	(gimplify_adjust_omp_clauses_1): For implicit references to
	variables with reference type and when not ref to scalar or
	ref to pointer, map what they refer to using tofrom and
	use GOMP_MAP_FIRSTPRIVATE_REFERENCE for the reference.
	(gimplify_adjust_omp_clauses): Remove GOMP_MAP_ALWAYS_POINTER
	from target exit data.  Handle GOMP_MAP_FIRSTPRIVATE_REFERENCE.
	Drop OMP_CLAUSE_MAP_PRIVATE support.  Use GOMP_MAP_ALWAYS_P.
	Diagnose the same var on both firstprivate and lastprivate on
	distribute construct.
	(gimplify_omp_for): Fix up handling of predetermined
	lastprivate or linear iter vars when combined with distribute.
	(find_omp_teams, computable_teams_clause, optimize_target_teams): New
	functions.
	(gimplify_omp_workshare): Call optimize_target_teams.
	* omp-low.c (struct omp_region): Add sched_modifiers field.
	(struct omp_for_data): Likewise.
	(omp_any_child_fn_dumped): New variable.
	(extract_omp_for_data): Fill in sched_modifiers, and mask out
	OMP_CLAUSE_SCHEDULE_KIND bits outside of OMP_CLAUSE_SCHEDULE_MASK
	from sched_kind.
	(determine_parallel_type): Use only OMP_CLAUSE_SCHEDULE_MASK
	bits of OMP_CLAUSE_SCHED_KIND.
	(scan_sharing_clauses): Handle GOMP_MAP_FIRSTPRIVATE_REFERENCE,
	drop OMP_CLAUSE_MAP_PRIVATE support.  Look through POINTER_PLUS_EXPR
	for array section reductions.
	(add_taskreg_looptemp_clauses): Add one extra _looptemp_ clause even
	for distribute parallel for, if there are lastprivate clauses on the
	for.
	(lower_rec_input_clauses): Handle non-zero low-bound on array
	section reductions.
	(lower_reduction_clauses): Likewise.
	(lower_send_clauses): Look through POINTER_PLUS_EXPR
	for array section reductions.
	(expand_parallel_call): Use nonmonotonic entrypoints for
	nonmonotonic: dynamic/guided.
	(expand_omp_taskreg): Call assign_assembler_name_if_neeeded on
	child_fn if current_function_decl has assembler name set, but child_fn
	does not.  Dump the header and IL of the child function when not in SSA
	form.
	(expand_omp_target): Likewise.  Pass num_teams and thread_limit
	arguments to BUILT_IN_GOMP_TARGET.
	(expand_omp_for_static_nochunk, expand_omp_for_static_chunk):
	Initialize the extra _looptemp_ clause to fd->loop.n2.
	(expand_omp_for): Use nonmonotonic entrypoints for
	nonmonotonic: dynamic/guided.  Initialize region->sched_modifiers.
	(expand_omp): Clear omp_any_child_fn_dumped.  Dump function header
	again if we have dumped any child functions.
	(lower_omp_for_lastprivate): Determine the right count variable
	for distribute simd, or distribute parallel for{, simd}.
	(lower_omp_target): Handle GOMP_MAP_FIRSTPRIVATE_REFERENCE
	and GOMP_MAP_ALWAYS_POINTER.  Drop OMP_CLAUSE_MAP_PRIVATE
	support.
	(simd_clone_clauses_extract): Handle variable step
	for references and arguments passed by reference.
	(simd_clone_mangle): Mangle ref/uval/val variable steps.
	(simd_clone_adjust_argument_types): Handle
	SIMD_CLONE_ARG_TYPE_LINEAR_UVAL_VARIABLE_STEP like
	SIMD_CLONE_ARG_TYPE_LINEAR_UVAL_CONSTANT_STEP and
	SIMD_CLONE_ARG_TYPE_LINEAR_VAL_VARIABLE_STEP like
	SIMD_CLONE_ARG_TYPE_LINEAR_VAL_CONSTANT_STEP.
	(simd_clone_linear_addend): New function.
	(simd_clone_adjust): Handle variable step like similarly
	to constant step, use simd_clone_linear_addend to determine
	the actual step at runtime.
gcc/c-family/
2015-11-05  Jakub Jelinek  <jakub@redhat.com>

	* c-common.h (c_finish_omp_atomic): Add TEST argument.
	(c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
	* c-omp.c (c_finish_omp_atomic): Add TEST argument.  Don't call
	save_expr or create_tmp_var* if TEST is true.
	(c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
	Don't call add_stmt here.
	(struct c_omp_check_loop_iv_data): New type.
	(c_omp_check_loop_iv_r, c_omp_check_loop_iv,
	c_omp_check_loop_iv_exprs): New functions.
	(c_omp_split_clauses): Adjust for lastprivate being allowed on
	distribute.
	(c_omp_declare_simd_clauses_to_numbers): Change
	OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
	(c_omp_declare_simd_clauses_to_decls): Similarly change those
	from numbers to PARM_DECLs.
gcc/c/
2015-11-05  Jakub Jelinek  <jakub@redhat.com>
	    Ilya Verbin  <ilya.verbin@intel.com>

	* c-parser.c: Include context.h and gimple-expr.h.
	(c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
	monotonic together with nonmonotonic.
	(c_parser_omp_for_loop): Call c_omp_check_loop_iv.  Call add_stmt here.
	(OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
	(c_parser_omp_target_data, c_parser_omp_target_enter_data,
	c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
	(c_parser_omp_target): Likewise.  Evaluate num_teams and thread_limit
	expressions on combined target teams before the target.
	(c_parser_omp_declare_target): If decl has "omp declare target" or
	"omp declare target link" attribute, and cgraph or varpool node already
	exists, then set corresponding flags.  Call c_finish_omp_clauses
	in the parenthesized extended-list syntax case.
	* c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
	declare target.
	* c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
	on OMP_CLAUSE_REDUCTION array sections.
	(handle_omp_array_sections): Encode low-bound into the MEM_REF, either
	into the constant offset, or for variable low-bound using
	POINTER_PLUS_EXPR.  For structure element based array sections use
	GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
	(c_finish_omp_clauses): Drop generic_field_head, structure
	elements are now always mapped even as array section bases,
	diagnose same var in data sharing and mapping clauses.  Diagnose if
	linear step on declare simd is neither a constant nor a uniform
	parameter.  Look through POINTER_PLUS_EXPR for array section
	reductions.  Diagnose the same var or function appearing multiple
	times on the same directive.  Fix up wording for the to clause if t
	is neither a FUNCTION_DECL nor a VAR_DECL.  Diagnose nonmonotonic
	modifier on kinds other than dynamic or guided or nonmonotonic
	modifier together with ordered clause.
gcc/cp/
2015-11-05  Jakub Jelinek  <jakub@redhat.com>
	    Ilya Verbin  <ilya.verbin@intel.com>

	* cp-tree.h (finish_omp_for): Add ORIG_INITS argument.
	(omp_privatize_field): Add SHARED argument.
	* parser.c: Include context.h.
	(cp_parser_omp_clause_schedule): Parse schedule
	modifiers, diagnose monotonic together with nonmonotonic.
	(cp_parser_omp_clause_linear): Add DECLARE_SIMD argument.  Parse
	parameter name as linear step as id-expression rather than expression.
	(cp_parser_omp_all_clauses): Adjust caller.
	(cp_parser_omp_for_loop_init): Add ORIG_INIT argument,
	initialize it.  Adjust omp_privatize_field caller.
	(cp_parser_omp_for_loop): Compute orig_inits, pass it's address
	to finish_omp_for.
	(OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
	(cp_parser_omp_target_data,
	cp_parser_omp_target_enter_data,
	cp_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER
	and GOMP_MAP_FIRSTPRIVATE_REFERENCE.
	(cp_parser_omp_target): Likewise.  Evaluate num_teams and
	thread_limit expressions on combined target teams before the target.
	(cp_parser_omp_declare_target): If decl has "omp declare target" or
	"omp declare target link" attribute, and cgraph or varpool node already
	exists, then set corresponding flags.  Call finish_omp_clauses
	in the parenthesized extended-list syntax case.  Call
	cp_parser_require_pragma_eol instead of cp_parser_skip_to_pragma_eol.
	(cp_parser_omp_end_declare_target): Call cp_parser_require_pragma_eol
	instead of cp_parser_skip_to_pragma_eol.
	* decl2.c (cplus_decl_attributes): Don't diagnose block scope vars inside
	declare target.
	* pt.c (tsubst_omp_clauses): If OMP_CLAUSE_LINEAR_VARIABLE_STRIDE,
	use tsubst_omp_clause_decl instead of tsubst_expr on
	OMP_CLAUSE_LINEAR_STEP.  Handle non-static data members in shared
	clauses.
	(tsubst_omp_for_iterator): Adjust omp_privatize_field caller.
	(tsubst_find_omp_teams): New function.
	(tsubst_expr): Evaluate num_teams and thread_limit expressions on
	combined target teams before the target.  Use OMP_FOR_ORIG_DECLS for
	all OpenMP/OpenACC/Cilk+ looping constructs.  Adjust finish_omp_for
	caller.
	* semantics.c (omp_privatize_field): Add SHARED argument, if true,
	always create artificial var and never put it into the hash table
	or vector.
	(handle_omp_array_sections_1): Adjust omp_privatize_field caller.
	Allow non-zero low-bound on OMP_CLAUSE_REDUCTION array sections.
	(handle_omp_array_sections): For structure element
	based array sections use GOMP_MAP_ALWAYS_POINTER instead of
	GOMP_MAP_FIRSTPRIVATE_POINTER.  Encode low-bound into the MEM_REF,
	either into the constant offset, or for variable low-bound using
	POINTER_PLUS_EXPR.
	(finish_omp_clauses): Adjust omp_privatize_field caller.  Drop
	generic_field_head, structure elements are now always mapped even
	as array section bases, diagnose same var in data sharing and
	mapping clauses.  For references map what they refer to using
	GOMP_MAP_ALWAYS_POINTER for structure elements and
	GOMP_MAP_FIRSTPRIVATE_REFERENCE otherwise.  Diagnose if linear step
	on declare simd is neither a constant nor a uniform parameter.
	Allow non-static data members on shared clauses.  Look through
	POINTER_PLUS_EXPR for array section reductions.  Diagnose nonmonotonic
	modifier on kinds other than dynamic or guided or nonmonotonic
	modifier together with ordered clause.  Diagnose the same var or
	function appearing multiple times on the same directive.  Fix up
	wording for the to clause if t is neither a FUNCTION_DECL nor a
	VAR_DECL, use special wording for OVERLOADs and TEMPLATE_ID_EXPR.
	(handle_omp_for_class_iterator): Add ORIG_DECLS argument.  Call
	c_omp_check_loop_iv_exprs on cond.
	(finish_omp_for): Add ORIG_INITS argument.  Call
	c_omp_check_loop_iv_exprs on ORIG_INITS elements.  Adjust
	handle_omp_for_class_iterator caller.  Call c_omp_check_loop_iv.
	Call add_stmt.
	(finish_omp_atomic): Adjust c_finish_omp_atomic caller.
gcc/fortran/
2015-11-05  Jakub Jelinek  <jakub@redhat.com>

	* types.def (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR): Remove.
	(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): New.
gcc/testsuite/
2015-11-05  Jakub Jelinek  <jakub@redhat.com>

	* c-c++-common/gomp/clauses-2.c (foo): Adjust for diagnostics
	of variables in both data sharing and mapping clauses and for
	structure element based array sections being mapped rather than
	privatized.
	* c-c++-common/gomp/declare-target-2.c: Add various new tests.  Adjust
	expected diagnostics wording in one case.
	* c-c++-common/gomp/distribute-1.c: New test.
	* c-c++-common/gomp/element-1.c: New test.
	* c-c++-common/gomp/pr61486-2.c: Add #pragma omp declare target
	and #pragma omp end declare target pair around the function.
	Change s from a parameter to a file scope variable.
	* c-c++-common/gomp/pr67521.c: Add dg-error directives.
	* c-c++-common/gomp/reduction-1.c (foo): Don't expect diagnostics
	on non-zero low-bound in reduction array sections.  Add further
	tests.
	* c-c++-common/gomp/schedule-modifiers-1.c: New test.
	* c-c++-common/gomp/target-teams-1.c: New test.
	* gcc.dg/gomp/declare-simd-1.c: Add scan-assembler-times directives
	for expected mangling on x86_64/i?86.
	* gcc.dg/gomp/declare-simd-3.c: New test.
	* gcc.dg/gomp/declare-simd-4.c: New test.
	* gcc.dg/gomp/for-20.c: New test.
	* gcc.dg/gomp/for-21.c: New test.
	* gcc.dg/gomp/for-22.c: New test.
	* gcc.dg/gomp/for-23.c: New test.
	* gcc.dg/gomp/for-24.c: New test.
	* gcc.dg/gomp/linear-1.c: New test.
	* gcc.dg/gomp/loop-1.c: New test.
	* g++.dg/gomp/atomic-17.C: New test.
	* g++.dg/gomp/clause-1.C (T::test): Don't expect error on
	non-static data member in shared clause.  Add single construct.
	* g++.dg/gomp/declare-simd-1.C: Add dg-options.  Add
	scan-assembler-times directives for expected mangling on x86_64/i?86.
	* g++.dg/gomp/declare-simd-3.C: Likewise.
	* g++.dg/gomp/declare-simd-4.C: New test.
	* g++.dg/gomp/declare-simd-5.C: New test.
	* g++.dg/gomp/declare-target-1.C: New test.
	* g++.dg/gomp/linear-2.C: New test.
	* g++.dg/gomp/loop-1.C: New test.
	* g++.dg/gomp/loop-2.C: New test.
	* g++.dg/gomp/loop-3.C: New test.
	* g++.dg/gomp/member-2.C (B::m2, B::m4): Don't expect error on
	non-static data member in shared clause.
	* g++.dg/gomp/member-3.C: New test.
	* g++.dg/gomp/member-4.C: New test.
	* g++.dg/gomp/pr38639.C (foo): Adjust dg-error.
	(bar): Remove dg-message.
	* g++.dg/gomp/target-teams-1.C: New test.
include/
2015-11-05  Jakub Jelinek  <jakub@redhat.com>
	    Ilya Verbin  <ilya.verbin@intel.com>

	* gomp-constants.h (GOMP_MAP_FLAG_SPECIAL_2): Define.
	(GOMP_MAP_FLAG_ALWAYS): Remove.
	(enum gomp_map_kind): Use GOMP_MAP_FLAG_SPECIAL_2 instead of
	GOMP_MAP_FLAG_ALWAYS for GOMP_MAP_ALWAYS_TO, GOMP_MAP_ALWAYS_FROM,
	GOMP_MAP_ALWAYS_TOFROM, GOMP_MAP_STRUCT, GOMP_MAP_RELEASE.
	Add GOMP_MAP_ALWAYS_POINTER and GOMP_MAP_FIRSTPRIVATE_REFERENCE.
	(GOMP_MAP_ALWAYS_P): Define.
	(GOMP_TARGET_FLAG_NOWAIT): Adjust comment.
libgomp/
2015-11-05  Jakub Jelinek  <jakub@redhat.com>
	    Ilya Verbin  <ilya.verbin@intel.com>

	* libgomp_g.h (GOMP_loop_nonmonotonic_dynamic_next,
	GOMP_loop_nonmonotonic_dynamic_start,
	GOMP_loop_nonmonotonic_guided_next,
	GOMP_loop_nonmonotonic_guided_start,
	GOMP_loop_ull_nonmonotonic_dynamic_next,
	GOMP_loop_ull_nonmonotonic_dynamic_start,
	GOMP_loop_ull_nonmonotonic_guided_next,
	GOMP_loop_ull_nonmonotonic_guided_start,
	GOMP_parallel_loop_nonmonotonic_dynamic,
	GOMP_parallel_loop_nonmonotonic_guided): New prototypes.
	(GOMP_target_41): Renamed to ...
	(GOMP_target_ext): ... this.  Add num_teams and thread_limit
	arguments.
	(GOMP_target_data_41): Renamed to ...
	(GOMP_target_data_ext): ... this.
	(GOMP_target_update_41): Renamed to ...
	(GOMP_target_update_ext): ... this.
	* libgomp.map (GOMP_4.5): Export GOMP_target_ext,
	GOMP_target_data_ext and GOMP_target_update_ext instead of
	GOMP_target_41, GOMP_target_data_41 and GOMP_target_update_41.
	Export GOMP_loop_nonmonotonic_dynamic_next,
	GOMP_loop_nonmonotonic_dynamic_start,
	GOMP_loop_nonmonotonic_guided_next,
	GOMP_loop_nonmonotonic_guided_start,
	GOMP_loop_ull_nonmonotonic_dynamic_next,
	GOMP_loop_ull_nonmonotonic_dynamic_start,
	GOMP_loop_ull_nonmonotonic_guided_next,
	GOMP_loop_ull_nonmonotonic_guided_start,
	GOMP_parallel_loop_nonmonotonic_dynamic and
	GOMP_parallel_loop_nonmonotonic_guided.
	* loop.c (GOMP_parallel_loop_nonmonotonic_dynamic,
	GOMP_parallel_loop_nonmonotonic_guided,
	GOMP_loop_nonmonotonic_dynamic_start,
	GOMP_loop_nonmonotonic_guided_start,
	GOMP_loop_nonmonotonic_dynamic_next,
	GOMP_loop_nonmonotonic_guided_next): New aliases or functions.
	* loop_ull.c (GOMP_loop_ull_nonmonotonic_dynamic_start,
	GOMP_loop_ull_nonmonotonic_guided_start,
	GOMP_loop_ull_nonmonotonic_dynamic_next,
	GOMP_loop_ull_nonmonotonic_guided_next): Likewise.
	* target.c (gomp_map_0len_lookup, gomp_map_val): New inline
	functions.
	(gomp_map_vars): Handle GOMP_MAP_ALWAYS_POINTER.  For
	GOMP_MAP_ZERO_LEN_ARRAY_SECTION use gomp_map_0len_lookup.
	Use gomp_map_val function.
	(gomp_target_fallback_firstprivate): New static function.
	(GOMP_target_41): Renamed to ...
	(GOMP_target_ext): ... this.  Add num_teams and thread_limit
	arguments.  Move firstprivate fallback handling into a new
	function.
	(GOMP_target_data_41): Renamed to ...
	(GOMP_target_data_ext): ... this.
	(GOMP_target_update_41): Renamed to ...
	(GOMP_target_update_ext): ... this.
	(gomp_exit_data): For GOMP_MAP_*ZERO_LEN* use
	gomp_map_0len_lookup instead of gomp_map_lookup.
	(omp_target_is_present): Use gomp_map_0len_lookup instead of
	gomp_map_lookup.
	* testsuite/libgomp.c/target-28.c: Likewise.
	* testsuite/libgomp.c/monotonic-1.c: New test.
	* testsuite/libgomp.c/monotonic-2.c: New test.
	* testsuite/libgomp.c/nonmonotonic-1.c: New test.
	* testsuite/libgomp.c/nonmonotonic-2.c: New test.
	* testsuite/libgomp.c/pr66199-5.c: New test.
	* testsuite/libgomp.c/pr66199-6.c: New test.
	* testsuite/libgomp.c/pr66199-7.c: New test.
	* testsuite/libgomp.c/pr66199-8.c: New test.
	* testsuite/libgomp.c/pr66199-9.c: New test.
	* testsuite/libgomp.c/reduction-11.c: New test.
	* testsuite/libgomp.c/reduction-12.c: New test.
	* testsuite/libgomp.c/reduction-13.c: New test.
	* testsuite/libgomp.c/reduction-14.c: New test.
	* testsuite/libgomp.c/reduction-15.c: New test.
	* testsuite/libgomp.c/target-12.c (main): Adjust for
	omp_target_is_present change for one-past-last element.
	* testsuite/libgomp.c/target-17.c (foo): Drop tests where
	the same var is both mapped and privatized.
	* testsuite/libgomp.c/target-19.c (foo): Adjust for different
	handling of zero-length array sections.
	* testsuite/libgomp.c/target-28.c: New test.
	* testsuite/libgomp.c/target-29.c: New test.
	* testsuite/libgomp.c/target-30.c: New test.
	* testsuite/libgomp.c/target-teams-1.c: New test.
	* testsuite/libgomp.c++/member-6.C: New test.
	* testsuite/libgomp.c++/member-7.C: New test.
	* testsuite/libgomp.c++/monotonic-1.C: New test.
	* testsuite/libgomp.c++/monotonic-2.C: New test.
	* testsuite/libgomp.c++/nonmonotonic-1.C: New test.
	* testsuite/libgomp.c++/nonmonotonic-2.C: New test.
	* testsuite/libgomp.c++/pr66199-3.C: New test.
	* testsuite/libgomp.c++/pr66199-4.C: New test.
	* testsuite/libgomp.c++/pr66199-5.C: New test.
	* testsuite/libgomp.c++/pr66199-6.C: New test.
	* testsuite/libgomp.c++/pr66199-7.C: New test.
	* testsuite/libgomp.c++/pr66199-8.C: New test.
	* testsuite/libgomp.c++/pr66199-9.C: New test.
	* testsuite/libgomp.c++/reduction-11.C: New test.
	* testsuite/libgomp.c++/reduction-12.C: New test.
	* testsuite/libgomp.c++/target-13.C: New test.
	* testsuite/libgomp.c++/target-14.C: New test.
	* testsuite/libgomp.c++/target-15.C: New test.
	* testsuite/libgomp.c++/target-16.C: New test.
	* testsuite/libgomp.c++/target-17.C: New test.
	* testsuite/libgomp.c++/target-18.C: New test.
	* testsuite/libgomp.c++/target-19.C: New test.

Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>

From-SVN: r229814
2015-11-05 16:08:08 +01:00
Mikhail Maltsev 595278beb1 ENABLE_CHECKING refactoring: C family front ends
gcc/c-family/

	* c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
	flag_checking.

gcc/cp/

	* call.c (validate_conversion_obstack): Define unconditionally.
	* constexpr.c (maybe_constant_value, fold_non_dependent_expr): Use
	gcc_checking_assert.
	* cp-tree.h: Use CHECKING_P instead of ENABLE_CHECKING.
	* decl2.c (cxx_post_compilation_parsing_cleanups): Use flag_checking.
	* mangle.c (add_substitution): Likewise.
	* method.c (maybe_explain_implicit_delete): Likewise.
	* parser.c (cp_parser_template_argument_list): Remove conditional
	compilation.
	* pt.c (check_unstripped_args): Rename to...
	(verify_unstripped_args): ... this and remove conditional compilation.
	(retrieve_specialization): Guard call of verify_unstripped_args with
	flag_checking.
	(template_parm_to_arg): Remove conditional compilation.
	(template_parms_to_args, coerce_template_parameter_pack,
	coerce_template_parms): Likewise.
	(tsubst_copy): Use flag_checking.
	(type_unification_real): Remove conditional compilation.
	(build_non_dependent_expr): Use flag_checking.
	* tree.c (build_target_expr): Remove conditional compilation, use
	gcc_checking_assert.
	* typeck.c (comptypes): Likewise.
	* typeck2.c (digest_init_r): Likewise.

From-SVN: r229756
2015-11-04 14:32:42 +00:00
Andrew MacLeod 2adfab879c decl.c: Reorder #include's and remove duplicates.
ada
2015-10-29  Andrew MacLeod  <amacleod@redhat.com>

	* gcc-interface/decl.c: Reorder #include's and remove duplicates.
	* gcc-interface/misc.c: Likewise.
	* gcc-interface/targtyps.c: Likewise.
	* gcc-interface/trans.c: Likewise.
	* gcc-interface/utils.c: Likewise.
	
c
2015-10-29  Andrew MacLeod  <amacleod@redhat.com>

	* c-array-notation.c: Reorder #include's and remove duplicates.
	* c-aux-info.c: Likewise.
	* c-convert.c: Likewise.
	* c-decl.c: Likewise.
	* c-errors.c: Likewise.
	* c-lang.c: Likewise.
	* c-objc-common.c: Likewise.
	* c-parser.c: Likewise.
	* c-typeck.c: Likewise.

c-family
2015-10-29  Andrew MacLeod  <amacleod@redhat.com>

	* array-notation-common.c: Reorder #include's and remove duplicates.
	* c-ada-spec.c: Likewise.
	* c-cilkplus.c: Likewise.
	* c-common.c: Likewise.
	* c-cppbuiltin.c: Likewise.
	* c-dump.c: Likewise.
	* c-format.c: Likewise.
	* c-gimplify.c: Likewise.
	* c-indentation.c: Likewise.
	* c-lex.c: Likewise.
	* c-omp.c: Likewise.
	* c-opts.c: Likewise.
	* c-pch.c: Likewise.
	* c-ppoutput.c: Likewise.
	* c-pragma.c: Likewise.
	* c-pretty-print.c: Likewise.
	* c-semantics.c: Likewise.
	* c-ubsan.c: Likewise.
	* cilk.c: Likewise.
	* stub-objc.c: Likewise.

cp
2015-10-29  Andrew MacLeod  <amacleod@redhat.com>

	* call.c: Reorder #include's and remove duplicates.
	* class.c: Likewise.
	* constexpr.c: Likewise.
	* cp-array-notation.c: Likewise.
	* cp-cilkplus.c: Likewise.
	* cp-gimplify.c: Likewise.
	* cp-lang.c: Likewise.
	* cp-objcp-common.c: Likewise.
	* cp-ubsan.c: Likewise.
	* cvt.c: Likewise.
	* cxx-pretty-print.c: Likewise.
	* decl.c: Likewise.
	* decl2.c: Likewise.
	* dump.c: Likewise.
	* error.c: Likewise.
	* except.c: Likewise.
	* expr.c: Likewise.
	* friend.c: Likewise.
	* init.c: Likewise.
	* lambda.c: Likewise.
	* lex.c: Likewise.
	* mangle.c: Likewise.
	* method.c: Likewise.
	* name-lookup.c: Likewise.
	* optimize.c: Likewise.
	* parser.c: Likewise.
	* pt.c: Likewise.
	* ptree.c: Likewise.
	* repo.c: Likewise.
	* rtti.c: Likewise.
	* search.c: Likewise.
	* semantics.c: Likewise.
	* tree.c: Likewise.
	* typeck.c: Likewise.
	* typeck2.c: Likewise.
	* vtable-class-hierarchy.c: Likewise.

fortran

2015-10-29  Andrew MacLeod  <amacleod@redhat.com>

	* array.c: Reorder #include's and remove duplicates.
	* convert.c: Likewise.
	* cpp.c: Likewise.
	* decl.c: Likewise.
	* f95-lang.c: Likewise.
	* frontend-passes.c: Likewise.
	* iresolve.c: Likewise.
	* match.c: Likewise.
	* module.c: Likewise.
	* options.c: Likewise.
	* parse.c: Likewise.
	* resolve.c: Likewise.
	* simplify.c: Likewise.
	* target-memory.c: Likewise.
	* trans-array.c: Likewise.
	* trans-common.c: Likewise.
	* trans-const.c: Likewise.
	* trans-decl.c: Likewise.
	* trans-expr.c: Likewise.
	* trans-intrinsic.c: Likewise.
	* trans-io.c: Likewise.
	* trans-openmp.c: Likewise.
	* trans-stmt.c: Likewise.
	* trans-types.c: Likewise.
	* trans.c: Likewise.

go
2015-10-29  Andrew MacLeod  <amacleod@redhat.com>

	* go-backend.c: Reorder #include's and remove duplicates.
	* go-lang.c: Likewise.

java
2015-10-29  Andrew MacLeod  <amacleod@redhat.com>

	* boehm.c: Reorder #include's and remove duplicates.
	* builtins.c: Likewise.
	* class.c: Likewise.
	* constants.c: Likewise.
	* decl.c: Likewise.
	* except.c: Likewise.
	* expr.c: Likewise.
	* java-gimplify.c: Likewise.
	* jcf-dump.c: Likewise.
	* jcf-io.c: Likewise.
	* jcf-parse.c: Likewise.
	* jvgenmain.c: Likewise.
	* lang.c: Likewise.
	* mangle.c: Likewise.
	* mangle_name.c: Likewise.
	* resource.c: Likewise.
	* typeck.c: Likewise.
	* verify-glue.c: Likewise.
	* verify-impl.c: Likewise.

jit
2015-10-29  Andrew MacLeod  <amacleod@redhat.com>

	* dummy-frontend.c: Reorder #include's and remove duplicates.
	* jit-builtins.c: Likewise.
	* jit-playback.c: Likewise.
	* jit-recording.c: Likewise.
	* libgccjit.c: Likewise.

lto
2015-10-29  Andrew MacLeod  <amacleod@redhat.com>

	* lto-lang.c: Reorder #include's and remove duplicates.
	* lto-object.c: Likewise.
	* lto-partition.c: Likewise.
	* lto-symtab.c: Likewise.
	* lto.c: Likewise.

objc
2015-10-29  Andrew MacLeod  <amacleod@redhat.com>

	* objc-lang.c: Reorder #include's and remove duplicates.
	* objc-map.c: Likewise.

objcp
2015-10-29  Andrew MacLeod  <amacleod@redhat.com>

	* objcp-decl.c: Reorder #include's and remove duplicates.
	* objcp-lang.c: Likewise.

From-SVN: r229533
2015-10-29 15:27:20 +00:00
Jason Merrill dcdbc004d5 Expand PTRMEM_CST only when necessary.
* constexpr.c (cxx_eval_constant_expression): Expand PTRMEM_CST
	only when necessary.
	(cxx_eval_component_reference): Like here.
	* decl2.c (lower_var_init): And here.
	(c_parse_final_cleanups): Call it.
	* typeck2.c (digest_init_r): Not here.
	* decl.c (complete_vars): Or here.
	(cp_finish_decl): Add local statics to symbol table.

From-SVN: r229018
2015-10-19 22:48:43 -04:00
Richard Biener b5415a9ebc cp-tree.h (note_decl_for_pch): Remove.
2015-09-17  Richard Biener  <rguenther@suse.de>

	* cp-tree.h (note_decl_for_pch): Remove.
	* class.c (build_clone): Do not call note_decl_for_pch.
	* semantics.c (finish_member_declaration): Likewise.
	(note_decl_for_pch): Remove.
	* decl2.c (c_parse_final_cleanups): Mangle all globals before
	writing the PCH.

From-SVN: r227846
2015-09-17 07:48:09 +00:00
Paolo Carlini 273aa49e2f re PR c++/53184 (Unnecessary anonymous namespace warnings)
2015-09-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/53184
	* doc/invoke.texi ([Wsubobject-linkage]): Document.

/c-family
2015-09-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/53184
	* c.opt ([Wsubobject-linkage]): Add.

/cp
2015-09-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/53184
	* decl2.c (constrain_class_visibility): Use Wsubobject-linkage.

/testsuite
2015-09-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/53184
	* g++.dg/warn/Wsubobject-linkage-1.C: New.
	* g++.dg/warn/Wsubobject-linkage-2.C: Likewise.
	* g++.dg/warn/Wsubobject-linkage-3.C: Likewise.
	* g++.dg/warn/Wsubobject-linkage-4.C: Likewise.

From-SVN: r227593
2015-09-09 16:48:13 +00:00
Jason Merrill 60349f15cc re PR c++/65974 (Bogus deprecated-declarations warnings for inline definitions of deprecated virtual methods)
PR c++/65974
	* decl2.c (mark_vtable_entries): Suppress -Wdeprecated.

From-SVN: r226908
2015-08-15 03:59:26 -04:00
Jason Merrill e5e58dbe28 re PR c++/67108 (ICE: in cxx_eval_call_expression, at cp/constexpr.c:1345 when dumping)
PR c++/67108
	* decl2.c (c_parse_final_cleanups): Set at_eof to 2 at end.
	* error.c (dump_template_bindings): Don't tsubst in that case.

From-SVN: r226829
2015-08-12 14:02:35 -04:00
Andrew Sutton 971e17ff87 Add C++ Concepts TS support.
gcc/c-family/
	* c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
	* c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
	(D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
	* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
	* c-opts.c (set_std_cxx1z): Set flag_concepts.
	* c.opt (fconcepts): New.
gcc/cp/
	* constraint.cc, logic.cc: New files.
	* Make-lang.in (CXX_AND_OBJCXX_OBJS): Add constraint.o and logic.o.
	(c++.tags): Also process .cc files.
	* call.c (enum rejection_reason_code): Add rr_constraint_failure.
	(print_z_candidate): Handle it.
	(constraint_failure): New.
	(add_function_candidate): Check constraints.
	(build_new_function_call): Handle evaluating concepts.
	(joust): Check more_constrained.
	* class.c (add_method): Check equivalently_constrained.
	(build_clone): Copy constraints.
	(currently_open_class): Return tree.
	(resolve_address_of_overloaded_function): Check constraints.
	* constexpr.c (cxx_eval_constant_expression): Handle REQUIRES_EXPR.
	(potential_constant_expression_1): Likewise.
	* cp-objcp-common.c (cp_tree_size): Handle CONSTRAINT_INFO.
	(cp_common_init_ts): Handle WILDCARD_DECL and REQUIRES_EXPR.
	* cp-tree.def: Add CONSTRAINT_INFO, WILDCARD_DECL, REQUIRES_EXPR,
	SIMPLE_REQ, TYPE_REQ, COMPOUND_REQ, NESTED_REQ, PRED_CONSTR,
	EXPR_CONSTR, TYPE_CONSTR, ICONV_CONSTR, DEDUCT_CONSTR,
	EXCEPT_CONSTR, PARM_CONSTR, CONJ_CONSTR, DISJ_CONSTR.
	* cp-tree.h (struct tree_constraint_info, check_nonnull)
	(check_constraint_info, CI_TEMPLATE_REQS, CI_DECLARATOR_REQS)
	(CI_ASSOCIATED_CONSTRAINTS, CI_NORMALIZED_CONSTRAINTS)
	(CI_ASSUMPTIONS, TEMPLATE_PARMS_CONSTRAINTS)
	(TEMPLATE_PARM_CONSTRAINTS, COMPOUND_REQ_NOEXCEPT_P)
	(PLACEHOLDER_TYPE_CONSTRAINTS, PRED_CONSTR_EXPR, EXPR_CONSTR_EXPR)
	(TYPE_CONSTR_TYPE, ICONV_CONSTR_EXPR, ICONV_CONSTR_TYPE)
	(DEDUCT_CONSTR_EXPR, DEDUCT_CONSTR_PATTERN)
	(DEDUCT_CONSTR_PLACEHOLDER, EXCEPT_CONSTR_EXPR, PARM_CONSTR_PARMS)
	(PARM_CONSTR_OPERAND, CONSTRAINT_VAR_P, CONSTRAINED_PARM_CONCEPT)
	(CONSTRAINED_PARM_EXTRA_ARGS, CONSTRAINED_PARM_PROTOTYPE)
	(DECL_DECLARED_CONCEPT_P, WILDCARD_PACK_P, struct cp_unevaluated)
	(struct local_specialization_stack, enum auto_deduction_context)
	(variable_concept_p, concept_template_p)
	(struct deferring_access_check_sentinel): New.
	(enum cp_tree_node_structure_enum): Add TS_CP_CONSTRAINT_INFO.
	(union lang_tree_node): Add constraint_info field.
	(struct lang_decl_base): Add concept_p flag.
	(enum cp_decl_spec): Add ds_concept.
	(struct cp_declarator): Add requires_clause.
	* cxx-pretty-print.c (cxx_pretty_printer::primary_expression)
	(cxx_pretty_printer::expression): Handle REQUIRES_EXPR,
	TRAIT_EXPR, *_CONSTR.
	(pp_cxx_parameter_declaration_clause): Accept a chain of
	PARM_DECLs.
	(cxx_pretty_printer::declarator): Print requires-clause.
	(pp_cxx_template_declaration): Likewise.
	(pp_cxx_trait_expression): Handle CPTK_IS_SAME_AS.
	(pp_cxx_requires_clause, pp_cxx_requirement)
	(pp_cxx_requirement_list, pp_cxx_requirement_body)
	(pp_cxx_requires_expr, pp_cxx_simple_requirement)
	(pp_cxx_type_requirement, pp_cxx_compound_requirement)
	(pp_cxx_nested_requirement, pp_cxx_predicate_constraint)
	(pp_cxx_expression_constraint, pp_cxx_type_constraint)
	(pp_cxx_implicit_conversion_constraint)
	(pp_cxx_argument_deduction_constraint)
	(pp_cxx_exception_constraint, pp_cxx_parameterized_constraint)
	(pp_cxx_conjunction, pp_cxx_disjunction, pp_cxx_constraint): New.
	* cxx-pretty-print.h: Declare them.
	* decl.c (decls_match): Compare constraints.
	(duplicate_decls): Likewise.  Remove constraints before freeing.
	(cxx_init_decl_processing): Call init_constraint_processing.
	(cp_finish_decl): Diagnose concept without initializer.
	(grokfndecl, grokvardecl): Handle concepts and constraints.
	(grokdeclarator): Handle concept, requires-clause.
	(grokparms): No longer static.
	(xref_tag_1): Check constraints.
	(finish_function): Call check_function_concept.
	(cp_tree_node_structure): Handle CONSTRAINT_INFO.
	(check_concept_refinement, is_concept_var, check_concept_fn): New.
	* decl2.c (check_classfn): Compare constraints.
	(mark_used): Don't instantiate concepts.
	* error.c (dump_template_decl): Print constraints.
	(dump_function_decl): Likewise.
	(dump_expr): Handle REQUIRES_EXPR, *_REQ, *_CONSTR.
	* lex.c (init_reswords): Set D_CXX_CONCEPTS.
	* method.c (implicitly_declare_fn): Copy constraints from
	inherited ctor.
	* parser.h (struct cp_parser): Add in_result_type_constraint_p and
	prevent_constrained_type_specifiers fields.
	* parser.c (make_call_declarator): Add requires_clause parm.
	(cp_parser_new): Clear prevent_constrained_type_specifiers.
	(cp_parser_primary_expression): Handle RID_IS_SAME_AS, RID_REQUIRES.
	(cp_parser_postfix_expression): Set prevent_constrained_type_specifiers.
	(cp_parser_trait_expr): Handle RID_IS_SAME_AS.
	(cp_parser_declaration): Handle concept introduction.
	(cp_parser_member_declaration): Likewise.
	(cp_parser_template_parameter): Handle constrained parameter.
	(cp_parser_type_parameter): Handle constraints.
	(cp_parser_decl_specifier_seq): Handle RID_CONCEPT.
	(cp_parser_template_id): Handle partial concept id.
	(cp_parser_type_name): Add overload that takes typename_keyword_p.
	Handle constrained parameter.
	(cp_parser_nonclass_name): Handle concept names.
	(cp_parser_alias_declaration): Handle constraints.
	(cp_parser_late_return_type_opt): Also handle requires-clause.
	(cp_parser_type_id_1): Handle deduction constraint.
	(cp_parser_parameter_declaration): Handle constrained parameters.
	(cp_parser_class_specifier_1): Handle constraints.
	(cp_parser_template_declaration_after_parameters): Split out from
	cp_parser_template_declaration_after_export.
	(cp_parser_single_declaration): Handle constraints.
	(synthesize_implicit_template_parm): Handle constraints.
	(cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id)
	(cp_parser_introduction_list, get_id_declarator)
	(get_unqualified_id, is_constrained_parameter)
	(cp_parser_check_constrained_type_parm)
	(cp_parser_constrained_type_template_parm)
	(cp_parser_constrained_template_template_parm)
	(constrained_non_type_template_parm, finish_constrained_parameter)
	(declares_constrained_type_template_parameter)
	(declares_constrained_template_template_parameter)
	(check_type_concept, cp_parser_maybe_constrained_type_specifier)
	(cp_parser_maybe_concept_name, cp_parser_maybe_partial_concept_id)
	(cp_parser_requires_clause, cp_parser_requires_clause_opt)
	(cp_parser_requires_expression)
	(cp_parser_requirement_parameter_list, cp_parser_requirement_body)
	(cp_parser_requirement_list, cp_parser_requirement)
	(cp_parser_simple_requirement, cp_parser_type_requirement)
	(cp_parser_compound_requirement, cp_parser_nested_requirement)
	(cp_parser_template_introduction)
	(cp_parser_explicit_template_declaration)
	(get_concept_from_constraint): New.
	* pt.c (local_specialization_stack): Implement.
	(maybe_new_partial_specialization): New.
	(maybe_process_partial_specialization): Use it.
	(retrieve_local_specialization, register_local_specialization)
	(template_parm_to_arg, build_template_decl, extract_fnparm_pack)
	(tsubst_expr): No longer static.
	(spec_hasher::equal): Compare constraints.
	(determine_specialization): Handle constraints.
	(check_explicit_specialization): Handle concepts.
	(process_template_parm): Handle constraints.
	(end_template_parm_list): Add overload taking no arguments.
	(process_partial_specialization): Handle concepts and constraints.
	Register partial specializations of variable templates.
	(redeclare_class_template): Handle constraints.
	(convert_template_argument): Handle WILDCARD_DECL.  Check
	is_compatible_template_arg.
	(coerce_template_parameter_pack): Handle wildcard packs.
	(coerce_template_parms): DR 1430 also applies to concepts.  Add
	overloads taking fewer parameters.
	(lookup_template_class_1): Handle constraints.
	(lookup_template_variable): Concepts are always bool.
	(finish_template_variable): Handle concepts and constraints.
	(tsubst_friend_class): Handle constraints.
	(gen_elem_of_pack_expansion_instantiation): Handle constraints.
	(tsubst_pack_expansion): Handle local parameters.
	(tsubst_decl) [FUNCTION_DECL]: Handle constraints.
	(tsubst) [TEMPLATE_TYPE_PARM]: Handle deduction constraints.
	(tsubst_copy_and_build): Handle REQUIRES_EXPR.
	(more_specialized_fn, more_specialized_partial_spec): Check constraints.
	(more_specialized_inst): Split out from most_specialized_instantiation.
	(most_specialized_partial_spec): Check constraints.
	(instantiate_decl): Never instantiate a concept.
	(value_dependent_expression_p): Handle REQUIRES_EXPR, TYPE_REQ,
	variable concepts.
	(type_dependent_expression_p): Handle WILDCARD_DECL, REQUIRES_EXPR.
	(instantiation_dependent_r): Handle REQUIRES_EXPR and concepts.
	(do_auto_deduction): Add overload taking tsubst flags and context enum.
	Handle constraints.
	(get_template_for_ordering, most_constrained_function)
	(is_compatible_template_arg, convert_wildcard_argument)
	(struct	constr_entry, struct constr_hasher, decl_constraints)
	(valid_constraints_p, get_constraints, set_constraints)
	(remove_constraints, init_constraint_processing): New.
	* ptree.c (cxx_print_xnode): Handle CONSTRAINT_INFO.
	* search.c (lookup_member): Do lookup in the open partial
	instantiation.
	* semantics.c (finish_template_template_parm): Handle constraints.
	(fixup_template_type): New.
	(finish_template_type): Call it.
	(trait_expr_value, finish_trait_expr): Handle CPTK_IS_SAME_AS.
	* tree.c (cp_tree_equal): Handle local parameters, CONSTRAINT_INFO.
	(cp_walk_subtrees): Handle REQUIRES_EXPR.
	* typeck.c (cp_build_function_call_vec): Check constraints.

Co-Authored-By: Braden Obrzut <admin@maniacsvault.net>
Co-Authored-By: Jason Merrill <jason@redhat.com>

From-SVN: r226713
2015-08-07 01:44:49 -04:00
Paolo Carlini af7186706c decl.c (poplevel): Use Use DECL_SOURCE_LOCATION and "%qD" in warning_at instead of "%q+D" in warning.
2015-07-26  Paolo Carlini  <paolo.carlini@oracle.com>

	* decl.c (poplevel): Use Use DECL_SOURCE_LOCATION and "%qD"
	in warning_at instead of "%q+D" in warning.
	(warn_extern_redeclared_static): Likewise for inform.
	(check_redeclaration_no_default_args): Likewise for permerror.
	(duplicate_decls): Likewise.
	(check_previous_goto_1): Likewise for inform.
	(check_goto, start_decl, check_for_uninitialized_const_var,
	start_preparsed_function, finish_function§): Likewise.
	* decl2.c (build_anon_union_vars, c_parse_final_cleanups): Likewise.
	* init.c (sort_mem_initializers): Likewise.
	* typeck.c (convert_for_initialization): Likewise for inform.
	(maybe_warn_about_returning_address_of_local): Likewise.
	* typeck2.c (abstract_virtuals_error_sfinae): Likewise for inform.
	(cxx_incomplete_type_diagnostic): Likewise for emit_diagnostic.

From-SVN: r226234
2015-07-26 09:17:03 +00:00
Eric Botcazou bb49ee66ef c-ada-spec.h (cpp_operation): Revert latest change.
c-family/
	* c-ada-spec.h (cpp_operation): Revert latest change.
	* c-ada-spec.c (print_ada_declaration): Likewise.  Skip implicit
	constructors and destructors.
cp/
	* decl2.c (cpp_check): Revert latest change.

From-SVN: r225686
2015-07-10 19:19:39 +00:00
Eric Botcazou a9dcd529a9 c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
c-family/
	* c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
	* c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
cp/
	* decl2.c (cpp_check): Deal with IS_CONSTEXPR.

From-SVN: r225585
2015-07-08 21:58:10 +00:00
Andrew MacLeod c7131fb2b5 tree-core.h: Include symtab.h.
2015-07-07  Andrew MacLeod  <amacleod@redhat.com>

	* tree-core.h: Include symtab.h.
	* rtl.h: Include hard-reg-set.h but not flags.h.
	(HARD_CONST): Remove condition compilation involving HARD_CONST since 
	hard-reg-set.h is always included.
	* regs.h: Don't include hard-reg-set.h or rtl.h.
	* cfg.h: Include dominance.h.
	* gimple.h: Include tree-ssa-alias.h and gimple-expr.h.
	* backend.h: New.  Aggregate commonly used backend header files.
	* gimple-ssa.h: Don't include tree-hasher.h.
	* ssa.h: New.  Aggregate commonly used SSA header files.
	* regset.h: Remove bitmap.h and hard-reg-set.h #includes.
	* sel-sched-ir.h: Flatten includes.
	* lra-int.h: Flatten completely.
	* sel-sched-dump.h: Flatten includes.
	* ira-int.h: Flatten includes.
	* gimple-streamer.h: Remove all includes.
	* cfgloop.h: Remove all #includes except cfgloopmanip.h.
	* resource.h: Flatten hard-reg-set.h and df.h.
	* sched-int.h: Flatten insn-arrt.h and df.h.
	* valtrack.h: flatten bitmap.h, df.h, and rtl.h
	* df.h: Flatten includes, leaving regset.h, alloc-pool.h and timevar.h.
	* genattrtab.c (write_header): Adjust generated includes.
	* genautomata.c (main): Likewise.
	* genconditions.c (write-header): Likewise.
	* genemit.c (main): Likewise.
	* gengtype.c (open_base_files): Likewise.
	* genopinit.c (main): Likewise.
	* genoutput.c (output_prologue): Likewise.
	* genpeep.c (main): Likewise.
	* genpreds.c (write_insn_preds_c): Likewise.
	* genrecog.c (write_header): Likewise.
	* alias.c: Adjust includes.
	* asan.c: Likewise.
	* attribs.c: Likewise.
	* auto-inc-dec.c: Likewise.
	* auto-profile.c: Likewise.
	* bb-reorder.c: Likewise.
	* bt-load.c: Likewise.
	* builtins.c: Likewise.
	* caller-save.c: Likewise.
	* calls.c: Likewise.
	* ccmp.c: Likewise.
	* cfg.c: Likewise.
	* cfganal.c: Likewise.
	* cfgbuild.c: Likewise.
	* cfgcleanup.c: Likewise.
	* cfgexpand.c: Likewise.
	* cfghooks.c: Likewise.
	* cfgloop.c: Likewise.
	* cfgloopanal.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* cfgrtl.c: Likewise.
	* cgraph.c: Likewise.
	* cgraphbuild.c: Likewise.
	* cgraphclones.c: Likewise.
	* cgraphunit.c: Likewise.
	* cilk-common.c: Likewise.
	* combine-stack-adj.c: Likewise.
	* combine.c: Likewise.
	* compare-elim.c: Likewise.
	* convert.c: Likewise.
	* coverage.c: Likewise.
	* cppbuiltin.c: Likewise.
	* cprop.c: Likewise.
	* cse.c: Likewise.
	* cselib.c: Likewise.
	* data-streamer-in.c: Likewise.
	* data-streamer-out.c: Likewise.
	* data-streamer.c: Likewise.
	* dbxout.c: Likewise.
	* dce.c: Likewise.
	* ddg.c: Likewise.
	* debug.c: Likewise.
	* df-core.c: Likewise.
	* df-problems.c: Likewise.
	* df-scan.c: Likewise.
	* dfp.c: Likewise.
	* dojump.c: Likewise.
	* dominance.c: Likewise.
	* domwalk.c: Likewise.
	* double-int.c: Likewise.
	* dse.c: Likewise.
	* dumpfile.c: Likewise.
	* dwarf2asm.c: Likewise.
	* dwarf2cfi.c: Likewise.
	* dwarf2out.c: Likewise.
	* emit-rtl.c: Likewise.
	* et-forest.c: Likewise.
	* except.c: Likewise.
	* explow.c: Likewise.
	* expmed.c: Likewise.
	* expr.c: Likewise.
	* final.c: Likewise.
	* fixed-value.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* fwprop.c: Likewise.
	* gcc-plugin.h: Likewise.
	* gcse-common.c: Likewise.
	* gcse.c: Likewise.
	* generic-match-head.c: Likewise.
	* ggc-page.c: Likewise.
	* gimple-builder.c: Likewise.
	* gimple-expr.c: Likewise.
	* gimple-fold.c: Likewise.
	* gimple-iterator.c: Likewise.
	* gimple-low.c: Likewise.
	* gimple-match-head.c: Likewise.
	* gimple-pretty-print.c: Likewise.
	* gimple-ssa-isolate-paths.c: Likewise.
	* gimple-ssa-strength-reduction.c: Likewise.
	* gimple-streamer-in.c: Likewise.
	* gimple-streamer-out.c: Likewise.
	* gimple-walk.c: Likewise.
	* gimple.c: Likewise.
	* gimplify-me.c: Likewise.
	* gimplify.c: Likewise.
	* godump.c: Likewise.
	* graph.c: Likewise.
	* graphite-blocking.c: Likewise.
	* graphite-dependences.c: Likewise.
	* graphite-interchange.c: Likewise.
	* graphite-isl-ast-to-gimple.c: Likewise.
	* graphite-optimize-isl.c: Likewise.
	* graphite-poly.c: Likewise.
	* graphite-scop-detection.c: Likewise.
	* graphite-sese-to-poly.c: Likewise.
	* graphite.c: Likewise.
	* haifa-sched.c: Likewise.
	* hw-doloop.c: Likewise.
	* ifcvt.c: Likewise.
	* init-regs.c: Likewise.
	* internal-fn.c: Likewise.
	* ipa-chkp.c: Likewise.
	* ipa-comdats.c: Likewise.
	* ipa-cp.c: Likewise.
	* ipa-devirt.c: Likewise.
	* ipa-icf-gimple.c: Likewise.
	* ipa-icf.c: Likewise.
	* ipa-inline-analysis.c: Likewise.
	* ipa-inline-transform.c: Likewise.
	* ipa-inline.c: Likewise.
	* ipa-polymorphic-call.c: Likewise.
	* ipa-profile.c: Likewise.
	* ipa-prop.c: Likewise.
	* ipa-pure-const.c: Likewise.
	* ipa-ref.c: Likewise.
	* ipa-reference.c: Likewise.
	* ipa-split.c: Likewise.
	* ipa-utils.c: Likewise.
	* ipa-visibility.c: Likewise.
	* ipa.c: Likewise.
	* ira-build.c: Likewise.
	* ira-color.c: Likewise.
	* ira-conflicts.c: Likewise.
	* ira-costs.c: Likewise.
	* ira-emit.c: Likewise.
	* ira-lives.c: Likewise.
	* ira.c: Likewise.
	* jump.c: Likewise.
	* langhooks.c: Likewise.
	* lcm.c: Likewise.
	* loop-doloop.c: Likewise.
	* loop-init.c: Likewise.
	* loop-invariant.c: Likewise.
	* loop-iv.c: Likewise.
	* loop-unroll.c: Likewise.
	* lower-subreg.c: Likewise.
	* lra-assigns.c: Likewise.
	* lra-coalesce.c: Likewise.
	* lra-constraints.c: Likewise.
	* lra-eliminations.c: Likewise.
	* lra-lives.c: Likewise.
	* lra-remat.c: Likewise.
	* lra-spills.c: Likewise.
	* lra.c: Likewise.
	* lto-cgraph.c: Likewise.
	* lto-compress.c: Likewise.
	* lto-opts.c: Likewise.
	* lto-section-in.c: Likewise.
	* lto-section-out.c: Likewise.
	* lto-streamer-in.c: Likewise.
	* lto-streamer-out.c: Likewise.
	* lto-streamer.c: Likewise.
	* mcf.c: Likewise.
	* mode-switching.c: Likewise.
	* modulo-sched.c: Likewise.
	* omega.c: Likewise.
	* omp-low.c: Likewise.
	* optabs.c: Likewise.
	* opts-global.c: Likewise.
	* passes.c: Likewise.
	* plugin.c: Likewise.
	* postreload-gcse.c: Likewise.
	* postreload.c: Likewise.
	* predict.c: Likewise.
	* print-rtl.c: Likewise.
	* print-tree.c: Likewise.
	* profile.c: Likewise.
	* real.c: Likewise.
	* realmpfr.c: Likewise.
	* recog.c: Likewise.
	* ree.c: Likewise.
	* reg-stack.c: Likewise.
	* regcprop.c: Likewise.
	* reginfo.c: Likewise.
	* regrename.c: Likewise.
	* regstat.c: Likewise.
	* reload.c: Likewise.
	* reload1.c: Likewise.
	* reorg.c: Likewise.
	* resource.c: Likewise.
	* rtl-chkp.c: Likewise.
	* rtlanal.c: Likewise.
	* rtlhooks.c: Likewise.
	* sanopt.c: Likewise.
	* sched-deps.c: Likewise.
	* sched-ebb.c: Likewise.
	* sched-rgn.c: Likewise.
	* sched-vis.c: Likewise.
	* sdbout.c: Likewise.
	* sel-sched-dump.c: Likewise.
	* sel-sched-ir.c: Likewise.
	* sel-sched.c: Likewise.
	* sese.c: Likewise.
	* shrink-wrap.c: Likewise.
	* simplify-rtx.c: Likewise.
	* stack-ptr-mod.c: Likewise.
	* stmt.c: Likewise.
	* stor-layout.c: Likewise.
	* store-motion.c: Likewise.
	* stringpool.c: Likewise.
	* symtab.c: Likewise.
	* target-globals.c: Likewise.
	* targhooks.c: Likewise.
	* toplev.c: Likewise.
	* tracer.c: Likewise.
	* trans-mem.c: Likewise.
	* tree-affine.c: Likewise.
	* tree-browser.c: Likewise.
	* tree-call-cdce.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-chkp-opt.c: Likewise.
	* tree-chkp.c: Likewise.
	* tree-chrec.c: Likewise.
	* tree-complex.c: Likewise.
	* tree-data-ref.c: Likewise.
	* tree-dfa.c: Likewise.
	* tree-diagnostic.c: Likewise.
	* tree-dump.c: Likewise.
	* tree-eh.c: Likewise.
	* tree-emutls.c: Likewise.
	* tree-if-conv.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-iterator.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-nested.c: Likewise.
	* tree-nrv.c: Likewise.
	* tree-object-size.c: Likewise.
	* tree-outof-ssa.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-phinodes.c: Likewise.
	* tree-predcom.c: Likewise.
	* tree-pretty-print.c: Likewise.
	* tree-profile.c: Likewise.
	* tree-scalar-evolution.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa-address.c: Likewise.
	* tree-ssa-alias.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-coalesce.c: Likewise.
	* tree-ssa-copy.c: Likewise.
	* tree-ssa-copyrename.c: Likewise.
	* tree-ssa-dce.c: Likewise.
	* tree-ssa-dom.c: Likewise.
	* tree-ssa-dse.c: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* tree-ssa-ifcombine.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-ssa-loop-ch.c: Likewise.
	* tree-ssa-loop-im.c: Likewise.
	* tree-ssa-loop-ivcanon.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-ssa-loop-manip.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-ssa-loop-prefetch.c: Likewise.
	* tree-ssa-loop-unswitch.c: Likewise.
	* tree-ssa-loop.c: Likewise.
	* tree-ssa-math-opts.c: Likewise.
	* tree-ssa-operands.c: Likewise.
	* tree-ssa-phiopt.c: Likewise.
	* tree-ssa-phiprop.c: Likewise.
	* tree-ssa-pre.c: Likewise.
	* tree-ssa-propagate.c: Likewise.
	* tree-ssa-reassoc.c: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-scopedtables.c: Likewise.
	* tree-ssa-sink.c: Likewise.
	* tree-ssa-strlen.c: Likewise.
	* tree-ssa-structalias.c: Likewise.
	* tree-ssa-tail-merge.c: Likewise.
	* tree-ssa-ter.c: Likewise.
	* tree-ssa-threadedge.c: Likewise.
	* tree-ssa-threadupdate.c: Likewise.
	* tree-ssa-uncprop.c: Likewise.
	* tree-ssa-uninit.c: Likewise.
	* tree-ssa.c: Likewise.
	* tree-ssanames.c: Likewise.
	* tree-stdarg.c: Likewise.
	* tree-streamer-in.c: Likewise.
	* tree-streamer-out.c: Likewise.
	* tree-streamer.c: Likewise.
	* tree-switch-conversion.c: Likewise.
	* tree-tailcall.c: Likewise.
	* tree-vect-data-refs.c: Likewise.
	* tree-vect-generic.c: Likewise.
	* tree-vect-loop-manip.c: Likewise.
	* tree-vect-loop.c: Likewise.
	* tree-vect-patterns.c: Likewise.
	* tree-vect-slp.c: Likewise.
	* tree-vect-stmts.c: Likewise.
	* tree-vectorizer.c: Likewise.
	* tree-vrp.c: Likewise.
	* tree.c: Likewise.
	* tsan.c: Likewise.
	* ubsan.c: Likewise.
	* valtrack.c: Likewise.
	* value-prof.c: Likewise.
	* var-tracking.c: Likewise.
	* varasm.c: Likewise.
	* varpool.c: Likewise.
	* vmsdbgout.c: Likewise.
	* vtable-verify.c: Likewise.
	* web.c: Likewise.
	* wide-int.cc: Likewise.
	* xcoffout.c: Likewise.
	* config/aarch64/aarch64-builtins.c: Likewise.
	* config/aarch64/aarch64.c: Likewise.
	* config/aarch64/cortex-a57-fma-steering.c: Likewise.
	* config/alpha/alpha.c: Likewise.
	* config/arc/arc.c: Likewise.
	* config/arm/aarch-common.c: Likewise.
	* config/arm/arm-builtins.c: Likewise.
	* config/arm/arm-c.c: Likewise.
	* config/arm/arm.c: Likewise.
	* config/avr/avr-c.c: Likewise.
	* config/avr/avr-log.c: Likewise.
	* config/avr/avr.c: Likewise.
	* config/bfin/bfin.c: Likewise.
	* config/c6x/c6x.c: Likewise.
	* config/cr16/cr16.c: Likewise.
	* config/cris/cris.c: Likewise.
	* config/darwin-c.c: Likewise.
	* config/darwin.c: Likewise.
	* config/epiphany/epiphany.c: Likewise.
	* config/epiphany/mode-switch-use.c: Likewise.
	* config/epiphany/resolve-sw-modes.c: Likewise.
	* config/fr30/fr30.c: Likewise.
	* config/frv/frv.c: Likewise.
	* config/ft32/ft32.c: Likewise.
	* config/h8300/h8300.c: Likewise.
	* config/i386/i386-c.c: Likewise.
	* config/i386/i386.c: Likewise.
	* config/i386/msformat-c.c: Likewise.
	* config/i386/winnt-cxx.c: Likewise.
	* config/i386/winnt-stubs.c: Likewise.
	* config/i386/winnt.c: Likewise.
	* config/ia64/ia64-c.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/iq2000/iq2000.c: Likewise.
	* config/lm32/lm32.c: Likewise.
	* config/m32c/m32c-pragma.c: Likewise.
	* config/m32c/m32c.c: Likewise.
	* config/m32r/m32r.c: Likewise.
	* config/m68k/m68k.c: Likewise.
	* config/mcore/mcore.c: Likewise.
	* config/mep/mep-pragma.c: Likewise.
	* config/mep/mep.c: Likewise.
	* config/microblaze/microblaze-c.c: Likewise.
	* config/microblaze/microblaze.c: Likewise.
	* config/mips/mips.c: Likewise.
	* config/mmix/mmix.c: Likewise.
	* config/mn10300/mn10300.c: Likewise.
	* config/moxie/moxie.c: Likewise.
	* config/msp430/msp430-c.c: Likewise.
	* config/msp430/msp430.c: Likewise.
	* config/nds32/nds32-cost.c: Likewise.
	* config/nds32/nds32-fp-as-gp.c: Likewise.
	* config/nds32/nds32-intrinsic.c: Likewise.
	* config/nds32/nds32-isr.c: Likewise.
	* config/nds32/nds32-md-auxiliary.c: Likewise.
	* config/nds32/nds32-memory-manipulation.c: Likewise.
	* config/nds32/nds32-pipelines-auxiliary.c: Likewise.
	* config/nds32/nds32-predicates.c: Likewise.
	* config/nds32/nds32.c: Likewise.
	* config/nios2/nios2.c: Likewise.
	* config/nvptx/nvptx.c: Likewise.
	* config/pa/pa.c: Likewise.
	* config/pdp11/pdp11.c: Likewise.
	* config/rl78/rl78-c.c: Likewise.
	* config/rl78/rl78.c: Likewise.
	* config/rs6000/rs6000-c.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/rx/rx.c: Likewise.
	* config/s390/s390-c.c: Likewise.
	* config/s390/s390.c: Likewise.
	* config/sh/sh-c.c: Likewise.
	* config/sh/sh-mem.cc: Likewise.
	* config/sh/sh.c: Likewise.
	* config/sh/sh_optimize_sett_clrt.cc: Likewise.
	* config/sh/sh_treg_combine.cc: Likewise.
	* config/sol2-c.c: Likewise.
	* config/sol2-cxx.c: Likewise.
	* config/sol2-stubs.c: Likewise.
	* config/sol2.c: Likewise.
	* config/sparc/sparc-c.c: Likewise.
	* config/sparc/sparc.c: Likewise.
	* config/spu/spu-c.c: Likewise.
	* config/spu/spu.c: Likewise.
	* config/stormy16/stormy16.c: Likewise.
	* config/tilegx/mul-tables.c: Likewise.
	* config/tilegx/tilegx-c.c: Likewise.
	* config/tilegx/tilegx.c: Likewise.
	* config/tilepro/mul-tables.c: Likewise.
	* config/tilepro/tilepro-c.c: Likewise.
	* config/tilepro/tilepro.c: Likewise.
	* config/v850/v850-c.c: Likewise.
	* config/v850/v850.c: Likewise.
	* config/vax/vax.c: Likewise.
	* config/visium/visium.c: Likewise.
	* config/vms/vms-c.c: Likewise.
	* config/vms/vms.c: Likewise.
	* config/vxworks.c: Likewise.
	* config/xtensa/xtensa.c: Likewise.

ada
2015-07-07  Andrew MacLeod  <amacleod@redhat.com>

	* gcc-interface/cuintp.c: Adjust includes.
	* gcc-interface/decl.c: Likewise.
	* gcc-interface/misc.c: Likewise.
	* gcc-interface/targtyps.c: Likewise.
	* gcc-interface/trans.c: Likewise.
	* gcc-interface/utils.c: Likewise.
	* gcc-interface/utils2.c: Likewise.

c
2015-07-07  Andrew MacLeod  <amacleod@redhat.com>

	* c-array-notation.c: Adjust includes.
	* c-aux-info.c: Likewise.
	* c-convert.c: Likewise.
	* c-decl.c: Likewise.
	* c-errors.c: Likewise.
	* c-lang.c: Likewise.
	* c-objc-common.c: Likewise.
	* c-parser.c: Likewise.
	* c-typeck.c: Likewise.

c-family
2015-07-07  Andrew MacLeod  <amacleod@redhat.com>

	* array-notation-common.c: Adjust includes.
	* c-ada-spec.c: Likewise.
	* c-cilkplus.c: Likewise.
	* c-common.h: Likewise.
	* c-cppbuiltin.c: Likewise.
	* c-dump.c: Likewise.
	* c-format.c: Likewise.
	* c-gimplify.c: Likewise.
	* c-indentation.c: Likewise.
	* c-lex.c: Likewise.
	* c-omp.c: Likewise.
	* c-opts.c: Likewise.
	* c-pch.c: Likewise.
	* c-ppoutput.c: Likewise.
	* c-pragma.c: Likewise.
	* c-pretty-print.c: Likewise.
	* c-semantics.c: Likewise.
	* c-ubsan.c: Likewise.
	* cilk.c: Likewise.
	* stub-objc.c: Likewise.

cp
2015-07-07  Andrew MacLeod  <amacleod@redhat.com>

	* call.c: Adjust includes.
	* class.c: Likewise.
	* constexpr.c: Likewise.
	* cp-array-notation.c: Likewise.
	* cp-gimplify.c: Likewise.
	* cp-lang.c: Likewise.
	* cp-objcp-common.c: Likewise.
	* cp-ubsan.c: Likewise.
	* cvt.c: Likewise.
	* decl.c: Likewise.
	* decl2.c: Likewise.
	* dump.c: Likewise.
	* error.c: Likewise.
	* except.c: Likewise.
	* expr.c: Likewise.
	* friend.c: Likewise.
	* init.c: Likewise.
	* lambda.c: Likewise.
	* lex.c: Likewise.
	* mangle.c: Likewise.
	* method.c: Likewise.
	* name-lookup.c: Likewise.
	* optimize.c: Likewise.
	* parser.c: Likewise.
	* pt.c: Likewise.
	* ptree.c: Likewise.
	* repo.c: Likewise.
	* rtti.c: Likewise.
	* search.c: Likewise.
	* semantics.c: Likewise.
	* tree.c: Likewise.
	* typeck.c: Likewise.
	* typeck2.c: Likewise.

fortran
2015-07-07  Andrew MacLeod  <amacleod@redhat.com>

	* convert.c: Adjust includes.
	* cpp.c: Likewise.
	* decl.c: Likewise.
	* f95-lang.c: Likewise.
	* iresolve.c: Likewise.
	* match.c: Likewise.
	* module.c: Likewise.
	* options.c: Likewise.
	* target-memory.c: Likewise.
	* trans-array.c: Likewise.
	* trans-common.c: Likewise.
	* trans-const.c: Likewise.
	* trans-decl.c: Likewise.
	* trans-expr.c: Likewise.
	* trans-intrinsic.c: Likewise.
	* trans-io.c: Likewise.
	* trans-openmp.c: Likewise.
	* trans-stmt.c: Likewise.
	* trans-types.c: Likewise.
	* trans.c: Likewise.

go
2015-07-07  Andrew MacLeod  <amacleod@redhat.com>

	* go-backend.c: Adjust includes.
	* go-gcc.cc: Likewise.
	* go-lang.c: Likewise.

java
2015-07-07  Andrew MacLeod  <amacleod@redhat.com>

	* boehm.c: Adjust includes.
	* builtins.c: Likewise.
	* class.c: Likewise.
	* constants.c: Likewise.
	* decl.c: Likewise.
	* except.c: Likewise.
	* expr.c: Likewise.
	* java-gimplify.c: Likewise.
	* jcf-dump.c: Likewise.
	* jcf-io.c: Likewise.
	* jcf-parse.c: Likewise.
	* jvgenmain.c: Likewise.
	* lang.c: Likewise.
	* mangle.c: Likewise.
	* mangle_name.c: Likewise.
	* resource.c: Likewise.
	* typeck.c: Likewise.
	* verify-glue.c: Likewise.

jit
2015-07-07  Andrew MacLeod  <amacleod@redhat.com>

	* dummy-frontend.c: Adjust includes.
	* jit-common.h: Likewise.
	* jit-playback.c: Likewise.

lto
2015-07-07  Andrew MacLeod  <amacleod@redhat.com>

	* lto-lang.c: Adjust includes.
	* lto-object.c: Likewise.
	* lto-partition.c: Likewise.
	* lto-symtab.c: Likewise.
	* lto.c: Likewise.

objc
2015-07-07  Andrew MacLeod  <amacleod@redhat.com>

	* objc-act.c: Adjust includes.
	* objc-encoding.c: Likewise.
	* objc-gnu-runtime-abi-01.c: Likewise.
	* objc-lang.c: Likewise.
	* objc-map.c: Likewise.
	* objc-next-runtime-abi-01.c: Likewise.
	* objc-next-runtime-abi-02.c: Likewise.
	* objc-runtime-shared-support.c: Likewise.

objcp
2015-07-07  Andrew MacLeod  <amacleod@redhat.com>

	* objcp-decl.c: Adjust includes.
	* objcp-lang.c: Likewise.

From-SVN: r225531
2015-07-08 00:53:03 +00:00
Eric Botcazou 2a7fb83f49 c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
c-family/
	* c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
	* c-ada-spec.c (print_ada_declaration): Skip move constructors.
cp/
	* decl2.c (cpp_check): Deal with IS_MOVE_CONSTRUCTOR.

From-SVN: r225525
2015-07-07 20:13:59 +00:00
Jason Merrill 47297e51f5 re PR debug/66653 (ice in gen_type_die_with_usage, at dwarf2out.c:20876)
PR debug/66653
	* decl2.c (is_late_template_attribute): True for tls_model.

From-SVN: r225193
2015-06-30 11:40:38 -04:00
Jason Merrill 3048c0c746 re PR debug/66653 (ice in gen_type_die_with_usage, at dwarf2out.c:20876)
PR debug/66653
	* cp-tree.h (CP_DECL_THREAD_LOCAL_P): New.
	(DECL_GNU_TLS_P): Use DECL_LANG_SPECIFIC field.
	(SET_DECL_GNU_TLS_P): New.
	* call.c (make_temporary_var_for_ref_to_temp): Use
	CP_DECL_THREAD_LOCAL_P.
	(set_up_extended_ref_temp): Likewise.
	* decl.c (duplicate_decls, expand_static_init): Likewise.
	(redeclaration_error_message, grokvardecl): Likewise.
	(start_decl, register_dtor_fn, grokdeclarator): Likewise.
	* decl2.c (get_guard, var_needs_tls_wrapper): Likewise.
	(handle_tls_init): Likewise.
	* pt.c (tsubst_decl, tsubst_copy_and_build): Likewise.
	* semantics.c (finish_id_expression): Likewise.
	(handle_omp_array_sections_1, finish_omp_clauses): Likewise.
	(finish_omp_threadprivate): Likewise.
	* tree.c (decl_storage_duration): Likewise.
	* cp-gimplify.c (omp_var_to_track): Likewise.
	(cp_genericize_r): Check that it matches DECL_THREAD_LOCAL_P.
	* lex.c (retrofit_lang_decl): Return if DECL_LANG_SPECIFIC is
	already set.

From-SVN: r225192
2015-06-30 10:31:36 -04:00
Marek Polacek b55b02ead4 call.c: Use VECTOR_TYPE_P.
* call.c: Use VECTOR_TYPE_P.
	* constexpr.c: Likewise.
	* cvt.c: Likewise.
	* decl.c: Likewise.
	* decl2.c: Likewise.
	* init.c: Likewise.
	* semantics.c: Likewise.
	* tree.c: Likewise.
	* typeck.c: Likewise.
	* typeck2.c: Likewise.

From-SVN: r225099
2015-06-27 10:40:21 +00:00
Marek Polacek 56a6f1d33f call.c (set_up_extended_ref_temp): Use VAR_P.
* call.c (set_up_extended_ref_temp): Use VAR_P.
	* class.c: Use VAR_P throughout.
	* constexpr.c (cxx_eval_constant_expression): Use VAR_P.
	* cp-array-notation.c (make_triplet_val_inv): Likewise.
	* decl.c: Use VAR_OR_FUNCTION_DECL_P or VAR_P
	throughout.
	* decl2.c: Likewise.
	* error.c (dump_decl): Use VAR_P.
	* mangle.c (decl_implicit_alias_p): Likewise.
	* parser.c: Use VAR_P throughout.
	* pt.c: Likewise.
	* semantics.c: Likewise.
	* vtable-class-hierarchy.c: Likewise.
	* tree.c (handle_abi_tag_attribute): Use VAR_OR_FUNCTION_DECL_P.

From-SVN: r225098
2015-06-27 10:39:31 +00:00
Andrew MacLeod f088993974 function.h (ipa_opt_pass, [...]): Move forward declarations.
2015-06-25  Andrew MacLeod  <amacleod@redhat.com>

	* function.h (ipa_opt_pass, ipa_opt_pass_d): Move forward declarations.
	* cgraph.h: Include ipa-ref.h and plugin-api.h.
	(ipa_opt_pass, ipa_opt_pass_d)): Relocate forward declarations here.
	(symtab_node::address_can_be_compared_p): Move function.
	* cgraph.c (symtab_node::address_can_be_compared_p): Relocate function
	definition here.
	* asan.c: Remove ipa-ref.h and plugin-api.h from include list.
	* auto-profile.c: Likewise.
	* bb-reorder.c: Likewise.
	* builtins.c: Likewise.
	* calls.c: Likewise.
	* cfgexpand.c: Likewise.
	* cgraphbuild.c: Likewise.
	* cgraphclones.c: Likewise.
	* cgraphunit.c: Likewise.
	* combine.c: Likewise.
	* coverage.c: Likewise.
	* data-streamer-in.c: Likewise.
	* data-streamer-out.c: Likewise.
	* data-streamer.c: Likewise.
	* dbxout.c: Likewise.
	* dwarf2out.c: Likewise.
	* except.c: Likewise.
	* expr.c: Likewise.
	* final.c: Likewise.
	* fold-const.c: Likewise.
	* ggc-page.c: Likewise.
	* gimple-fold.c: Likewise.
	* gimple-iterator.c: Likewise.
	* gimple-pretty-print.c: Likewise.
	* gimple-streamer-in.c: Likewise.
	* gimple-streamer-out.c: Likewise.
	* gimple.c: Likewise.
	* gimplify.c: Likewise.
	* ipa-chkp.c: Likewise.
	* ipa-comdats.c: Likewise.
	* ipa-cp.c: Likewise.
	* ipa-devirt.c: Likewise.
	* ipa-icf-gimple.c: Likewise.
	* ipa-icf.c: Likewise.
	* ipa-inline-analysis.c: Likewise.
	* ipa-inline-transform.c: Likewise.
	* ipa-inline.c: Likewise.
	* ipa-polymorphic-call.c: Likewise.
	* ipa-profile.c: Likewise.
	* ipa-prop.c: Likewise.
	* ipa-pure-const.c: Likewise.
	* ipa-ref.c: Likewise.
	* ipa-reference.c: Likewise.
	* ipa-split.c: Likewise.
	* ipa-utils.c: Likewise.
	* ipa-visibility.c: Likewise.
	* ipa.c: Likewise.
	* langhooks.c: Likewise.
	* lto-cgraph.c: Likewise.
	* lto-compress.c: Likewise.
	* lto-opts.c: Likewise.
	* lto-section-in.c: Likewise.
	* lto-section-out.c: Likewise.
	* lto-streamer-in.c: Likewise.
	* lto-streamer-out.c: Likewise.
	* lto-streamer.c: Likewise.
	* omp-low.c: Likewise.
	* opts-global.c: Likewise.
	* passes.c: Likewise.
	* predict.c: Likewise.
	* print-tree.c: Likewise.
	* profile.c: Likewise.
	* ree.c: Likewise.
	* sanopt.c: Likewise.
	* stor-layout.c: Likewise.
	* symtab.c: Likewise.
	* toplev.c: Likewise.
	* trans-mem.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-chkp.c: Likewise.
	* tree-eh.c: Likewise.
	* tree-emutls.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-nested.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-pretty-print.c: Likewise.
	* tree-profile.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa-alias.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-ssa-loop-ivcanon.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-ssa-pre.c: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-strlen.c: Likewise.
	* tree-ssa-structalias.c: Likewise.
	* tree-streamer-in.c: Likewise.
	* tree-streamer-out.c: Likewise.
	* tree-streamer.c: Likewise.
	* tree-switch-conversion.c: Likewise.
	* tree-tailcall.c: Likewise.
	* tree-vect-data-refs.c: Likewise.
	* tree-vect-stmts.c: Likewise.
	* tree-vectorizer.c: Likewise.
	* tree.c: Likewise.
	* tsan.c: Likewise.
	* ubsan.c: Likewise.
	* value-prof.c: Likewise.
	* varasm.c: Likewise.
	* varpool.c: Likewise.
	* config/arm/arm.c: Likewise.
	* config/bfin/bfin.c: Likewise.
	* config/c6x/c6x.c: Likewise.
	* config/cris/cris.c: Likewise.
	* config/darwin-c.c: Likewise.
	* config/darwin.c: Likewise.
	* config/i386/i386.c: Likewise.
	* config/i386/winnt.c: Likewise.
	* config/microblaze/microblaze.c: Likewise.
	* config/mips/mips.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/rx/rx.c: Likewise.
	* config/s390/s390.c: Likewise.
	* config/tilegx/mul-tables.c: Likewise.

ada
2015-06-25  Andrew MacLeod  <amacleod@redhat.com>

	* gcc-interface/trans.c: Remove ipa-ref.h and plugin-api.h from include
	list.
	* gcc-interface/utils.c: Likewise.

c
2015-06-25  Andrew MacLeod  <amacleod@redhat.com>

	* c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
	* c-parser.c: Likewise.

c-family
2015-06-25  Andrew MacLeod  <amacleod@redhat.com>

	* c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
	* c-gimplify.c: Likewise.
	* c-pragma.c: Likewise.
	* c-ubsan.c: Likewise.
	* cilk.c: Likewise.

cp
2015-06-25  Andrew MacLeod  <amacleod@redhat.com>

	* call.c: Remove ipa-ref.h and plugin-api.h from include list.
	* class.c: Likewise.
	* cp-ubsan.c: Likewise.
	* decl.c: Likewise.
	* decl2.c: Likewise.
	* lambda.c: Likewise.
	* mangle.c: Likewise.
	* method.c: Likewise.
	* optimize.c: Likewise.
	* parser.c: Likewise.
	* semantics.c: Likewise.
	* tree.c: Likewise.
	* vtable-class-hierarchy.c: Likewise.

fortran
2015-06-25  Andrew MacLeod  <amacleod@redhat.com>

	* f95-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
	* trans-decl.c: Likewise.

go
2015-06-25  Andrew MacLeod  <amacleod@redhat.com>

	* go-gcc.cc: Remove ipa-ref.h and plugin-api.h from include list.

java
2015-06-25  Andrew MacLeod  <amacleod@redhat.com>

	* class.c: Remove ipa-ref.h and plugin-api.h from include list.
	* decl.c: Likewise.
	* jcf-parse.c: Likewise.
	* resource.c: Likewise.

jit
2015-06-25  Andrew MacLeod  <amacleod@redhat.com>

	* dummy-frontend.c: Remove ipa-ref.h and plugin-api.h from include list.
	* jit-playback.c: Likewise.

lto
2015-06-25  Andrew MacLeod  <amacleod@redhat.com>

	* lto-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
	* lto-object.c: Likewise.
	* lto-partition.c: Likewise.
	* lto-symtab.c: Likewise.
	* lto-tree.h: Likewise.
	* lto.c: Likewise.

objc
2015-06-25  Andrew MacLeod  <amacleod@redhat.com>

	* objc-act.c: Remove ipa-ref.h and plugin-api.h from include list.

From-SVN: r224986
2015-06-25 18:32:38 +00:00
Pierre-Marie de Rodat c6a2f2d98d c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
c-family/
	* c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
	* c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
	(dump_ada_template): Skip partially specialized types.
cp/
	* decl2.c (cpp_check): Deal with HAS_DEPENDENT_TEMPLATE_ARGS.

From-SVN: r224754
2015-06-22 19:16:58 +00:00