2013-08-19  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/46271
	* openmp.c (resolve_omp_clauses): Bugfix for procedure pointers.


2013-08-19  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/46271
	* gfortran.dg/gomp/proc_ptr_1.f90: New.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201835 138bc75d-0d04-0410-961f-82ee72b054a4

	* Makeifle-in (ipa-devirt.o): New.
	(GTFILES): Add ipa-utils.h and ipa-devirt.c
	* cgraphunit.c (decide_is_symbol_needed): Do not care about virtuals.
	(analyze_functions): Look into possible targets of polymorphic call.
	* dumpfile.c (dump_files): Add type-inheritance dump.
	* dumpfile.h (TDI_inheritance): New.
	* ipa-devirt.c: New file.
	* ipa-utils.h (odr_type_d): Forward declare.
	(odr_type): New type.
	(build_type_inheritance_graph): Declare.
	(possible_polymorphic_call_targets): Declare and introduce inline
	variant when only edge is pased.
	(dump_possible_polymorphic_call_targets): Likewise.
	* timevar.def (TV_IPA_INHERITANCE, TV_IPA_VIRTUAL_CALL): New.
	* tree.c (type_in_anonymous_namespace_p): Break out from ...
	(types_same_for_odr): ... here.
	* tree.h (type_in_anonymous_namespace_p): Declare.

	* g++.dg/ipa/type-inheritance-1.C: New testcase.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201836 138bc75d-0d04-0410-961f-82ee72b054a4
	* gcc.target/avr/progmem-error-1.cpp: Update linenumber of error.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201837 138bc75d-0d04-0410-961f-82ee72b054a4
	* target.def (TARGET_LIBC_HAS_FUNCTION): New target hook.
	* builtins.c (default_libc_has_function): New.
	(gnu_libc_has_function): Ditto.
	(no_c99_libc_has_function): Ditto.
	(expand_builtin_cexpi): Using new target hook TARGET_LIBC_HAS_FUNCTION
	instead of TARGET_HAS_SINCOS and TARGET_C99_FUNCTIONS.
	(fold_builtin_sincos): Likewise.
	(fold_builtin_cexp): Likewise.
	* builtins.def (DEF_C94_BUILTIN): Likewise.
	(DEF_C99_BUILTIN): Likewise.
	(DEF_C99_C90RES_BUILTIN): Likewise.
	(DEF_C99_COMPL_BUILTIN): New define. Change all complex c99 builtin
	definitions to using this define.
	* config/darwin-protos.h (darwin_libc_has_function): New.
	* config/darwin.c: (darwin_libc_has_function: Ditto.
	* config/alpha/linux.h: Remove TARGET_C99_FUNCTIONS and
	TARGET_HAS_SINCOS. Redefine TARGET_LIBC_HAS_FUNCTION.
	* config/darwin.h: Ditto.
	* config/elfos.h: Ditto.
	* config/freebsd.h: Ditto.
	* config/i386/cygming.h: Ditto.
	* config/i386/djgpp.h: Ditto.
	* config/i386/i386-interix.h: Ditto.
	* config/microblaze/microblaze.h: Ditto.
	* config/mmix/mmix.h: Ditto.
	* config/gnu-user.h: Ditto.
	* config/ia64/hpux.h: Ditto.
	* config/pa/pa-hpux.h: Ditto.
	* config/pdp11/pdp11.h: Ditto.
	* config/picochip/picochip.h: Ditto.
	* config/linux.h: Ditto.
	* config/netbsd.h: Ditto.
	* config/openbsd.h: Ditto.
	* config/rs6000/aix43.h: Ditto.
	* config/rs6000/aix51.h: Ditto.
	* config/rs6000/aix52.h: Ditto.
	* config/rs6000/aix53.h: Ditto.
	* config/rs6000/aix61.h: Ditto.
	* config/rs6000/darwin.h: Ditto.
	* config/rs6000/linux.h: Ditto.
	* config/rs6000/linux64.h: Ditto.
	* config/s390/tpf.h: Ditto.
	* config/sol2-10.h: Ditto.
	* config/sol2.h: Ditto.
	* config/vms/vms.h: Ditto.
	* config/vxworks.h: Ditto.
	* config/linux-android.c (linux_android_libc_has_function):
	New linux-specific implementation of TARGET_LIBC_HAS_FUNCTION.
	* config/linux-protos.h (linux_android_libc_has_function):
	New declaration.
	* config/i386/i386.c (ix86_libc_has_function): New.
	* config/i386/i386-protos.h
	(ix86_libc_has_function): New declaration.
	* config/i386/i386.md
	("isinfxf2"): Change condition for TARGET_LIBC_HAS_FUNCTION.
	("isinf<mode>2): Likewise.
	* convert.c (convert_to_integer): Using new target hook
	TARGET_LIBC_HAS_FUNCTION istead of TARGET_HAS_SINCOS and
	TARGET_C99_FUNCTIONS.
	* fortran/f95-lang.c (gfc_init_builtin_functions): Ditto.
	* tree-ssa-math-opts.c (execute_cse_sincos): Ditto.
	* coretypes.h (function_class): New enum for different
	classes of functions.
	* defaults.h: Remove TARGET_C99_FUNCTIONS and TARGET_HAS_SINCOS.
	* doc/tm.texi.in (TARGET_C99_FUNCTIONS): Remove documentation.
	(TARGET_HAS_SINCOS): Likewise.
	(TARGET_LIBC_HAS_FUNCTION): New.
	* doc/tm.texi: Regenerated.
	* targhooks.h (default_libc_has_function): New declaration.
	(no_c99_libc_has_function): Ditto.
	(gnu_libc_has_function): Ditto.
	* system.h: Add the poisoning of TARGET_C99_FUNCTIONS
	and TARGET_HAS_SINCOS.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201838 138bc75d-0d04-0410-961f-82ee72b054a4
2013-08-19  Paolo Carlini  <paolo.carlini@oracle.com>

	* parser.c (cp_parser_lambda_introducer, cp_parser_decltype_expr):
	Use cp_parser_lookup_name_simple.

2013-08-19  Paolo Carlini  <paolo.carlini@oracle.com>

	* name-lookup.h (pop_bindings_and_leave_scope): Declare.
	* name-lookup.c (pop_bindings_and_leave_scope): Define.
	* parser.c (cp_parser_lambda_declarator_opt,
	cp_parser_direct_declarator, cp_parser_cache_defarg): Use it.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201839 138bc75d-0d04-0410-961f-82ee72b054a4
        * gcc.dg/tree-ssa/ssa-dom-thread-4.c [avr-*-*]: Expect 6 times
        "Threaded".


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201842 138bc75d-0d04-0410-961f-82ee72b054a4
        * gcc.dg/tree-ssa/vrp55.c: Use keeps_null_pointer_checks to determine
        correct test response.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201843 138bc75d-0d04-0410-961f-82ee72b054a4
        PR testsuite/52641
        * gcc.dg/tree-ssa/pr31261.c [int16]: Change expected unsigned type.
        * gcc.dg/tree-ssa/ssa-pre-21.c [! size32plus]: Mark as xfail.
        * gcc.dg/tree-ssa/vector-4.c (SItype): New typedef.
        (v4si): Use it.
        * gcc.dg/tree-ssa/ssa-pre-30.c: Test requires int32.
        * gcc.dg/tree-ssa/vrp58.c: Adjust scan expression for int16.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201844 138bc75d-0d04-0410-961f-82ee72b054a4
        * gcc.dg/tree-ssa/vrp87.c [avr-*-*] (dg-additional-options): New.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201845 138bc75d-0d04-0410-961f-82ee72b054a4
	* doc/invoke.texi (-fcilkplus): Clarify that implementation is
	incomplete.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201846 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/
	* config/mips/mips.c (mips_adjust_insn_length): Add checks for
	JUMP_P and INSN_P.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201847 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/testsuite/
	* gcc.target/mips/mulsize-1.c: Check for SLL as well as SUBU.
	* gcc.target/mips/mulsize-2.c: Check for ADDU rather than SUBU.
	Check for SLL too.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201848 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/
	* builtins.def (BUILT_IN_FABSD32): New DFP ABS builtin.
	(BUILT_IN_FABSD64): Likewise.
	(BUILT_IN_FABSD128): Likewise.
	* builtins.c (expand_builtin): Add support for new DFP ABS builtins.
	(fold_builtin_1): Likewise.
	* config/rs6000/dfp.md (*negtd2_fpr): Handle non-overlapping destination
	and source operands.
	(*abstd2_fpr): Likewise.
	(*nabstd2_fpr): Likewise.

gcc/testsuite/
	* gcc.target/powerpc/dfp-dd-2.c: New test.
	* gcc.target/powerpc/dfp-td-2.c: Likewise.
	* gcc.target/powerpc/dfp-td-3.c: Likewise.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201849 138bc75d-0d04-0410-961f-82ee72b054a4
2013-08-19  Dehao Chen  <dehao@google.com>

	* dwarf2.def (DW_AT_GNU_discriminator): New attribute.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201855 138bc75d-0d04-0410-961f-82ee72b054a4
2013-08-19  Dehao Chen (dehao@google.com)

        * value-prof.c (gimple_ic): Fix the bug of adding EH edge.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201859 138bc75d-0d04-0410-961f-82ee72b054a4
	PR target/57865
	* config/rs6000/rs6000.c (rs6000_emit_prologue): Correct ool_adjust.
	(rs6000_emit_epilogue): Likewise.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201860 138bc75d-0d04-0410-961f-82ee72b054a4
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201863 138bc75d-0d04-0410-961f-82ee72b054a4
Make gcc::context be GC-managed

	* Makefile.in (GTFILES): Add context.h.
	* context.c (gcc::context::operator new): New.
	(gcc::context::gt_ggc_mx): New.
	(gcc::context::gt_pch_nx): New.
	(gcc::context::gt_pch_nx): New.
	* context.h (gcc::context): Add GTY((user)) marking.
	(gcc::context::operator new): New.
	(gcc::context::gt_ggc_mx): New.
	(gcc::context::gt_pch_nx): New.
	(gcc::context::gt_pch_nx): New.
	(g): Add GTY marking.
	(gt_ggc_mx (gcc::context *)): New.
	(gt_pch_nx (gcc::context *)): New.
	(gt_pch_nx (gcc::context *ctxt, gt_pointer_operator op,
	void *cookie)): New.
	* gengtype.c (open_base_files) <ifiles>: Add context.h.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201864 138bc75d-0d04-0410-961f-82ee72b054a4
Make opt_pass and gcc::pass_manager be GC-managed

2013-08-20  David Malcolm  <dmalcolm@redhat.com>

	Make opt_pass and gcc::pass_manager be GC-managed, so that pass
	instances can own GC refs.

	* Makefile.in (GTFILES): Add pass_manager.h and tree-pass.h.
	* context.c (gcc::context::gt_ggc_mx): Traverse passes_.
	(gcc::context::gt_pch_nx): Likewise.
	(gcc::context::gt_pch_nx):  Likewise.
	* ggc.h (gt_ggc_mx <T>): New.
	(gt_pch_nx_with_op <T>): New.
	(gt_pch_nx <T>): New.
	* passes.c (opt_pass::gt_ggc_mx): New.
	(opt_pass::gt_pch_nx): New.
	(opt_pass::gt_pch_nx_with_op): New.
	(pass_manager::gt_ggc_mx): New.
	(pass_manager::gt_pch_nx): New.
	(pass_manager::gt_pch_nx_with_op): New.
	(pass_manager::operator new): Use
	ggc_internal_cleared_alloc_stat rather than xcalloc.
	* pass_manager.h (class pass_manager): Add GTY((user)) marking.
	(pass_manager::gt_ggc_mx): New.
	(pass_manager::gt_pch_nx): New.
	(pass_manager::gt_pch_nx_with_op): New.
	* tree-pass.h (class opt_pass): Add GTY((user)) marking.
	(opt_pass::operator new): New.
	(opt_pass::gt_ggc_mx): New.
	(opt_pass::gt_pch_nx): New.
	(opt_pass::gt_pch_nx_with_op): New.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201865 138bc75d-0d04-0410-961f-82ee72b054a4
Fix for PR c/57490.

gcc/c/ChangeLog
+2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
+
+       PR c/57490
+       * c-array-notation.c (fix_conditional_array_notations_1): Added a
+       check for truth values.
+       (expand_array_notation_exprs): Added truth values case.  Removed an
+       unwanted else.  Added for-loop to walk through subtrees in default
+       case.
+

gcc/cp/ChangeLog
+2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
+
+       PR c/57490
+       * cp-array-notation.c (cp_expand_cond_array_notations): Added a
+       check for truth values.
+       (expand_array_notation_exprs): Added truth values case.  Removed an
+       unwanted else.  Added for-loop to walk through subtrees in default
+       case.
+       * call.c (build_cxx_call): Inherited the type of the array notation for
+       certain built-in array notation functions.
+

gcc/testsuite/ChangeLog
+2013-08-19  Balaji V. Iyer  <balaji.v.iyer@intel.com>
+
+       PR c/57490
+       * c-c++-common/cilk-plus/AN/pr57490.c: New test.
+



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201867 138bc75d-0d04-0410-961f-82ee72b054a4