Commit Graph

129938 Commits

Author SHA1 Message Date
Richard Sandiford
5c0f009c92 fold-const.c (optimize_bit_field_compare): Use wi:: operations instead of const_binop.
gcc/
	* fold-const.c (optimize_bit_field_compare): Use wi:: operations
	instead of const_binop.
	(fold_binary_loc): Likewise.

From-SVN: r210378
2014-05-13 13:51:32 +00:00
Richard Sandiford
460d1e2235 tree-dfa.h (get_addr_base_and_unit_offset_1): Update array index calculation to match get_ref_base_and_extent.
gcc/
	* tree-dfa.h (get_addr_base_and_unit_offset_1): Update array index
	calculation to match get_ref_base_and_extent.

From-SVN: r210377
2014-05-13 13:51:20 +00:00
Catherine Moore
1e1f96b5f6 configure.ac: Fix assembly for explicit JALR relocation check.
2014-05-13  Catherine Moore  <clm@codesourcery.com>
	    Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	* configure.ac: Fix assembly for explicit JALR relocation check.
	* configure: Regenerate.


Co-Authored-By: Sandra Loosemore <sandra@codesourcery.com>

From-SVN: r210375
2014-05-13 09:36:56 -04:00
Nathan Sidwell
8fa5aaf3c0 loongson-simd.c: Disable micromips too.
2014-05-13  Nathan Sidwell  <nathan@codesourcery.com>
	    Sandra Loosemore  <sandra@codesourcery.com>

	gcc/testsuite/
	* gcc.target/mips/loongson-simd.c: Disable micromips too.

Co-Authored-By: Sandra Loosemore <sandra@codesourcery.com>

From-SVN: r210374
2014-05-13 09:35:20 -04:00
Kyrylo Tkachov
411f86ad86 [ARM] Remove builtins for vzup, vuzp, vtrn and cleanup.
* config/arm/arm.c (neon_itype): Remove NEON_RESULTPAIR.
	(arm_init_neon_builtins): Remove handling of NEON_RESULTPAIR.
	Remove associated type declarations and initialisations.
	(arm_expand_neon_builtin): Likewise.
	(neon_emit_pair_result_insn): Delete.
	* config/arm/arm_neon_builtins (vtrn, vzip, vuzp): Delete.
	* config/arm/neon.md (neon_vtrn<mode>): Delete.
	(neon_vzip<mode>): Likewise.
	(neon_vuzp<mode>): Likewise.

From-SVN: r210369
2014-05-13 13:02:33 +00:00
Catherine Moore
9ce24424f4 near-far-1.c: Adjust expected output to allow the JALS instruction.
2014-05-13  Catherine Moore  <clm@cm00re.com>

        * gcc.target/mips/near-far-1.c: Adjust expected output
        to allow the JALS instruction.
        * gcc.target/mips/near-far-2.c: Likewise.
        * gcc.target/mips/near-far-4.c: Likewise.

From-SVN: r210368
2014-05-13 08:51:39 -04:00
Jonathan Wakely
75e75a087d re PR libstdc++/60497 (unique_ptr<T> tries to complete its type T even though it's not required to be a complete type)
PR libstdc++/60497
	* include/std/tuple (get, __tuple_compare): Qualify more calls to
	prevent ADL. Cast comparison results to bool.
	* testsuite/20_util/tuple/60497.cc: Test accessing rvalues.
	* testsuite/20_util/tuple/comparison_operators/overloaded.cc: New.

From-SVN: r210366
2014-05-13 12:18:01 +01:00
Richard Biener
6b77934ee0 re PR ipa/60973 (Invalid propagation of a tail call in devirt pass)
2014-05-13  Richard Biener  <rguenther@suse.de>

	PR ipa/60973
	* tree-inline.c (remap_gimple_stmt): Clear tail call flag,
	it needs revisiting whether the call still may be tail-called.

From-SVN: r210364
2014-05-13 11:04:44 +00:00
Richard Sandiford
da3cd11361 rtl.def (SYMBOL_REF): Remove middle "0" field.
gcc/
	* rtl.def (SYMBOL_REF): Remove middle "0" field.
	* rtl.h (block_symbol): Reduce number of fields to 2.
	(rtx_def): Add u2.symbol_ref_flags.
	(SYMBOL_REF_FLAGS): Use it.
	(SYMBOL_REF_DATA, SET_SYMBOL_REF_DECL, SYMBOL_REF_DECL)
	(SET_SYMBOL_REF_CONSTANT, SYMBOL_REF_CONSTANT): Lower index.
	* gengtype.c (adjust_field_rtx_def): Remove SYMBOL_REF_FLAGS handling.
	Lower index of SYMBOL_REF_DATA.
	* print-rtl.c (print_rtx): Lower index for SYMBOL_REF_DATA.
	Print SYMBOL_REF_FLAGS at the same time.
	* genattrtab.c (attr_rtx_1): Only initialize 1 "0" SYMBOL_REF field.

From-SVN: r210363
2014-05-13 10:39:16 +00:00
Richard Sandiford
fcc74520d0 rtl.def (VAR_LOCATION): Remove "i" field.
gcc/
	* rtl.def (VAR_LOCATION): Remove "i" field.
	* rtl.h (rtx_def): Add u2.var_location_status.
	(PAT_VAR_LOCATION_STATUS): Use it.
	(gen_rtx_VAR_LOCATION): Declare.
	* gengenrtl.c (excluded_rtx): Add VAR_LOCATION.
	* emit-rtl.c (gen_rtx_VAR_LOCATION): New function.
	* var-tracking.c (emit_note_insn_var_location): Remove casts.

From-SVN: r210362
2014-05-13 10:39:08 +00:00
Richard Sandiford
feb09dd93d rtl.def (scratch): Fix outdated comment and remove "0" field.
gcc/
	* rtl.def (scratch): Fix outdated comment and remove "0" field.
	* gengtype.c (adjust_field_rtx_def): Update accordingly.

From-SVN: r210361
2014-05-13 10:38:57 +00:00
Richard Sandiford
ed8921dc73 gcc/
* rtl.def (DEBUG_INSN, INSN, JUMP_INSN, CALL_INSN, JUMP_TABLE_DATA)
	(BARRIER, CODE_LABEL, NOTE): Remove first "i" field.
	* rtl.h (rtx_def): Add insn_uid to u2 field.
	(RTX_FLAG_CHECK8): Delete in favor of...
	(RTL_INSN_CHAIN_FLAG_CHECK): ...this new macro.
	(INSN_DELETED_P): Update accordingly.
	(INSN_UID): Use u2.insn_uid.
	(INSN_CHAIN_CODE_P): Define.
	(PREV_INSN, NEXT_INSN, BLOCK_FOR_INSN, PATTERN, INSN_LOCATION)
	(INSN_CODE, REG_NOTES, CALL_INSN_FUNCTION_USAGE, CODE_LABEL_NUMBER)
	(NOTE_DATA, NOTE_DELETED_LABEL_NAME, NOTE_BLOCK, NOTE_EH_HANDLER)
	(NOTE_BASIC_BLOCK, NOTE_VAR_LOCATION, NOTE_CFI, NOTE_LABEL_NUMBER)
	(NOTE_KIND, LABEL_NAME, LABEL_NUSES, JUMP_LABEL, LABEL_REFS): Lower
	indices accordingly.
	* print-rtl.c (print_rtx): Print INSN_UIDs before the main loop.
	Update indices for insn-chain rtxes.
	* gengtype.c (gen_rtx_next): Adjust test for insn-chain rtxes.
	(adjust_field_rtx_def): Lower '0' indices for all insn-chain rtxes.
	* emit-rtl.c (gen_label_rtx): Update gen_rtx_LABEL call.
	* caller-save.c (init_caller_save): Update gen_rtx_INSN calls.
	* combine.c (try_combine): Likewise.
	* ira.c (setup_prohibited_mode_move_regs): Likewise.

From-SVN: r210360
2014-05-13 10:38:50 +00:00
Richard Sandiford
fccc55155d rtl.def (REG): Remove middle field.
gcc/
	* rtl.def (REG): Remove middle field.
	* rtl.h (rtx_def): Add orignal_regno to u2.
	(ORIGINAL_REGNO): Use it instead of field 1.
	(REG_ATTRS): Lower field index accordingly.
	* gengtype.c (adjust_field_rtx_def): Remove handling of
	ORIGINAL_REGNO.  Move REG_ATTRS index down.
	* print-rtl.c (print_rtx): Move ORIGINAL_REGNO handling to the
	code that prints the REGNO.

From-SVN: r210359
2014-05-13 10:38:38 +00:00
Richard Sandiford
925c1bae48 print-rtl.c (print_rtx): Guard whole '0' block with ifndef GENERATOR_FILE.
gcc/
	* print-rtl.c (print_rtx): Guard whole '0' block with ifndef
	GENERATOR_FILE.

From-SVN: r210358
2014-05-13 10:38:27 +00:00
Richard Sandiford
13b0c5ac1e rtl.h (rtx_def): Mark u2 as GTY ((skip)).
gcc/
	* rtl.h (rtx_def): Mark u2 as GTY ((skip)).

From-SVN: r210357
2014-05-13 10:38:17 +00:00
Bin Cheng
be9a0da55e tree-ssa-loop-ivopts.c (contain_complex_addr_expr): New.
* tree-ssa-loop-ivopts.c (contain_complex_addr_expr): New.
	(alloc_iv): Lower base expressions containing ADDR_EXPR.

	* gcc.dg/tree-ssa/ivopts-lower_base.c: New test.

From-SVN: r210356
2014-05-13 10:09:54 +00:00
Ian Bolton
73d9ac6a6a Implement HARD_REGNO_CALLER_SAVE_MODE for AArch64
* config/aarch64/aarch64-protos.h
	(aarch64_hard_regno_caller_save_mode): New prototype.
	* config/aarch64/aarch64.c (aarch64_hard_regno_caller_save_mode):
	New function.
	* config/aarch64/aarch64.h (HARD_REGNO_CALLER_SAVE_MODE): New macro.

From-SVN: r210355
2014-05-13 09:28:35 +00:00
Christian Bruel
06b9060214 target.def (mode_switching): New hook vector.
2014-05-13  Christian Bruel  <christian.bruel@st.com>

	* target.def (mode_switching): New hook vector.
	(mode_emit, mode_needed, mode_after, mode_entry): New hooks.
	(mode_exit, modepriority_to_mode): Likewise.
	* mode-switching.c (MODE_NEEDED, MODE_AFTER, MODE_ENTRY): Hookify.
	(MODE_EXIT, MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
	(default_priority_to_mode): Define.
	* targhooks.h (default_priority_to_mode): Declare.
	* target.h: Include tm.h and hard-reg-set.h.
	* doc/tm.texi.in (EMIT_MODE_SET, MODE_NEEDED, MODE_AFTER, MODE_ENTRY)
	(MODE_EXIT, MODE_PRIORITY_TO_MODE): Delete and hookify.
	* doc/tm.texi Regenerate.
	* config/sh/sh.h (MODE_NEEDED, MODE_AFTER, MODE_ENTRY): Delete
	(MODE_EXIT, MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
	* config/sh/sh.c (sh_emit_mode_set, sh_mode_priority): Hookify.
	(sh_mode_needed, sh_mode_after, sh_mode_entry, sh_mode_exit): Likewise.
	* config/i386/i386.h (MODE_NEEDED, MODE_AFTER, MODE_ENTRY): Delete
	(MODE_EXIT, MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
	* config/i386/i386-protos.h (ix86_mode_needed, ix86_mode_after)
	(ix86_mode_entrym, ix86_emit_mode_set): Remove external declaration.
	* config/i386/i386.c (ix86_mode_needed, ix86_mode_after, ix86_mode_exit,
	(ix86_mode_entry, ix86_mode_priority, ix86_emit_mode_set): Hookify.
	* config/epiphany/epiphany.h (MODE_NEEDED, MODE_AFTER, MODE_ENTRY):
	Delete
	(MODE_EXIT, MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
	* config/sh/sh.h (MODE_NEEDED, MODE_AFTER, MODE_ENTRY): Delete
	(MODE_EXIT, MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise.
	* config/sh/sh.c (sh4_emit_mode_set, sh4_mode_needed): Hookify.
	(sh4_mode_after, sh4_mode_entry, sh4_mode_exit): Likewise.
	* config/epiphany/epiphany-protos.h (epiphany_mode_needed)
	(emit_set_fp_mode, epiphany_mode_entry_exit, epiphany_mode_after)
	(epiphany_mode_priority_to_mode): Remove declaration.
	* config/epiphany/epiphany.c (emit_set_fp_mode): Hookify.
	(epiphany_mode_needed, epiphany_mode_priority_to_mode): Likewise.
	(epiphany_mode_entry, epiphany_mode_exit, epiphany_mode_after):
	Likewise.
	(epiphany_mode_priority_to_mode): Change priority type. Hookify.
	(epiphany_mode_needed, epiphany_mode_entry_exit): Hookify.
	(epiphany_mode_after, epiphany_mode_entry, emit_set_fp_mode): Hookify.

From-SVN: r210354
2014-05-13 10:50:51 +02:00
Jakub Jelinek
455464ab33 re PR target/61060 (ICE: in int_mode_for_mode, at stor-layout.c:400 with -free-ter)
PR target/61060
	* config/i386/i386.c (ix86_expand_set_or_movmem): If count_exp
	is const0_rtx, return immediately.  Don't test count == 0 when
	it is always true.

	* gcc.dg/pr61060.c: New test.

From-SVN: r210352
2014-05-13 10:28:53 +02:00
Zhenqiang Chen
f30e25a336 Makefile.in: add shrink-wrap.o.
2014-05-13  Zhenqiang Chen  <zhenqiang.chen@linaro.org>

	* Makefile.in: add shrink-wrap.o.
	* config/i386/i386.c: include "shrink-wrap.h"
	* function.c: Likewise.
	(requires_stack_frame_p, next_block_for_reg,
	move_insn_for_shrink_wrap, prepare_shrink_wrap,
	dup_block_and_redirect): Move to shrink-wrap.c
	(thread_prologue_and_epilogue_insns): Extract three code segments
	as functions in shrink-wrap.c
	* function.h: Move #ifdef HAVE_simple_return ... #endif block to
	shrink-wrap.h
	* shrink-wrap.c: New file.
	* shrink-wrap.h: New file.

From-SVN: r210351
2014-05-13 07:05:46 +00:00
Jason Merrill
3f55e16a29 call.c (maybe_print_user_conv_context): New.
* call.c (maybe_print_user_conv_context): New.
	(convert_like_real): Use it.  Print call context for bad
	user-defined conversion.
	(build_over_call): Print call context for bad 'this' conversion.

From-SVN: r210350
2014-05-12 23:21:18 -04:00
GCC Administrator
eed64f277a Daily bump.
From-SVN: r210349
2014-05-13 00:17:03 +00:00
David Wohlferd
f95c6a7849 extend.texi: Reflect current numbers of pragmas.
* doc/extend.texi: Reflect current numbers of pragmas.  Remove
	reference to Solaris.

From-SVN: r210343
2014-05-12 22:37:23 +00:00
DJ Delorie
5e90b26ffd sibcall-3.c: MSP430 doesn't have sibcall.
* gcc.dg/sibcall-3.c: MSP430 doesn't have sibcall.
* gcc.dg/sibcall-4.c: Likewise.

From-SVN: r210341
2014-05-12 18:12:31 -04:00
Mike Stump
77a1da2c02 re PR other/31778 (genattrtab.c doesn't record filename)
PR other/31778
        * genattrtab.c (filename): Add.
        (convert_set_attr_alternative): Improve error message.
	(check_defs): Restore read_md_filename for error messages.
        (gen_insn): Save filename.

From-SVN: r210340
2014-05-12 21:22:20 +00:00
Dimitris Papavasiliou
f636f886d2 invoke.texi: Document new switches -Wno-shadow-ivar, -fno-local-ivars and -fivar-visibility.
2014-05-12  Dimitris Papavasiliou  <dpapavas@gmail.com>

            * doc/invoke.texi: Document new switches -Wno-shadow-ivar,
            -fno-local-ivars and -fivar-visibility.
            * c-family/c.opt: Make -Wshadow also implicitly enable
            -Wshadow-ivar.

testsuite:
            * objc.dg/shadow-1.m: New test.
            * objc.dg/shadow-2.m: New test.
            * objc.dg/ivar-scope-1.m: New test.
            * objc.dg/ivar-scope-2.m: New test.
            * objc.dg/ivar-scope-3.m: New test.
            * objc.dg/ivar-scope-4.m: New test.
            * objc.dg/ivar-visibility-1.m: New test.
            * objc.dg/ivar-visibility-2.m: New test.
            * objc.dg/ivar-visibility-3.m: New test.
            * objc.dg/ivar-visibility-4.m: New test.

Now, actuatally add the files....

From-SVN: r210339
2014-05-12 20:55:54 +00:00
Janne Blomqvist
16e60fff0b Fix stack overflow crash in getcwd intrinsic.
2014-05-12  Janne Blomqvist  <jb@gcc.gnu.org>

	PR libfortran/61035
	* intrinsics/getcwd.c (getcwd_i4_sub): Avoid potentially large
	stack allocation, avoid extra copying in the common case.

From-SVN: r210335
2014-05-12 22:23:11 +03:00
Janne Blomqvist
f7b6856fa4 Use -std=gnu11 instead of -std=gnu99 for libgfortran C code.
2014-05-12  Janne Blomqvist  <jb@gcc.gnu.org>

	* configure.ac (AM_CFLAGS): Use -std=gnu11.
	(CFLAGS): Likewise.
	* configure: Regenerated.

From-SVN: r210334
2014-05-12 22:20:50 +03:00
Dimitris Papavasiliou
dff8943f54 invoke.texi: Document new switches -Wno-shadow-ivar, -fno-local-ivars and -fivar-visibility.
2014-05-12  Dimitris Papavasiliou  <dpapavas@gmail.com>

	    * doc/invoke.texi: Document new switches -Wno-shadow-ivar,
	    -fno-local-ivars and -fivar-visibility.
	    * c-family/c.opt: Make -Wshadow also implicitly enable
	    -Wshadow-ivar.

testsuite:
	    * objc.dg/shadow-1.m: New test.
	    * objc.dg/shadow-2.m: New test.
	    * objc.dg/ivar-scope-1.m: New test.
	    * objc.dg/ivar-scope-2.m: New test.
	    * objc.dg/ivar-scope-3.m: New test.
	    * objc.dg/ivar-scope-4.m: New test.
	    * objc.dg/ivar-visibility-1.m: New test.
	    * objc.dg/ivar-visibility-2.m: New test.
	    * objc.dg/ivar-visibility-3.m: New test.
	    * objc.dg/ivar-visibility-4.m: New test.

From-SVN: r210333
2014-05-12 19:12:27 +00:00
Jason Merrill
83afe9ef89 call.c (convert_like_real): Use inform for identifying the declaration point.
* call.c (convert_like_real): Use inform for identifying the
	declaration point.

From-SVN: r210332
2014-05-12 15:07:55 -04:00
Tobias Burnus
da7316cbac re PR fortran/60127 (ICE with OpenMP and DO CONCURRENT)
2014-05-12  Tobias Burnus  <burnus@net-b.de>

        PR fortran/60127
        * openmp.c (resolve_omp_do): Reject do concurrent loops.

2014-05-12  Tobias Burnus  <burnus@net-b.de>

        PR fortran/60127
        * gfortran.dg/gomp/omp_do_concurrent.f90: New.

From-SVN: r210331
2014-05-12 21:00:08 +02:00
David Wohlferd
3842015ea2 tm.texi: Remove reference to deleted macro.
2014-05-12  David Wohlferd <dw@LimeGreenSocks.com>

	* doc/tm.texi: Remove reference to deleted macro.
	* doc/tm.texi.in: Likewise.

From-SVN: r210330
2014-05-12 10:22:15 -06:00
Thomas Koenig
e3f9e75762 re PR fortran/60834 ([OOP] ICE with ASSOCIATE construct (gimplify_var_or_parm_decl, at gimplify.c:1721))
2014-05-12  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/60834
	* frontend-passes.c (in_assoc_list):  New variable.
	(optimize_namespace):  Initialize in_assoc_list
	(combine_array_constructor): Don't try to combine
	assoc lists.
	(gfc_code_walker):  Keep track of in_assoc_list.

2014-05-12  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/60834
	* gfortran.dg/associate_16.f90:  New test.

From-SVN: r210329
2014-05-12 16:17:09 +00:00
Paolo Carlini
bc51de9cf8 cvt.c (cp_convert_to_pointer): Don't call error_at if complain & tf_error is false.
2014-05-12  Paolo Carlini  <paolo.carlini@oracle.com>

	* cvt.c (cp_convert_to_pointer): Don't call error_at if
	complain & tf_error is false.

	* decl.c (make_unbound_class_template): Prefer inform for
	"declared here"-type message.

From-SVN: r210326
2014-05-12 15:33:35 +00:00
Senthil Kumar Selvaraj
079f14208f re PR target/60991 ([avr] Stack corruption when using 24-bit integers __int24 or __memx pointers in large stack frame)
gcc/ChangeLog

	PR target/60991
	* config/avr/avr.c (avr_out_store_psi): Use correct constant
	to restore Y.

gcc/testsuite/ChangeLog

	PR target/60991
	* gcc.target/avr/pr60991.c: New testcase.

From-SVN: r210325
2014-05-12 19:33:00 +04:00
Paolo Carlini
c7ae26aab8 re PR c++/60054 ([c++1y] ICE with auto* cast)
2014-05-12  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/60054
	* g++.dg/cpp1y/pr60054.C: New.

From-SVN: r210323
2014-05-12 09:17:46 +00:00
Georg-Johann Lay
999db1252c arm.h (License): Add GCC Runtime Library Exception.
gcc/
	* config/arm/arm.h (License): Add GCC Runtime Library Exception.
	* config/arm/aout.h (License): Same.
	* config/arm/bpabi.h (License): Same.
	* config/arm/elf.h (License): Same.
	* config/arm/linux-elf.h (License): Same.
	* config/arm/linux-gas.h (License): Same.
	* config/arm/netbsd-elf.h (License): Same.
	* config/arm/uclinux-eabi.h (License): Same.
	* config/arm/uclinux-elf.h (License): Same.
	* config/arm/vxworks.h (License): Same.

libgcc/
	* config/arm/bpabi-lib.h (License): Add GCC Runtime Library Exception.

From-SVN: r210322
2014-05-12 09:02:36 +00:00
Paolo Carlini
713106ad88 re PR c++/51199 ([C++11][DR 547] gcc forms impossible types derived from function types with cv-qualifier-seq)
2014-05-12  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51199
	* g++.dg/template/pr51199.C: New.

From-SVN: r210321
2014-05-12 08:42:41 +00:00
GCC Administrator
481d8d7005 Daily bump.
From-SVN: r210319
2014-05-12 00:17:17 +00:00
Hans-Peter Nilsson
c862e3b181 * gcc.c-torture/execute/20101011-1.c [__MMIX__] (DO_TEST): Define as 0.
From-SVN: r210315
2014-05-11 20:48:31 +00:00
Jakub Jelinek
dd2fc5256e tree.h (OMP_CLAUSE_LINEAR_STMT): Define.
* tree.h (OMP_CLAUSE_LINEAR_STMT): Define.
	* tree.c (omp_clause_num_ops): Increase OMP_CLAUSE_LINEAR
	number of operands to 3.
	(walk_tree_1): Walk all operands of OMP_CLAUSE_LINEAR.
	* tree-nested.c (convert_nonlocal_omp_clauses,
	convert_local_omp_clauses): Handle OMP_CLAUSE_DEPEND.
	* gimplify.c (gimplify_scan_omp_clauses): Handle
	OMP_CLAUSE_LINEAR_STMT.
	* omp-low.c (lower_rec_input_clauses): Fix typo.
	(maybe_add_implicit_barrier_cancel, lower_omp_1): Add
	cast between Fortran boolean_type_node and C _Bool if
	needed.
gcc/fortran/
	* gfortran.h (gfc_statement): Add ST_OMP_CANCEL,
	ST_OMP_CANCELLATION_POINT, ST_OMP_TASKGROUP, ST_OMP_END_TASKGROUP,
	ST_OMP_SIMD, ST_OMP_END_SIMD, ST_OMP_DO_SIMD, ST_OMP_END_DO_SIMD,
	ST_OMP_PARALLEL_DO_SIMD, ST_OMP_END_PARALLEL_DO_SIMD and
	ST_OMP_DECLARE_SIMD.
	(gfc_omp_namelist): New typedef.
	(gfc_get_omp_namelist): Define.
	(OMP_LIST_UNIFORM, OMP_LIST_ALIGNED, OMP_LIST_LINEAR,
	OMP_LIST_DEPEND_IN, OMP_LIST_DEPEND_OUT): New clause list kinds.
	(gfc_omp_proc_bind_kind, gfc_omp_cancel_kind): New enums.
	(gfc_omp_clauses): Change type of lists to gfc_omp_namelist *.
	Add inbranch, notinbranch, cancel, proc_bind, safelen_expr and
	simdlen_expr fields.
	(gfc_omp_declare_simd): New typedef.
	(gfc_get_omp_declare_simd): Define.
	(gfc_namespace): Add omp_declare_simd field.
	(gfc_exec_op): Add EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT,
	EXEC_OMP_TASKGROUP, EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD and
	EXEC_OMP_PARALLEL_DO_SIMD.
	(gfc_omp_atomic_op): Add GFC_OMP_ATOMIC_MASK, GFC_OMP_ATOMIC_SEQ_CST
	and GFC_OMP_ATOMIC_SWAP.
	(gfc_code): Change type of omp_namelist field to gfc_omp_namelist *.
	(gfc_free_omp_namelist, gfc_free_omp_declare_simd,
	gfc_free_omp_declare_simd_list, gfc_resolve_omp_declare_simd): New
	prototypes.
	* trans-stmt.h (gfc_trans_omp_declare_simd): New prototype.
	* symbol.c (gfc_free_namespace): Call gfc_free_omp_declare_simd.
	* openmp.c (gfc_free_omp_clauses): Free safelen_expr and
	simdlen_expr.  Use gfc_free_omp_namelist instead of
	gfc_free_namelist.
	(gfc_free_omp_declare_simd, gfc_free_omp_declare_simd_list): New
	functions.
	(gfc_match_omp_variable_list): Add end_colon, headp and
	allow_sections arguments.  Handle parsing of array sections.
	Use *omp_namelist* instead of *namelist* data structure and
	functions/macros.  Allow termination at : character.
	(OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH,
	OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND,
	OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM): Define.
	(gfc_match_omp_clauses): Change first and needs_space variables
	into arguments with default values.  Parse inbranch, notinbranch,
	proc_bind, safelen, simdlen, uniform, linear, aligned and
	depend clauses.
	(OMP_PARALLEL_CLAUSES): Add OMP_CLAUSE_PROC_BIND.
	(OMP_DECLARE_SIMD_CLAUSES, OMP_SIMD_CLAUSES): Define.
	(OMP_TASK_CLAUSES): Add OMP_CLAUSE_DEPEND.
	(gfc_match_omp_do_simd): New function.
	(gfc_match_omp_flush): Use *omp_namelist* instead of *namelist*
	data structure and functions/macros.
	(gfc_match_omp_simd, gfc_match_omp_declare_simd,
	gfc_match_omp_parallel_do_simd): New functions.
	(gfc_match_omp_atomic): Handle seq_cst clause.  Handle atomic swap.
	(gfc_match_omp_taskgroup, gfc_match_omp_cancel_kind,
	gfc_match_omp_cancel, gfc_match_omp_cancellation_point): New
	functions.
	(resolve_omp_clauses): Add where, omp_clauses and ns arguments.
	Use *omp_namelist* instead of *namelist* data structure and
	functions/macros.  Resolve uniform, aligned, linear, depend,
	safelen and simdlen clauses.
	(resolve_omp_atomic): Adjust for GFC_OMP_ATOMIC_{MASK,SEQ_CST,SWAP}
	addition, recognize atomic swap.
	(gfc_resolve_omp_parallel_blocks): Use gfc_omp_namelist instead
	of gfc_namelist.  Handle EXEC_OMP_PARALLEL_DO_SIMD the same as
	EXEC_OMP_PARALLEL_DO.
	(gfc_resolve_do_iterator): Use *omp_namelist* instead of *namelist*
	data structure and functions/macros.
	(resolve_omp_do): Likewise.  Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD,
	EXEC_OMP_PARALLEL_DO_SIMD.
	(gfc_resolve_omp_directive): Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD,
	EXEC_OMP_PARALLEL_DO_SIMD and EXEC_OMP_CANCEL.  Adjust
	resolve_omp_clauses caller.
	(gfc_resolve_omp_declare_simd): New function.
	* parse.c (decode_omp_directive): Parse cancellation point, cancel,
	declare simd, end do simd, end simd, end parallel do simd,
	end taskgroup, parallel do simd, simd and taskgroup directives.
	(case_executable): Add ST_OMP_CANCEL and ST_OMP_CANCELLATION_POINT.
	(case_exec_markers): Add ST_OMP_TASKGROUP, case ST_OMP_SIMD,
	ST_OMP_DO_SIMD and ST_OMP_PARALLEL_DO_SIMD.
	(case_decl): Add ST_OMP_DECLARE_SIMD.
	(gfc_ascii_statement): Handle ST_OMP_CANCEL,
	ST_OMP_CANCELLATION_POINT, ST_OMP_TASKGROUP, ST_OMP_END_TASKGROUP,
	ST_OMP_SIMD, ST_OMP_END_SIMD, ST_OMP_DO_SIMD, ST_OMP_END_DO_SIMD,
	ST_OMP_PARALLEL_DO_SIMD, ST_OMP_END_PARALLEL_DO_SIMD and
	ST_OMP_DECLARE_SIMD.
	(parse_omp_do): Handle ST_OMP_SIMD, ST_OMP_DO_SIMD and
	ST_OMP_PARALLEL_DO_SIMD.
	(parse_omp_atomic): Adjust for GFC_OMP_ATOMIC_* additions.
	(parse_omp_structured_block): Handle ST_OMP_TASKGROUP and
	ST_OMP_PARALLEL_DO_SIMD.
	(parse_executable): Handle ST_OMP_SIMD, ST_OMP_DO_SIMD,
	ST_OMP_PARALLEL_DO_SIMD and ST_OMP_TASKGROUP.
	* trans-decl.c (gfc_get_extern_function_decl,
	gfc_create_function_decl): Call gfc_trans_omp_declare_simd if
	needed.
	* frontend-passes.c (gfc_code_walker): Handle EXEC_OMP_SIMD,
	EXEC_OMP_DO_SIMD and EXEC_OMP_PARALLEL_DO_SIMD.  Walk
	safelen_expr and simdlen_expr.  Walk expressions in gfc_omp_namelist
	of depend, aligned and linear clauses.
	* match.c (match_exit_cycle): Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD
	and EXEC_OMP_PARALLEL_DO_SIMD.
	(gfc_free_omp_namelist): New function.
	* dump-parse-tree.c (show_namelist): Removed.
	(show_omp_namelist): New function.
	(show_omp_node): Handle OpenMP 4.0 additions.
	(show_code_node): Handle EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT,
	EXEC_OMP_DO_SIMD, EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and
	EXEC_OMP_TASKGROUP.
	* match.h (gfc_match_omp_cancel, gfc_match_omp_cancellation_point,
	gfc_match_omp_declare_simd, gfc_match_omp_do_simd,
	gfc_match_omp_parallel_do_simd, gfc_match_omp_simd,
	gfc_match_omp_taskgroup): New prototypes.
	* trans-openmp.c (gfc_trans_omp_variable): Add declare_simd
	argument, handle it.  Allow current_function_decl to be NULL.
	(gfc_trans_omp_variable_list): Add declare_simd argument, pass
	it through to gfc_trans_omp_variable and disregard whether
	sym is referenced if declare_simd is true.  Work on gfc_omp_namelist
	instead of gfc_namelist.
	(gfc_trans_omp_reduction_list): Work on gfc_omp_namelist instead of
	gfc_namelist.  Adjust gfc_trans_omp_variable caller.
	(gfc_trans_omp_clauses): Add declare_simd argument, pass it through
	to gfc_trans_omp_variable{,_list} callers.  Work on gfc_omp_namelist
	instead of gfc_namelist.  Handle inbranch, notinbranch, safelen,
	simdlen, depend, uniform, linear, proc_bind and aligned clauses.
	Handle cancel kind.
	(gfc_trans_omp_atomic): Handle seq_cst clause, handle atomic swap,
	adjust for GFC_OMP_ATOMIC_* changes.
	(gfc_trans_omp_cancel, gfc_trans_omp_cancellation_point): New
	functions.
	(gfc_trans_omp_do): Add op argument, handle simd translation into
	generic.
	(GFC_OMP_SPLIT_SIMD, GFC_OMP_SPLIT_DO, GFC_OMP_SPLIT_PARALLEL,
	GFC_OMP_SPLIT_NUM, GFC_OMP_MASK_SIMD, GFC_OMP_MASK_DO,
	GFC_OMP_MASK_PARALLEL): New.
	(gfc_split_omp_clauses, gfc_trans_omp_do_simd): New functions.
	(gfc_trans_omp_parallel_do): Rework to use gfc_split_omp_clauses.
	(gfc_trans_omp_parallel_do_simd, gfc_trans_omp_taskgroup): New
	functions.
	(gfc_trans_omp_directive): Handle EXEC_OMP_CANCEL,
	EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
	EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
	Adjust gfc_trans_omp_do caller.
	(gfc_trans_omp_declare_simd): New function.
	* st.c (gfc_free_statement): Handle EXEC_OMP_CANCEL,
	EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
	EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
	For EXEC_OMP_FLUSH call gfc_free_omp_namelist instead of
	gfc_free_namelist.
	* module.c (omp_declare_simd_clauses): New variable.
	(mio_omp_declare_simd): New function.
	(mio_symbol): Call it.
	* trans.c (trans_code): Handle EXEC_OMP_CANCEL,
	EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
	EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
	* resolve.c (gfc_resolve_blocks): Handle EXEC_OMP_DO_SIMD,  
	EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
	(resolve_code): Handle EXEC_OMP_CANCEL,
	EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD,
	EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP.
	(resolve_types): Call gfc_resolve_omp_declare_simd.
gcc/testsuite/
	* gfortran.dg/gomp/affinity-1.f90: New test.
libgomp/
	* testsuite/libgomp.fortran/cancel-do-1.f90: New test.
	* testsuite/libgomp.fortran/cancel-do-2.f90: New test.
	* testsuite/libgomp.fortran/cancel-parallel-1.f90: New test.
	* testsuite/libgomp.fortran/cancel-parallel-3.f90: New test.
	* testsuite/libgomp.fortran/cancel-sections-1.f90: New test.
	* testsuite/libgomp.fortran/cancel-taskgroup-2.f90: New test.
	* testsuite/libgomp.fortran/declare-simd-1.f90: New test.
	* testsuite/libgomp.fortran/declare-simd-2.f90: New test.
	* testsuite/libgomp.fortran/declare-simd-3.f90: New test.
	* testsuite/libgomp.fortran/depend-1.f90: New test.
	* testsuite/libgomp.fortran/depend-2.f90: New test.
	* testsuite/libgomp.fortran/omp_atomic5.f90: New test.
	* testsuite/libgomp.fortran/simd1.f90: New test.
	* testsuite/libgomp.fortran/simd2.f90: New test.
	* testsuite/libgomp.fortran/simd3.f90: New test.
	* testsuite/libgomp.fortran/simd4.f90: New test.
	* testsuite/libgomp.fortran/taskgroup1.f90: New test.

From-SVN: r210313
2014-05-11 22:26:36 +02:00
Richard Sandiford
7588d8aae4 re PR c/61136 (ice in tree_nop_conversion)
gcc/
	PR tree-optimization/61136
	* wide-int.h (multiple_of_p): Define a version that doesn't return
	the quotient.
	* fold-const.c (extract_muldiv_1): Use wi::multiple_of_p instead of an
	integer_zerop/const_binop pair.
	(multiple_of_p): Likewise, converting both operands to widest_int
	precision.

gcc/testsuite/
	* gcc.dg/torture/pr61136.c: New test.

From-SVN: r210312
2014-05-11 20:21:55 +00:00
Tobias Burnus
a9fe68774e trans-intrinsic.c (gfc_build_builtin_function_decls): Change type of second argument to int.
2014-05-11  Tobias Burnus  <burnus@net-b.de>

       * trans-intrinsic.c (gfc_build_builtin_function_decls):
       Change type of second argument to int.

2014-05-11  Tobias Burnus  <burnus@net-b.de>

       * caf/libcaf.h (_gfortran_caf_num_images): Change type of
       second argument to int.
       * caf/mpi.c (_gfortran_caf_num_images): Ditto.
       * caf/single.c (_gfortran_caf_num_images): Ditto.

From-SVN: r210311
2014-05-11 20:25:55 +02:00
Paolo Carlini
3af89f8bdf re PR c++/59705 (possible compiler bug regarding SFINAE (program compiles fine))
2014-05-11  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/59705
	* g++.dg/cpp0x/sfinae51.C: New.

	PR c++/58353
	* g++.dg/cpp0x/variadic157.C: New.

From-SVN: r210310
2014-05-11 10:23:34 +00:00
GCC Administrator
6f8531afe1 Daily bump.
From-SVN: r210305
2014-05-11 00:16:47 +00:00
Oleg Endo
229e47f1a0 re PR target/51244 ([SH] Inefficient conditional branch and code around T bit)
gcc/testsuite/
	PR target/51244
	* gcc.target/sh/pr51244-14.c: Relax criteria for passing the test.

From-SVN: r210301
2014-05-10 20:19:06 +00:00
Marek Polacek
d033409e94 c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to maybe_warn_string_init.
* c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
	maybe_warn_string_init.
	(c_parser_postfix_expression_after_paren_type): Pass type_loc to
	maybe_warn_string_init.
	* c-tree.h (maybe_warn_string_init): Update declaration.
	* c-typeck.c (maybe_warn_string_init): Add location parameter.
	Call pedwarn_init with loc instead of with input_location.
	(digest_init): Pass init_loc to maybe_warn_string_init.
	(pop_init_level): Call pedwarn_init with loc instead of with
	input_location.
	(set_init_index): Likewise.
	(process_init_element): Likewise.

	* gcc.dg/pedwarn-init.c: New test.
	* gcc.dg/init-string-1.c: Adjust dg-error.

From-SVN: r210300
2014-05-10 20:03:57 +00:00
Hans-Peter Nilsson
0059920267 * lib/target-supports.exp
(check_effective_target_logical_op_short_circuit): Add mmix-*-*
	to the list.

From-SVN: r210299
2014-05-10 11:58:57 +00:00
GCC Administrator
2ac5e1ec31 Daily bump.
From-SVN: r210298
2014-05-10 00:16:52 +00:00
Momchil Velikov
0b360a07d3 re PR c++/60463 (Lambda function can call a non-const member function with const this)
PR c++/60463
	PR c++/60755
	* lambda.c (lambda_expr_this_capture): Add new parameter
	add_capture_p controlling whether the functions will try to
	capture 'this' via the default capture.
	(maybe_resolve_dummy): Likewise.
	* cp-tree.h: Adjust prototypes.
	* call.c, semantics.c: Change callers of these functions.
	* call.c (build_new_method_call_1): Use the actual 'this' that
	would be potentially captured for the overload resolution, instead
	of the dummy object.

From-SVN: r210292
2014-05-09 16:07:45 -04:00