Commit Graph

112186 Commits

Author SHA1 Message Date
Jonathan Wakely
73f0503101 alloc_traits.h (__alloc_traits::max_size): Define.
2011-10-04  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/ext/alloc_traits.h (__alloc_traits::max_size): Define.
	(__alloc_traits::rebind): Define.
	* include/bits/stl_vector.h: Use them.
	* testsuite/util/testsuite_allocator.h (SimpleAllocator): Define.
	* testsuite/23_containers/vector/allocator/minimal.cc: New.
	* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
	Adjust dg-error line numbers.
	* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
	Likewise.
	* testsuite/23_containers/vector/requirements/dr438/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/vector/requirements/dr438/
	constructor_2_neg.cc: Likewise.

From-SVN: r179523
2011-10-04 21:34:54 +01:00
Janus Weil
97f2673267 re PR fortran/35831 ([F95] Shape mismatch check missing for dummy procedure argument)
2011-10-04  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/35831
	* interface.c (check_dummy_characteristics): Check the array shape.


2011-10-04  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/35831
	* gfortran.dg/dummy_procedure_6.f90: New.

From-SVN: r179520
2011-10-04 20:37:13 +02:00
Ozkan Sezer
0de99d2625 mingw-w64.h (CPP_SPEC): Rename _REENTRANCE to _REENTRANT.
2011-10-04  Ozkan Sezer  <sezeroz@gmail.com>

        * config/i386/mingw-w64.h (CPP_SPEC): Rename _REENTRANCE to
        _REENTRANT.
        * config/i386/mingw32.h (CPP_SPEC): Likewise.

From-SVN: r179511
2011-10-04 18:42:35 +02:00
David S. Miller
1de6359c61 Small -m{cpu,tune}=native fix under Linux/Sparc.
* config/sparc/driver-sparc.c (cpu_names): Fix string for supersparc
	under Linux.

From-SVN: r179510
2011-10-04 08:45:49 -07:00
Jakub Jelinek
80642376c0 re PR middle-end/50604 (verify_gimple failed: type mismatch in binary expression)
PR tree-optimization/50604
	* builtins.c (fold_builtin_strcpy, fold_builtin_stpcpy,
	fold_builtin_strncpy, fold_builtin_stxcpy_chk): Ensure
	last argument to memcpy has size_type_node type instead of
	ssizetype.
	* tree-ssa-strlen.c (handle_builtin_memcpy): Use size_type_node
	instead of TREE_TYPE (len) as type for newlen.

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

From-SVN: r179508
2011-10-04 17:25:53 +02:00
Andi Kleen
c17d253c7a Maintain order of LTO sections
Currently when reading in LTO sections from ld -r files they can
get randomly reordered based on hash tables and random IDs.
This causes reordering later when the final code is generated and
also makes crashes harder to reproduce.

This patch maintains explicit lists based on the input order and uses
those lists to preserve that order when starting the rest of the
LTO passes.

This is the first step to working -fno-toplevel-reorder for
LTO. But this needs more changes because the LTO partitioner
can still reorder.

This add two lists: one for the section and another one for
the file_decl_datas. This is needed because the sections are
walked twice through different data structures.

In addition some code becomes slightly cleaner because we don't need
to pass state through abstract callbacks anymore, but
can just use direct type safe calls.

gcc/lto/:

2011-10-02   Andi Kleen <ak@linux.intel.com>

	* lto-object.c (lto_obj_add_section_data): Add list.
	(lto_obj_add_section): Fill in list.
	(ltoobj_build_section_table): Pass through list.
	* lto.c (file_data_list): Declare.
	(create_subid_section_table): Pass arguments directly.
	Fill in list of file_datas.
	(lwstate): Delete.
	(lto_create_files_from_ids): Pass in direct arguments.
	Don't maintain list.
	(lto_file_read): Use explicit section and file data lists.
	(lto_read_all_file_options): Pass in section_list.
	* lto.h (lto_obj_build_section_table): Add list.
	(lto_section_slot): Add next.
	(lto_section_list): Declare.

From-SVN: r179505
2011-10-04 14:12:37 +00:00
Rainer Orth
0d9bbe5476 Don't XFAIL gcc.dg/graphite/interchange-14.c (PR tree-optimization/49662)
From-SVN: r179503
2011-10-04 14:02:29 +00:00
Jakub Jelinek
31330e16d5 re PR tree-optimization/50522 (C++ std::valarray vectorization missed optimization)
PR tree-optimization/50522
	* tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Don't test
	TYPE_RESTRICT.
	(ptr_derefs_may_alias_p): Call pt_solutions_same_restrict_base
	unconditionally.

From-SVN: r179502
2011-10-04 15:36:24 +02:00
Jakub Jelinek
f548a3173e fold-const.c (fold_unary_loc): Don't optimize POINTER_PLUS_EXPR casted to TYPE_RESTRICT pointer by casting the...
* fold-const.c (fold_unary_loc): Don't optimize
	POINTER_PLUS_EXPR casted to TYPE_RESTRICT pointer by
	casting the inner pointer if it isn't TYPE_RESTRICT.
	* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Don't through
	casts from non-TYPE_RESTRICT pointer to TYPE_RESTRICT pointer.

	* gcc.dg/tree-ssa/restrict-4.c: New test.

From-SVN: r179500
2011-10-04 14:34:06 +02:00
Joseph Myers
8cba602747 config.gcc (i[34567]86-*-elf*, [...]): Use i386/t-crtstuff.
* config.gcc (i[34567]86-*-elf*, x86_64-*-elf*): Use
	i386/t-crtstuff.

From-SVN: r179498
2011-10-04 12:24:23 +01:00
Artjoms Sinkarovs
08f215a24f vector-compare-1.c: Fix trailing white spaces.
2011-10-04  Artem Shinkarov  <artyom.shinkaroff@gmail.com>
	* gcc.c-torture/execute/vector-compare-1.c: Fix trailing white
	spaces.
	(main): Use __typeof to get result type of comparison.

From-SVN: r179497
2011-10-04 10:01:32 +00:00
Jan Hubicka
398f05daa1 lto-streamer.h (lto_input_toplevel_asms): Add order_base parameter.
* lto-streamer.h (lto_input_toplevel_asms): Add order_base parameter.
	* lto-streamer-in.c (lto_input_toplevel_asms): Stream in order.
	* lto-streamer-out.c (lto_output_toplevel_asms): Stream out order.
	* lto-cgraph.c (order_base): New static var.
	(lto_output_node): Stream in order.
	(lto_output_varpool_node): Stream out order.
	(input_node): Stream in order.
	(input_varpool_node): Stream out order.
	(input_cgraph_1): Initialize order base; update call of
	lto_input_toplevel_asms.

From-SVN: r179496
2011-10-04 09:46:56 +00:00
Georg-Johann Lay
36a50ab6e0 re PR target/50566 ([avr]: Add support for better logging similar to -mdeb)
PR target/50566
	* config/avr/avr-protos.h (avr_legitimize_reload_address): New
	prototype.
	* config/avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Copy worker code
	from here...
	* config/avr/avr.c (avr_legitimize_reload_address) ...to this new
	function.  Log if avr_log.legitimize_reload_address.

From-SVN: r179494
2011-10-04 08:23:03 +00:00
Eric Botcazou
437bcafa1a * config/sparc/sparc.c (sparc_fold_builtin): Use a sequence of tests.
From-SVN: r179493
2011-10-04 07:40:07 +00:00
Andreas Krebbel
aecb619723 longlong.h (smul_ppmm, sdiv_qrnnd): Add underscores to the local variables.
2011-10-04  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* longlong.h (smul_ppmm, sdiv_qrnnd): Add underscores to the local
	variables.  Fix second operand of DR.  Swap inputs for sdiv_qrnnd.

From-SVN: r179491
2011-10-04 07:27:01 +00:00
Ira Rosen
26ac357939 * lib/target-supports.exp
(check_effective_target_vect_multiple_sizes):
        Make et_vect_multiple_sizes_saved global.
        (check_effective_target_vect64): Make et_vect64_saved global.

From-SVN: r179490
2011-10-04 07:21:46 +00:00
David S. Miller
a4f713f550 More consistent access to sparc %ger register.
* config/sparc/sparc.md (fpack16_vis, fpackfix_vis, fpack32_vis): Make
	GSR_REG an input operand to UNSPEC instead of a parallel USE.
	(faligndata<V64I:mode>_vis): Likewise and use DI mode.
	(alignaddrsi_vis, alignaddrdi_vis, alignaddrlsi_vis, alignaddrldi_vis):
	Reference GSR_REG in DI mode, simplify convoluted expressions by using
	zero_extract.
	(bshuffle<V64I:mode>_vis): Reference GSR_REG in DI mode.

From-SVN: r179489
2011-10-03 23:34:22 -07:00
Maxim Kuvyrkov
57f934115e * tree-eh.c (remove_unreachable_handlers): Obvious cleanup.
From-SVN: r179486
2011-10-04 02:23:17 +00:00
GCC Administrator
65e820e086 Daily bump.
From-SVN: r179484
2011-10-04 00:17:40 +00:00
Joseph Myers
27257365c8 * de.po: Update.
From-SVN: r179478
2011-10-03 21:15:53 +01:00
Jakub Jelinek
7617c0fdfb godump.c (go_output_typedef): Support printing enum values that don't fit in a signed HOST_WIDE_INT.
* godump.c (go_output_typedef): Support printing enum values that
	don't fit in a signed HOST_WIDE_INT.

Co-Authored-By: Ian Lance Taylor <iant@google.com>

From-SVN: r179477
2011-10-03 20:09:56 +00:00
Anatoly Sokolov
586747fca1 cris.c (cris_output_addr_const_extra): Make static.
* config/cris/cris.c (cris_output_addr_const_extra): Make static.
	(TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
	* config/cris/cris.h (OUTPUT_ADDR_CONST_EXTRA): Remove.
	* config/cris/cris-protos.h (cris_output_addr_const_extra): Remove.

From-SVN: r179476
2011-10-03 23:39:50 +04:00
Anatoly Sokolov
cb69db4fe4 m68k.c (m68k_output_addr_const_extra): Make static.
* config/m68k/m68k.c (m68k_output_addr_const_extra): Make static.
	(TARGET_OUTPUT_ADDR_CONST_EXTRA): Define.
	* config/m68k/m68k.h (OUTPUT_ADDR_CONST_EXTRA): Remove.
	* config/m68k/m68k-protos.h (m68k_output_addr_const_extra): Remove.

From-SVN: r179474
2011-10-03 23:16:29 +04:00
Jonathan Wakely
491258e638 pointer_to.cc: Define equality operator and use.
2011-10-03  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* testsuite/20_util/pointer_traits/pointer_to.cc: Define equality
	operator and use.

From-SVN: r179473
2011-10-03 20:11:53 +01:00
Steve Ellcey
f903e000c3 re PR target/49967 (The -static-libstdc++ does not work on HP-UX (IA64 B.11.23, probably others))
2011-10-03  Steve Ellcey  <sje@cup.hp.com>

	PR target/49967
	* configure.ac (gcc_cv_ld_static_dynamic): Define for *-*-hpux*.
	(gcc_cv_ld_static_option): Ditto.
	(gcc_cv_ld_dynamic_option): Ditto.
	* configure: Regenerate.

From-SVN: r179472
2011-10-03 17:57:40 +00:00
David S. Miller
4f936a37f2 Minor fixup to the sparc bshuffle pattern.
* config/sparc/sparc.md (bshuffle<V64I:mode>_vis): Don't wrap GSR_REG in
	a USE, since it's now a true arg to the UNSPEC.

From-SVN: r179470
2011-10-03 10:55:10 -07:00
Richard Henderson
d59b911eec Fix Artem's name spelling, at request.
From-SVN: r179469
2011-10-03 10:11:11 -07:00
Richard Henderson
a46e3824b7 Fix broken commit wrt vect-shuffle-N.c tests.
From-SVN: r179468
2011-10-03 10:08:43 -07:00
David S. Miller
2b25763bce Minor fixups to the sparc bmask/bshuffle patterns.
* config/sparc/sparc.md (bmask<P:mode>_vis): Split into explicit 'di'
	and 'si' patterns which describe the GSR changes explicitly in the
	RTL using zero_extract.
	(bshuffle<V64I:mode>_vis): Put the GSR use inside of the unspec.

From-SVN: r179465
2011-10-03 09:41:07 -07:00
Paolo Carlini
1c29961267 hashtable.h (_Hashtable<>::insert(value_type&&), [...]): Don't define here...
2011-10-03  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/hashtable.h (_Hashtable<>::insert(value_type&&),
	insert(const_iterator, value_type&&)): Don't define here...
	* include/bits/unordered_set.h (__unordered_set<>,
	__unordered_multiset<>): ... define here instead.

From-SVN: r179464
2011-10-03 15:28:47 +00:00
Artjoms Sinkarovs
f90e8e2eae Vector shuffling patch from Artem Shinkarov.
From-SVN: r179462
2011-10-03 08:13:26 -07:00
Jakub Jelinek
e4a5b262e7 re PR tree-optimization/50587 (ICE init_range_entry, at tree-ssa-reassoc.c:1698 caused by recent change)
PR tree-optimization/50587
	* tree-ssa-reassoc.c (init_range_entry): Stop iterating when
	arg0 is not a SSA_NAME.

From-SVN: r179447
2011-10-03 11:06:38 +02:00
Richard Sandiford
93b765d091 ipa-inline-analysis.c (MAX_TIME): Update comment.
gcc/
	* ipa-inline-analysis.c (MAX_TIME): Update comment.

From-SVN: r179446
2011-10-03 08:11:43 +00:00
Jason Merrill
874fc1677e pt.c (tsubst_pack_expansion): Re-use ARGUMENT_PACK_SELECTs.
* pt.c (tsubst_pack_expansion): Re-use ARGUMENT_PACK_SELECTs.
	Change unsubstituted_packs to bool.

From-SVN: r179444
2011-10-03 00:32:35 -04:00
Jason Merrill
a558c1e2e1 parser.c (cp_parser_range_for): Don't try to deduce from {} in a template.
* parser.c (cp_parser_range_for): Don't try to deduce from {}
	in a template.

From-SVN: r179443
2011-10-03 00:32:20 -04:00
David S. Miller
bb69f33b3a Add missing changelog details in previous commit.
* config/sparc/predicates.md (const_one_operand): Delete.

From-SVN: r179442
2011-10-02 17:52:32 -07:00
Richard Henderson
5422cd26d3 Add missing sparc shift zero extensions, and fix shift attributes.
* config/sparc/sparc.md (ashlsi3, *ashldi3_sp64): Remove
	conditional insn type setting, we always emit a shift.
	(*ashlsi3_extend, *lshrsi3_extend0): New patterns.
	(*lshrsi3_extend): Rename to *lshrsi3_extend1.

Co-Authored-By: David S. Miller <davem@davemloft.net>

From-SVN: r179441
2011-10-02 17:46:54 -07:00
GCC Administrator
073c175724 Daily bump.
From-SVN: r179440
2011-10-03 00:19:00 +00:00
Jason Merrill
d602756341 re PR c++/35722 ([C++0x] Variadic templates expansion into non-variadic class template)
PR c++/35722
	Implement N2555 (expanding pack expansion to fixed parm list)
	* pt.c (coerce_template_parms): Allow expanding a pack expansion
	to a fixed-length argument list.
	(unify_pack_expansion): Handle explicit args properly.
	(unify) [TREE_VEC]: Handle pack expansions here.
	[TYPE_ARGUMENT_PACK]: Not here.
	(tsubst_pack_expansion): Don't try to do partial substitution.
	(pack_deducible_p): New.
	(fn_type_unification): Use it.
	(find_parameter_packs_r): Take the TYPE_MAIN_VARIANT
	of a type parameter.
	(check_non_deducible_conversion): Split from type_unification_real.
	(unify_one_argument): Split from type_unification_real...
	(unify_pack_expansion): ...and here.  Drop call_args_p parm.
	(type_unification_real, unify, more_specialized_fn): Adjust.

From-SVN: r179436
2011-10-02 17:45:01 -04:00
Jason Merrill
f10eaa2dcc class.c (fixed_type_or_null): Handle NSDMI.
* class.c (fixed_type_or_null): Handle NSDMI.
	* method.c (walk_field_subobs): Disable NSDMI noexcept checking
	for now.

From-SVN: r179435
2011-10-02 17:44:52 -04:00
Gerald Pfeifer
3bf108578e * invoke.texi (SPARC Options): Refer to GNU/Linux.
From-SVN: r179434
2011-10-02 20:51:29 +00:00
Richard Sandiford
e4c07adeb0 re PR target/50579 (gcc.target/mips/20020620-1.c FAILs on IRIX 6.5)
gcc/testsuite/
	PR target/50579
	* gcc.target/mips/mips.exp (mips_long32_abi_p, mips_long64_abi_p):
	New procedures.
	(mips-dg-options): Force an ABI option if the current ABI is
	incompatible with the required -mlong setting.  Likewise force
	a long setting if the current one is incompatible with the
	chosen ABI.  Keep abi_test_option_p, abi and eabi_p updated
	throughout procedure.
	* gcc.target/mips/abi-o64-long64.c: Require -mno-abicalls
	instead of addressing=absolute.

From-SVN: r179433
2011-10-02 18:29:27 +00:00
Richard Sandiford
d9b59f5634 mips.c (mips_frame_barrier): New function.
gcc/
	* config/mips/mips.c (mips_frame_barrier): New function.
	(mips_expand_prologue): Call it after allocating stack space.
	(mips_deallocate_stack): New function.
	(mips_expand_epilogue): Call mips_frame_barrier and
	mips_deallocate_stack.

gcc/testsuite/
	* gcc.target/mips/stack-1.c: New test.

From-SVN: r179432
2011-10-02 17:46:11 +00:00
Richard Sandiford
31045a25f3 re PR target/49696 (ICE on mips when compiling drizzle)
gcc/
	PR target/49696
	* config/mips/sync.md (sync_<optab>_12): Allow zero operands.
	(sync_old_<optab>_12, sync_new_<optab>_12, sync_nand_12): Likewise.
	(sync_old_nand_12, sync_new_nand_12, test_and_set_12): Likewise.

gcc/testsuite/
	* gcc.dg/pr49696.c: New test.

From-SVN: r179431
2011-10-02 17:45:10 +00:00
Jan Hubicka
4762f56169 * cgraphunit.c (verify_edge_count_and_frequency): Bounds check.
From-SVN: r179430
2011-10-02 15:06:11 +00:00
Jan Hubicka
467a8db025 cgraphunit.c (ipa_passes): Remove unrechable nodes.
* cgraphunit.c (ipa_passes): Remove unrechable nodes.
	* lto-streamer-out.c (produce_symtab): Skip unused extern declarations.
	* ipa.c (cgraph_remove_unreachable_nodes): Do not assume that external
	functions are reachable when address is taken.
	* ipa-inline-analysis.c (reset_inline_edge_summary): New

	* gcc.dg/ipa/ctor-empty-1.c: Update dump file.

From-SVN: r179429
2011-10-02 14:30:50 +00:00
Jan Hubicka
78e5ce9f1e * ipa-inline-analysis.c (inline_summary_alloc): Bounds check.
From-SVN: r179428
2011-10-02 14:28:18 +00:00
Jan Hubicka
1c52c60148 ipa-inline-analysis.c (reset_inline_edge_summary): New function.
* ipa-inline-analysis.c (reset_inline_edge_summary): New function.
	(reset_inline_summary): New function.
	(compute_inline_parameters, inline_node_removal_hook,
	inline_edge_removal_hook): Use it.
	(inline_free_summary): Reset holders correctly.
	(inline_generate_summary): Free summary before computing it.

From-SVN: r179427
2011-10-02 13:59:28 +00:00
Paolo Carlini
61e0e2f8af re PR preprocessor/36819 (memleak in split_quote_chain)
2011-10-02  Paolo Carlini  <paolo.carlini@oracle.com>

	PR preprocessor/36819
	* incpath.c (merge_include_chains): Call free_path on
	heads[QUOTE] and tails[QUOTE].

From-SVN: r179426
2011-10-02 12:31:40 +00:00
Revital Eres
e8775f2593 Fix r179381: add missing period in testsuite/Changelog.
From-SVN: r179425
2011-10-02 11:14:53 +00:00