Commit Graph

117134 Commits

Author SHA1 Message Date
Paolo Carlini 041f207220 re PR c++/53361 (Could not convert ‘{0, 0, 0}’ from ‘<brace-enclosed initializer list>’ to ‘std::array<unsigned int, 3ul>’)
2012-05-21  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/53361
	* testsuite/23_containers/array/cons/53361.cc: New.

From-SVN: r187746
2012-05-21 22:17:54 +00:00
Bernd Schmidt 1d2944a3fe re PR rtl-optimization/53373 (ICE on valid code with -mavx)
PR rtl-optimization/53373
	* caller-save.c (save_call_clobbered_regs): Look into a possible
	PARALLEL manually rather than using single_set on a call insn.

From-SVN: r187745
2012-05-21 21:37:01 +00:00
Jakub Jelinek a9a587118e re PR tree-optimization/53436 (Volatile behaves strange with OpenMP)
PR tree-optimization/53436
	* omp-low.c (omp_build_component_ref): New function.
	(build_receiver_ref, build_sender_ref, create_task_copyfn): Use it.

From-SVN: r187741
2012-05-21 23:05:33 +02:00
Uros Bizjak f1ea1f5c04 i386.c (put_condition_code): Change "reverse" and "fp" arguments to bool.
* config/i386/i386.c (put_condition_code): Change "reverse" and "fp"
	arguments to bool.
	(ix86_print_operand) <case 'O'>: Look at mode size of the operand.
	Do not print '.' here.  Output operand lossage error for unhandled
	sizes.  Move.
	<case '*'>: Move.
	<case '&'>: Ditto.
	<case 'Y'>: Ditto.
	<case 'z'>: Hardcode "code" argument into error strings.
	<case 'Z'>: Ditto.
	<case 'D'>: Merge AVX and non-AVX codes.
	<case 'C', case 'c', case 'F', case 'f'>: Merge.  Fix error string.
	Update call to put_condition_code.

From-SVN: r187734
2012-05-21 21:32:55 +02:00
Andrew Pinski 07ba94b91a re PR bootstrap/53183 (libgcc does not always figure out the size of double/long double)
2012-05-21  Andrew Pinski  <apinski@cavium.com>

        PR bootstrap/53183
        * configure.ac: Define the default includes to being none.
        * configure: Regenerate.

From-SVN: r187732
2012-05-21 11:56:35 -07:00
Andreas Schwab 577e03958f m68k.md (*clzsi2_cf): Renamed from clzsi2.
* config/m68k/m68k.md (*clzsi2_cf): Renamed from clzsi2.  Call
CC_STATUS_INIT.
(clzsi2): New expander.
(*clzsi2_68k): New insn.
* config/m68k/m68k.h: Update comment about
CLZ_DEFINED_VALUE_AT_ZERO.

From-SVN: r187731
2012-05-21 18:43:27 +00:00
Aldy Hernandez 83e1a7f080 gimple.h (gimple_set_in_transaction): Remove.
* gimple.h (gimple_set_in_transaction): Remove.
        (gimple_in_transaction): Look in BB instead.
        (gimple_statement_base): Remove in_transaction field.
        * basic-block.h (enum bb_flags): Add BB_IN_TRANSACTION.
        * trans-mem.c (compute_transaction_bits): Place transaction bit
        information into basic blocks.

From-SVN: r187729
2012-05-21 18:02:17 +00:00
Benjamin Kosnik 0ac65d04f4 re PR bootstrap/52700 (lib* configure fails on --enable-symvers=gnu-versioned-namespace.)
2012-05-21  Benjamin Kosnik  <bkoz@redhat.com>

        PR libstdc++/52700
        * configure.ac: Allow gnu, gnu-versioned-namespace for
        --enable-symvers arguments.
        * configure: Regenerate.

From-SVN: r187728
2012-05-21 17:34:25 +00:00
Andreas Schwab 18c5643980 expr.c (get_def_for_expr_class): Define only if HAVE_conditional_move.
* expr.c (get_def_for_expr_class): Define only if
HAVE_conditional_move.
(convert_tree_comp_to_rtx): Likewise.

From-SVN: r187727
2012-05-21 17:21:44 +00:00
John David Anglin bbe9ae5180 re PR java/52815 (class.c:2815:53: error: 'JCR_SECTION_NAME' was not declared in this scope)
PR java/52815
	* class.c (emit_register_classes_in_jcr_section): Revise placement
	of #ifdef JCR_SECTION_NAME.

From-SVN: r187724
2012-05-21 16:27:40 +00:00
Joseph Myers ce863f5d61 Fix PR number in ChangeLogs.
From-SVN: r187723
2012-05-21 17:01:01 +01:00
Uros Bizjak 89ac11d833 re PR target/53399 ("*ffs" pattern generates wrong code with BMI enabled)
PR target/53399
	* config/i386/i386.md (ffs<mode>2): Generate CCCmode compare
	for TARGET_BMI.
	(ffssi2_no_cmove): Ditto.
	(*ffs<mode>_1): Remove insn pattern.
	(*tzcnt<mode>_1): New insn pattern.
	(*bsf<mode>1): Ditto.

From-SVN: r187722
2012-05-21 17:46:25 +02:00
Paolo Carlini 94ccc95d41 re PR c++/51184 (Abstract class in function return type)
/cp
2012-05-21  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51184
	* decl.c (grokdeclarator): Diagnose functions returning abstract
	class types as TYPENAME.
	* cp-tree.h (ABSTRACT_CLASS_TYPE_P): Add.
	* except.c (is_admissible_throw_operand_or_catch_parameter): Use it.
	* pt.c (tsubst): Likewise.
	* semantics.c (trait_expr_value): Likewise.

/testsuite
2012-05-21  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51184
	* g++.dg/other/abstract4.C: New-

/cp
2012-05-21  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/40821
	* parser.c (cp_parser_attributes_opt): Enforce error checking of
	unbalanced parentheses in the presence of tentative parsing.

/testsuite
2012-05-21  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/40821
	* g++.dg/ext/attrib46.C: New.

From-SVN: r187720
2012-05-21 15:12:13 +00:00
Richard Guenther cb0c9fc305 tree-dfa.c (add_referenced_var): Do not walk DECL_INITIAL for more referenced vars.
2012-05-21  Richard Guenther  <rguenther@suse.de>

	* tree-dfa.c (add_referenced_var): Do not walk DECL_INITIAL for
	more referenced vars.
	* tree-ssa-live.c (mark_all_vars_used_1): Only set the used
	flag on variables that have a var-annotation.

From-SVN: r187719
2012-05-21 14:53:21 +00:00
Joseph Myers 01c7ccbb81 re PR c/53418 (ICE at gimplify.c:7773)
PR c/53148
	* c-typeck.c (build_conditional_expr): Remove C_MAYBE_CONST_EXPR
	from folded operands before wrapping another around the
	conditional expression.

testsuite:
	* gcc.c-torture/compile/pr53418-1.c,
	gcc.c-torture/compile/pr53418-2.c: New tests.

From-SVN: r187718
2012-05-21 15:42:26 +01:00
Jakub Jelinek 7772bae06c re PR tree-optimization/53366 (wrong code generation by tree vectorizer using AVX)
PR tree-optimization/53366
	* tree-vect-slp.c (vect_supported_load_permutation_p): Don't shortcut
	tests if complex_numbers == 2, but there are non-complex number loads
	too.

	* gcc.dg/torture/pr53366-1.c: New test.
	* gcc.dg/torture/pr53366-2.c: New test.
	* gcc.target/i386/pr53366-1.c: New test.
	* gcc.target/i386/pr53366-2.c: New test.

From-SVN: r187717
2012-05-21 16:29:11 +02:00
Jakub Jelinek 017a202055 re PR middle-end/53409 (ICE: vector VEC(vec_void_p,base) index domain error, in vinfo_for_stmt at tree-vectorizer.h:630)
PR tree-optimization/53409
	* tree-vect-loop.c (vect_analyze_loop_operations): Don't check
	vinfo_for_stmt (op_def_stmt) if op_def_stmt isn't inside loop.

	* gcc.c-torture/compile/pr53409.c: New test.

From-SVN: r187716
2012-05-21 16:27:10 +02:00
Jakub Jelinek 27edb974ee re PR tree-optimization/53410 (ICE in build_int_cst_wide, at tree.c:1219)
PR tree-optimization/53410
	* fold-const.c (fold_binary_loc): Use build_zero_cst (type)
	instead of build_int_cst (type, 0) where vector types might be
	involved. Instead of build_int_cst (type, 1) convert the original
	integer_onep argument to the desired type.

	* gcc.c-torture/compile/pr53410-1.c: New test.
	* gcc.c-torture/compile/pr53410-2.c: New test.

From-SVN: r187715
2012-05-21 16:25:03 +02:00
Michael Matz fb639843e4 genattrtab.c (attr_rtx_cost): Move earlier, start with cost being 1.
* genattrtab.c (attr_rtx_cost): Move earlier, start with cost being 1.
	(simplify_test_exp): Handle one more case of distributive law,
	decrease cost threshold.
	(tests_attr_p, get_attr_order): New functions.
	(optimize_attrs): Use topological order, inline only cheap values.
	(write_attr_set): Reset our_known_true after some time.

From-SVN: r187714
2012-05-21 13:24:31 +00:00
H.J. Lu 30ee9dbf3d Warn passing SSE argument ABI change for -m64
gcc/

	PR target/53425
	* config/i386/i386.c (type_natural_mode): Warn passing SSE
	vector argument without SSE enabled changes the ABI.

gcc/testsuite/

	PR target/53425
	* gcc.target/i386/pr53425-1.c: New file.
	* gcc.target/i386/pr53425-2.c: Likewise.

From-SVN: r187711
2012-05-21 05:48:38 -07:00
Richard Guenther 21039e0e00 re PR middle-end/53408 (ICE in get_initial_def_for_induction, at tree-vect-loop.c:3222)
2012-05-21  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/53408
	* tree-vect-loop.c (vectorizable_induction): Properly check
	the restriction that we cannot handle induction results from
	the inner loop outside of the outer loop.

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

From-SVN: r187710
2012-05-21 12:45:59 +00:00
H.J. Lu 9b5effa449 Use unspec_volatile on rdrand<mode>_1
gcc/

	PR target/53416
	* config/i386/i386.md (UNSPEC_RDRAND): Renamed to ...
	(UNSPECV_RDRAND): This.
	(rdrand<mode>_1): Updated.

gcc/testsuite/

	PR target/53416
	* gcc.target/i386/pr53416.c: New file.

From-SVN: r187709
2012-05-21 05:31:45 -07:00
Richard Guenther 47fb0e185a pr46519-2.f90: Adjust to avoid memset transform.
2012-05-21  Richard Guenther  <rguenther@suse.de>

	* gfortran.dg/pr46519-2.f90: Adjust to avoid memset transform.

From-SVN: r187708
2012-05-21 10:48:07 +00:00
Richard Guenther 8450aa9720 tree-loop-distribution.c (can_generate_builtin): Reject volatile stmts.
2012-05-21  Richard Guenther  <rguenther@suse.de>

	* tree-loop-distribution.c (can_generate_builtin): Reject
	volatile stmts.

	* gcc.dg/torture/ldist-1.c: New testcase.

From-SVN: r187707
2012-05-21 10:46:19 +00:00
Chung-Lin Tang 6be4d3acd0 Makefile.in (options.c): Add options.h to included header files, before tm.h.
2012-05-21  Chung-Lin Tang  <cltang@codesourcery.com>

	* Makefile.in (options.c): Add options.h to included header
	files, before tm.h.

From-SVN: r187705
2012-05-21 10:33:43 +00:00
Razya Ladelsky 70837b718c tree-parloops.c: Add myself to contributors, update TODO list, add link to wiki.
2012-05-21  Razya Ladelsky  <razya@il.ibm.com>

        * tree-parloops.c : Add myself to contributors, update
        TODO list, add link to wiki.

From-SVN: r187704
2012-05-21 07:39:38 +00:00
GCC Administrator 8dbabec2f8 Daily bump.
From-SVN: r187703
2012-05-21 00:18:34 +00:00
Alan Modra 8afc36363f predicates.md (input_operand): Don't match constant pool addresses.
* config/rs6000/predicates.md (input_operand): Don't match
	constant pool addresses.  Remove label_ref, high and plus from
	match_code list.  Remove redundant CONSTANT_P test.
	(splat_input_operand): Similarly update match_code list.
	(small_toc_ref): New predicate.
	* config/rs6000/rs6000-protos.h (toc_relative_expr_p): Update prototype.
	* config/rs6000/rs6000.c (tocrel_base, tocrel_offset): Make const.
	(legitimate_constant_pool_address_p): Move TARGET_TOC test and
	register checks to..
	(toc_relative_expr_p): ..here.  Add "strict" param.  Match new rtl
	generated by create_TOC_reference.
	(rs6000_legitimize_address): Update cerate_TOC_reference call.
	(rs6000_delegitimize_address): Handle new rtl for toc refs.
	(rs6000_cannot_force_const_mem, rs6000_find_base_term): Likewise.
	(use_toc_relative_ref): New function, split out from..
	(rs6000_emit_move): ..here.  Remove redundant tests.  Update
	create_TOC_reference calls.
	(rs6000_legitimize_reload_address): Formatting.  Handle splitting
	of medium/large model toc addresses.  Use use_toc_relative_ref.
	(print_operand): Formatting, style.  Adjust for toc changes.
	(print_operand_address): Likewise.
	(rs6000_output_addr_const_extra): Likewise.
	(create_TOC_reference): Put TOC_REGISTER in UNSPEC_TOCREL rather
	than a PLUS.  Use this formulation for both high and low part
	of -mcmodel=medium/large toc reference too.  Before reload,
	always use the small model formulation.
	* config/rs6000/rs6000.md (tls_gd, tls_gd_high): Similarly avoid
	a PLUS in high part of addresses here.
	(tls_ld, tls_ld_high, tls_got_dtprel, tls_got_dtprel_high): Likewise.
	(tls_got_tprel, tls_got_tprel_high, largetoc_high): Likewise.
	(largetoc_high, largetoc_low): Move earlier.  Cope when no
	base reg available.
	(largetoc_high_plus): New insn.
	(movsi_internal1, movsi_internal1_single, movsf_softfloat,
	movdi_mfpgpr, movdi_internal64): Don't handle 'R' constraint here..
	(tocref): ..instead do so here, new insn and split.

From-SVN: r187699
2012-05-21 09:01:35 +09:30
H.J. Lu d1925759ed Add RDRND, F16C and FSGSBASE support to -march=native
* config/i386/driver-i386.c (host_detect_local_cpu): Support
	RDRND, F16C and FSGSBASE.

From-SVN: r187696
2012-05-20 14:34:14 -07:00
John David Anglin 05607e5b63 re PR rtl-optimization/53373 (ICE on valid code with -mavx)
PR rtl-optimzation/53373
	* config/pa/pa.md (call_symref_pic): Don't expose PIC register save in
	call pattern.  Update split patterns.
	(call_symref_64bit, call_reg_pic, call_reg_64bit, call_val_symref_pic,
	call_val_symref_64bit, call_val_reg_pic, call_val_reg_64bit): Likewise.

From-SVN: r187695
2012-05-20 16:32:50 +00:00
Razya Ladelsky 768da0da28 tree-parloops.c (gen_parallel_loop): Change many_iterations_cond for outer loops.
2012-05-20  Razya Ladelsky  <razya@il.ibm.com>
        
                 * tree-parloops.c (gen_parallel_loop): Change many_iterations_cond for outer loops.

From-SVN: r187694
2012-05-20 11:41:45 +00:00
Eric Botcazou d3c268abbd utils.c (gnat_write_global_declarations): Put a name on the dummy global variable.
* gcc-interface/utils.c (gnat_write_global_declarations): Put a name
	on the dummy global variable.

From-SVN: r187692
2012-05-20 09:42:42 +00:00
Eric Botcazou 4fe4de900d Fix oversight
From-SVN: r187691
2012-05-20 06:54:25 +00:00
Gary Funck 103ab31f69 dwarf2.def: Update comment re: UPC extensions to reference DWARF4 specification.
toplevel/include/
	* dwarf2.def: Update comment re: UPC extensions to reference
	DWARF4 specification.

From-SVN: r187689
2012-05-20 00:55:05 +00:00
GCC Administrator a808df1f3c Daily bump.
From-SVN: r187688
2012-05-20 00:18:39 +00:00
Jan Hubicka 877ab5e91e cgraphunit.c (handle_alias_pairs): Declare; free alias_pairs
* cgraphunit.c (handle_alias_pairs): Declare; free alias_pairs
	(cgraph_process_new_functions): Process also aliases.
	* lto-streamer-out.c (struct sets): Remove.
	(trivally_defined_alias): Remove.
	(output_alias_pair_p): Remove.
	(output_unreferenced_globals): Remove.
	(produce_symtab); Do not handle alias pairs.
	(produce_asm_for_decls): Likewise.
	* lto-streamer-in.c (input_alias_pairs): Remove.
	(lto_read_body): Do not input alias pairs.
	(lto_input_constructors_and_inits): Remove.

From-SVN: r187681
2012-05-19 20:36:48 +00:00
Jan Hubicka 38e55ac9e0 * cgraphunit.c (handle_alias_pairs): Cleanup; handle all types of aliases.
From-SVN: r187680
2012-05-19 15:26:30 +00:00
Jan Hubicka c44c2088f7 cgraphbuild.c (record_reference): Update.
* cgraphbuild.c (record_reference): Update.
	* lto-cgraph.c (lto_output_varpool_node): External vars
	are not in other partition even if they are not output
	in current partition.
	* gimple-fold.c (can_refer_decl_in_current_unit_p): Take FROM_DECL
	argument; fix.
	(canonicalize_constructor_val): Take FROM_DECL argument.
	(fold_ctor_reference, fold_string_cst_ctor_reference,
	fold_array_ctor_reference, fold_nonarray_ctor_reference,
	fold_ctor_reference): Likewise.
	(fold_const_aggregate_ref_1, gimple_get_virt_method_for_binfo): Update.
	* gimple.h (gimple_fold_builtin): Likewise.

From-SVN: r187678
2012-05-19 09:49:47 +00:00
Eric Botcazou c80c1ce951 decl.c (Has_Thiscall_Convention): New macro.
* gcc-interface/decl.c (Has_Thiscall_Convention): New macro.
	(gnat_to_gnu_entity) <E_Subprogram_Type>: Test it to set the thiscall
	calling convention
	(get_minimal_subprog_decl): Likewise.
	(gnat_first_param_is_class): New predicate.

	* gcc-interface/misc.c (gnat_handle_option): Fix formatting.
	* gcc-interface/Makefile.in: Likewise.

From-SVN: r187676
2012-05-19 09:32:50 +00:00
GCC Administrator 2a2aa0391e Daily bump.
From-SVN: r187674
2012-05-19 00:18:29 +00:00
Eric Botcazou 1d5bfe9720 decl.c (gnat_to_gnu_entity): For an object at global level with unconstrained nominal subtype and a...
* gcc-interface/decl.c (gnat_to_gnu_entity) <object>: For an object at
	global level with unconstrained nominal subtype and a non-fixed size,
	make a variable for the size.

From-SVN: r187666
2012-05-18 20:33:49 +00:00
Ian Lance Taylor b8b552d99b compiler: Fix erroneous use of VEC.
From-SVN: r187664
2012-05-18 20:15:42 +00:00
Olivier Hainque 0ac3cb2a66 Makefile.in (FLAGS_TO_PASS): Pass $(libexecsubdir) instead of $(libsubdir) as libexecsubdir.
gcc/
        * Makefile.in (FLAGS_TO_PASS): Pass $(libexecsubdir) instead of
        $(libsubdir) as libexecsubdir.

From-SVN: r187658
2012-05-18 16:30:24 +00:00
Bill Schmidt 9c68125ebc rs6000.c (print_operand): Revise code that unsafely relied on signed overflow behavior.
2012-05-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* config/rs6000/rs6000.c (print_operand): Revise code that unsafely
	relied on signed overflow behavior.

From-SVN: r187657
2012-05-18 16:01:17 +00:00
Richard Guenther a4293fa661 re PR target/53346 (Bad if conversion in cptrf2 of rnflow.f90)
2012-05-18  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/53346
	* tree-loop-distribution.c (ldist_gen): Make sure to apply
	builtin transform even when only a single partition with
	all reads/writes exists.

	* gcc.dg/tree-ssa/ldist-18.c: New testcase.
	* gcc.target/i386/incoming-10.c: Adjust.
	* gcc.target/i386/incoming-11.c: Likewise.
	* gcc.target/i386/pr46295.c: Likewise.

From-SVN: r187655
2012-05-18 13:10:01 +00:00
Richard Guenther b696101130 pr53352.c: Return zero.
2012-05-18  Richard Guenther  <rguenther@suse.de>

	* gcc.dg/pr53352.c: Return zero.

From-SVN: r187654
2012-05-18 12:30:36 +00:00
Richard Guenther 7595989bb4 re PR tree-optimization/53390 (ICE: tree check: expected integer_cst, have nop_expr in vect_compute_data_ref_alignmen on 32-bit x86 host)
2012-05-18  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/53390
	* tree-vect-data-refs.c (vect_compute_data_ref_alignment): Ignore
	strided loads.

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

From-SVN: r187653
2012-05-18 12:09:49 +00:00
Bill Schmidt 917a52020a tree-ssa-reassoc.c (bip_map): Remove decl.
2012-05-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* tree-ssa-reassoc.c (bip_map): Remove decl.
	(completely_remove_stmt): Remove function.
	(remove_def_if_absorbed_call): Remove function.
	(remove_visited_stmt_chain): Remove __builtin_powi handling.
	(possibly_move_powi): Remove function.
	(rewrite_expr_tree): Remove calls to possibly_move_powi.
	(rewrite_expr_tree_parallel): Likewise.
	(attempt_builtin_powi): Build multiplies explicitly rather than
	relying on the ops vector and rank system.
	(transform_stmt_to_copy): New function.
	(transform_stmt_to_multiply): Likewise.
	(reassociate_bb): Handle leftover operations after __builtin_powi
	optimization; build a final multiply if necessary.

From-SVN: r187652
2012-05-18 12:02:54 +00:00
Jan Hubicka 387df87160 cgraphunit.c (varpool_finalize_decl): Allow external decls.
* cgraphunit.c (varpool_finalize_decl): Allow external decls.
	(mark_functions_to_output): Fix sanity check.
	* ipa.c (function_and_variable_visibility): Remove TREE_STATIC
	check.

From-SVN: r187651
2012-05-18 11:44:52 +00:00
Richard Guenther f9a21e1342 tree-flow.h (mark_symbols_for_renaming): Remove.
2012-05-18  Richard Guenther  <rguenther@suse.de>

	* tree-flow.h (mark_symbols_for_renaming): Remove.
	* tree-dfa.c (mark_symbols_for_renaming): Likewise.
	* tree-inline.c (copy_edges_for_bb): Do not mark symbols for
	renaming.
	(copy_debug_stmt): Likewise.
	(expand_call_inline): Likewise.
	(declare_return_variable): Mark the return variable for renaming
	if necessary.

From-SVN: r187650
2012-05-18 10:19:22 +00:00