118541 Commits

Author SHA1 Message Date
Richard Biener
c1aaec5bf8 cp-tree.h (TREE_INDIRECT_USING): Use TREE_LANG_FLAG_0 accessor.
2012-08-21  Richard Guenther  <rguenther@suse.de>

	cp/
	* cp-tree.h (TREE_INDIRECT_USING): Use TREE_LANG_FLAG_0 accessor.
	(ATTR_IS_DEPENDENT): Likewise.
	(ARGUMENT_PACK_INCOMPLETE_P): Use TREE_ADDRESSABLE instead of
	TREE_LANG_FLAG_0 on TREE_VECs.

	* tree.h (struct tree_base): Add union to make it possible to
	re-use the upper 4 bytes for tree codes that do not need as
	many flags as others.  Move visited and default_def_flag to
	common bits section in exchange for saturating_flag and
	unsigned_flag.  Add SSA name version and tree vec length
	fields here.
	(struct tree_vec): Remove length field here.
	(struct tree_ssa_name): Remove version field here.

From-SVN: r190558
2012-08-21 10:03:38 +00:00
Hariharan Sandanagobalane
12d876079a MAINTAINERS (Write After Approval): Add myself.
* MAINTAINERS (Write After Approval): Add myself.
        (picochip port): Remove myself.

From-SVN: r190557
2012-08-21 09:59:59 +00:00
Jan Hubicka
2daffc4799 re PR fortran/48636 (Enable more inlining with -O2 and higher)
PR fortran/48636
	* ipa-inline.c (want_inline_small_function_p): Take loop_iterations hint.
	(edge_badness): Likewise.
	* ipa-inline.h (inline_hints_vals): Add INLINE_HINT_loop_iterations.
	(inline_summary): Add loop_iterations.
	* ipa-inline-analysis.c: Include tree-scalar-evolution.h.
	(dump_inline_hints): Dump loop_iterations.
	(reset_inline_summary): Free loop_iterations.
	(inline_node_duplication_hook): Update loop_iterations.
	(dump_inline_summary): Dump loop_iterations.
	(will_be_nonconstant_expr_predicate): New function.
	(estimate_function_body_sizes): Analyze loops.
	(estimate_node_size_and_time): Set hint loop_iterations.
	(inline_merge_summary): Merge loop iterations.
	(inline_read_section): Stream in loop_iterations.
	(inline_write_summary): Stream out loop_iterations.

From-SVN: r190556
2012-08-21 06:54:01 +00:00
Ian Lance Taylor
e162e288ec mksysinfo: Fix syscall.F_GETLK and friends for 32-bit x86.
From-SVN: r190554
2012-08-21 05:29:30 +00:00
GCC Administrator
bb51debe06 Daily bump.
From-SVN: r190552
2012-08-21 00:18:14 +00:00
Oleg Endo
f76ea20802 Fix PR numbers for ChangeLog entries.
From-SVN: r190547
2012-08-20 21:25:17 +00:00
Florian Weimer
4a84253c98 Fix PR C++/19351: integer overflow in operator new[]
2012-08-20  Florian Weimer  <fweimer@redhat.com>

	PR c++/19351
	* call.c (build_operator_new_call): Add size_check argument and
	evaluate it.
	* cp-tree.h (build_operator_new_call): Adjust declaration.
	* init.c (build_new_1): Compute array size check and apply it.

2012-08-10  Florian Weimer  <fweimer@redhat.com>

	PR c++/19351
	* g++.dg/init/new38.C: New test.
	* g++.dg/init/new39.C: New test.

From-SVN: r190546
2012-08-20 23:13:23 +02:00
Oleg Endo
5592815a88 re PR rtl-optimization/50489 ([UPC/IA64] mis-schedule of MEM ref with -ftree-vectorize and -fschedule-insns2)
PR target/50489
	* config/sh/sh.md (rotcr, *rotcr, shar, shlr): New insns and splits.
	(ashrdi3_k, lshrdi3_k): Rewrite as insn_and_split.
	* config/sh/sh.c (sh_lshrsi_clobbers_t_reg_p): New function.
	* config/sh/sh-protos.h (sh_lshrsi_clobbers_t_reg_p): Declare it.

	PR target/50489
	* gcc.target/sh/pr54089-1.c: New.

From-SVN: r190545
2012-08-20 20:54:20 +00:00
Oleg Endo
6774855070 re PR target/51244 ([SH] Inefficient conditional branch and code around T bit)
PR target/51244
	* config/sh/sh.md (*cset_zero): New insns.

	PR target/51244
	* gcc.target/sh/pr51244-11.c: New.

From-SVN: r190544
2012-08-20 20:51:06 +00:00
Mark Wielaard
413de8e5c7 dwarf2out.c: For DWARF 4+, output DW_AT_high_pc as constant offset.
* dwarf2out.h (enum dw_val_class): Add dw_val_class_high_pc.
        * dwarf2out.c (dw_val_equal_p): Handle dw_val_class_high_pc.
        (add_AT_low_high_pc): New function.
        (AT_lbl): Handle dw_val_class_high_pc.
        (print_die): Likewise.
        (attr_checksum): Likewise.
        (attr_checksum_ordered): Likewise.
        (same_dw_val_p): Likewise.
        (size_of_die): Likewise.
        (value_format): Likewise.
        (output_die): Likewise.
        (gen_subprogram_die): Use add_AT_low_high_pc.
        (add_high_low_attributes): Likewise.
        (dwarf2out_finish): Likewise.

From-SVN: r190543
2012-08-20 20:27:46 +00:00
Tobias Burnus
ed0ba472c6 re PR fortran/54301 (Add optional warning if pointer assigning a local variable to a nonlocal pointer)
2012-08-20  Tobias Burnus  <burnus@net-b.de>

        PR fortran/54301
        * expr.c (gfc_check_pointer_assign): Warn when a pointer,
        which is a function result, might outlive its target.

2012-08-20  Tobias Burnus  <burnus@net-b.de>

        PR fortran/54301
        * gfortran.dg/warn_target_lifetime_2.f90: New.

From-SVN: r190542
2012-08-20 21:49:46 +02:00
Jakub Jelinek
07bc8ae8ab re PR rtl-optimization/54294 ([alpha] Bootstrap comparison failure due to fwprop handling of debug insns)
PR rtl-optimization/54294
	* fwprop.c (all_uses_available_at): Ignore debug insns in between
	def_insn and target_insn when checking whether the shortcut is
	possible.

From-SVN: r190541
2012-08-20 20:56:49 +02:00
Eric Botcazou
59e08d4f09 * config/sparc/sparc.h (MAX_FIXED_MODE_SIZE): Define.
From-SVN: r190540
2012-08-20 18:50:13 +00:00
Paolo Carlini
d952d7ad31 re PR c++/10416 ('unused variable' warning ignores ctor/dtor side-effects)
/cp
2012-08-20  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/10416
	* decl.c (poplevel): Check TYPE_HAS_NONTRIVIAL_DESTRUCTOR for
	Wunused_variable too.

/testsuite
2012-08-20  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/10416
	* g++.dg/warn/Wunused-var-17.C: New.

From-SVN: r190538
2012-08-20 17:38:53 +00:00
Patrick Marlier
d88513eaf7 re PR middle-end/53992 (Combining -fopenmp and -fgnu-tm results in segfault or misbehaving binaries)
gcc/
2012-08-20  Patrick Marlier  <patrick.marlier@gmail.com>

	PR middle-end/53992
	* omp-low.c (lower_omp_1): Handle GIMPLE_TRANSACTION.

testsuite/
2012-08-20  Patrick Marlier  <patrick.marlier@gmail.com>

	PR middle-end/53992
	* gcc.dg/gomp/pr53992.c: New test.

From-SVN: r190536
2012-08-20 16:22:17 +00:00
Diego Novillo
e3b3505750 Fix -ftime-report for C++ lookup.
Found this while running -ftime-report on a largish C++ source file.
We need to start TV_NAME_LOOKUP conditionally inside poplevel()
because it may be called from another lookup routine that already has
TV_NAME_LOOKUP going.

Tested on x86_64.  Committed to trunk.

2012-08-20  Diego Novillo  <dnovillo@google.com>

	* decl.c (poplevel): Start TV_NAME_LOOKUP conditionally.

From-SVN: r190535
2012-08-20 10:23:32 -04:00
Richard Earnshaw
eb83633a81 re PR tree-optimization/54295 (Widening multiply-accumulate operation uses wrong value extension)
PR tree-ssa/54295
	* tree-ssa-math-opts.c (is_widening_mult_rhs_p): Delete rhs_code
	declaration and setter.

From-SVN: r190534
2012-08-20 14:13:16 +00:00
Richard Earnshaw
7ab6a82801 re PR tree-optimization/54295 (Widening multiply-accumulate operation uses wrong value extension)
PR tree-ssa/54295
	* tree-ssa-math-opts.c (widening_mult_conversion_strippable_p):
	New function.
	(is_widening_mult_rhs_p): Use it.

	* gcc.c-torture/execute/20120817-1.c: New test.

From-SVN: r190533
2012-08-20 12:49:47 +00:00
Joseph Myers
19f7578389 configure.ac (ffs): Check for declaration.
* configure.ac (ffs): Check for declaration.
	* configure, config.in: Regenerate.

From-SVN: r190532
2012-08-20 13:31:25 +01:00
Richard Guenther
45db3141b7 tree-flow.h (register_new_name_mapping): Remove.
2012-08-20  Richard Guenther  <rguenther@suse.de>

	* tree-flow.h (register_new_name_mapping): Remove.
	* tree-into-ssa.c (register_new_name_mapping): Likewise.
	(add_new_name_mapping): Do not push/pop timevar here.
	(create_new_def_for): Instead do it here.  Initialize
	update-ssa here, handle a NULL def.
	* tree-vrp.c (build_assert_expr_for): Use create_new_def_for.

From-SVN: r190531
2012-08-20 12:04:38 +00:00
Richard Earnshaw
c3b3cd8d68 thumb-16bit-ops.c (f): This test uses a 16-bit add instruction.
* gcc.target/arm/thumb-16bit-ops.c (f): This test uses a 16-bit
	add instruction.
	(f2): New test that really does need adds.

From-SVN: r190530
2012-08-20 10:57:45 +00:00
Richard Guenther
71f15f319b name-lookup.c (store_binding_p): New predicate, split out from ...
2012-08-20  Richard Guenther  <rguenther@suse.de>

	* name-lookup.c (store_binding_p): New predicate, split out from ...
	(store_binding): ... here.  Always store binding and require
	target vector with enough space.
	(store_bindings): Collect to store bindings and reserve space
	for them, then store them.
	(store_class_bindings): Likewise.

From-SVN: r190529
2012-08-20 10:27:37 +00:00
Richard Guenther
491e0b9b0c re PR middle-end/54327 (Segmentation fault in init_ggc)
2012-08-20  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/54327
	* gimple-fold.c (get_maxval_strlen): Do not walk use-def chains
	if the use is registered for SSA update.

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

From-SVN: r190528
2012-08-20 10:26:45 +00:00
Jakub Jelinek
081db96050 re PR middle-end/54321 (ice in tree_low_cst at -O3)
PR tree-optimization/54321
	* tree-ssa-forwprop.c (simplify_builtin_call): Pass 0 instead of 1
	as second argument to tree_low_cst call on val2.

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

From-SVN: r190526
2012-08-20 11:12:05 +02:00
Richard Guenther
d17fd79ca1 gimple.h (gimple_statement_base): Annotate with GTY chain_next.
2012-08-20  Richard Guenther  <rguenther@suse.de>

	* gimple.h (gimple_statement_base): Annotate with GTY chain_next.

From-SVN: r190525
2012-08-20 09:03:20 +00:00
Richard Guenther
e7eec276ff re PR bootstrap/54326 (GCC does not build with G++ version 3.4.0)
2012-08-20  Richard Guenther  <rguenther@suse.de>

	PR bootstrap/54326
	* genoutput.c (note_constraint): Properly use CONST_CAST.

From-SVN: r190524
2012-08-20 07:49:41 +00:00
Tobias Burnus
f657024b85 re PR fortran/54301 (Add optional warning if pointer assigning a local variable to a nonlocal pointer)
2012-08-20  Tobias Burnus  <burnus@net-b.de>

        PR fortran/54301
        * expr.c (gfc_check_pointer_assign): Warn when the pointer
        might outlive its target.
        * gfortran.h (struct gfc_option_t): Add warn_target_lifetime.
        * options.c (gfc_init_options, set_wall, gfc_handle_option):
        handle it.
        * invoke.texi (-Wtarget-lifetime): Document it.
        (-Wall): Implied it.
        * lang.opt (-Wtarget-lifetime): New flag.

2012-08-20  Tobias Burnus  <burnus@net-b.de>

        PR fortran/54301
        * gfortran.dg/warn_target_lifetime_1.f90: New.

From-SVN: r190522
2012-08-20 07:47:46 +02:00
GCC Administrator
a15f1338f9 Daily bump.
From-SVN: r190521
2012-08-20 00:17:46 +00:00
Jan-Benedict Glaw
735c4ae393 * ChangeLog: Remove entry that shouldn't be there.
From-SVN: r190518
2012-08-19 19:15:45 +00:00
Joseph Myers
d246814197 crtstuff.c (USE_PT_GNU_EH_FRAME): Define for systems using glibc even if inhibit_libc.
* crtstuff.c (USE_PT_GNU_EH_FRAME): Define for systems using glibc
	even if inhibit_libc.

From-SVN: r190517
2012-08-19 16:11:40 +01:00
Thomas Koenig
cf21551eac re PR fortran/54298 (Add warning when doing equal/nonequal floating-point comparisons)
2012-08-19  Thomas König  <tkoenig@gcc.gnu.org>

	PR fortran/54298
	* gfortran.h (struct gfc_option_t): Add warn_compare_reals.
	* lang.opt:  Add Wcompare-reals.
	* invoke.texi:  Document -Wcompare-reals.
	* resolve.c (resolve_operator):  If -Wcompare-reals is in effect,
	warn about equality/inequality comparisions for REAL and COMPLEX.
	* options.c (gfc_init_options):  Set warn_compare_reals.
	(set_Wall):  Include warn_compare_reals in Wall.
	(gfc_handle_option):  Handle Wcompare_reals.

2012-08-19  Thomas König  <tkoenig@gcc.gnu.org>

	PR fortran/54298
	* gfortran.dg/real_compare_1.f90:  New test case.
	* gfortran.dg/bessel_5.f90  Add -Wno-compare-reals to options.

From-SVN: r190516
2012-08-19 15:05:41 +00:00
Eric Botcazou
5da8c01106 layout.adb (Set_Elem_Alignment): Cap the alignment of access types to that of a regular access type for...
* layout.adb (Set_Elem_Alignment): Cap the alignment of access types
	to that of a regular access type for non-strict-alignment platforms.
	* gcc-interface/utils.c (finish_fat_pointer_type): Do not set the
	alignment for non-strict-alignment platforms.

From-SVN: r190515
2012-08-19 14:17:22 +00:00
Eric Botcazou
08cb7d42bf decl.c (gnat_to_gnu_entity): Use proper dummy type for the temporary COMPONENT_REF built for a derived...
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Use proper
	dummy type for the temporary COMPONENT_REF built for a derived tagged
	type with discriminant.

From-SVN: r190514
2012-08-19 14:07:58 +00:00
Mikael Morin
594d6faafa Make-lang.in: Fix typo.
cp/
	* Make-lang.in: Fix typo.

From-SVN: r190513
2012-08-19 10:03:10 +00:00
Jan-Benedict Glaw
dfcb551435 * ChangeLog: Fix whitespace.
From-SVN: r190512
2012-08-19 08:31:25 +00:00
Nick Clifton
220e70dff0 re PR c/54306 (ARM iwmmxt2 commit adds imbalanced #endif in mmintrin.h)
PR target/54306
	* config/arm/mmintrin.h: Remove spurious #endif.

From-SVN: r190511
2012-08-19 07:11:35 +00:00
Jan-Benedict Glaw
92f7f5fd57 avr-log.c (avr_log_vadump): Properly use int-promoted enum values.
* config/avr/avr-log.c (avr_log_vadump): Properly use
        int-promoted enum values.
        * config/avr/avr.h (struct mcu_type_s): Change `arch' from
        int to enum avr_arch.
        * config/avr/gen-avr-mmcu-texi.c (main): Use correct initializer.

From-SVN: r190510
2012-08-19 10:15:03 +04:00
Jan Hubicka
37678631a8 re PR lto/45375 ([meta-bug] Issues with building Mozilla (i.e. Firefox) with LTO)
PR lto/45375
	* ipa-inline.c (want_inline_small_function_p): Bypass
	inline limits for hinted functions.
	(edge_badness): Dump hints; decrease badness for hinted funcitons.
	* ipa-inline.h (enum inline_hints_vals): New enum.
	(inline_hints): New type.
	(edge_growth_cache_entry): Add hints.
	(dump_inline_summary): Update.
	(dump_inline_hints): Declare.
	(do_estimate_edge_hints): Declare.
	(estimate_edge_hints): New inline function.
	(reset_edge_growth_cache): Update.
	* predict.c (cgraph_maybe_hot_edge_p): Do not ice on indirect edges.
	* ipa-inline-analysis.c (dump_inline_hints): New function.
	(estimate_edge_devirt_benefit): Return true when function should be
	hinted.
	(estimate_calls_size_and_time): New hints argument; set it when
	devritualization happens.
	(estimate_node_size_and_time): New hints argument.
	(do_estimate_edge_time): Cache hints.
	(do_estimate_edge_growth): Update.	
	(do_estimate_edge_hints): New function

From-SVN: r190509
2012-08-19 05:55:20 +00:00
GCC Administrator
ecfdae6f11 Daily bump.
From-SVN: r190508
2012-08-19 00:17:52 +00:00
John David Anglin
b216b86b7e re PR middle-end/53823 (FAIL: gcc.c-torture/execute/930921-1.c execution at -O0 and -O1)
PR middle-end/53823
	* expmed.c (expand_mult): Skip synth_mult for negative coefficients
	if the mode is larger than a wide int and it is too costly to multiply
	by a positive multiplier and negate the result.

From-SVN: r190505
2012-08-18 23:16:53 +00:00
Mikael Morin
b44e2c4cfb Add the working testcase from PR fortran/39290.
testsuite/
	PR fortran/39290
	* gfortran.dg/interface_37.f90: New test.

From-SVN: r190504
2012-08-18 22:00:10 +00:00
Steven Bosscher
a9c283a506 sparseset.c (sparseset_alloc): Use non-clearing allocation.
* sparseset.c (sparseset_alloc): Use non-clearing allocation.  Tell
	valgrind not to worry about reading from unitialized memory.

From-SVN: r190503
2012-08-18 13:44:00 +00:00
Steven Bosscher
e0de76d8ad re PR middle-end/54313 (GCC fails to bootstrap with MALLOC_PERTURB – Segfault in bitmap_obstack_free)
PR middle-end/54313
	* dse.c (dse_step7): Don't free kill_on_calls bitmap, it is
	freed when its obstack is release.

From-SVN: r190502
2012-08-18 10:35:36 +00:00
Andrew Pinski
32b2d8f3a6 alloc-pool.c (pool_alloc): Add valgrind markers.
2012-08-18  Andrew Pinski  <pinskia@gmail.com>

	* alloc-pool.c (pool_alloc): Add valgrind markers.
	(pool_free): Likewise.

From-SVN: r190501
2012-08-18 01:24:06 -07:00
Walter Lee
b5719a04fa Define stubs for feedback instrumentation.
* config/tilegx/feedback.h (FEEDBACK_ENTER_EXPLICIT): Define.
	(FEEDBACK_ENTER): Define.
	(FEEDBACK_REENTER): Define.
	(FEEDBACK_ENTRY): Define.
	* config/tilepro/feedback.h: (FEEDBACK_ENTER_EXPLICIT): Define.
	(FEEDBACK_ENTER): Define.
	(FEEDBACK_REENTER): Define.
	(FEEDBACK_ENTRY): Define.

From-SVN: r190499
2012-08-18 03:21:55 +00:00
GCC Administrator
4b937d01f8 Daily bump.
From-SVN: r190498
2012-08-18 00:18:18 +00:00
Andreas Schwab
c9ac76ae53 floatformat.c (floatformat_to_double): Correctly handle numbers between 1 and 2.
* floatformat.c (floatformat_to_double): Correctly handle numbers
between 1 and 2.  Simplify handling of denormal number.
(main): Test with 1.1.

From-SVN: r190493
2012-08-17 21:56:48 +00:00
H.J. Lu
e327d1a362 Define MAX_FIXED_MODE_SIZE/TARGET_MEMBER_TYPE_FORCES_BLK for i386
gcc/

	PR target/20020
	* config/i386/i386.c (ix86_member_type_forces_blk): New function.
	(TARGET_MEMBER_TYPE_FORCES_BLK): New macro.

	* config/i386/i386.h (MAX_FIXED_MODE_SIZE): New macro.

gcc/testsuite/

	PR target/20020
	* gcc.target/i386/pr20020-1.c: New test.
	* gcc.target/i386/pr20020-2.c: Likewise.
	* gcc.target/i386/pr20020-3.c: Likewise.

Co-Authored-By: Gary Funck <gary@intrepid.com>

From-SVN: r190492
2012-08-17 12:59:46 -07:00
Marc Glisse
fd9da2c807 simplify-rtx.c (simplify_binary_operation_1): Optimize shuffle of a concatenation.
2012-08-17  Marc Glisse  <marc.glisse@inria.fr>

gcc/
	* simplify-rtx.c (simplify_binary_operation_1): Optimize shuffle of
	a concatenation.

gcc/testsuite/
	* gcc.target/i386/perm-concat.c: New test.

From-SVN: r190490
2012-08-17 17:53:57 +00:00
H.J. Lu
d9886a9e04 Convert MEMBER_TYPE_FORCES_BLK to target hook
* stor-layout.c (compute_record_mode): Replace
	MEMBER_TYPE_FORCES_BLK with targetm.member_type_forces_blk.
	(layout_type): Likewise.

	* system.h: Poison MEMBER_TYPE_FORCES_BLK.

	* target.def (member_type_forces_blk): New target hook.

	* targhooks.c (default_member_type_forces_blk): New.
	* targhooks.h (default_member_type_forces_blk): Likewise.

	* doc/tm.texi.in (MEMBER_TYPE_FORCES_BLK): Removed.
	(TARGET_MEMBER_TYPE_FORCES_BLK): New hook.
	* doc/tm.texi: Regenerated.

	* config/ia64/hpux.h (MEMBER_TYPE_FORCES_BLK): Removed.

	* config/ia64/ia64.c (ia64_member_type_forces_blk): New
	function.
	(TARGET_MEMBER_TYPE_FORCES_BLK): New macro.

	* config/rs6000/rs6000.c (TARGET_MEMBER_TYPE_FORCES_BLK): New
	macro.
	(rs6000_member_type_forces_blk): New function.

	* config/rs6000/rs6000.h (MEMBER_TYPE_FORCES_BLK): Removed.

	* config/xtensa/xtensa.c (xtensa_member_type_forces_blk): New
	function.
	(TARGET_MEMBER_TYPE_FORCES_BLK): New macro.

	* config/xtensa/xtensa.h (MEMBER_TYPE_FORCES_BLK): Removed.

From-SVN: r190488
2012-08-17 08:50:44 -07:00