Commit Graph

129713 Commits

Author SHA1 Message Date
Bin Cheng
cb8f1a5761 re PR tree-optimization/60363 (logical_op_short_circuit, gcc.dg/tree-ssa/ssa-dom-thread-4.c scan-tree-dump-times dom1 "Threaded" 4)
PR tree-optimization/60363
	* gcc/tree-ssa-threadupdate.c (get_value_locus_in_path): New.
	(copy_phi_args): New parameters.  Call get_value_locus_in_path.
	(update_destination_phis): New parameter.
	(create_edge_and_update_destination_phis): Ditto.
	(ssa_fix_duplicate_block_edges): Pass new arguments.
	(thread_single_edge): Ditto.

	PR tree-optimization/60363
	* gcc.dg/tree-ssa/ssa-dom-thread-4.c: Revert XFAIL test.

From-SVN: r210059
2014-05-05 07:36:30 +00:00
Peter Bergner
f93bc5b31a rs6000.h (RS6000_BTM_HARD_FLOAT): New define.
gcc/
	* config/rs6000/rs6000.h (RS6000_BTM_HARD_FLOAT): New define.
	(RS6000_BTM_COMMON): Add RS6000_BTM_HARD_FLOAT.
	(TARGET_EXTRA_BUILTINS): Add TARGET_HARD_FLOAT.
	* config/rs6000/rs6000-builtin.def (BU_MISC_1):
	Use RS6000_BTM_HARD_FLOAT.
	(BU_MISC_2): Likewise.
	* config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Handle
	RS6000_BTM_HARD_FLOAT.
	(rs6000_option_override_internal): Enforce -mhard-float if -mhard-dfp
	is explicitly used.
	(rs6000_invalid_builtin): Add hard floating builtin support.
	(rs6000_expand_builtin): Relax the gcc_assert to allow the new
	hard float builtins.
	(rs6000_builtin_mask_names): Add RS6000_BTM_HARD_FLOAT.

gcc/testsuite/
	* gcc.target/powerpc/pack02.c (dg-options): Add -mhard-float.
	(dg-require-effective-target): Change target to powerpc_fprs.
	* gcc.target/powerpc/pack03.c (dg-options): Add -mhard-dfp.
	(dg-require-effective-target): Change target to dfprt.

From-SVN: r210054
2014-05-04 20:52:30 -05:00
GCC Administrator
b89184027e Daily bump.
From-SVN: r210053
2014-05-05 00:16:25 +00:00
GCC Administrator
76374c9079 Daily bump.
From-SVN: r210047
2014-05-04 00:16:42 +00:00
Paolo Carlini
32314c3804 re PR c++/58582 ([c++11] ICE defining and instantiating deleted template function)
/cp
2014-05-03  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58582
	* decl.c (grokfndecl): Check duplicate_decls return value for
	error_mark_node.
	* pt.c (instantiate_decl): A deleted function is defined.

/testsuite
2014-05-03  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58582
	* g++.dg/cpp0x/deleted4.C: New.
	* g++.dg/cpp0x/deleted5.C: Likewise.
	* g++.dg/cpp0x/deleted6.C: Likewise.

From-SVN: r210043
2014-05-03 22:44:22 +00:00
Oleg Endo
579f4e64df sh_optimize_sett_clrt.cc (sh_optimize_sett_clrt::execute): Add missing function* argument.
* config/sh/sh_optimize_sett_clrt.cc (sh_optimize_sett_clrt::execute):
	Add missing function* argument.

From-SVN: r210040
2014-05-03 20:22:09 +00:00
Richard Sandiford
0be7287d81 lra-constraints.c (valid_address_p): Move earlier in file.
gcc/
	* lra-constraints.c (valid_address_p): Move earlier in file.
	Add a constraint argument to the address_info version.
	(satisfies_memory_constraint_p): New function.
	(satisfies_address_constraint_p): Likewise.
	(process_alt_operands, curr_insn_transform): Use them.
	(process_address): Pass the constraint to valid_address_p when
	checking address operands.

From-SVN: r210039
2014-05-03 19:19:56 +00:00
Richard Sandiford
ad782bc910 mips.c (mips_isa_rev): New variable.
gcc/
	* config/mips/mips.c (mips_isa_rev): New variable.
	(mips_set_architecture): Set it.
	* config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Set __mips_isa_rev
	from mips_isa_rev.
	(ISA_HAS_MUL3, ISA_HAS_FP_CONDMOVE, ISA_HAS_8CC, ISA_HAS_FP4)
	(ISA_HAS_PAIRED_SINGLE, ISA_HAS_MADD_MSUB, ISA_HAS_FP_RECIP_RSQRT)
	(ISA_HAS_CLZ_CLO, ISA_HAS_ROR, ISA_HAS_WSBH, ISA_HAS_PREFETCH)
	(ISA_HAS_SEB_SEH, ISA_HAS_EXT_INS, ISA_HAS_MXHC1)
	(ISA_HAS_HILO_INTERLOCKS, ISA_HAS_SYNCI, MIN_FPRS_PER_FMT): Reexpress
	conditions in terms of mips_isa_rev.
	(mips_isa_rev): Declare.

From-SVN: r210038
2014-05-03 19:18:40 +00:00
Oleg Endo
45731f37b3 sh-mem.cc: Use tabs instead of spaces.
* config/sh/sh-mem.cc: Use tabs instead of spaces.
	(prob_unlikely, prob_likely): Make variables const.

From-SVN: r210037
2014-05-03 17:47:27 +00:00
Denis Chertykov
c61dfa6388 avr.c (avr_adjust_insn_length): Handle JUMP_TABLE_DATA.
* config/avr/avr.c (avr_adjust_insn_length): Handle JUMP_TABLE_DATA.

From-SVN: r210035
2014-05-03 18:23:24 +04:00
Dominique d'Humieres
6855e17c36 2014-05-03 Dominique d'Humieres <dominiq@lps.ens.fr>
Fix typos in log entries.

From-SVN: r210034
2014-05-03 14:16:53 +02:00
Oleg Endo
1b8da635dc sh.h (SH_ASM_SPEC): Handle m1, m2*, m3* and m4* cases.
* config/sh/sh.h (SH_ASM_SPEC): Handle m1, m2*, m3* and m4* cases.

From-SVN: r210033
2014-05-03 11:50:38 +00:00
Oleg Endo
f6982a08ca sh.h (ROUND_ADVANCE): Delete macro.
* config/sh/sh.h (ROUND_ADVANCE): Delete macro.
	(ROUND_REG, PASS_IN_REG_P): Move and rename macros to ...
	* config/sh/sh.c (sh_round_reg, sh_pass_in_reg_p): ... these new
	functions.
	(sh_arg_partial_bytes, sh_function_arg, sh_function_arg_advance,
	sh_setup_incoming_varargs): Replace usage of PASS_IN_REG_P with
	sh_pass_in_reg_p.
	Replace usage of ROUND_REG with sh_round_reg.
	Use CEIL instead of ROUND_ADVANCE.

From-SVN: r210032
2014-05-03 09:42:52 +00:00
Dominique d'Humieres
3c922bcd25 re PR testsuite/61025 (FAIL: gfortran.dg/coarray_lib_this_image_1.f90)
2014-05-03  Dominique d'Humieres <dominiq@lps.ens.fr>

	PR fortran/61025
	* gfortran.dg/coarray_lib_this_image_1.f90: Adjust the dg-final
	regexps for -m32.
	* gfortran.dg/coarray_lib_this_image_2.f90: Likewise.
	* gfortran.dg/coarray_poly_7.f90: Likewise.
	* gfortran.dg/coarray_poly_8.f90: Likewise.
	* gfortran.dg/coarray_poly_9.f90: Likewise.

From-SVN: r210031
2014-05-03 11:08:15 +02:00
Oleg Endo
0bcf70f851 re PR target/61026 (sh-rtems4.11 build of 4.9.0 fails on FreeBSD 10 c++ (clang).)
PR target/61026
	* config/sh/sh.c: Include stdlib headers before everything else.

From-SVN: r210028
2014-05-03 07:51:02 +00:00
GCC Administrator
2ec1d0af60 Daily bump.
From-SVN: r210026
2014-05-03 00:16:48 +00:00
Jason Merrill
c4fa357222 * decl2.c (vague_linkage_p): Local statics have vague linkage.
From-SVN: r210019
2014-05-02 16:56:41 -04:00
Jason Merrill
43b781fac7 re PR c++/60992 (ICE in tsubst_copy, at cp/pt.c:12637)
PR c++/60992
	* lambda.c (lambda_capture_field_type): Wrap anything dependent
	other than 'this'.
	(add_capture): Check for VLA before calling it.
	* semantics.c (is_this_parameter): Accept any 'this' parameter, not
	just the current one.  Make non-static.
	* cp-tree.h: Declare it.
	* pt.c (tsubst_copy) [VAR_DECL]: Also build a new VAR_DECL if
	the operand was static or constant.

From-SVN: r210017
2014-05-02 15:47:40 -04:00
Jonathan Wakely
62da5a07b2 re PR libstdc++/61036 (shared_ptr<void>(new T) rejected)
PR libstdc++/61036
	* include/bits/shared_ptr_base.h (__shared_ptr::__shared_ptr(_Tp1*)):
	Check the correct type in the static assertion.
	* testsuite/20_util/shared_ptr/cons/61036.cc: New.

From-SVN: r210015
2014-05-02 19:29:48 +01:00
Marek Polacek
a0e24419cf re PR c/25801 (bad diagnostic for increment/decrement of pointer to incomplete array)
PR c/25801
	* c-typeck.c (c_size_in_bytes): Update comment.  Don't call error.
	Return size_one_node when the type is not complete.
	(pointer_diff): Remove comment.
	(build_unary_op): Improve error messages.

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

From-SVN: r210013
2014-05-02 18:13:43 +00:00
Marek Polacek
19fc9faaaf c-typeck.c (c_finish_return): Separate warning_at calls.
c/
	* c-typeck.c (c_finish_return): Separate warning_at calls.
cp/
	* typeck.c (maybe_warn_about_returning_address_of_local): Separate
	warning_at calls.

From-SVN: r210012
2014-05-02 18:09:42 +00:00
Marek Polacek
6577374eaa * c.opt (Wsizeof-pointer-memaccess): Describe option.
From-SVN: r210011
2014-05-02 18:07:40 +00:00
Jakub Jelinek
95782571f3 gimplify.c (gimplify_adjust_omp_clauses_1): Handle GOVD_FIRSTPRIVATE | GOVD_LASTPRIVATE.
* gimplify.c (gimplify_adjust_omp_clauses_1): Handle
	GOVD_FIRSTPRIVATE | GOVD_LASTPRIVATE.
	(gimplify_adjust_omp_clauses): Simd region is never
	directly nested in combined parallel.  Instead, for linear
	with copyin/copyout, if in combined for simd loop, make decl
	firstprivate/lastprivate on OMP_FOR.
	* omp-low.c (expand_omp_for_generic, expand_omp_for_static_nochunk,
	expand_omp_for_static_chunk): When setting endvar, also set
	fd->loop.v to the same value.
libgomp/
	* testsuite/libgomp.c/simd-10.c: New test.
	* testsuite/libgomp.c/simd-11.c: New test.
	* testsuite/libgomp.c/simd-12.c: New test.
	* testsuite/libgomp.c/simd-13.c: New test.

From-SVN: r210009
2014-05-02 19:43:40 +02:00
Jonathan Wakely
047f1cec7f re PR libstdc++/59476 (gdb pretty-printer cannot print C++11 _Rb_tree_iterator)
PR libstdc++/59476
	* python/libstdcxx/v6/printers.py (get_value_from_Rb_tree_node): New
	function to handle both C++03 and C++11 _Rb_tree_node implementations.
	(StdRbtreeIteratorPrinter, StdMapPrinter, StdSetPrinter): Use it.
	* testsuite/libstdc++-prettyprinters/simple.cc: Update comment to
	refer to...
	* testsuite/libstdc++-prettyprinters/simple11.cc: New.

From-SVN: r210008
2014-05-02 17:01:30 +01:00
Richard Sandiford
e13b3dfdee hwint.h (zext_hwi): Fix signed overflow for prec == 63.
gcc/
	* hwint.h (zext_hwi): Fix signed overflow for prec == 63.

From-SVN: r210006
2014-05-02 15:35:33 +00:00
Alan Lawrence
0696116a28 One-line tidy of bit-twiddle expression in aarch64.c
* config/aarch64/aarch64.c (aarch64_expand_vec_perm_1): Tidy bit-flip
	expression.

From-SVN: r210005
2014-05-02 15:11:04 +00:00
Marek Polacek
fb90f9f3ae * doc/invoke.texi: Describe -fsanitize=float-divide-by-zero.
From-SVN: r210002
2014-05-02 08:24:49 +00:00
Marek Polacek
63bc4e8734 c-tree.h (error_init): Remove declaration.
* c-tree.h (error_init): Remove declaration.
	(pedwarn_init): Likewise.
	* c-typeck.c (error_init): Make static and move above.
	(pedwarn_init): Likewise.
	(warning_init): Move above.
	(maybe_warn_string_init): Likewise.

From-SVN: r210001
2014-05-02 07:57:59 +00:00
Kito Cheng
ed15c5984e defaults.h (HONOR_REG_ALLOC_ORDER): Change HONOR_REG_ALLOC_ORDER to a C expression marco.
2014-02-26  Kito Cheng  <kito@0xlab.org>

	* defaults.h (HONOR_REG_ALLOC_ORDER): Change HONOR_REG_ALLOC_ORDER
	to a C expression marco.
	* ira-color.c (HONOR_REG_ALLOC_ORDER) : Ditto.
	* config/arm/arm.h (HONOR_REG_ALLOC_ORDER): Ditto.
	* config/nds32/nds32.h (HONOR_REG_ALLOC_ORDER): Ditto.
	* doc/tm.texi (HONOR_REG_ALLOC_ORDER): Update document for
	HONOR_REG_ALLOC_ORDER.
	* doc/tm.texi.in (HONOR_REG_ALLOC_ORDER): Ditto.

From-SVN: r210000
2014-05-02 00:03:22 -06:00
Jeff Law
4bd2511b3c revert: c-parser.c (c_parser_sizeof_expression): Reorganize slightly to avoid goto.
2014-05-01  Jeff Law  <law@redhat.com>

	Revert:

	2014-04-24  Prathamesh Kulkarni  <bilbotheelffriend@gmail.com>
	* c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
	avoid goto.

From-SVN: r209999
2014-05-01 23:46:38 -06:00
Marek Polacek
6a358dcb65 re PR c/60784 (Spurious -Wmissing-field-initializers warning for anonymous structure)
PR c/60784
	* c-typeck.c (push_init_level): Set constructor_designated to
	p->designated for structures.

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

From-SVN: r209998
2014-05-02 05:40:38 +00:00
Jeff Law
cea4a152f6 [multiple changes]
2014-05-01  Jeff Law  <law@redhat.com>

	* Revert:
	2014-04-24  Jincheng Miao  <jincheng.miao@gmail.com>

	* zh_CN.po: Fix typo for -mfentry.

From-SVN: r209997
2014-05-01 21:54:33 -06:00
GCC Administrator
99c00993ae Daily bump.
From-SVN: r209996
2014-05-02 00:17:21 +00:00
Joseph Myers
77dc11d948 * sv.po: Update.
From-SVN: r209989
2014-05-01 22:33:52 +01:00
Richard Sandiford
a4ebe10454 * config.sub, config.guess: Import from upstream.
From-SVN: r209988
2014-05-01 20:51:11 +00:00
Ian Lance Taylor
e14b9135f1 compiler: Use backend interface for heap expressions.
From-SVN: r209983
2014-05-01 19:18:56 +00:00
Steve Ellcey
b6799f373a longlong.h: Use 'defined()' to check __mips16.
2014-05-01  Steve Ellcey  <sellcey@mips.com>

	* include/longlong.h: Use 'defined()' to check __mips16.

From-SVN: r209980
2014-05-01 15:07:00 +00:00
Jan-Benedict Glaw
53c8d5a729 arc.c (TARGET_LRA_P): Undef before redefine.
2014-05-01  Jan-Benedict Glaw  <jbglaw@lug-owl.de>

	* config/arc/arc.c (TARGET_LRA_P): Undef before redefine.

From-SVN: r209979
2014-05-01 13:00:10 +00:00
Jan-Benedict Glaw
486c559b0c arc.c (arc_select_cc_mode): Fix typo.
2014-05-01  Jan-Benedict Glaw  <jbglaw@lug-owl.de>

	* config/arc/arc.c (arc_select_cc_mode): Fix typo.

From-SVN: r209978
2014-05-01 12:16:42 +00:00
Marek Polacek
ae5ebda473 re PR c/60915 (confusing diagnostic from attribute on function definition)
PR c/60915
	* c-parser.c (c_parser_declaration_or_fndef): Give better error if
	function-definition has an attribute after the declarator.

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

From-SVN: r209975
2014-05-01 07:40:26 +00:00
Marek Polacek
96b40f8d4c re PR c/60257 (Incorrect column number and confusing message in -Woverride-init)
PR c/60257
	* c-typeck.c (warning_init): Add location_t parameter.  Call
	warning_at instead of warning.
	(push_init_level): Pass input_location to warning_init.
	(add_pending_init): Add location_t parameter.  Pass loc to
	warning_init.
	(set_nonincremental_init): Pass input_location to add_pending_init.
	(set_nonincremental_init_from_string): Likewise.
	(output_init_element): Pass loc to warning_init and to
	add_pending_init.

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

From-SVN: r209974
2014-05-01 07:35:05 +00:00
Marek Polacek
32e007683d re PR c/43395 (Gcc warns label as local variable)
PR c/43395
c/
	* c-typeck.c (c_finish_return): Distinguish between label and variable
	when warning about returning local address.
cp/
	* typeck.c (maybe_warn_about_returning_address_of_local): Distinguish
	between label and variable when warning about returning local address.
testsuite/
	* c-c++-common/pr43395.c: New test.

From-SVN: r209973
2014-05-01 07:29:38 +00:00
Yuri Rumyantsev
944052b9ae tree-if-conv.c (is_cond_scalar_reduction): New function.
gcc/
	* tree-if-conv.c (is_cond_scalar_reduction): New function.
	(convert_scalar_cond_reduction): Likewise.
	(predicate_scalar_phi): Add recognition and transformation
	of simple conditioanl reduction to be vectorizable.

gcc/testsuite/
	* gcc.dg/cond-reduc-1.c: New test.
	* gcc.dg/cond-reduc-2.c: Likewise.

From-SVN: r209972
2014-05-01 07:23:06 +00:00
Marek Polacek
c9379ce2a9 re PR c/29467 (-ansi -pedantic accepts _Bool without diagnostic)
PR c/29467
	* c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
	in C89 mode.

	* gcc.dg/pr29467.c: New test.
	* gcc.dg/declspec-13.c: Renumber some dg-warnings.  Add dg-warnings
	about boolean types.
	* gfortran.dg/bind_c_usage_24_c.c: Include <stdbool.h>.  Change _Bool
	to bool.
	* gfortran.dg/c_f_pointer_logical_driver.c: Change _Bool to bool.

From-SVN: r209971
2014-05-01 07:21:07 +00:00
Marek Polacek
d00887e899 re PR c/43245 (add option to control "discarding qualifiers" warnings)
PR c/43245
	* doc/invoke.texi: Document -Wdiscarded-qualifiers.
c-family/
	* c.opt (Wdiscarded-qualifiers): Add.
c/
	* c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
	instead of 0 to WARN_FOR_QUALIFIERS.
testsuite/
	* gcc.dg/pr43245.c: New test.

From-SVN: r209970
2014-05-01 07:16:10 +00:00
Marek Polacek
5436fa2e87 re PR c/56989 (wrong location in error message)
PR c/56989
	* c-typeck.c (default_conversion): Use better location for
	error call.

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

From-SVN: r209969
2014-05-01 07:08:19 +00:00
Chris Manghane
d2d9bc36ee go-backend.c: #include "diagnostics.h".
* go-backend.c: #include "diagnostics.h".
	(saw_errors): New function.
	* go-c.h (saw_errors): Declare.
	* Make-lang.in (GO_OBJS): Remove go/gogo-tree.o.

From-SVN: r209968
2014-05-01 01:20:07 +00:00
Ian Lance Taylor
6c76a95d1b runtime: ask $GOC rather than $CC for the version and multi-os-directory
The Go compiler may have different values for these than the C compiler.

From-SVN: r209967
2014-05-01 00:35:58 +00:00
GCC Administrator
86f72d76d5 Daily bump.
From-SVN: r209966
2014-05-01 00:17:03 +00:00
Ian Lance Taylor
d5d79d9be9 go-test.exp (go-gc-tests): For rundir...
* go.test/go-test.exp (go-gc-tests): For rundir, pass extra files
	in go_compile_args rather than in argument to go-torture-execute.

From-SVN: r209959
2014-04-30 21:39:41 +00:00