Commit Graph

112027 Commits

Author SHA1 Message Date
Ian Lance Taylor
fbfb84e623 mksysinfo: #include <ttold.h> on Irix.
From Rainer Orth.

From-SVN: r179312
2011-09-28 13:14:11 +00:00
Tom de Vries
9415cfddab re PR testsuite/50485 (gcc.target/i386/sse4_1-blendps.c fails spuriously on i686)
2011-09-28  Tom de Vries  <tom@codesourcery.com>

	PR testsuite/50485
	* gcc.target/i386/sse4_1-blendps.c: Include <stdlib.h>.
	(TEST): Initialize src3 with random floats.
	* gcc.target/i386/sse4_1-blendps-2.c (sse4_1_test): Remove field i from
	union src3.  Initialize src3 with random floats.

From-SVN: r179309
2011-09-28 08:48:00 +00:00
Kai Tietz
08c71c82b8 configure.ac: Add test for new section attribute specifier "e" via define...
* configure.ac: Add test for new section attribute
	specifier "e" via define HAVE_GAS_SECTION_EXCLUDE.
	* config.in: Regenerated.
	* configure: Regenerated.
	* config/i386/winnt.c (i386_pe_asm_named_section): Emit
	new section flag "e" for excluded sections, if supported.
	Otherwise we mark section withc SECTION_EXCLUDE flag
	as never-load.

From-SVN: r179308
2011-09-28 10:07:39 +02:00
Benjamin Kosnik
5e3a0ed1a7 *: Regenerate.
2011-09-27  Benjamin Kosnik  <bkoz@redhat.com>

	* doc/html/*: Regenerate.

	* doc/Makefile.am: Un-nest the ext output directory.
	* doc/Makefile.in: Regenerate.
	* spine.xml: Remove authors, add abstract for short
	contents. Rename to index.html for html output.
	* manual/spine.xml: Authors here, manual starts with index.html.
	* api.xml: Update.
	* faq.xml: Same.

Co-Authored-By: Jonathan Wakely <jwakely.gcc@gmail.com>

From-SVN: r179304
2011-09-28 01:37:10 +00:00
GCC Administrator
78a7cbccbd Daily bump.
From-SVN: r179302
2011-09-28 00:18:32 +00:00
Richard Sandiford
f18d1d16c3 m32r.md: Use match_test rather than eq/ne symbol_ref throughout file.
gcc/
	* config/m32r/m32r.md: Use match_test rather than eq/ne symbol_ref
	throughout file.

From-SVN: r179297
2011-09-27 23:04:14 +00:00
Richard Sandiford
b4d58803b1 iq2000.md: Use match_test rather than eq/ne symbol_ref throughout file.
gcc/
	* config/iq2000/iq2000.md: Use match_test rather than eq/ne symbol_ref
	throughout file.

From-SVN: r179296
2011-09-27 23:03:57 +00:00
Oleg Endo
88778f1576 mfmovd.c: Extend list of supported targets.
* gcc.target/sh/mfmovd.c: Extend list of supported targets.
	* gcc.target/sh/struct-arg-dw2.c: Fix typo.
	* gcc.target/sh/sh4a-sincos.c: Make test SH4A only.
	* gcc.target/sh/sh4a-sincosf.c: Ditto.
	* gcc.target/sh/sh4a-cos.c: Ditto.
	* gcc.target/sh/sh4a-cosf.c: Ditto.
	* gcc.target/sh/sh4a-sin.c: Ditto.
	* gcc.target/sh/sh4a-sinf.c: Ditto.
	* gcc.target/sh/sh4a-fsrra.c: Ditto.
	* gcc.target/sh/sh4a-memmovua.c: Ditto.
	* gcc.target/sh/sh4a-bitmovua.c: Ditto.

From-SVN: r179295
2011-09-27 22:46:00 +00:00
Paolo Carlini
2427db200d re PR c++/31489 (error says struct when it should say class)
/cp
2011-09-27  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/31489
	* parser.c (cp_parser_elaborated_type_specifier): For RECORD_TYPE,
	set CLASSTYPE_DECLARED_CLASS.

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

	PR c++/31489
	* g++.dg/parse/error40.C: New.
	* g++.dg/warn/incomplete1.C: Adjust.

From-SVN: r179293
2011-09-27 21:52:19 +00:00
Jakub Jelinek
82aa872231 trans-types.c (gfc_type_for_size): Return wider type if no suitable narrower type has been found.
* trans-types.c (gfc_type_for_size): Return wider type
	if no suitable narrower type has been found.
	(gfc_type_for_mode): Return NULL_TREE if gfc_type_for_size
	returned type doesn't have expected TYPE_MODE.

From-SVN: r179290
2011-09-27 21:17:31 +02:00
Sriraman Tallam
4c345757e0 output.h (SECTION_EXCLUDE): New macro.
2011-09-27  Sriraman Tallam  <tmsriram@google.com>

	* output.h (SECTION_EXCLUDE): New macro.
	* varasm.c (default_elf_asm_named_section): Check for
	SECTION_EXCLUDE.

From-SVN: r179288
2011-09-27 17:52:13 +00:00
Richard Sandiford
8e8af9b74d fwprop.c (forward_propagate_and_simplify): After checking reg/subreg combinations, check whether the modes are the same.
gcc/
	* fwprop.c (forward_propagate_and_simplify): After checking
	reg/subreg combinations, check whether the modes are the same.

From-SVN: r179287
2011-09-27 17:24:03 +00:00
Bernd Schmidt
a744996112 mips.c (mips_add_cfa_restore): New function.
gcc/
2011-09-25  Bernd Schmidt  <bernds@codesourcery.com>
	    Richard Sandiford  <rdsandiford@googlemail.com>

	* config/mips/mips.c (mips_add_cfa_restore): New function.
	(mips16e_save_restore_reg): Use it.
	(mips_restore_reg): Likewise.  Split double FPRs for
	REG_CFA_RESTORE notes.

Co-Authored-By: Richard Sandiford <rdsandiford@googlemail.com>

From-SVN: r179286
2011-09-27 17:23:27 +00:00
Richard Sandiford
58ac64596a re PR libgomp/50386 (libgomp.h:87:5: error: unnamed struct/union that defines no instances)
gcc/
	PR middle-end/50386
	PR middle-end/50326
	* tree-sra.c (build_ref_for_model): Use the type of the field as
	the type of the COMPONENT_REF.

From-SVN: r179285
2011-09-27 17:18:22 +00:00
Jeff Law
16a275d29d ifcvt.c (cheap_bb_rtx_cost_p): Add SCALE argument.
* ifcvt.c (cheap_bb_rtx_cost_p): Add SCALE argument.  Scale
	non-jumping insns by REG_BR_PROB_BASE and the maximum cost
	by SCALE.
	(find_if_case_1): Use the probability of the THEN clause when
	determining if speculation is profitable.
	(find_if_case_2): Similarly for the ELSE clause.

From-SVN: r179284
2011-09-27 10:49:17 -06:00
Jan Hubicka
9b7ab6d6e0 re PR middle-end/49463 (LTO doesn't work symbol renamed via asm statement)
PR middle-end/49463
	* gcc.c-torture/execute/builtins/strstr-asm-lib.c
	(my_strstr): Mark used.

From-SVN: r179280
2011-09-27 16:28:24 +00:00
Jakub Jelinek
d88780319e common.opt: Add -foptimize-strlen option.
* common.opt: Add -foptimize-strlen option.
	* Makefile.in (OBJS): Add tree-ssa-strlen.o.
	(tree-sssa-strlen.o): Add dependencies.
	* opts.c (default_options_table): Enable -foptimize-strlen
	by default at -O2 if not -Os.
	* passes.c (init_optimization_passes): Add pass_strlen
	after pass_object_sizes.
	* timevar.def (TV_TREE_STRLEN): New timevar.
	* params.def (PARAM_MAX_TRACKED_STRLENS): New parameter.
	* tree-pass.h (pass_strlen): Declare.
	* tree-ssa-strlen.c: New file.
	* c-decl.c (merge_decls): If compatible stpcpy prototype
	is seen, set implicit_built_in_decls[BUILT_IN_STPCPY].
cp/
	* decl.c (duplicate_decls): If compatible stpcpy prototype
	is seen, set implicit_built_in_decls[BUILT_IN_STPCPY].
testsuite/
	* gcc.dg/strlenopt-1.c: New test.
	* gcc.dg/strlenopt-1f.c: New test.
	* gcc.dg/strlenopt-2.c: New test.
	* gcc.dg/strlenopt-2f.c: New test.
	* gcc.dg/strlenopt-3.c: New test.
	* gcc.dg/strlenopt-4.c: New test.
	* gcc.dg/strlenopt-4g.c: New test.
	* gcc.dg/strlenopt-4gf.c: New test.
	* gcc.dg/strlenopt-5.c: New test.
	* gcc.dg/strlenopt-6.c: New test.
	* gcc.dg/strlenopt-7.c: New test.
	* gcc.dg/strlenopt-8.c: New test.
	* gcc.dg/strlenopt-9.c: New test.
	* gcc.dg/strlenopt-10.c: New test.
	* gcc.dg/strlenopt-11.c: New test.
	* gcc.dg/strlenopt-12.c: New test.
	* gcc.dg/strlenopt-12g.c: New test.
	* gcc.dg/strlenopt-13.c: New test.
	* gcc.dg/strlenopt-14g.c: New test.
	* gcc.dg/strlenopt-14gf.c: New test.
	* gcc.dg/strlenopt-15.c: New test.
	* gcc.dg/strlenopt-16g.c: New test.
	* gcc.dg/strlenopt-17g.c: New test.
	* gcc.dg/strlenopt-18g.c: New test.
	* gcc.dg/strlenopt.h: New file.

From-SVN: r179279
2011-09-27 18:18:49 +02:00
Jakub Jelinek
19ecbcbcbf common.opt: Add -foptimize-strlen option.
* common.opt: Add -foptimize-strlen option.
	* Makefile.in (OBJS): Add tree-ssa-strlen.o.
	(tree-sssa-strlen.o): Add dependencies.
	* opts.c (default_options_table): Enable -foptimize-strlen
	by default at -O2 if not -Os.
	* passes.c (init_optimization_passes): Add pass_strlen
	after pass_object_sizes.
	* timevar.def (TV_TREE_STRLEN): New timevar.
	* params.def (PARAM_MAX_TRACKED_STRLENS): New parameter.
	* tree-pass.h (pass_strlen): Declare.
	* tree-ssa-strlen.c: New file.
	* c-decl.c (merge_decls): If compatible stpcpy prototype
	is seen, set implicit_built_in_decls[BUILT_IN_STPCPY].
cp/
	* decl.c (duplicate_decls): If compatible stpcpy prototype
	is seen, set implicit_built_in_decls[BUILT_IN_STPCPY].
testsuite/
	* gcc.dg/strlenopt-1.c: New test.
	* gcc.dg/strlenopt-1f.c: New test.
	* gcc.dg/strlenopt-2.c: New test.
	* gcc.dg/strlenopt-2f.c: New test.
	* gcc.dg/strlenopt-3.c: New test.
	* gcc.dg/strlenopt-4.c: New test.
	* gcc.dg/strlenopt-4g.c: New test.
	* gcc.dg/strlenopt-4gf.c: New test.
	* gcc.dg/strlenopt-5.c: New test.
	* gcc.dg/strlenopt-6.c: New test.
	* gcc.dg/strlenopt-7.c: New test.
	* gcc.dg/strlenopt-8.c: New test.
	* gcc.dg/strlenopt-9.c: New test.
	* gcc.dg/strlenopt-10.c: New test.
	* gcc.dg/strlenopt-11.c: New test.
	* gcc.dg/strlenopt-12.c: New test.
	* gcc.dg/strlenopt-12g.c: New test.
	* gcc.dg/strlenopt-13.c: New test.
	* gcc.dg/strlenopt-14g.c: New test.
	* gcc.dg/strlenopt-14gf.c: New test.
	* gcc.dg/strlenopt-15.c: New test.
	* gcc.dg/strlenopt-16g.c: New test.
	* gcc.dg/strlenopt-17g.c: New test.
	* gcc.dg/strlenopt-18g.c: New test.
	* gcc.dg/strlenopt.h: New file.

From-SVN: r179278
2011-09-27 18:16:57 +02:00
Jakub Jelinek
8b57bfebe0 common.opt: Add -foptimize-strlen option.
* common.opt: Add -foptimize-strlen option.
	* Makefile.in (OBJS): Add tree-ssa-strlen.o.
	(tree-sssa-strlen.o): Add dependencies.
	* opts.c (default_options_table): Enable -foptimize-strlen
	by default at -O2 if not -Os.
	* passes.c (init_optimization_passes): Add pass_strlen
	after pass_object_sizes.
	* timevar.def (TV_TREE_STRLEN): New timevar.
	* params.def (PARAM_MAX_TRACKED_STRLENS): New parameter.
	* tree-pass.h (pass_strlen): Declare.
	* tree-ssa-strlen.c: New file.
	* c-decl.c (merge_decls): If compatible stpcpy prototype
	is seen, set implicit_built_in_decls[BUILT_IN_STPCPY].
cp/
	* decl.c (duplicate_decls): If compatible stpcpy prototype
	is seen, set implicit_built_in_decls[BUILT_IN_STPCPY].
testsuite/
	* gcc.dg/strlenopt-1.c: New test.
	* gcc.dg/strlenopt-1f.c: New test.
	* gcc.dg/strlenopt-2.c: New test.
	* gcc.dg/strlenopt-2f.c: New test.
	* gcc.dg/strlenopt-3.c: New test.
	* gcc.dg/strlenopt-4.c: New test.
	* gcc.dg/strlenopt-4g.c: New test.
	* gcc.dg/strlenopt-4gf.c: New test.
	* gcc.dg/strlenopt-5.c: New test.
	* gcc.dg/strlenopt-6.c: New test.
	* gcc.dg/strlenopt-7.c: New test.
	* gcc.dg/strlenopt-8.c: New test.
	* gcc.dg/strlenopt-9.c: New test.
	* gcc.dg/strlenopt-10.c: New test.
	* gcc.dg/strlenopt-11.c: New test.
	* gcc.dg/strlenopt-12.c: New test.
	* gcc.dg/strlenopt-12g.c: New test.
	* gcc.dg/strlenopt-13.c: New test.
	* gcc.dg/strlenopt-14g.c: New test.
	* gcc.dg/strlenopt-14gf.c: New test.
	* gcc.dg/strlenopt-15.c: New test.
	* gcc.dg/strlenopt-16g.c: New test.
	* gcc.dg/strlenopt-17g.c: New test.
	* gcc.dg/strlenopt-18g.c: New test.
	* gcc.dg/strlenopt.h: New file.

From-SVN: r179277
2011-09-27 18:15:46 +02:00
Tom de Vries
baaa40aeca re PR middle-end/43864 (Same basic blocks should be merged)
2011-09-27  Tom de Vries  <tom@codesourcery.com>

	PR middle-end/43864
	* gcc.dg/fold-compare-2.c (dg-options): Add -fno-tree-tail-merge.
	* gcc/testsuite/gcc.dg/uninit-pred-2_c.c: Same.
	* gcc.dg/pr43864.c: New test.
	* gcc.dg/pr43864-2.c: Same.
	* gcc.dg/pr43864-3.c: Same.
	* gcc.dg/pr43864-4.c: Same.

From-SVN: r179276
2011-09-27 16:12:35 +00:00
Tom de Vries
c9e9316807 re PR middle-end/43864 (Same basic blocks should be merged)
2011-09-27  Tom de Vries  <tom@codesourcery.com>

	PR middle-end/43864
	* tree-ssa-tail-merge.c: New file.
	(struct same_succ_def): Define.
	(same_succ, const_same_succ): New typedef.
	(struct bb_cluster_def): Define.
	(bb_cluster, const_bb_cluster): New typedef.
	(struct aux_bb_info): Define.
	(BB_SIZE, BB_SAME_SUCC, BB_CLUSTER, BB_VOP_AT_EXIT): Define.
	(gvn_uses_equal): New function.
	(same_succ_print, same_succ_print_traverse, update_dep_bb)
	(stmt_update_dep_bb, local_def, same_succ_hash)
	(inverse_flags, same_succ_equal, same_succ_alloc, same_succ_delete)
	(same_succ_reset): New function.
	(same_succ_htab, same_succ_edge_flags)
	(deleted_bbs, deleted_bb_preds): New var.
	(debug_same_succ): New function.
	(worklist): New var.
	(print_worklist, add_to_worklist, find_same_succ_bb, find_same_succ)
	(init_worklist, delete_worklist, delete_basic_block_same_succ)
	(same_succ_flush_bbs, purge_bbs, update_worklist): New function.
	(print_cluster, debug_cluster, update_rep_bb)
	(add_bb_to_cluster, new_cluster, delete_cluster): New function.
	(all_clusters): New var.
	(alloc_cluster_vectors, reset_cluster_vectors, delete_cluster_vectors)
	(merge_clusters, set_cluster): New function.
	(gimple_equal_p, gsi_advance_bw_nondebug_nonlocal, find_duplicate)
	(same_phi_alternatives_1, same_phi_alternatives, bb_has_non_vop_phi)
	(deps_ok_for_redirect_from_bb_to_bb, deps_ok_for_redirect)
	(find_clusters_1, find_clusters): New function.
	(update_vuses, vop_phi, vop_at_entry, replace_block_by): New function.
	(update_bbs): New var.
	(apply_clusters): New function.
	(update_debug_stmt, update_debug_stmts): New function.
	(tail_merge_optimize): New function.
	tree-pass.h (tail_merge_optimize): Declare.
	* tree-ssa-pre.c (execute_pre): Use tail_merge_optimize.
	* Makefile.in (OBJS-common): Add tree-ssa-tail-merge.o.
	(tree-ssa-tail-merge.o): New rule.
	* opts.c (default_options_table): Set OPT_ftree_tail_merge by default at
	OPT_LEVELS_2_PLUS.
	* tree-ssa-sccvn.c (vn_valueize): Move to ...
	* tree-ssa-sccvn.h (vn_valueize): Here.
	* timevar.def (TV_TREE_TAIL_MERGE): New timevar.
	* common.opt (ftree-tail-merge): New switch.
	* params.def (PARAM_MAX_TAIL_MERGE_COMPARISONS)
	(PARAM_MAX_TAIL_MERGE_ITERATIONS): New parameter.
	* doc/invoke.texi (Optimization Options, -O2): Add -ftree-tail-merge.
	(-ftree-tail-merge, max-tail-merge-comparisons)
	(max-tail-merge-iterations): New item.

From-SVN: r179275
2011-09-27 16:10:42 +00:00
Jan Hubicka
99e299a8c7 * ipa-inline-analysis.c (MAX_TIME): Reduce to avoid overflows.
From-SVN: r179274
2011-09-27 15:27:41 +00:00
Jan Hubicka
2ceb2339b1 inline-5.c: New testcase.
* gcc.dg/ipa/inline-5.c: New testcase.
	* ipa-inline-analysis.c (eliminated_by_inlining_prob): Handle parameters
	passed by reference; handle loads from non-SSA scalars and update comments.

From-SVN: r179273
2011-09-27 15:08:31 +00:00
Bernd Schmidt
0b47c1a9a9 re PR rtl-optimization/50249 (ira marks wrong value for inheriting)
PR rtl-optimization/50249
	* reload1.c (reload_reg_reaches_end_p): Accept a reloadnum argument
	instead of opnum and type.  All callers changed.  Remove useless
	declaration.
	Search forward for other reloads of the same type for the same operand
	using the same register; if any are found, return false.
	(reload_regs_reach_end_p): Same argument changes; all callers changed.

From-SVN: r179272
2011-09-27 14:55:11 +00:00
Andi Kleen
cc8547a776 invoke.texi (ffat-lto-objects): Document.
* doc/invoke.texi (ffat-lto-objects): Document.
	* toplev.c (compile_file): Do not output assembly when doing slim lto;
	Output __gnu_slim_lto when doing slim lto.
	* cgraphunit.c (ipa_passes): Do only analysis when producing slim lto.
	(cgraph_optimize): Return early when doing slim lto.
	* opts.c (finish_options): Complain about lack of linker plugin
	when doing slim lto.
	* common.opt (ffat-lto-objects): New.

Co-Authored-By: Jan Hubicka <jh@suse.cz>

From-SVN: r179271
2011-09-27 14:36:48 +00:00
Ian Lance Taylor
3019bbaeb3 mksysinfo: Fix for systems that don't define TIOCSCTTY.
From Rainer Orth.

From-SVN: r179269
2011-09-27 13:16:22 +00:00
Richard Sandiford
0578e4172d ipa-inline-analysis.c (predicate_probability): Avoid comparison between signed and unsigned.
gcc/
	* ipa-inline-analysis.c (predicate_probability): Avoid comparison
	between signed and unsigned.

From-SVN: r179268
2011-09-27 13:01:31 +00:00
Ira Rosen
4ef69dfc4a tree-vect-stmts.c (vectorizable_type_demotion): Handle basic block vectorization.
* tree-vect-stmts.c (vectorizable_type_demotion): Handle basic
        block vectorization.
        (vectorizable_type_promotion): Likewise.
        (vect_analyze_stmt): Call vectorizable_type_demotion and
        vectorizable_type_promotion for basic blocks.
        (supportable_widening_operation): Don't assume loop
        vectorization.
        * tree-vect-slp.c (vect_build_slp_tree): Allow multiple types
        for basic blocks.  Update vectorization factor for basic block
        vectorization.
        (vect_analyze_slp_instance): Allow multiple types for basic
        block vectorization.  Recheck unrolling factor after
        construction of SLP instance.

From-SVN: r179267
2011-09-27 12:26:34 +00:00
Bernd Schmidt
d22c9c3116 target-supports.exp (check_profiling_available): Don't rely solely on TLS tests for -fprofile-generate...
* testsuite/lib/target-supports.exp (check_profiling_available):
	Don't rely solely on TLS tests for -fprofile-generate, fall
	through to the other code.

From-SVN: r179263
2011-09-27 11:04:34 +00:00
Ed Schonberg
ffb35bbf33 a-cbhase.adb, [...]: Add iterator machinery to bounded sets and indefinite sets.
2011-09-27  Ed Schonberg  <schonberg@adacore.com>

	* a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
	a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
	a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
	indefinite sets.
	* a-coorma.ads: Minor reformmating.
	* einfo.ads: Improve the comment describing the
	Directly_Designated_Type function.
	* a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
	ordered maps.
	* gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
	dependencies.

From-SVN: r179260
2011-09-27 12:11:01 +02:00
Richard Guenther
862a84f5cf tree-object-size.c (compute_object_sizes): Fix dumping of folded statement.
2011-09-27  Richard Guenther  <rguenther@suse.de>

	* tree-object-size.c (compute_object_sizes): Fix dumping of
	folded statement.

From-SVN: r179259
2011-09-27 10:06:40 +00:00
Arnaud Charlet
da124b6afd [multiple changes]
2011-09-27  Robert Dewar  <dewar@adacore.com>

	* a-comutr.ads: Minor reformatting.

2011-09-27  Ed Schonberg  <schonberg@adacore.com>

	* a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
	iterators to multiway trees.

2011-09-27  Yannick Moy  <moy@adacore.com>

	* debug.adb (d.D): New option for strict Alfa mode.
	* opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
	permissions as strictly as possible.
	* sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
	Alfa mode, now, interpret ranges of base types like GNAT does; in
	strict mode, simply change the range of the implicit base Itype.
	* gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.

From-SVN: r179258
2011-09-27 12:03:09 +02:00
Arnaud Charlet
706a4067b8 [multiple changes]
2011-09-27  Robert Dewar  <dewar@adacore.com>

	* exp_ch9.adb: Minor comment fixes.

2011-09-27  Ed Schonberg  <schonberg@adacore.com>

	* a-comutr.adb, a-comutr.ads: Add children iterators on multiway
	trees.

From-SVN: r179257
2011-09-27 11:58:53 +02:00
Arnaud Charlet
05c1e7d2ef [multiple changes]
2011-09-27  Eric Botcazou  <ebotcazou@adacore.com>

	* checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
	instead of Directly_Designated_Type in the indirect array case.

2011-09-27  Robert Dewar  <dewar@adacore.com>

	* exp_util.adb, exp_aggr.adb: Minor reformatting.

From-SVN: r179256
2011-09-27 11:57:19 +02:00
Arnaud Charlet
65e78a74b6 [multiple changes]
2011-09-27  Ed Schonberg  <schonberg@adacore.com>

	* sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
	on subtype declarations.
	* exp_aggr.adb: Minor comment update.

2011-09-27  Eric Botcazou  <ebotcazou@adacore.com>

	* exp_util.adb (Safe_Prefixed_Reference): Remove always-false
	test in the N_Explicit_Dereference case.  Fold double logical
	negation in the special loop case and conditionalize it on
	Variable_Ref being true.

2011-09-27  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
	single protected object and the selector is a discriminant or an
	entry family, this is a non-overloaded candidate interpretation,
	and possible primitive operations of the type must not be
	examined.

2011-09-27  Arnaud Charlet  <charlet@adacore.com>

	* s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.

From-SVN: r179255
2011-09-27 11:54:10 +02:00
Arnaud Charlet
6f5add73cd [multiple changes]
2011-09-27  Pascal Obry  <obry@adacore.com>

	* s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
	s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
	Add dummy definitions for pthread_rwlock_t
	and pthread_rwlockattr_t on all POSIX platforms.
	* s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
	reference.
	(Finalize_Lock): Likewise.
	(Write_Lock): Likewise.
	(Unlock): Likewise.

2011-09-27  Tristan Gingold  <gingold@adacore.com>

	* s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
	windows 64.

From-SVN: r179254
2011-09-27 11:48:14 +02:00
Pascal Obry
64a63cd58b s-osinte-hpux.ads, [...]: Revert previous changes.
2011-09-27  Pascal Obry  <obry@adacore.com>

	* s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
	s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
	s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
	s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
	s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
	s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
	s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
	s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
	s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
	s-taprop-posix.adb: Revert previous changes.
	(Lock): Now a record containing the two possible lock
	(mutex and read/write) defined in OS_Interface.
	* s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
	'R' locking policy.
	(Initialize_Protection): Likewise.
	(Lock): Likewise.
	(Lock_Read_Only): Likewise.
	(Unlock): Likewise.

From-SVN: r179253
2011-09-27 11:45:00 +02:00
Arnaud Charlet
f672a756b3 [multiple changes]
2011-09-27  Pascal Obry  <obry@adacore.com>

	* s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
	OS_Interface.pthread_rwlock_t.

2011-09-27  Robert Dewar  <dewar@adacore.com>

	* exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
	a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
	sem_ch5.adb, sem_util.adb: Minor reformatting.

From-SVN: r179252
2011-09-27 11:37:53 +02:00
Pascal Obry
7a44cb697f s-taprop.ads (Initialize_Lock): New spec for r/w lock.
2011-09-27  Pascal Obry  <obry@adacore.com>

	* s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
	(Finalize_Lock)[RW_Lock]: Likewise.
	(Write_Lock)[RW_Lock]: Likewise.
	(Unlock)[RW_Lock]: Likewise.
	(Read_Lock): Define L as RW_Lock (instead of Lock).
	* s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
	routine for r/w lock.
	(Finalize_Lock)[RW_Lock]: Likewise.
	(Write_Lock)[RW_Lock]: Likewise.
	(Unlock)[RW_Lock]: Likewise.
	(Read_Lock): Define L as RW_Lock (instead of Lock).

	* s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
	s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
	s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
	(Initialize_Lock)[RW_Lock]: Same implementation as corresponding
	routine for standard lock.
	(Finalize_Lock)[RW_Lock]: Likewise.
	(Write_Lock)[RW_Lock]: Likewise.
	(Unlock)[RW_Lock]: Likewise.
	(Read_Lock): Define L as RW_Lock (instead of Lock).
	* s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
	in the record definition.
	* s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
	lock for 'R' locking policy.
	(Initialize_Protection): Likewise.
	(Lock): Likewise.
	(Lock_Read_Only): Likewise.
	(Unlock): Likewise.
	* s-taspri-posix.ads (RW_Lock): New type defined as
	OS_Interface.pthread_rwlock_t.

	* s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
	s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
	s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
	s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.

From-SVN: r179251
2011-09-27 11:33:30 +02:00
Pascal Obry
4c173b500b exp_ch9.adb, [...]: Minor reformatting.
2011-09-27  Pascal Obry  <obry@adacore.com>

	* exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.

2011-09-27  Pascal Obry  <obry@adacore.com>

	* s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
	s-osinte-hpux.ads, s-osinte-irix.ads,
	s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
	pthread_mutex_t.
	(pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
	* s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
	pthread_rwlockattr_init, pthread_rwlockattr_destroy,
	pthread_rwlockattr_setkind_np, pthread_rwlock_init,
	pthread_rwlock_destroy, pthread_rwlock_rdlock,
	pthread_rwlock_wrlock, pthread_rwlock_unlock): New.

From-SVN: r179250
2011-09-27 11:26:11 +02:00
Pascal Obry
343250a6d5 rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
2011-09-27  Pascal Obry  <obry@adacore.com>

	* rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
	(RE_Id): Add RE_Lock_Read_Only.
	(RE_Unit_Table): Likewise.
	* sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
	to lift restriction on first character. Handle now the
	Name_Concurrent_Readers_Locking where policy character is set to
	'R'.
	* snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
	constant.
	* exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
	read only lock for function in protected object.
	* s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
	this routine is now used.

From-SVN: r179248
2011-09-27 11:16:57 +02:00
Richard Guenther
48acf1b78b re PR tree-optimization/50363 (internal compiler error: verify_gimple failed)
2011-09-27  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/50363
	* tree-ssa-pre.c (create_expression_by_pieces): Handle
	pointer conversions in POINTER_PLUS_EXPRs properly.

	* gcc.dg/torture/pr50363.c: New testcase.

From-SVN: r179247
2011-09-27 08:53:08 +00:00
Richard Sandiford
ddfd2edf32 gcc/
* config/arm/neon.md (neon_vget_highv16qi, neon_vget_highv8hi)
	(neon_vget_highv4si, neon_vget_highv4sf, neon_vget_highv2di)
	(neon_vget_lowv16qi, neon_vget_lowv8hi, neon_vget_lowv4si)
	(neon_vget_lowv4sf, neon_vget_lowv2di): Turn into define_expands
	that produce subreg moves.  Define using VQX iterators.

From-SVN: r179243
2011-09-27 08:27:31 +00:00
Georg-Johann Lay
1cd12949e1 avr.md (ashrqi3): Split alternative "n" into its remaining parts C03...
* config/avr/avr.md (ashrqi3): Split alternative "n"
	into its remaining parts C03, C04, C05, C06, C07 and describe
	impact in CC by attribute "cc" appropriately.
	* config/avr/avr.c (notice_update_cc): Clean-up: Don't patch CC0
	by digging RTX.

From-SVN: r179241
2011-09-27 08:08:16 +00:00
Jakub Jelinek
e7c82a9925 rtl.h (const_tiny_rtx): Change into array of 4 x MAX_MACHINE_MODE from 3 x MAX_MACHINE_MODE.
* rtl.h (const_tiny_rtx): Change into array of 4 x MAX_MACHINE_MODE
	from 3 x MAX_MACHINE_MODE.
	(CONSTM1_RTX): Define.
	* emit-rtl.c (const_tiny_rtx): Change into array of 4 x MAX_MACHINE_MODE
        from 3 x MAX_MACHINE_MODE.
	(gen_rtx_CONST_VECTOR): Use CONSTM1_RTX if all inner constants are
	CONSTM1_RTX.
	(init_emit_once): Initialize CONSTM1_RTX for MODE_INT and
	MODE_VECTOR_INT modes.
	* simplify-rtx.c (simplify_binary_operation_1) <case IOR, XOR, AND>:
	Optimize if one operand is CONSTM1_RTX.
	* config/i386/i386.c (ix86_expand_sse_movcc): Optimize mask ? -1 : x
	into mask | x.

From-SVN: r179238
2011-09-27 09:29:21 +02:00
Marcus Shawcroft
16fa5e238a tinfo.cc (type_info::operator==): Test __name instead of name().
2011-09-27  Marcus Shawcroft  <marcus.shawcroft@arm.com>

	* libsupc++/tinfo.cc (type_info::operator==): Test __name instead
	of name().

From-SVN: r179236
2011-09-27 06:03:58 +00:00
David S. Miller
f14e02622f Add explicit VIS intrinsics for addition and subtraction.
gcc/

	* config/sparc/sparc.c (sparc_vis_init_builtins): Add explicit
	builtins for VIS vector addition and subtraction.
	* config/sparc/visintrin.h (__vis_fpadd16, __vis_fpadd16s,
	__vis_fpadd32, __vis_fpadd32s, __vis_fpsub16, __vis_fpsub16s,
	__vis_fpsub32, __vis_fpsub32s): New.
	* doc/extend.texi: Document new VIS intrinsics.

gcc/testsuite/

	* gcc.target/sparc/fpaddsubi.c: New test.

From-SVN: r179235
2011-09-26 20:56:50 -07:00
Paolo Carlini
a7cee01d32 re PR libstdc++/50529 ([C++0x] std::vector::erase invokes undefined behavior with empty range)
2011-09-26  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/50529
	* include/bits/vector.tcc (vector<>::erase(iterator, iterator)):
	Fix to do nothing if the range is empty.
	* include/bits/stl_bvector.h: Likewise.
	* include/bits/deque.tcc: Likewise.
	* include/debug/vector: Adjust.
	* include/debug/deque: Likewise.
	* testsuite/23_containers/vector/modifiers/erase/50529.cc: New.
	* testsuite/23_containers/deque/modifiers/erase/50529.cc: Likewise.
	* testsuite/23_containers/deque/modifiers/erase/3.cc: Adjust.

From-SVN: r179234
2011-09-27 02:39:34 +00:00
Jason Merrill
b92edfe52d fix ChangeLog
From-SVN: r179233
2011-09-26 22:21:24 -04:00
Jason Merrill
9d84dbe6ba re PR c++/45012 (Invalid ambiguity on partial class specialization matching)
PR c++/45102
	* pt.c (tsubst_copy_and_build) [CONST_DECL]: Don't pull out
	constant value if we're still in a template.

From-SVN: r179230
2011-09-26 22:13:00 -04:00