Commit Graph

117217 Commits

Author SHA1 Message Date
H.J. Lu
dea9f99db0 Skip debug insns in ix86_sched_reorder
PR bootstrap/53555
	* config/i386/i386.c (ix86_sched_reorder) Skip debug insns.

From-SVN: r188212
2012-06-04 16:31:54 -07:00
Jason Merrill
61a3e629c1 dwarf2out.c (is_unit_die): New.
* dwarf2out.c (is_unit_die): New.
	(copy_declaration_context, copy_ancestor_tree): Use it.
	(copy_decls_walk): Likewise.

From-SVN: r188209
2012-06-04 17:45:31 -04:00
Tobias Burnus
a67cfde819 re PR fortran/50619 (Surprising interaction between -finit-real=NAN and the associate construct)
2012-06-04  Tobias Burnus  <burnus@net-b.de>

        PR fortran/50619
        * resolve.c (build_default_init_expr): Don't initialize
        ASSOCIATE names.

2012-06-04  Tobias Burnus  <burnus@net-b.de>

        PR fortran/50619
        * gfortran.dg/init_flag_10.f90: New.

From-SVN: r188208
2012-06-04 23:01:02 +02:00
Paolo Carlini
0e1dd874f8 re PR c++/53524 (Bogus enum comparison warning)
2012-06-04  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/53524
	* doc/invoke.texi (Wenum-compare): Update documentation.

/cp
2012-06-04  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/53524
	* call.c (build_conditional_expr_1): Use OPT_Wenum_compare
	to control enumeral mismatch in conditional expression too.

/testsuite
2012-06-04  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/53524
	* g++.dg/warn/Wenum-compare-no-2: New.

From-SVN: r188204
2012-06-04 19:27:12 +00:00
Dodji Seketeli
7ca643e17e PR preprocessor/53463 - Fix system header detection for built-in macro tokens
The location for a built-in macro token is BUILTIN_LOCATION.  When we
see that location value, we cannot know if that token was used in a
system header or not.  And that can trigger some unwanted warnings on
e.g, the use of __LONG_LONG_MAX__ built-in macro in system headers
when we compile with -pedantic, like in the test case accompanying
this patch.

In that case, I think we ought to step-up to see where the built-in
macro has been expanded, until we see a location that is not for a
built-in macro.  Then we can check if the resulting location is in a
system header or not.

Now that we step up to the location of first non-built-in-macro token,
it appeared that for
testsuite/c-c++-common/dfp/convert-int-saturate.c, G++ then fails to
emit the warning in:

    volatile unsigned int usi;
    int
    main ()
    {
      usi = DEC32_MAX;  /* { dg-warning "overflow in implicit constant conversion" } */
     ...
    }

Because DEC32_MAX is defined in the system header float.h as a
built-in macro:

    #define DEC32_MAX	__DEC32_MAX__

And during the parsing of the assignment expression that should have
led to the warning above, input_location is set to the location for
the DEC32_MAX, which is actually the location for the built-in
__DECL32_MAX_EXP.

A possible fix is to use the location of the "=" operator as the
default location for assignment expressions.  This is what the patch
does.

I had to adjust a couple of tests to arrange for this.

Bootstrapped and tested on x86_64-unknown-linux-gnu against trunk.

libcpp/

	PR preprocessor/53463
	* line-map.c (linemap_location_in_system_header_p): For built-in
	macro tokens, check the first expansion point location for that is
	not for a token coming from a built-in macro.

gcc/cp/

	PR preprocessor/53463
	* parser.c (cp_parser_assignment_expression): Use the location
	for the LHS as the default location for the expression.

gcc/testsuite/

	PR preprocessor/53463
	* g++.dg/cpp/limits.C: New test.
	* g++.dg/parse/error19.C: Adjust.
	* g++.dg/warn/Wconversion-real-integer2.C: Likewise.
	* g++.dg/warn/pr35635.C: Likewise.
	* g++.old-deja/g++.pt/assign1.C: Likewise.

From-SVN: r188203
2012-06-04 21:19:58 +02:00
Robert Mason
aadd9700d5 PR 53456 Fix incorrect ChangeLog entry.
From-SVN: r188202
2012-06-04 22:15:21 +03:00
Robert Mason
1e5c1001b4 PR 53456 Fix typo in gf_cputime.
2012-06-04  Robert Mason  <rbmj@verizon.net>
	    Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/53456
	* intrinsics/time_1.h (gf_cputime): Fix typo in clock_gettime branch.

From-SVN: r188201
2012-06-04 22:13:49 +03:00
Edmar Wienskoski
fbc932e72c re PR target/53559 (ICE on altivec builtins stv[l|r]x[l])
2012-06-04  Edmar Wienskoski  <edmar@freescale.com>

	PR target/53559
	* config/rs6000/altivec.md (altivec_stvlx): Change machine mode of
	operands.
	(altivec_stvlxl): Ditto.
	(altivec_stvrx): Ditto.
	(altivec_stvrxl): Ditto.

gcc/testsuite
2012-06-04  Edmar Wienskoski  <edmar@freescale.com>

	PR target/53559
	* gcc.target/powerpc/cell_builtin_1.c: New test case.
	* gcc.target/powerpc/cell_builtin_2.c: Ditto.
	* gcc.target/powerpc/cell_builtin_3.c: Ditto.
	* gcc.target/powerpc/cell_builtin_4.c: Ditto.
	* gcc.target/powerpc/cell_builtin_5.c: Ditto.
	* gcc.target/powerpc/cell_builtin_6.c: Ditto.
	* gcc.target/powerpc/cell_builtin_7.c: Ditto.
	* gcc.target/powerpc/cell_builtin_8.c: Ditto.

From-SVN: r188200
2012-06-04 18:44:53 +00:00
Vladimir Makarov
165f639cea ira-int.h (struct target_ira_int): Add member x_ira_uniform_class_p.
2012-06-04  Vladimir Makarov  <vmakarov@redhat.com>

	* ira-int.h (struct target_ira_int): Add member
	x_ira_uniform_class_p.
	(ira_uniform_class_p): New macro.

	* ira.c (setup_uniform_class_p): New function.
	(setup_allocno_and_important_classes): Call the function.
	(print_unform_and_important_classes): New function.
	(print_classes): Rename to print_translated_classes.
	(ira_debug_allocno_classes): Add call of
	print_unform_and_important_classes.

	* ira-costs.c (setup_regno_cost_classes_by_aclass): Use uniform
	classes instead of pressure classes.

From-SVN: r188199
2012-06-04 18:27:36 +00:00
Sterling Augustine
7496cd5bea c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
2012-06-04   Sterling Augustine  <saugustine@google.com>

	* gcc/c-family/c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
	* gcc/c-family/c-pretty-print.c (pp_c_specifier_qualifier_list): Check
	it at both the start and end of the function.
	* gcc/cp/error.c (dump_decl): Check pp_c_flag_gnu_v3.
	(decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
	(lang_decl_name): Handle namespace decls.
	* gcc/cp/cp-tree.h: Declare decl_as_dwarf_string, lang_decl_dwarf_name.
	* gcc/cp/cp-lang.c: Call them.

From-SVN: r188195
2012-06-04 17:52:42 +00:00
Aldy Hernandez
764ce4f20a re PR middle-end/47530 ([trans-mem] tail call optimization problem with _ITM_commitTransaction)
PR middle-end/47530
        * trans-mem.c (expand_block_edges): Do not skip the first
        statement when resetting the BB.

From-SVN: r188190
2012-06-04 16:51:24 +00:00
Richard Guenther
be6b029b8c tree-data-ref.c (stores_from_loop): Remove.
2012-06-04  Richard Guenther  <rguenther@suse.de>

	* tree-data-ref.c (stores_from_loop): Remove.
	(stmt_with_adjacent_zero_store_dr_p): Likewise.
	(stores_zero_from_loop): Likewise.
	* tree-data-ref.h (stores_from_loop, stores_zero_from_loop,
	stmt_with_adjacent_zero_store_dr_p, stride_of_unit_type_p): Remove.
	(adjacent_store_dr_p): New function.
	* tree-loop-distribution.c (generate_memset_builtin): Pass
	the RDG, use the already available data-reference.
	(generate_code_for_partition): Pass down RDG.
	(classify_partition): Inline parts of the former
	stmt_with_adjacent_zero_store_dr_p here and use adjacent_store_dr_p.
	(ldist_gen): Remember if there was any detected builtin and
	do less work if not and flag_tree_loop_distribution is not set.
	(tree_loop_distribution): Inline and fuse stores_from_loop
	and stores_zero_from_loop here.

From-SVN: r188186
2012-06-04 15:04:15 +00:00
Andreas Schwab
36829666e2 * g++.dg/debug/dwarf2/nested-3.C: Allow for | comments.
From-SVN: r188185
2012-06-04 14:48:58 +00:00
Richard Guenther
ad16e15256 re PR lto/53471 (ICE in pp_base_format, at pretty-print.c:510 (-flto -g))
2012-06-04  Richard Guenther  <rguenther@suse.de>

	PR middle-end/53471
	* dwarf2out.c (dwarf2out_finish): If generating LTO do not
	create new assembler names.

From-SVN: r188181
2012-06-04 13:19:17 +00:00
Richard Guenther
1fa0c18004 tree-data-ref.c (struct rdg_vertex_info): Remove.
2012-06-04  Richard Guenther  <rguenther@suse.de>

	* tree-data-ref.c (struct rdg_vertex_info): Remove.
	(rdg_vertex_for_stmt): Simplify using gimple_uid.
	(create_rdg_vertices): Pass loop argument, remove stmt to RDG index
	hashtable.   Record stmt data-references.
	(hash_stmt_vertex_info): Remove.
	(eq_stmt_vertex_info): Likewise.
	(hash_stmt_vertex_del): Likewise.
	(build_empty_rdg): Simplify.
	(build_rdg): Adjust.
	(free_rdg): Likewise.
	(ref_base_address): Remove.
	(have_similar_memory_accesses): Likewise.
	* tree-data-ref.h (create_rdg_vertices): Remove.
	(struct rdg_vertex): Add datarefs member.
	(RDGV_DATAREFS): New define.
	(RDG_DATAREFS): Likewise.
	(have_similar_memory_accesses): Remove.
	(rdg_has_similar_memory_accesses): Likewise.
	* tree-loop-distribution.c (ref_base_address): Re-implement here.
	(similar_memory_accesses): Re-implement using existing data-references.
	(tree_loop_distribution): Initialize stmt uids for the stmt to
	RDG index mapping.
	* tree-vect-loop.c (vect_create_epilog_for_reduction): Only
	access stmt vinfo for stmts in loop.

From-SVN: r188180
2012-06-04 13:18:16 +00:00
Andreas Schwab
143015c4f8 re PR target/53461 (Incorrect handling of CASE_VECTOR_PC_RELATIVE in config/m68k.md)
PR target/53461
* config/m68k/m68k.md ("tablejump"): Fix check for
CASE_VECTOR_PC_RELATIVE.

From-SVN: r188179
2012-06-04 13:13:09 +00:00
Steven Bosscher
a4b7d13c17 output.h (merge_weak, [...]): Move protos from here...
* output.h (merge_weak, assemble_alias,
	initializer_constant_valid_p,
	initializer_constant_valid_for_bitfield_p): Move protos from here...
	* tree.h: ... to here.

	* cgraphclones.c: Do not include output.h.
	* gimplify.c: Likewise.
	* reload.c: Likewise.
	* recog.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-switch-conversion.c: Likewise.
	* c-parser.c: Likewise.
	* c-typeck.c: Likewise.

	* Makefile.in: Fix dependencies.

c-family/
	* c-common.c: Do not include output.h.
	* c-pragma.c: Likewise.

cp/
	* semantics.c: Do not include output.h.
	* decl2.c: Likewise.
	* friend.c: Likewise.
	* typeck.c: Likewise.
	* typeck2.c: Likewise.
	* Make-lang.in: Fix dependencies.

ada/
	* gcc-interface/utils2.c: Do not include output.h.
	* gcc-interface/Make-lang.in: Fix dependencies.

From-SVN: r188178
2012-06-04 11:17:58 +00:00
Georg-Johann Lay
0b8a03e10e re PR target/46261 (avr-gcc: Segfaults when compiled with the -mint8 option)
PR target/46261
	* config/avr/avr-stdint.h: New file.
	* config.gcc (avr-*-*,tm_file): Use avr/avr-stdint.h instead of
	newlib-stdint.h

From-SVN: r188172
2012-06-04 09:48:34 +00:00
Jakub Jelinek
8f27a3f7f0 Update Copyright years.
From-SVN: r188171
2012-06-04 11:27:33 +02:00
Jakub Jelinek
5ece98479f re PR tree-optimization/53550 (ICE with -O{1,2,3} -fprefetch-loop-arrays in build2_stat, at tree.c:3803)
PR tree-optimization/53550
	* tree-ssa-loop-niter.c (number_of_iterations_cond): If type
	is POINTER_TYPE_P, use sizetype as step type instead of type.

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

From-SVN: r188169
2012-06-04 11:23:27 +02:00
Richard Guenther
c014f6f54b tree-data-ref.c (have_similar_memory_accesses_1): Remove.
2012-06-04  Richard Guenther  <rguenther@suse.de>

	* tree-data-ref.c (have_similar_memory_accesses_1): Remove.
	(ref_base_address_1): Likewise.
	(remove_similar_memory_refs): Likewise.
	* tree-data-ref.h (remove_similar_memory_refs): Remove.
	* tree-loop-distribution.c (classify_partition): Do not classify
	as builtin if -ftree-loop-distribute-patterns is not enabled.
	(fuse_partitions_with_similar_memory_accesses): Inline ...
	(ldist_gen): ... here.  Fuse all non-builtin partitions if
	-ftree-loop-distribution is not enabled.  Properly return
	the number of created partitions.  Do not update SSA form here
	but ...
	(tree_loop_distribution): ... once here for the whole function.
	Only walk innermost loops, constrain loops we consider here
	further.  Do not call remove_similar_memory_refs.
	(distribute_loop): Do not check number of loop nodes here.

	* gcc.dg/tree-ssa/ldist-11.c: Enable -ftree-loop-distribute-patterns.
	* gcc.dg/tree-ssa/ldist-17.c: Likewise.
	* gcc.dg/tree-ssa/ldist-pr45948.c: Likewise.

From-SVN: r188168
2012-06-04 09:00:21 +00:00
Steven Bosscher
296f202e8e * Makefile.in (GIMPLE_H): Do not depend on TARGET_H.
From-SVN: r188166
2012-06-04 08:09:12 +00:00
Ian Lance Taylor
7bea4023f2 runtime: Better SWIG interface for allocating Go memory from C/C++.
From-SVN: r188164
2012-06-04 05:34:59 +00:00
David S. Miller
7b4cf26643 Fix bug added to sparc 64-bit sub_ddmmss() implementation.
* longlong.h [SPARC] (sub_ddmmss): Fix thinko in previous 64-bit
	change.

From-SVN: r188163
2012-06-03 18:54:59 -07:00
GCC Administrator
0f38ea89ec Daily bump.
From-SVN: r188160
2012-06-04 00:18:14 +00:00
Martin Jambor
7b872d9e65 ipa-prop.h (ipa_get_jf_known_type_offset): New function.
2012-06-03  Martin Jambor  <mjambor@suse.cz>

	* ipa-prop.h (ipa_get_jf_known_type_offset): New function.
	(ipa_get_jf_known_type_base_type): Likewise.
	(ipa_get_jf_known_type_component_type): Likewise.
	(ipa_get_jf_constant): Likewise.
	(ipa_get_jf_pass_through_formal_id): Likewise.
	(ipa_get_jf_pass_through_operation): Likewise.
	(ipa_get_jf_ancestor_offset): Likewise.
	(ipa_get_jf_ancestor_type): Likewise.
	(ipa_get_jf_ancestor_formal_id): Likewise.
	(ipa_get_jf_member_ptr_pfn): Likewise.
	* ipa-prop.c (ipa_set_jf_known_type): New function.
	(ipa_set_jf_constant): Likewise.
	(ipa_set_jf_simple_pass_through): Likewise.
	(ipa_set_jf_arith_pass_through): Likewise.
	(ipa_set_ancestor_jf): Likewise.
	(fill_member_ptr_cst_jump_function): Moved up and renamed to
	ipa_set_jf_member_ptr_cst.
	(detect_type_change_1): Use the new jump function creation functions.
	(compute_complex_assign_jump_func): Likewise.
	(compute_complex_ancestor_jump_func): Likewise.
	(compute_known_type_jump_func): Likewise.
	(compute_scalar_jump_functions): Likewise.
	(compute_pass_through_member_ptrs): Likewise.
	(determine_cst_member_ptr): Likewise.
	(combine_known_type_and_ancestor_jfs): Likewise.
	(try_make_edge_direct_simple_call): Likewise.
	(try_make_edge_direct_virtual_call): Likewise.
	(update_indirect_edges_after_inlining): Likewise.
	* ipa-cp.c (ipa_get_jf_pass_through_result): Use jump function
	access functions.  Incorporat NOP_EXPR and BINFO handling from its
	callers.
	(ipa_get_jf_ancestor_result): Likewise.  Incorporate handling BINFOs
	which was in its callers.
	(ipa_value_from_jfunc): Use jump function access functions.  Some
	functionality moved to functions above.
	(propagate_vals_accross_ancestor): Likewise.
	(propagate_vals_accross_pass_through): Use jump function access
	functions.
	(propagate_accross_jump_function): Likewise.
	* ipa-inline-analysis.c (remap_edge_change_prob): Use jump function
	access functions.
	(inline_merge_summary): Likewise.

From-SVN: r188156
2012-06-04 00:10:19 +02:00
Alessandro Fanfarillo
7ac6a832c3 re PR fortran/48831 (check.c: Constant expression (PARAMETER array element) rejected as nonconstant)
2012-06-03  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
            Tobias Burnus  <burnus@net-b.de>

        PR fortran/48831
        * gfortran.h (gfc_check_init_expr): Add prototype declaration
        of function.
        * check.c (kind_check): Change if condition to use
        to gfc_check_init_expr.
        * expr.c (check_init_expr): Remove forward declaration
        and static keyword. Change name in gfc_check_init_expr.

2012-06-03  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>

        PR fortran/48831
        * gfortran.dg/parameter_array_element_2.f90: New.


Co-Authored-By: Tobias Burnus <burnus@net-b.de>

From-SVN: r188152
2012-06-03 15:21:50 +02:00
John David Anglin
a43434ffab pa.h (MAX_PCREL17F_OFFSET): Define.
* config/pa/pa.h (MAX_PCREL17F_OFFSET): Define.
	* config/pa/pa.c (pa_attr_length_millicode_call): Use
	MAX_PCREL17F_OFFSET instead of fixed offset.
	(pa_attr_length_call): Likewise.
	(pa_attr_length_indirect_call): Likewise.

From-SVN: r188151
2012-06-03 12:46:44 +00:00
Oleg Endo
aba92f5fe0 re PR target/53512 (SH Target: Allow fsca and fsrra for non-SH4A)
PR target/53512
	* sh.opt (mfsca, mfsrra): New options.
	* sh.md (rsqrtsf2): Use TARGET_FPU_ANY and TARGET_FSRRA	condition.
	(fsca): Use TARGET_FPU_ANY and TARGET_FSCA condition.
	(sinssf2, cossf2): Fold expanders to ...
	(sincossf3): ... this new expander.  Use TARGET_FPU_ANY and
	TARGET_FSCA condition.
	* sh.c (sh_option_override): Handle TARGET_FSRRA and TARGET_FSCA.
	* doc/invoke.texi (SH Options): Add descriptions for -mfsca,
	-mno-fsca, -mfsrra, -mno-fsrra.

	PR target/53512
	* gcc.target/sh/pr53512-1.c: New.
	* gcc.target/sh/pr53512-2.c: New.
	* gcc.target/sh/pr53512-3.c: New.
	* gcc.target/sh/pr53512-4.c: New.

From-SVN: r188149
2012-06-03 11:26:54 +00:00
Matt Turner
d58e7d6924 4600.md (r4700_imul_si): New.
gcc/
2012-03-24  Matt Turner  <mattst88@gmail.com>

	* config/mips/4600.md (r4700_imul_si): New.
	(r4700_imul_di): New.
	(r4700_fmul_single): New.
	(r4700_fmul_double): New.
	* config/mips/mips-cpus.def: Add r4700.
	* config/mips/mips.c: Likewise.
	* config/mips/mips.md: Likewise.
	* config/mips/mips-tables.opt: Regenerate.

From-SVN: r188148
2012-06-03 08:00:19 +00:00
GCC Administrator
843b17b2bd Daily bump.
From-SVN: r188146
2012-06-03 00:17:34 +00:00
Steven Bosscher
9e6a4b7701 Restore Sparc build.
gcc/

	* config/sparc/sparc.h (INITIAL_ELIMINATION_OFFSET): Split out to
	new function sparc_initial_elimination_offset.
	* config/sparc/sparc.c (sparc_initial_elimination_offset): New
	function.
	* config/sparc/sparc-protos.h (sparc_initial_elimination_offset):
	Prototype it.

From-SVN: r188142
2012-06-02 14:51:18 -07:00
Kenneth Zadeck
49ab6098ee 2012-06-2 Kenneth Zadeck <zadeck@naturalbridge.com>
* expmed.c (expand_mult, choose_multiplier): Change "2 *
	HOST_BITS_PER_WIDE_INT" to "HOST_BITS_PER_DOUBLE_INT".
	* expr.c (convert_modes): Likewise.
	* explow.c (plus_constant): Likewise.
	* fixed-value.c (fixed_saturate1, fixed_saturate2)
	(do_fixed_add, do_fixed_multiply, do_fixed_multiply)
	(do_fixed_multiply, do_fixed_multiply, do_fixed_divide)
	(do_fixed_divide, do_fixed_divide, do_fixed_divide)
	(do_fixed_divide, do_fixed_divide, do_fixed_shift, do_fixed_shift)
	(do_fixed_shift, fixed_convert, fixed_convert)
	(fixed_convert_from_int, fixed_convert_from_int)
	(fixed_convert_from_real): Likewise.
	* fold-const.c (fold_convert_const_int_from_fixed, sign_bit_p)
	(native_interpret_int, fold_binary_loc, fold_ternary_loc): Likewise.
	* varasm.c (output_constructor_bitfield): Likewise.
	* tree-vrp.c (register_edge_assert_for_2): Likewise.
	* double-int.c (rshift_double, lshift_double): Likewise.
	* double-int.h (double_int_fits_in_uhwi_p, double_int, double_int): Likewise.
	* simplify-rtx.c (mode_signbit_p)
	(simplify_const_unary_operation, simplify_binary_operation_1)
	(simplify_immed_subreg): Likewise.
	* builtins.c (c_readstr, fold_builtin_bitop): Likewise.
	* tree-vect-generic.c (build_replicated_const): Likewise.
	* dbxout.c (stabstr_O): Likewise.
	* emit-rtl.c (immed_double_int_const, immed_double_const)
	(gen_lowpart_common, init_emit_once): Likewise.
	* tree.c (integer_pow2p, tree_log2, tree_floor_log2)
	(widest_int_cst_value, upper_bound_in_type): Likewise.
	* stor-layout.c (initialize_sizetypes, fixup_signed_type)
	(fixup_unsigned_type): Likewise.
	* real.c (real_to_integer2, real_from_integer): Likewise.
	* dwarf2out.c (size_of_loc_descr, size_of_die, output_die)
	(clz_loc_descriptor, mem_loc_descriptor): Likewise.

From-SVN: r188139
2012-06-02 16:08:39 +00:00
Jason Merrill
e3c888eb0e re PR c++/52973 (visibility attribute for class is not passed to its members)
PR c++/52973
	* parser.c (cp_parser_class_head): Apply attributes here.
	* semantics.c (begin_class_definition): Not here.
	* cp-tree.h: Adjust.

From-SVN: r188137
2012-06-02 00:03:51 -04:00
GCC Administrator
b691f14cc4 Daily bump.
From-SVN: r188133
2012-06-02 00:18:07 +00:00
Jason Merrill
ef4b1d6de5 re PR c++/52725 (error: "capture of non-variable" for new-expression incorrectly parsed as lambda-expression)
PR c++/52725
	* parser.c (cp_parser_binary_expression): Bail early if we're parsing
	tentatively and the LHS has a parse error.

From-SVN: r188127
2012-06-01 17:19:22 -04:00
Eric Botcazou
4efa926130 re PR tree-optimization/53501 (scev introduces signed overflow)
PR middle-end/53501
	* fold-const.c (fold_binary_loc): Refine previous change.
testsuite/
	* c-c++-common/restrict-2.c: Revert previous change.

From-SVN: r188118
2012-06-01 17:01:17 +00:00
Jason Merrill
3dfaf1d7db re PR c++/53137 (g++ segfault)
PR c++/53137
	* pt.c (instantiate_class_template_1): Set LAMBDA_EXPR_THIS_CAPTURE.
	(instantiate_decl): Don't push_to_top_level for local class methods.
	(instantiate_class_template_1): Or for local classes.

From-SVN: r188117
2012-06-01 12:55:17 -04:00
Jason Merrill
d37c775a73 re PR c++/53484 ([c++11] Wrong auto in lambdas in function templates)
PR c++/53484
	* pt.c (do_auto_deduction): Don't try to deduce from a
	type-dependent initializer.

From-SVN: r188116
2012-06-01 12:55:08 -04:00
Olivier Hainque
676bd9a422 vxworks.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Restore the "do {" part of the do-while(0) loop.
* config/rs6000/vxworks.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Restore the
        "do {" part of the do-while(0) loop.

From-SVN: r188114
2012-06-01 16:41:25 +00:00
Paolo Carlini
5714705f11 re PR c++/26155 (ICE after error with namespace alias)
/cp
2012-06-01  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/26155
	* name-lookup.c (push_namespace): When error recovery is
	impossible just error out in duplicate_decls.

/testsuite
2012-06-01  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/26155
	* g++.dg/parse/namespace-alias-1.C: New.

From-SVN: r188113
2012-06-01 16:11:38 +00:00
Aldy Hernandez
874a358949 tree-ssa-loop-im.c (execute_sm): Do not check flag_tm.
* tree-ssa-loop-im.c (execute_sm): Do not check flag_tm.
        * gimple.h (block_in_transaction): Check for flag_tm.

From-SVN: r188112
2012-06-01 15:44:10 +00:00
Yuri Rumyantsev
674dd90ad7 i386.c (x86_sched_reorder): New function.
* config/i386/i386.c (x86_sched_reorder): New function.
       Added new function x86_sched_reorder.

From-SVN: r188107
2012-06-01 11:56:00 +00:00
Richard Guenther
9ca86fc371 tree-loop-distribution.c (stmt_has_scalar_dependences_outside_loop): Handle PHIs.
2012-06-01  Richard Guenther  <rguenther@suse.de>

	* tree-loop-distribution.c (stmt_has_scalar_dependences_outside_loop):
	Handle PHIs.
	(classify_partition): Likewise.

From-SVN: r188106
2012-06-01 11:38:10 +00:00
Richard Guenther
30d55936c5 tree-loop-distribution.c (enum partition_kind): New enum.
2012-06-01  Richard Guenther  <rguenther@suse.de>

	* tree-loop-distribution.c (enum partition_kind): New enum.
	(struct partition_s): Add kind and main_stmt members.
	(partition_alloc): Initialize kind to PKIND_NORMAL.
	(partition_builtin_p): New function.
	(copy_loop_before): Remove failure path and assert instead.
	(generate_loops_for_partition): Likewise.
	(generate_memset_zero): Fold into ...
	(generate_memset_builtin): ... this.
	(classify_partition): New function with code from
	can_generate_builtin and generate_builtin.
	(generate_builtin): Remove.
	(can_generate_builtin): Likewise.
	(fuse_partitions_with_similar_memory_accesses): Call
	partition_builtin_p instead of can_generate_builtin.
	(rdg_build_partitions): Do not call
	fuse_partitions_with_similar_memory_accesses here...
	(ldist_gen): ... but here after classifying all partitions.
	Remove failure path of generate_code_for_partition.
	(generate_code_for_partition): Generate code according
	to partition classification.

From-SVN: r188104
2012-06-01 08:55:04 +00:00
Manuel López-Ibáñez
c3a43311c1 re PR c++/50134 (-Wmissing-prototypes doesn't work for C++)
2012-06-01  Manuel López-Ibáñez  <manu@gcc.gnu.org>
            Jonathan Wakely  <jwakely.gcc@gmail.com>

	PR c++/50134
	* doc/invoke.texi (Warning Options): Explain purpose and differences
	between -Wmissing-prototypes and -Wmissing-declarations.

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

From-SVN: r188103
2012-06-01 09:47:06 +01:00
Christian Bruel
d168aaeed9 Allow --specs options.
2012-05-30  Christian Bruel  <christian.bruel@st.com>

	* gcc.c (save_switch): Add user_p parameter.
	(read_specs): Likewise.
	(set_specs): Likewise.
	(validate_switches): Likewise.
	(validate_switches_from_spec): Likewise.
	(validate_all_switches): Pass on user_p parameter.
	(struct spec_list): Add user_p field.
	(struct switchstr): Add known field.
	(save_switch): Add known parameter.
	(INIT_STATIC_SPEC): Initialize user_p;
	(driver_unknown_option_callbac): call save_switch if
	OPT_SPECIAL_unknown.
	(driver_handle_option): Propagate OPT_specs.
	(do_spec_1): Set validated only if known.
	(check_live_switch): Likewise.
	(validate_switches): Set validated if known or user_spec.

From-SVN: r188102
2012-06-01 09:55:39 +02:00
Eric Botcazou
46014ce2c3 re PR ada/53517 (gnat.dg/lto14.adb FAILs)
PR ada/53517
	* gnat.dg/lto14.adb: Skip on Solaris.

From-SVN: r188100
2012-06-01 07:33:38 +00:00
Tobias Burnus
7ed26a671c chmod.c (chmod_func): On MinGW, don't set is_dir
2012-06-01  Tobias Burnus  <burnus@net-b.de>

        * intrinsics/chmod.c (chmod_func): On MinGW, don't set is_dir
        * and
        fix octal-mode handling.
        * io/unit.c (get_internal_unit): Add cast.
        * io/unix.c (min): Undef "min" before defining it.
        * runtime/backtrace.c (show_backtrace): Move label into
        ifndef __MINGW__ block.

From-SVN: r188098
2012-06-01 07:53:31 +02:00
Hans-Peter Nilsson
62330f08cb sync-1-v10.c, [...]: New tests.
* gcc.target/cris/sync-1-v10.c,
	gcc.target/cris/sync-1-v32.c, gcc.target/cris/sync-1.c,
	gcc.target/cris/sync-2c.c, gcc.target/cris/sync-2i.c,
	gcc.target/cris/sync-2s.c, gcc.target/cris/sync-3i.c,
	gcc.target/cris/sync-3s.c, gcc.target/cris/sync-4c.c,
	gcc.target/cris/sync-4i.c, gcc.target/cris/sync-4s.c,
	gcc.target/cris/torture/sync-mis-op-i-1.c,
	gcc.target/cris/torture/sync-mis-op-i-1a.c,
	gcc.target/cris/torture/sync-mis-op-i-2.c,
	gcc.target/cris/torture/sync-mis-op-i-2a.c,
	gcc.target/cris/torture/sync-mis-op-i-3.c,
	gcc.target/cris/torture/sync-mis-op-i-3a.c,
	gcc.target/cris/torture/sync-mis-op-s-1.c,
	gcc.target/cris/torture/sync-mis-op-s-1a.c,
	gcc.target/cris/torture/sync-mis-xchg-i-1.c,
	gcc.target/cris/torture/sync-mis-xchg-i-1a.c,
	gcc.target/cris/torture/sync-mis-xchg-i-2.c,
	gcc.target/cris/torture/sync-mis-xchg-i-2a.c,
	gcc.target/cris/torture/sync-mis-xchg-i-3.c,
	gcc.target/cris/torture/sync-mis-xchg-i-3a.c,
	gcc.target/cris/torture/sync-mis-xchg-s-1.c,
	gcc.target/cris/torture/sync-mis-xchg-s-1a.c: New tests.

From-SVN: r188097
2012-06-01 05:51:07 +00:00