gcc.git
9 years agoc-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
Marek Polacek [Fri, 25 Sep 2015 11:19:11 +0000 (11:19 +0000)]
c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.

* c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
(ubsan_instrument_shift): Likewise.

* c-c++-common/ubsan/bounds-11.c: New test.
* c-c++-common/ubsan/bounds-12.c: New test.

From-SVN: r228114

9 years agore PR sanitizer/64906 (-fsanitize=integer-divide-by-zero creates false -Wmaybe-uninit...
Marek Polacek [Fri, 25 Sep 2015 09:50:29 +0000 (09:50 +0000)]
re PR sanitizer/64906 (-fsanitize=integer-divide-by-zero creates false -Wmaybe-uninitialized warning)

PR sanitizer/64906
* c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.

* c-c++-common/ubsan/pr64906.c: New test.

From-SVN: r228112

9 years agoChange IA MCU processor from iamcu to lakemount
H.J. Lu [Fri, 25 Sep 2015 00:18:21 +0000 (00:18 +0000)]
Change IA MCU processor from iamcu to lakemount

The first IA MCU processor will be Lakemount.  This patch changes IA MCU
processor name from iamcu to lakemount.

gcc/

* config.gcc (x86_archs): Replace iamcu with lakemount.
(with_cpu): Likewise.
(with_arch): Likewise.
* doc/invoke.texi: Likewise.
* config/i386/i386-c.c (ix86_target_macros_internal): Replace
PROCESSOR_IAMCU with PROCESSOR_LAKEMOUNT.  Replace
__tune_iamcu__ with __tune_lakemount__.
* config/i386/i386.c (iamcu_cost): Renamed to ...
(lakemount_cost): This.
(m_IAMCU): Renamed to ...
(m_LAKEMOUNT): This.
(initial_ix86_arch_features): Replace m_IAMCU with m_LAKEMOUNT.
(processor_target_table): Replace "iamcu" with "lakemount".
(processor_alias_table): Likewise.
(ix86_issue_rate): Replace PROCESSOR_IAMCU with
PROCESSOR_LAKEMOUNT.
(ix86_adjust_cost): Likewise.
(ia32_multipass_dfa_lookahead): Likewise.
* config/i386/i386.h (processor_type): Likewise.
* config/i386/x86-tune.def: Replace m_IAMCU with m_LAKEMOUNT.

gcc/testsuite/

* gcc.target/i386/pr66749.c (dg-options): Replace -mtune=iamcu
with -mtune=lakemount.
* gcc.target/i386/pr66821.c (dg-options): Likewise.
* gcc.target/i386/pr67329.c (dg-options): Likewise.

From-SVN: r228109

9 years agoDaily bump.
GCC Administrator [Fri, 25 Sep 2015 00:16:11 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r228108

9 years agopa-linux.h (HAVE_sync_compare_and_swapdi): Define.
John David Anglin [Fri, 25 Sep 2015 00:01:34 +0000 (00:01 +0000)]
pa-linux.h (HAVE_sync_compare_and_swapdi): Define.

* config/pa/pa-linux.h (HAVE_sync_compare_and_swapdi): Define.
* config/pa/pa-protos.h (pa_maybe_emit_compare_and_swap_exchange_loop):
Declare.
* config/pa/pa.c (pa_init_libfuncs): Init sync libfuncs up to 8 bytes.
(pa_expand_compare_and_swap_loop): New.
(pa_maybe_emit_compare_and_swap_exchange_loop): New.
* config/pa/pa.md (atomic_storeqi, atomic_storehi, atomic_storesi,
atomic_storesf, atomic_loaddf, atomic_storedf): New expanders.
(atomic_loaddf_1, atomic_storedf_1): New insn patterns.
(atomic_loaddi, atomic_loaddi_1, atomic_storedi, atomic_storedi_1):
Revise.

From-SVN: r228104

9 years agore PR other/57195 (Mode attributes with specific mode iterator can not be used as...
Michael Collison [Thu, 24 Sep 2015 23:26:50 +0000 (23:26 +0000)]
re PR other/57195 (Mode attributes with specific mode iterator can not be used as mode iterators in *.md files)

2015-09-24  Michael Collison  <michael.collison@linaro.org>

PR other/57195
* read-md.c (read_name): Allow mode iterators inside angle
brackets in rtl expressions.

From-SVN: r228102

9 years agore PR target/61578 (Code size increase for ARM thumb compared to 4.8.x when compiling...
Vladimir Makarov [Thu, 24 Sep 2015 20:40:30 +0000 (20:40 +0000)]
re PR target/61578 (Code size increase for ARM thumb compared to 4.8.x when compiling with -Os)

2015-09-24  Vladimir Makarov  <vmakarov@redhat.com>

PR target/61578
* ira-color.c (update_allocno_cost): Add parameter.
(update_costs_from_allocno): Decrease conflict cost.  Pass the new
parameter.

From-SVN: r228097

9 years agofdiagnostics-color=never does not disable color for some diagnostics
Manuel López-Ibáñez [Thu, 24 Sep 2015 16:37:43 +0000 (16:37 +0000)]
fdiagnostics-color=never does not disable color for some diagnostics

Actually, I was trying to reject non-warning options as argument to
-Werror=. However, the new test fails because -fdiagnostics-color=never is
always placed by the driver after the warning options when calling the compiler
proper. This patch prunes all -fdiagnostics-color from the command-line but the
last one, which is moved to the first position.

gcc/ChangeLog:

2015-09-24  Manuel López-Ibáñez  <manu@gcc.gnu.org>

PR driver/67640
* opts-common.c (prune_options): Discard all -fdiagnostics-color
but the last one, which is moved to the front to be processed
first.
* opts.c (enable_warning_as_error): Reject options that do not
control warnings.

gcc/testsuite/ChangeLog:

2015-09-24  Manuel López-Ibáñez  <manu@gcc.gnu.org>

PR driver/67640
* gcc.dg/Werror-13.c: New test.

From-SVN: r228094

9 years ago[AArch64] Handle const address in aarch64_print_operand
Jiong Wang [Thu, 24 Sep 2015 16:04:12 +0000 (16:04 +0000)]
[AArch64] Handle const address in aarch64_print_operand

2015-09-24  Jiong Wang  <jiong.wang@arm.com>

* config/aarch64/aarch64.c (aarch64_print_operand): Add "CONST" support.

From-SVN: r228093

9 years ago[AArch64] Delete aarch64_symbol_context which is not used
Jiong Wang [Thu, 24 Sep 2015 16:02:08 +0000 (16:02 +0000)]
[AArch64] Delete aarch64_symbol_context which is not used

2015-09-24  Jiong Wang  <jiong.wang@arm.com>

* config/aarch64/aarch64-protos.h (aarch64_symbol_context): Delete.
* config/aarch64/aarch64.c (aarch64_expand_mov_immediate): Likewise.
(aarch64_cannot_force_const_mem): Likewise.
(aarch64_classify_address): Likewise.
(aarch64_classify_symbolic_expression): Likewise.
(aarch64_print_operand): Likewise.
(aarch64_classify_symbol): Likewise.
(aarch64_mov_operand_p): Likewise.
* config/aarch64/predicates.md (aarch64_valid_symref): Likewise.
(aarch64_mov_operand): Likewise.

From-SVN: r228092

9 years agoLeave moved-from std::deque in a valid state
Jonathan Wakely [Thu, 24 Sep 2015 15:46:24 +0000 (16:46 +0100)]
Leave moved-from std::deque in a valid state

PR libstdc++/67707
* include/bits/stl_deque.h (_Deque_base::_M_move_impl): Initialize
empty object.
* testsuite/23_containers/deque/allocator/move.cc: Check moved-from
deque.

From-SVN: r228090

9 years agoFix aarch64/target_attr_10 test following r227997.
Szabolcs Nagy [Thu, 24 Sep 2015 13:41:52 +0000 (13:41 +0000)]
Fix aarch64/target_attr_10 test following r227997.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/target_attr_10.c (foo): Use dg-message for note.

From-SVN: r228088

9 years agoruntime: Fix recent lfstack change on Solaris.
Ian Lance Taylor [Thu, 24 Sep 2015 13:33:20 +0000 (13:33 +0000)]
runtime: Fix recent lfstack change on Solaris.

    Reviewed-on: https://go-review.googlesource.com/14922

From-SVN: r228087

9 years agors6000: Fix -mdebug=stack code for spe_gp_offset
Segher Boessenkool [Thu, 24 Sep 2015 12:43:43 +0000 (14:43 +0200)]
rs6000: Fix -mdebug=stack code for spe_gp_offset

2015-09-23  Segher Boessenkool  <segher@kernel.crashing.org>

* config/rs6000/rs6000.c (debug_stack_info): Invert the test
for info->spe_gp_size.

From-SVN: r228086

9 years agore PR lto/67699 (ICE (segfault) compiling a const array with -flto)
Richard Biener [Thu, 24 Sep 2015 11:01:14 +0000 (11:01 +0000)]
re PR lto/67699 (ICE (segfault) compiling a const array with -flto)

2015-09-24  Richard Biener  <rguenther@suse.de>

PR lto/67699
* lto-cgraph.c (compute_ltrans_boundary): Do not stream
abstract origins.

* g++.dg/pr67699.C: New testcase.

From-SVN: r228084

9 years agoARM: fp16 Fix PR 67624 - Incorrect conversion of float Infinity to __fp16
Richard Earnshaw [Thu, 24 Sep 2015 09:40:06 +0000 (09:40 +0000)]
ARM: fp16 Fix PR 67624 - Incorrect conversion of float Infinity to __fp16

PR libgcc/67624
libgcc:
* config/arm/fp16.c (__gnu_f2h_internal): Handle infinity correctly.
gcc/testsuite:
* gcc.target/arm/fp16-inf.c: New test.

From-SVN: r228082

9 years agoAdditional changes to switch from gimple to gimple *
Thomas Schwinge [Thu, 24 Sep 2015 09:27:12 +0000 (11:27 +0200)]
Additional changes to switch from gimple to gimple *

gcc/
* tree-object-size.c (plus_stmt_object_size)
(cond_expr_object_size): Change the formal parameters from gimple
to gimple *.
* tree-ssa-sccvn.h (vn_nary_op_insert_stmt): Likewise.
* tree-ssa-sccvn.c (vn_nary_op_insert_stmt): Make it static.
* tree-ssa-sccvn.h (vn_nary_op_insert_stmt): Don't declare.

From-SVN: r228080

9 years agoavx512vbmi-check.h (main): Fix register name while checking for AVX-512VBMI presence.
Kirill Yukhin [Thu, 24 Sep 2015 09:03:57 +0000 (09:03 +0000)]
avx512vbmi-check.h (main): Fix register name while checking for AVX-512VBMI presence.

gcc/testsuite/
* gcc.target/i386/avx512vbmi-check.h (main): Fix register
name while checking for AVX-512VBMI presence.

From-SVN: r228079

9 years agoSupport PIE on Solaris
Rainer Orth [Thu, 24 Sep 2015 09:00:22 +0000 (09:00 +0000)]
Support PIE on Solaris

gcc/testsuite:
* lib/target-supports.exp (check_effective_target_pie): Check for
PIE support on Solaris 11.x and 12.

libgcc:
* config.host (*-*-solaris2*): Add t-crtstuff-pic to tmake_file.
Add crtbeginS.o, crtendS.o to extra_parts if libgcc_cv_solaris_crts.
* config/sol2/gmon.c: (monstartup): Don't write trailing NUL of
messages.
(internal_mcount): Likewise.
* config/sol2/t-sol2 (crtp.o, crtpg.o, gmon.o): Compile with
crt_compile, add CRTSTUFF_T_CFLAGS_S.

gcc:
* configure.ac (gcc_cv_ld_pie): Check for gld >= 2.26 on Solaris.
Check for ld -type pie on Solaris 11.x and 12.
* configure: Regenerate.
* config.in: Regenerate.

* gcc.c (LD_PIE_SPEC): Allow redefinition.

* config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Define.
(STARTFILE_SPEC): Use it.
(ENDFILE_CRTEND_SPEC): Define.
(ENDFILE_SPEC): Use it and ENDFILE_ARCH_SPEC.
(SUBTARGET_EXTRA_SPECS): Add STARTFILE_CRTBEGIN_SPEC,
ENDFILE_ARCH_SPEC, ENDFILE_CRTEND_SPEC.
[HAVE_LD_PIE && HAVE_SOLARIS_CRTS] (LD_PIE_SPEC): Define.
(!(HAVE_LD_PIE && HAVE_SOLARIS_CRTS)] (LINK_PIE_SPEC): Define.
* config/i386/sol2.h (ENDFILE_SPEC): Remove.
(ENDFILE_ARCH_SPEC): Define.
* config/sparc/sol2.h (ENDFILE_ARCH_SPEC): Define.

From-SVN: r228078

9 years agoUse CRTs provided by Solaris
Rainer Orth [Thu, 24 Sep 2015 08:51:39 +0000 (08:51 +0000)]
Use CRTs provided by Solaris

gcc:
* configure.ac (gcc_cv_solaris_crts): New test.
* configure. Regenerate.
* config.in: Regenerate.
* config/sol2.h (STARTFILE_SPEC): Simplify, provide
HAVE_SOLARIS_CRTS variant.

libgcc:
* configure.ac (libgcc_cv_solaris_crts): New test.
* configure: Regenerate.
* config.in: Regenerate.
* config/sol2/crtp.c, config/sol2/crtpg.c: New files.
* config/gmon-sol2.c: Rename to ...
* config/sol2/gmon.c: ... this.
Include auto-target.h.
(internal_mcount): Wrap setup handling in !HAVE_SOLARIS_CRTS.
* config/t-sol2: Rename to ...
* config/sol2/t-sol2: ... this.
(gmon.o): Reflect renaming.
(crtp.o, crtpg.o): New rules.
* config.host (*-*-solaris2*): Reflect renaming.
Use system CRTs if present.
Remove default CRT case.

From-SVN: r228077

9 years ago[tree-inline][obvious] Delete redundant count_insns_seq
Kyrylo Tkachov [Thu, 24 Sep 2015 08:25:13 +0000 (08:25 +0000)]
[tree-inline][obvious] Delete redundant count_insns_seq

* tree-inline.h (count_insns_seq): Delete prototype.
(estimate_num_insns_seq): Define prototype.
* tree-inline.c (count_insns_seq): Delete.
(estimate_num_insns_seq): Remove static qualifier.
* tree-eh.c (decide_copy_try_finally): Replace use of count_insns_seq
with estimate_num_insns_seq.

From-SVN: r228075

9 years agotree-ssa-sccvn.h (vn_reference_op_struct): Add clique and base members.
Richard Biener [Thu, 24 Sep 2015 07:35:55 +0000 (07:35 +0000)]
tree-ssa-sccvn.h (vn_reference_op_struct): Add clique and base members.

2015-09-24  Richard Biener  <rguenther@suse.de>

* tree-ssa-sccvn.h (vn_reference_op_struct): Add clique and base
members.
* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Record clique
and base for MEM_REF and TARGET_MEM_REF.  Handle BIT_FIELD_REF
offset.
(ao_ref_init_from_vn_reference): Record clique and base in the
built base.
* tree-ssa-pre.c (create_component_ref_by_pieces_1): Likewise

* g++.dg/tree-ssa/restrict3.C: New testcase.

From-SVN: r228074

9 years agore PR c/48885 (missed optimization with restrict qualifier?)
Richard Biener [Thu, 24 Sep 2015 07:34:47 +0000 (07:34 +0000)]
re PR c/48885 (missed optimization with restrict qualifier?)

2015-09-24  Richard Biener  <rguenther@suse.de>

PR tree-optimization/48885
* tree-ssa-structalias.c (visit_loadstore): Handle default defs
as not including any restrict tags from other pointers.

* gcc.dg/tree-ssa/restrict-6.c: New testcase.

From-SVN: r228073

9 years agoChangeLog: Fix whitespace.
Uros Bizjak [Thu, 24 Sep 2015 06:30:52 +0000 (08:30 +0200)]
ChangeLog: Fix whitespace.

* ChangeLog: Fix whitespace.
* testsuite/ChangeLog: Ditto.

From-SVN: r228072

9 years agoFix a -Wmisleading-indentation false-negative
Patrick Palka [Thu, 24 Sep 2015 01:55:59 +0000 (01:55 +0000)]
Fix a -Wmisleading-indentation false-negative

gcc/c-family/ChangeLog:

* c-indentation.c (should_warn_for_misleading_indentation):
Compare next_stmt_vis_column with guard_line_first_nws instead
of with guard_line_vis_column.

gcc/testsuite/ChangeLog:

* c-c++-common/Wmisleading-indentation.c: Augment test.

From-SVN: r228071

9 years agoDaily bump.
GCC Administrator [Thu, 24 Sep 2015 00:16:15 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r228070

9 years agolinux-atomic.c (__kernel_cmpxchg2): Reorder error checks.
John David Anglin [Wed, 23 Sep 2015 23:27:15 +0000 (23:27 +0000)]
linux-atomic.c (__kernel_cmpxchg2): Reorder error checks.

* config/pa/linux-atomic.c (__kernel_cmpxchg2): Reorder error checks.
(__sync_fetch_and_##OP##_##WIDTH): Change result to match type of
__kernel_cmpxchg2.
(__sync_##OP##_and_fetch_##WIDTH): Likewise.
(__sync_val_compare_and_swap_##WIDTH): Likewise.
(__sync_bool_compare_and_swap_##WIDTH): Likewise.
(__sync_lock_test_and_set_##WIDTH): Likewise.
(__sync_lock_release_##WIDTH): Likewise.
(__sync_fetch_and_##OP##_4): Change result to match type of
__kernel_cmpxchg.
(__sync_##OP##_and_fetch_4): Likewise.
(__sync_val_compare_and_swap_4): Likewise.
(__sync_bool_compare_and_swap_4): likewise.
(__sync_lock_test_and_set_4): Likewise.
(__sync_lock_release_4): Likewise.
(FETCH_AND_OP_2): Add long long variants.
(OP_AND_FETCH_2): Likewise.
(COMPARE_AND_SWAP_2 ): Likewise.
(SYNC_LOCK_TEST_AND_SET_2): Likewise.
(SYNC_LOCK_RELEASE_2): Likewise.
(__sync_bool_compare_and_swap_##WIDTH): Correct return.

From-SVN: r228065

9 years agore PR go/67695 (Please improve POSIX shell compatibility of libgo/mksysinfo.sh)
Ian Lance Taylor [Wed, 23 Sep 2015 20:43:46 +0000 (20:43 +0000)]
re PR go/67695 (Please improve POSIX shell compatibility of libgo/mksysinfo.sh)

PR go/67695
    mksysinfo.sh: Use = with test rather than ==.

    Fixes GCC PR 67695.

    Reviewed-on: https://go-review.googlesource.com/14858

From-SVN: r228064

9 years agoFix small typos in the coding rule enforcement warnings.
Ville Voutilainen [Wed, 23 Sep 2015 18:22:21 +0000 (21:22 +0300)]
Fix small typos in the coding rule enforcement warnings.

/cp
2015-09-23  Ville Voutilainen  <ville.voutilainen@gmail.com>

Fix small typos in the coding rule enforcement warnings.
* parser.c (cp_parser_namespace_definition): Replace 'namepace'
with 'namespace'.

/testsuite
2015-09-23  Ville Voutilainen  <ville.voutilainen@gmail.com>

Fix small typos in the coding rule enforcement warnings.
* g++.dg/diagnostic/disable.C: Replace 'namepace'
with 'namespace'.

From-SVN: r228061

9 years agoruntime: rewrite lfstack packing/unpacking to look more like that in Go
Ian Lance Taylor [Wed, 23 Sep 2015 17:07:15 +0000 (17:07 +0000)]
runtime: rewrite lfstack packing/unpacking to look more like that in Go

    Reviewed-on: https://go-review.googlesource.com/13037

From-SVN: r228057

9 years agoFix --enable-offload-targets/-foffload handling, pt. 2
Thomas Schwinge [Wed, 23 Sep 2015 14:52:57 +0000 (16:52 +0200)]
Fix --enable-offload-targets/-foffload handling, pt. 2

gcc/
* gcc.c (handle_foffload_option): Don't lose the trailing NUL
character when appending to offload_targets.

From-SVN: r228054

9 years agoFix --enable-offload-targets/-foffload handling, pt. 1
Thomas Schwinge [Wed, 23 Sep 2015 14:52:50 +0000 (16:52 +0200)]
Fix --enable-offload-targets/-foffload handling, pt. 1

gcc/
* configure.ac (offload_targets, OFFLOAD_TARGETS): Separate
offload targets by commas, not colons.
* config.in: Regenerate.
* configure: Likewise.
* gcc.c (driver::maybe_putenv_COLLECT_LTO_WRAPPER): Due to that,
instead of setting up the default offload targets here...
(process_command): ..., do it here.
libgomp/
* plugin/configfrag.ac (OFFLOAD_TARGETS): Clarify that offload
targets are separated by commas.
* config.h.in: Regenerate.

From-SVN: r228053

9 years agoRefactor omp_reduction_init: omp_reduction_init_op
Thomas Schwinge [Wed, 23 Sep 2015 14:46:55 +0000 (16:46 +0200)]
Refactor omp_reduction_init: omp_reduction_init_op

gcc/
* omp-low.h (omp_reduction_init_op): Declare.
* omp-low.c (omp_reduction_init_op): New, broken out of ...
(omp_reduction_init): ... here.  Call it.
* tree-parloops.c (initialize_reductions): Use
omp_reduction_init_op.

Co-Authored-By: Nathan Sidwell <nathan@codesourcery.com>
From-SVN: r228052

9 years agore PR middle-end/67662 (-fsanitize=undefined cries wolf for X - 1 + X when X is 2...
Richard Biener [Wed, 23 Sep 2015 14:09:48 +0000 (14:09 +0000)]
re PR middle-end/67662 (-fsanitize=undefined cries wolf for X - 1 + X when X is 2**30)

2015-09-23   Richard Biener  <rguenther@suse.de>

PR middle-end/67662
* fold-const.c (fold_binary_loc): Do not reassociate two vars with
undefined overflow unless they will cancel out.

* gcc.dg/ubsan/pr67662.c: New testcase.

From-SVN: r228051

9 years agoAVX-512. Fix emit in '*<mshift><mode>3' pattern.
Kirill Yukhin [Wed, 23 Sep 2015 13:28:12 +0000 (13:28 +0000)]
AVX-512. Fix emit in '*<mshift><mode>3' pattern.

gcc/
 * config/i386/i386.md (define_insn "*<mshift><mode>3"): Fix
 insn emit.

From-SVN: r228050

9 years ago[c-family/49654/49655] reject invalid options in pragma diagnostic
Manuel López-Ibáñez [Wed, 23 Sep 2015 13:07:07 +0000 (13:07 +0000)]
[c-family/49654/49655] reject invalid options in pragma diagnostic

Use find_opt instead of linear search through options in
handle_pragma_diagnostic (PR 49654) and reject non-warning options and
options not valid for the current language (PR 49655).

gcc/testsuite/ChangeLog:

2015-09-23  Manuel López-Ibáñez  <manu@gcc.gnu.org>

PR c/49655
* gcc.dg/pragma-diag-6.c: New test.

gcc/ChangeLog:

2015-09-23  Manuel López-Ibáñez  <manu@gcc.gnu.org>

PR c/49655
* opts.h (write_langs): Declare.
* opts-global.c (write_langs): Make it extern.

gcc/c-family/ChangeLog:

2015-09-23  Manuel López-Ibáñez  <manu@gcc.gnu.org>

PR c/49654
PR c/49655
* c-pragma.c (handle_pragma_diagnostic): Detect non-warning
options and options not valid for the current language.

From-SVN: r228049

9 years agore PR target/67391 ([SH] Convert clrt addc to normal add insn)
Oleg Endo [Wed, 23 Sep 2015 11:55:45 +0000 (11:55 +0000)]
re PR target/67391 ([SH] Convert clrt addc to normal add insn)

gcc/
PR target/67391
* config/sh/sh.md (addsi3, *addsi3_compact): Don't check for overlapping
regs when matching the pattern.

From-SVN: r228046

9 years ago[AArch64] Fix vcvt_high_f64_f32 and vcvt_figh_f32_f64 intrinsics.
James Greenhalgh [Wed, 23 Sep 2015 11:39:48 +0000 (11:39 +0000)]
[AArch64] Fix vcvt_high_f64_f32 and vcvt_figh_f32_f64 intrinsics.

gcc/

* config/aarch64/aarch64-simd.md
(aarch64_float_truncate_hi_v4sf): Rewrite as an expand.
(aarch64_float_truncate_hi_v4sf_le): New.
(aarch64_float_truncate_hi_v4sf_be): Likewise.

gcc/testsuite/

* gcc.target/aarch64/advsimd-intrinsics/vcvt_high_1.c: New.

From-SVN: r228044

9 years agoLimit number of symlinks that canonical() will resolve
Jonathan Wakely [Wed, 23 Sep 2015 11:26:50 +0000 (12:26 +0100)]
Limit number of symlinks that canonical() will resolve

* src/filesystem/ops.cc (canonical): Simplify error handling and
limit number of symlinks that can be resolved.

From-SVN: r228043

9 years agoFix semantics of Filesystem TS directory iterators
Jonathan Wakely [Wed, 23 Sep 2015 11:26:45 +0000 (12:26 +0100)]
Fix semantics of Filesystem TS directory iterators

[class.directory_iterator] p4 and [directory_iterator.members] p4
require that only the default constructor and ignored permission denied
errors can create the end iterator.

* acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Remove _GLIBCXX_
prefix from HAVE_STRUCT_DIRENT_D_TYPE.
* config.h.in: Regenerate.
* configure: Regenerate.
* include/experimental/fs_dir.h (operator==, operator==):
Use owner_before instead of pointer equality.
(directory_iterator(std::shared_ptr<_Dir>, error_code*)): Remove.
* src/filesystem/dir.cc (ErrorCode): Remove.
(_Dir::advance): Change ErrorCode parameter to error_code*, add
directory_options parameter and check it on error.
(opendir): Rename to open_dir to avoid clashing with macro. Change
ErrorCode parameter to error_code*.
(make_shared_dir): Remove.
(native_readdir) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Don't set errno.
(directory_iterator(std::shared_ptr<_Dir>, error_code*)): Remove.
(directory_iterator(const path&, directory_options, error_code*)):
Pass options to _Dir::advance and create non-end iterator on error.
(recursive_directory_iterator(const path&, directory_options,
error_code*)): Clear error_code on ignored error, create non-end
iterator otherwise.
(recursive_directory_iterator::increment): Pass _M_options to
_Dir::advance.
(recursive_directory_iterator::pop): Likewise.
* testsuite/experimental/filesystem/iterators/directory_iterator.cc:
New.
* testsuite/experimental/filesystem/iterators/
recursive_directory_iterator.cc: New.

From-SVN: r228042

9 years agoFix filesystem::create_directories() function
Jonathan Wakely [Wed, 23 Sep 2015 11:25:59 +0000 (12:25 +0100)]
Fix filesystem::create_directories() function

* src/filesystem/ops.cc (is_dot, is_dotdot): Define new helpers.
(create_directories): Fix error handling.
* testsuite/experimental/filesystem/operations/create_directories.cc:
New.

From-SVN: r228041

9 years agotree-ssa-structalias.c (intra_create_variable_infos): Build representatives for all...
Richard Biener [Wed, 23 Sep 2015 11:11:48 +0000 (11:11 +0000)]
tree-ssa-structalias.c (intra_create_variable_infos): Build representatives for all restrict qualified pointer destinations.

2015-09-23  Richard Biener  <rguenther@suse.de>

* tree-ssa-structalias.c (intra_create_variable_infos): Build
representatives for all restrict qualified pointer destinations.

* g++.dg/tree-ssa/restrict2.C: Un-XFAIL testcase.

From-SVN: r228040

9 years agoAVX-512. Add kshift[lr][bwdq]. Fix iterator.
Kirill Yukhin [Wed, 23 Sep 2015 07:08:56 +0000 (07:08 +0000)]
AVX-512. Add kshift[lr][bwdq]. Fix iterator.

gcc/
* config/i386/i386.md (define_code_attr mshift): New.
(define_mode_iterator SWI1248_AVX512BW): Rename ...
(SWI1248_AVX512BW): ... to this. Make QI enabled for TARGET_AVX512DQ
only.
(define_insn "*k<logic><mode>"): Use new iterator name.
(define_insn "*<mshift><mode>3"): New.

From-SVN: r228034

9 years agoFix use of valgrind API
Mikhail Maltsev [Wed, 23 Sep 2015 02:31:14 +0000 (02:31 +0000)]
Fix use of valgrind API

gcc/
PR middle-end/67649
* memory-block.h (memory_block_pool::allocate): Use valgrind API to
mark the block as accessible.

From-SVN: r228033

9 years agoDaily bump.
GCC Administrator [Wed, 23 Sep 2015 00:16:13 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r228031

9 years agoFix -Wmisleading-indentation false-positive
Patrick Palka [Tue, 22 Sep 2015 23:06:31 +0000 (23:06 +0000)]
Fix -Wmisleading-indentation false-positive

gcc/c-family/ChangeLog:

* c-indentation.c (should_warn_for_misleading_indentation):
Float out and consolidate the calls to get_visual_column that
are passed guard_exploc as an argument.  Compare
next_stmt_vis_column with guard_line_first_nws instead of with
body_line_first_nws.

gcc/testsuite/ChangeLog:

* c-c++-common/Wmisleading-indentation.c: Augment test.

From-SVN: r228027

9 years agoshrink-wrap: Handle multiple predecessors of prologue
Segher Boessenkool [Tue, 22 Sep 2015 20:50:38 +0000 (22:50 +0200)]
shrink-wrap: Handle multiple predecessors of prologue

The caller of try_shrink_wrapping wants to be returned a single edge to
put the prologue on.  To make that work even if there are multiple edges
(all pointing to the PRO block) that need the prologue, add a new block
that becomes the destination of all such edges, and then jumps to PRO.

In the general case, some edges to PRO will need to be redirected, and
not all edges *can* be redirected.  This adds a can_get_prologue function
that detects such cases.  This then happily can also handle the "prologue
clobbers some reg that is live on the edge we want to insert it on" case.

Not all EDGE_CROSSING edges can be redirected, so handle those the same
as EDGE_COMPLEX edges.

2015-09-22  Segher Boessenkool  <segher@kernel.crashing.org>

* function.c (thread_prologue_and_epilogue_insns): Delete
orig_entry_edge argument to try_shrink_wrapping.
* shrink-wrap.c (can_get_prologue): New function.
(can_dup_for_shrink_wrapping): Also handle EDGE_CROSSING.
(try_shrink_wrapping): Delete orig_entry_edge argument.  Use
can_get_prologue where needed.  Remove code that finds a single
edge for the prologue.  Remove code that tests if any reg clobbered
by the prologue is live on the prologue edge.  Remove code that finds
the new prologue edge after duplicating blocks.  Make a new prologue
block and edge.
* shrink-wrap.h (try_shrink_wrapping): Delete orig_entry_edge argument.

From-SVN: r228022

9 years ago[PATCH] Remove undefined behaviour from hppa backend
Jeff Law [Tue, 22 Sep 2015 18:39:10 +0000 (12:39 -0600)]
[PATCH] Remove undefined behaviour from hppa backend

* config/pa/pa.h (MIN_LEGIT_64BIT_CONST_INT: Avoid undefined
behavior.

From-SVN: r228021

9 years agoc.opt (Wmultiple-inheritance, [...]): New C++ warnings.
Nathan Sidwell [Tue, 22 Sep 2015 15:34:49 +0000 (15:34 +0000)]
c.opt (Wmultiple-inheritance, [...]): New C++ warnings.

c-family/
* c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
Wnamespaces): New C++ warnings.

cp/
* decl.c (xref_basetypes): Check virtual and/or multiple
inheritance warning.
* parser.c (cp_parser_namespace_definition): Check namespaces
warning.
* pt.c (push_template_decl_real): Check templates warning.

* doc/invoke.texi  (-Wmultiple-inheritance, -Wvirtual-inheritance,
-Wtemplates, -Wnamespaces): Document.

testsuite/
* g++.dg/diagostic/disable.C: New.

From-SVN: r228019

9 years agoDisconnect -Wabi=<n> from -fabi-compat-version=<n>.
Jason Merrill [Tue, 22 Sep 2015 15:18:26 +0000 (11:18 -0400)]
Disconnect -Wabi=<n> from -fabi-compat-version=<n>.

gcc/c-family/
* c-common.h (abi_compat_version_crosses): New.
(warn_abi_version): Declare.
* c-common.c: Define it.
* c-opts.c (c_common_post_options): Handle it.
flag_abi_compat_version defaults to 8.
gcc/cp/
* mangle.c (abi_warn_or_compat_version_crosses): New.
Use it instead of abi_version_crosses.
(mangle_decl): Deal with -fabi-compat-version and -Wabi separately.

From-SVN: r228017

9 years agoHandle restrict pointer references as restrict in AA
Tom de Vries [Tue, 22 Sep 2015 14:14:56 +0000 (14:14 +0000)]
Handle restrict pointer references as restrict in AA

2015-09-22  Tom de Vries  <tom@codesourcery.com>

PR tree-optimization/67671
* tree-ssa-structalias.c (create_variable_info_for_1): Handle restrict
pointer references as restrict.

* g++.dg/pr67671.C: New test.

From-SVN: r228015

9 years agoUpdate Andrew Cagney's address.
Jason Merrill [Tue, 22 Sep 2015 13:31:20 +0000 (09:31 -0400)]
Update Andrew Cagney's address.

From-SVN: r228014

9 years agonios2.c (nios2_legitimize_address): When handling 'reg + reloc' cases...
Chung-Lin Tang [Tue, 22 Sep 2015 12:19:27 +0000 (12:19 +0000)]
nios2.c (nios2_legitimize_address): When handling 'reg + reloc' cases...

2015-09-22  Chung-Lin Tang  <cltang@codesourcery.com>

* config/nios2/nios2.c (nios2_legitimize_address): When handling
'reg + reloc' cases, allow first operand to be non-REG, and use
force_reg() to enforce address pattern.

From-SVN: r228012

9 years agore PR target/67480 (AVX512 bitwise logic operations pattern is incorrect)
Alexander Fomin [Tue, 22 Sep 2015 11:14:25 +0000 (11:14 +0000)]
re PR target/67480 (AVX512 bitwise logic operations pattern is incorrect)

PR target/67480

gcc/
* config/i386/sse.md (define_mode_iterator VI48_AVX_AVX512F): New.
(define_mode_iterator VI12_AVX_AVX512F): New.
(define_insn "<mask_codefor><code><mode>3<mask_name>"): Change
all iterators to VI48_AVX_AVX512F. Extract remaining modes ...
(define_insn "*<code><mode>3"): ... Into new pattern using
VI12_AVX_AVX512F iterators without masking.

gcc/testsuite/
* gcc.target/i386/pr67480.c: New test.

From-SVN: r228010

9 years agoAVX-512. Introduce SKylake server CPU.
Kirill Yukhin [Tue, 22 Sep 2015 11:10:21 +0000 (11:10 +0000)]
AVX-512. Introduce SKylake server CPU.

gcc/
* config.gcc: Support "skylake-avx512".
        * config/i386/i386-c.c (ix86_target_macros_internal): Handle
        PROCESSOR_SKYLAKE_AVX512.
        * config/i386/i386.c (m_SKYLAKE_AVX512): Define.
        (processor_target_table): Add "skylake-avx512".
        (PTA_SKYLAKE_AVX512): Define.
(ix86_option_override_internal): Add "skylake_avx512".
        (fold_builtin_cpu): Handle "skylake_avx512", add F_AVX512VL
F_AVX512BW, F_AVX512DQ, F_AVX512ER, F_AVX512PF, F_AVX512CD.
        * config/i386/i386.h (TARGET_SKYLAKE_AVX512): Define.
        (processor_type): Add PROCESSOR_SKYLAKE_AVX512.
* doc/invoke.texi (skylake-avx512): New.

libgcc/
* libgcc/config/i386/cpuinfo.c (enum processor_features): Add
FEATURE_AVX512VL, FEATURE_AVX512BW, FEATURE_AVX512DQ,
FEATURE_AVX512CD, FEATURE_AVX512ER, FEATURE_AVX512PF.
(get_available_features): Habdle new features.

gcc/testsuite/
        * gcc.target/i386/funcspec-5.c: Test avx512vl, avx512bw,
avx512dq, avx512cd, avx512er, avx512pf and skylake-avx512.
* gcc.target/i386/builtin_target.c: Test  avx512vl, avx512bw,
avx512dq, avx512cd, avx512er and avx512pf.

From-SVN: r228009

9 years agoAVX-512. Fix patterns for kunpck insns.
Kirill Yukhin [Tue, 22 Sep 2015 09:47:39 +0000 (09:47 +0000)]
AVX-512. Fix patterns for kunpck insns.

gcc/
* gcc/config/i386/i386.md (define_insn "kunpckhi"): Fix
operand in pattern.
(define_insn "kunpcksi"): Ditto.
(define_insn "kunpckdi"): Ditto.

From-SVN: r228005

9 years agoAVX-512. Fix kxnor insn split.
Kirill Yukhin [Tue, 22 Sep 2015 09:42:26 +0000 (09:42 +0000)]
AVX-512. Fix kxnor insn split.

gcc/
* gcc/config/i386/i386.md (define_split not/xor SWI1248x): Use
iterator instead of fixed modes.

From-SVN: r228003

9 years ago[AArch64] Use atomic load-operate instructions for update-fetch patterns.
Matthew Wahab [Tue, 22 Sep 2015 09:41:15 +0000 (09:41 +0000)]
[AArch64] Use atomic load-operate instructions for update-fetch patterns.

2015-09-22  Matthew Wahab  <matthew.wahab@arm.com>

* config/aarch64/aarch64-protos.h (aarch64_gen_atomic_ldop):
Adjust declaration.
* config/aarch64/aarch64.c (aarch64_emit_bic): New.
(aarch64_gen_atomic_ldop): Adjust comment.  Add parameter
out_result.  Update to support update-fetch operations.
* config/aarch64/atomics.md (aarch64_atomic_exchange<mode>_lse):
Adjust for change to aarch64_gen_atomic_ldop.
(aarch64_atomic_<atomic_optab><mode>_lse): Likewise.
(aarch64_atomic_fetch_<atomic_optab><mode>_lse): Likewise.
(atomic_<atomic_optab>_fetch<mode>): Change to an expander.
(aarch64_atomic_<atomic_optab>_fetch<mode>): New.
(aarch64_atomic_<atomic_optab>_fetch<mode>_lse): New.

gcc/testsuite
2015-09-22  Matthew Wahab  <matthew.wahab@arm.com>

* gcc.target/aarch64/atomic-inst-ldadd.c: Add tests for
update-fetch operations.
* gcc.target/aarch64/atomic-inst-ldlogic.c: Likewise.

From-SVN: r228002

9 years ago[AArch64] Use atomic load-operate instructions for fetch-update patterns.
Matthew Wahab [Tue, 22 Sep 2015 09:35:17 +0000 (09:35 +0000)]
[AArch64] Use atomic load-operate instructions for fetch-update patterns.

gcc/
2015-09-22  Matthew Wahab  <matthew.wahab@arm.com>

* config/aarch64/aarch64-protos.h
(aarch64_atomic_ldop_supported_p): Declare.
* config/aarch64/aarch64.c (aarch64_atomic_ldop_supported_p): New.
(enum aarch64_atomic_load_op_code): New.
(aarch64_emit_atomic_load_op): New.
(aarch64_gen_atomic_ldop): Update to support load-operate
patterns.
* config/aarch64/atomics.md (atomic_<atomic_optab><mode>): Change
to an expander.
(aarch64_atomic_<atomic_optab><mode>): New.
(aarch64_atomic_<atomic_optab><mode>_lse): New.
(atomic_fetch_<atomic_optab><mode>): Change to an expander.
(aarch64_atomic_fetch_<atomic_optab><mode>): New.
(aarch64_atomic_fetch_<atomic_optab><mode>_lse): New.

gcc/testsuite/
2015-09-22  Matthew Wahab  <matthew.wahab@arm.com>

* gcc.target/aarch64/atomic-inst-ldadd.c: New.
* gcc.target/aarch64/atomic-inst-ldlogic.c: New.

From-SVN: r228001

9 years ago[AArch64] Add atomic load-operate instructions.
Matthew Wahab [Tue, 22 Sep 2015 09:30:51 +0000 (09:30 +0000)]
[AArch64] Add atomic load-operate instructions.

2015-09-22  Matthew Wahab  <matthew.wahab@arm.com>

* config/aarch64/aarch64/atomics.md (UNSPECV_ATOMIC_LDOP): New.
(UNSPECV_ATOMIC_LDOP_OR): New.
(UNSPECV_ATOMIC_LDOP_BIC): New.
(UNSPECV_ATOMIC_LDOP_XOR): New.
(UNSPECV_ATOMIC_LDOP_PLUS): New.
(ATOMIC_LDOP): New.
(atomic_ldop): New.
(aarch64_atomic_load<atomic_ldop><mode>): New.

From-SVN: r228000

9 years ago[AArch64] Make BIC, other logical instructions, available.
Matthew Wahab [Tue, 22 Sep 2015 09:24:47 +0000 (09:24 +0000)]
[AArch64] Make BIC, other logical instructions, available.

2015-09-22  Matthew Wahab  <matthew.wahab@arm.com>

* config/aarch64/aarch64.md
(<LOGICAL:optab>_one_cmpl_<SHIFT:optab><mode>3): Make a named
pattern.

From-SVN: r227999

9 years ago[AArch64] Use atomic instructions for swap and fetch-update operations.
Matthew Wahab [Tue, 22 Sep 2015 09:19:55 +0000 (09:19 +0000)]
[AArch64] Use atomic instructions for swap and fetch-update operations.

gcc/
2015-09-22  Matthew Wahab  <matthew.wahab@arm.com>

* config/aarch64/aarch64-protos.h (aarch64_gen_atomic_ldop):
Declare.
* config/aarch64/aarch64.c (aarch64_emit_atomic_swap): New.
(aarch64_gen_atomic_ldop): New.
(aarch64_split_atomic_op): Fix whitespace and add a comment.
* config/aarch64/atomics.md (UNSPECV_ATOMIC_SWP): New.
(aarch64_compare_and_swap<mode>_lse): Fix some whitespace.
(atomic_exchange<mode>): Replace with an expander.
(aarch64_atomic_exchange<mode>): New.
(aarch64_atomic_exchange<mode>_lse): New.
(aarch64_atomic_<atomic_optab><mode>): Fix some whitespace.
(aarch64_atomic_swp<mode>): New.

gcc/testsuite/
2015-09-22  Matthew Wahab  <matthew.wahab@arm.com>

* gcc.target/aarch64/atomic-inst-ops.inc: (TEST_MODEL): New.
(TEST_ONE): New.
        * gcc.target/aarch64/atomic-inst-swap.c: New.

From-SVN: r227998

9 years ago[PATCH tree-inline] Do not say "called from here" with UNKNOWN_LOCATION
Manuel López-Ibáñez [Tue, 22 Sep 2015 09:14:04 +0000 (09:14 +0000)]
[PATCH tree-inline] Do not say "called from here" with UNKNOWN_LOCATION

In https://sourceware.org/ml/libc-alpha/2014-12/msg00300.html, we give a
"called from here" note without actually having a location, which looks
strange. I haven't been able to generate such a testcase. If this happens,
try to at least point to the current function being called. If that location is
also unknown, skip the extra note.

gcc/ChangeLog:

2015-09-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>

* tree-inline.c (expand_call_inline): Use inform for extra note.
Do not give a note with UNKNOWN_LOCATION.
Replace input_location with gimple_location (stmt).
Use true/false instead of TRUE/FALSE.

gcc/testsuite/ChangeLog:

2015-09-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>

* gcc.target/i386/inline_error.c (int bar): Use dg-message for note.
* gcc.target/i386/pr57756.c (static __inline int caller): Likewise.
* gcc.target/i386/pr59789.c (f1): Likewise.
* gcc.target/i386/intrinsics_5.c (__m128i foo): Likewise.
* gcc.target/i386/intrinsics_6.c: Likewise.
* gcc.dg/winline-5.c (int t): Likewise.
* gcc.dg/winline-9.c (t): Likewise.
* gcc.dg/always_inline2.c (q): Likewise.
* gcc.dg/winline-2.c (inline int t): Likewise.
* gcc.dg/winline-6.c: Likewise.
* gcc.dg/winline-10.c (void g): Likewise.
* gcc.dg/pr49243.c (void parse): Likewise.
* gcc.dg/always_inline3.c (q2): Likewise.
* gcc.dg/winline-3.c: Likewise.
* gcc.dg/winline-7.c (inline void *t): Likewise.

From-SVN: r227997

9 years agoHandle single restrict pointer in struct in create_variable_info_for_1
Tom de Vries [Tue, 22 Sep 2015 08:15:32 +0000 (08:15 +0000)]
Handle single restrict pointer in struct in create_variable_info_for_1

2015-09-22  Tom de Vries  <tom@codesourcery.com>

PR tree-optimization/67666
* tree-ssa-structalias.c (create_variable_info_for_1): Handle struct
with single field non-conservative.

* g++.dg/pr67666.C: New test.

From-SVN: r227996

9 years agore PR libgomp/67141 (wrong libgomp mutex initialisation order)
Chung-Lin Tang [Tue, 22 Sep 2015 06:45:22 +0000 (06:45 +0000)]
re PR libgomp/67141 (wrong libgomp mutex initialisation order)

2015-09-22  Chung-Lin Tang  <cltang@codesourcery.com>

PR libgomp/67141
* oacc-int.h (goacc_host_init): Add declaration.
* oacc-host.c (goacc_host_init): Remove static and constructor attribute.
* oacc-init.c (goacc_runtime_initialize): Call goacc_host_init() at end.

From-SVN: r227994

9 years agoRevert LRA SPARC changes for now.
David S. Miller [Tue, 22 Sep 2015 03:52:45 +0000 (03:52 +0000)]
Revert LRA SPARC changes for now.

gcc/

PR/67622
Revert:
2015-09-11  David S. Miller  <davem@davemloft.net>

* config/sparc/constraints.md: Make "U" constraint a real register
constraint.
* config/sparc/sparc.c (TARGET_LRA_P): Define.
(D_MODES, DF_MODES): Add missing cast.
(TF_MODES, TF_MODES_NO_S): Include T_MODE.
(OF_MODES, OF_MODES_NO_S): Include O_MODE.
(sparc_register_move_cost): Decrease Niagara/UltrsSPARC memory
cost to 8.
* config/sparc/sparc.h (PROMOTE_MODE): Define.
* config/sparc/sparc.md (*movsi_lo_sum, *movsi_high): Do not
provide these insn when flag_pic.

2015-09-17  David S. Miller  <davem@davemloft.net>

* config/sparc/sparc-protos.h (sparc_secondary_memory_needed):
Declare.
* config/sparc/sparc.c (sparc_secondary_memory_needed): New
function.
* config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED): Use it.
(HARD_REGNO_CALLER_SAVE_MODE): Define.
* config/sparc/sparc.md (sethi_di_medlow, losum_di_medlow, seth44)
(setm44, setl44, sethh, setlm, sethm, setlo, embmedany_sethi)
(embmedany_losum, embmedany_brsum, embmedany_textuhi)
(embmedany_texthi, embmedany_textulo, embmedany_textlo): Do not
provide when flag_pic.

From-SVN: r227993

9 years agoDaily bump.
GCC Administrator [Tue, 22 Sep 2015 00:16:12 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r227992

9 years ago[FT32] fixes for the default hardware startup
James Bowman [Mon, 21 Sep 2015 22:31:53 +0000 (22:31 +0000)]
[FT32] fixes for the default hardware startup

libgcc/
        * config/ft32/crti-hw.S: Use __PMSIZE to allow configurable
        memory layout. Deal correctly with BSS region larger than 32K.
        Handle a watchdog reset like a power-on reset. Clean up unused
        code.

From-SVN: r227986

9 years agoresolve.c (nonscalar_typebound_assign): Fix typos in comment.
Steven G. Kargl [Mon, 21 Sep 2015 21:40:26 +0000 (21:40 +0000)]
resolve.c (nonscalar_typebound_assign): Fix typos in comment.

2015-09-21  Steven G. Kargl  <kargl@gcc.gnu.org>

* resolve.c (nonscalar_typebound_assign): Fix typos in comment.

From-SVN: r227985

9 years agore PR fortran/67615 (ICE on using arithmetic if with array instead of scalar)
Steven G. Kargl [Mon, 21 Sep 2015 18:09:13 +0000 (18:09 +0000)]
re PR fortran/67615 (ICE on using arithmetic if with array instead of scalar)

2015-09-21  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/67615
* resolve.c (gfc_resolve_code): Check for scalar expression in
arithmetic-if.

2015-09-21  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/67615
* gfortran.dg/pr67615.f90: new test.

From-SVN: r227981

9 years ago[PATCH] Fix undefined behavior in h8300 backend
Jeff Law [Mon, 21 Sep 2015 17:09:53 +0000 (11:09 -0600)]
[PATCH] Fix undefined behavior in h8300 backend

* config/h8300/h8300.md (andsi3_ashift_n_lower): Avoid undefined
behavior.

* gcc.target/h8300/andsi3_ashift_n_lower.c: New test.

From-SVN: r227978

9 years agoComplete the implementation of N4230, Nested namespace definition.
Ville Voutilainen [Mon, 21 Sep 2015 15:50:30 +0000 (18:50 +0300)]
Complete the implementation of N4230, Nested namespace definition.

/c-family
2015-09-21  Ville Voutilainen  <ville.voutilainen@gmail.com>

Complete the implementation of N4230, Nested namespace definition.
* c-cppbuiltin.c: Add __cpp_namespace_attributes and
__cpp_nested_namespace_definitions.

/cp
2015-09-21  Ville Voutilainen  <ville.voutilainen@gmail.com>

Complete the implementation of N4230, Nested namespace definition.
* parser.c (cp_parser_namespace_definition): Support namespace
attributes both before and after the namespace identifier.

/testsuite
2015-09-21  Ville Voutilainen  <ville.voutilainen@gmail.com>

Complete the implementation of N4230, Nested namespace definition.
* g++.dg/cpp1y/feat-cxx11-neg.C: Add tests for C++17 namespace
attributes and nested namespace definitions.
* g++.dg/cpp1y/feat-cxx98-neg.C: Likewise.
* g++.dg/cpp1z/feat-cxx1z.C: Likewise.
* g++.dg/cpp1y/feat-cxx14-neg.C: New.
* g++.dg/cpp1z/namespace-attribs.C: Likewise.
* g++.dg/cpp1z/nested-namespace-def1.C: Add tests for attributes
appearing before the namespace identifier.

From-SVN: r227977

9 years agoHandle lines encoded into several maps in linemap_position_for_loc_and_offset
Manuel López-Ibáñez [Mon, 21 Sep 2015 14:52:09 +0000 (14:52 +0000)]
Handle lines encoded into several maps in linemap_position_for_loc_and_offset

linemap_position_for_loc_and_offset() tries to generate a location_t
encoding a column offset from the current location, for example, point
to a certain character inside a string. This is trivial to do when the
new location "fits within" the map of the original location. However,
it may happen that the (long) line corresponding to the original
location is encoded in several maps, thus the new location should
actually be encoded in a subsequent map from the original location.
This patch detects this case and adjusts the map correspondingly.

(This shows that the line-map representation is quite wasteful in this
case, because line-maps always start at column 0. That is, map[0]
highest location may encode up to line 8 column 80, then
map[1]->start_location starts encoding at line 8 column 0. Thus, there
are two location_t values that point to the same source location.)

libcpp/ChangeLog:

2015-09-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>

PR c/66415
* line-map.c (linemap_position_for_loc_and_offset): Handle the
case of long lines encoded in multiple maps.

gcc/testsuite/ChangeLog:

2015-09-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>

PR c/66415
* gcc.dg/cpp/pr66415-1.c: Test column number.

From-SVN: r227975

9 years ago* config/spu/spu.c (spu_expand_insv): Avoid undefined behavior.
Ulrich Weigand [Mon, 21 Sep 2015 14:41:10 +0000 (14:41 +0000)]
* config/spu/spu.c (spu_expand_insv): Avoid undefined behavior.

From-SVN: r227974

9 years agopasses.c (rest_of_decl_compilation): Do not call dwarf2out_early_global_decl for...
Richard Biener [Mon, 21 Sep 2015 14:12:58 +0000 (14:12 +0000)]
passes.c (rest_of_decl_compilation): Do not call dwarf2out_early_global_decl for aliases.

2015-09-21  Richard Biener  <rguenther@suse.de>

* passes.c (rest_of_decl_compilation): Do not call
dwarf2out_early_global_decl for aliases.

* g++.dg/ext/attr-alias-3.C: Add -g.

From-SVN: r227973

9 years agore PR debug/67664 (Duplicate AT_const_value attributes in some c++ cases.)
Richard Biener [Mon, 21 Sep 2015 14:02:27 +0000 (14:02 +0000)]
re PR debug/67664 (Duplicate AT_const_value attributes in some c++ cases.)

2015-09-21  Richard Biener  <rguenther@suse.de>

PR debug/67664
* dwarf2out.c (add_location_or_const_value_attribute): Remove
attribute parameter.  Early exit if either DW_AT_const_value
or DW_AT_location are present already.
(gen_variable_die): Adjust caller.
(dwarf2out_late_global_decl): Likewise.

* g++.dg/debug/dwarf2/pr67764.C: New testcase.

From-SVN: r227972

9 years agore PR target/64345 ([SH] Improve single bit extraction)
Oleg Endo [Mon, 21 Sep 2015 13:49:07 +0000 (13:49 +0000)]
re PR target/64345 ([SH] Improve single bit extraction)

testsuite/
PR target/64345
* gcc.target/sh/pr64345-1.c: Adjust expected insn counts for SH2A.

From-SVN: r227971

9 years agore PR target/67657 ([SH][5/6 Regression]: internal compiler error: in cselib_record_s...
Oleg Endo [Mon, 21 Sep 2015 12:57:31 +0000 (12:57 +0000)]
re PR target/67657 ([SH][5/6 Regression]: internal compiler error: in cselib_record_set, at cselib.c:2396 when compiling libjpeg-turbo)

gcc/
PR target/67657
* config/sh/sh.c (sh_remove_overlapping_post_inc,
sh_peephole_emit_move_insn): Add new functions.
* config/sh/sh-protos.h (sh_remove_overlapping_post_inc,
sh_peephole_emit_move_insn): Declere them.
* config/sh/sh.md: Use them in various peephole2 patterns.

From-SVN: r227969

9 years agore PR middle-end/67651 (Optimizer assumes nothing can reside at address 0 despite...
Richard Biener [Mon, 21 Sep 2015 12:33:23 +0000 (12:33 +0000)]
re PR middle-end/67651 (Optimizer assumes nothing can reside at address 0 despite -fno-delete-null-pointer-checks)

2015-09-21  Richard Biener  <rguenther@suse.de>

PR middle-end/67651
* rtlanal.c (nonzero_address_p): SYMBOL_REFs may have zero
address with -fno-delete-null-pointer-checks.

From-SVN: r227968

9 years agoCatch excess warning in gcc.dg/pragma-diag-5.c
Manuel López-Ibáñez [Mon, 21 Sep 2015 12:26:18 +0000 (12:26 +0000)]
Catch excess warning in gcc.dg/pragma-diag-5.c

We xfail at emitting the correct location, but we still need to catch the
warning.

2015-09-21 Manuel López-Ibáñez <manu@gcc.gnu.org>

* gcc.dg/pragma-diag-5.c: Catch excess warning.

From-SVN: r227967

9 years agoFix bootstrap error introduced in r227870
Jonathan Wakely [Mon, 21 Sep 2015 11:44:08 +0000 (12:44 +0100)]
Fix bootstrap error introduced in r227870

PR libstdc++/67647
* include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
(basic_string::shrink_to_fit): Fix #endif placement.

From-SVN: r227966

9 years ago[RS6000] Migrate from reduc_xxx to reduc_xxx_scal optabs
Alan Lawrence [Mon, 21 Sep 2015 10:38:27 +0000 (10:38 +0000)]
[RS6000] Migrate from reduc_xxx to reduc_xxx_scal optabs

* config/rs6000/altivec.md (reduc_splus_<mode>): Rename to...
(reduc_plus_scal_<mode>): ...this, add rs6000_expand_vector_extract.
(reduc_uplus_v16qi): Remove.

* config/rs6000/vector.md (VEC_reduc_name): Change "splus" to "plus".
(reduc_<VEC_reduc_name>_v2df): Remove.
(reduc_<VEC_reduc_name>_v4sf): Remove.
(reduc_<VEC_reduc:VEC_reduc_name>_scal_<VEC_F:name>): New.

* config/rs6000/vsx.md (vsx_reduc_<VEC_reduc_name>_v2df): Declare
gen_ function by removing * prefix.
(vsx_reduc_<VEC_reduc_name>_v4sf): Likewise.

From-SVN: r227965

9 years ago[PR middle-end/60832] Do not convert widest_int to tree just for printing it.
Manuel López-Ibáñez [Mon, 21 Sep 2015 10:11:24 +0000 (10:11 +0000)]
[PR middle-end/60832] Do not convert widest_int to tree just for printing it.

In do_warn_aggressive_loop_optimizations, we convert to a tree just to print a
widest_int. Apart from overly complicated, this results in printing '3u'
instead of just '3'.

Unfortunately, adding a printf-like conversion specifier would require making
pretty-print.c link with wide-int.cc, which will include a lot of new
dependencies into several other programs (gcov-tool for example). It would be
possible to add the conversion specifier to every FE pretty-printer, but this
still would require updating c-format.c, which is far from trivial. A simpler
approach is to convert to a string rather than to a tree.

In addition, "iteration 3 invokes undefined behavior within this loop" seems to
me clearer than "iteration 3 invokes undefined behavior; containing loop".

gcc/testsuite/ChangeLog:

2015-09-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>

PR middle-end/60832
* gcc.dg/pr53265.c: Update.

gcc/ChangeLog:

2015-09-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>

PR middle-end/60832
* tree-ssa-loop-niter.c (do_warn_aggressive_loop_optimizations):
Print i_bound without converting it to a tree.

From-SVN: r227964

9 years ago[ARM] Replacing variable swaps that use a temporary variable with a call to std:...
Bilyan Borisov [Mon, 21 Sep 2015 10:07:44 +0000 (10:07 +0000)]
[ARM] Replacing variable swaps that use a temporary variable with a call to std::swap in gcc/config/arm/arm.c

On behalf of <bilyan.borisov@arm.com>

2015-09-21  Bilyan Borisov  <bilyan.borisov@arm.com>

* config/arm/arm.c (thumb_output_move_mem_multiple): Replaced
operands[4] operands[5] swap with std::swap, removed tmp variable.
(arm_evpc_neon_vzip): Replaced in0/in1 and
out0/out1 swaps with std::swap, removed x variable.
(arm_evpc_neon_vtrn): Replaced in0/int1 and
out0/out1 swaos with std::swap, removed x variable.
(arm_expand_vec_perm_const_1): Replaced
d->op0/d->op1 swap with std::swap, removed x variable.
(arm_evpc_neon_vuzp): Replaced in0/in1 and
out0/out1 swaps with std::swap, removed x variable.

From-SVN: r227963

9 years agocygwin.h (STARTFILE_SPEC): Explicitly search sysroot/usr/lib/32api for additional...
Jonathan Yong [Mon, 21 Sep 2015 09:58:44 +0000 (09:58 +0000)]
cygwin.h (STARTFILE_SPEC): Explicitly search sysroot/usr/lib/32api for additional win32 libraries...

2015-09-21  Jonathan Yong  <10walls@gmail.com>

        * config/i386/cygwin.h (STARTFILE_SPEC): Explicitly search
        sysroot/usr/lib/32api for additional win32 libraries,
        fixes failing Cygwin bootstrapping.

From-SVN: r227962

9 years ago* gcc.target/arm/stack-checking.c: Skip for Thumb1.
Eric Botcazou [Mon, 21 Sep 2015 08:16:32 +0000 (08:16 +0000)]
* gcc.target/arm/stack-checking.c: Skip for Thumb1.

From-SVN: r227960

9 years agoinvoke.texi (SH Options): Undocument SH5/SH64 related options.
Oleg Endo [Mon, 21 Sep 2015 07:23:23 +0000 (07:23 +0000)]
invoke.texi (SH Options): Undocument SH5/SH64 related options.

gcc/
* doc/invoke.texi (SH Options): Undocument SH5/SH64 related options.

From-SVN: r227959

9 years agore PR tree-optimization/59478 (Optimize variable access via byte copy)
Oleg Endo [Mon, 21 Sep 2015 01:43:50 +0000 (01:43 +0000)]
re PR tree-optimization/59478 (Optimize variable access via byte copy)

gcc/testsuite/
PR target/59478
* gcc.target/sh/pr59478.c: New.

From-SVN: r227958

9 years agore PR target/67126 ([SH] gcc.target/sh/pr51244-12.c failures)
Oleg Endo [Mon, 21 Sep 2015 00:17:22 +0000 (00:17 +0000)]
re PR target/67126 ([SH] gcc.target/sh/pr51244-12.c failures)

gcc/
PR target/67126
* config/sh/sh.md (*reg_lsb_t): Emit bld insn on SH2A.
(*mov_t_msb_neg): Rewrite negc pattern.

gcc/testsuite/
PR target/67126
* gcc.target/sh/pr51244-12.c: Adjust testcase.
* gcc.target/sh/pr54236-2.c: Likewise.

From-SVN: r227957

9 years agoDaily bump.
GCC Administrator [Mon, 21 Sep 2015 00:16:13 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r227956

9 years agore PR middle-end/67619 (ICE at -O1 and above on x86_64-linux-gnu in int_mode_for_mode...
Uros Bizjak [Sun, 20 Sep 2015 18:07:58 +0000 (20:07 +0200)]
re PR middle-end/67619 (ICE at -O1 and above on x86_64-linux-gnu in int_mode_for_mode, at stor-layout.c:425)

PR middle-end/67619
* lib/target-supports.exp (check_effective_target_builtin_eh_return):
New procedure.

From-SVN: r227952

9 years agoMAINTAINERS: Update email.
Kai Tietz [Sun, 20 Sep 2015 17:33:05 +0000 (17:33 +0000)]
MAINTAINERS: Update email.

2015-09-20  Kai Tietz  <ktietz70@googlemail.com>

* MAINTAINERS: Update email.

From-SVN: r227951

9 years ago[AArch64][5/5] Cleanup immediate generation code in aarch64_internal_mov_immediate
Wilco Dijkstra [Sun, 20 Sep 2015 16:46:12 +0000 (16:46 +0000)]
[AArch64][5/5] Cleanup immediate generation code in aarch64_internal_mov_immediate

2015-09-20  Wilco Dijkstra  <wdijkstr@arm.com>

* config/aarch64/aarch64.c (aarch64_internal_mov_immediate): Cleanup
immediate generation code.

From-SVN: r227950

9 years ago[AArch64][4/5] Remove redundant code
Wilco Dijkstra [Sun, 20 Sep 2015 16:43:28 +0000 (16:43 +0000)]
[AArch64][4/5] Remove redundant code

2015-09-20  Wilco Dijkstra  <wdijkstr@arm.com>

* config/aarch64/aarch64.c (aarch64_internal_mov_immediate): Remove
redundant immediate generation code.

From-SVN: r227949

9 years ago[AArch64][3/5] Remove dead code
Wilco Dijkstra [Sun, 20 Sep 2015 16:41:26 +0000 (16:41 +0000)]
[AArch64][3/5] Remove dead code

2015-09-20  Wilco Dijkstra  <wdijkstr@arm.com>

* config/aarch64/aarch64.c (aarch64_bitmasks): Remove.
(AARCH64_NUM_BITMASKS): Remove.
(aarch64_bitmasks_cmp): Remove.
(aarch64_build_bitmask_table): Remove.

From-SVN: r227948

9 years ago[AArch64][2/5] Improve aarch64_internal_mov_immediate by using faster algorithm
Wilco Dijkstra [Sun, 20 Sep 2015 16:37:39 +0000 (16:37 +0000)]
[AArch64][2/5] Improve aarch64_internal_mov_immediate by using faster algorithm

2015-09-20  Wilco Dijkstra  <wdijkstr@arm.com>

* config/aarch64/aarch64.c (aarch64_internal_mov_immediate): Replace
slow immediate matching loops with a faster algorithm.

From-SVN: r227947

9 years ago[AArch64][1/5] Reimplement aarch64_bitmask_imm
Wilco Dijkstra [Sun, 20 Sep 2015 16:34:44 +0000 (16:34 +0000)]
[AArch64][1/5] Reimplement aarch64_bitmask_imm

2015-09-20  Wilco Dijkstra  <wdijkstr@arm.com>

* config/aarch64/aarch64.c (aarch64_bitmask_imm): Reimplement using
faster algorithm.

From-SVN: r227946

9 years agopr43417.c: Move target independent test to ...
Oleg Endo [Sun, 20 Sep 2015 14:36:58 +0000 (14:36 +0000)]
pr43417.c: Move target independent test to ...

gcc/testsuite/
* gcc.target/sh/pr43417.c: Move target independent test to ...
* gcc.c-torture/compile/pr43417.c: ... here.

From-SVN: r227945

9 years agosh.exp (check_effective_target_sh4a, [...]): New effective target checks.
Oleg Endo [Sun, 20 Sep 2015 14:09:36 +0000 (14:09 +0000)]
sh.exp (check_effective_target_sh4a, [...]): New effective target checks.

gcc/testsuite/
* gcc.target/sh/sh.exp (check_effective_target_sh4a,
check_effective_target_big_endian, check_effective_target_little_endian,
check_effective_target_any_fpu, check_effective_target_double_fpu,
check_effective_target_use_single_only_fpu,
check_effective_target_default_single_fpu,
check_effective_target_no_fpu, check_effective_target_has_xf_regs,
check_effective_target_has_fsca, check_effective_target_has_fsrra,
check_effective_target_has_fpchg, check_effective_target_has_dyn_shift,
check_effective_target_fmovd_enabled,
check_effective_target_has_privileged, check_effective_target_has_pref,
check_effective_target_banked_r0r7_isr,
check_effective_target_stack_save_isr): New effective target checks.
* gcc.target/sh/pr51244-16.c: Merge into pr51244-15.c.
* gcc.target/sh/pr51244-20-sh2a.c: Merge into pr51244-20.c.
* gcc.target/sh/pr51244-3.c: Merge into pr51244-2.c
* gcc.target/sh/pr54089-5.c: Merge into pr54089-4.c.
* gcc.target/sh/20080410-1.c: Use new effective target checks.
* gcc.target/sh/attr-isr-nosave_low_regs.c: Likewise.
* gcc.target/sh/attr-isr.c: Likewise.
* gcc.target/sh/fpul-usage-1.c: Likewise.
* gcc.target/sh/hiconst.c: Likewise.
* gcc.target/sh/mfmovd.c: Likewise.
* gcc.target/sh/pr21255-3.c: Likewise.
* gcc.target/sh/pr33135-1.c: Likewise.
* gcc.target/sh/pr33135-2.c: Likewise.
* gcc.target/sh/pr33135-3.c: Likewise.
* gcc.target/sh/pr33135-4.c: Likewise.
* gcc.target/sh/pr39423-2.c: Likewise.
* gcc.target/sh/pr49880-4.c: Likewise.
* gcc.target/sh/pr49880-5.c: Likewise.
* gcc.target/sh/pr50749-sf-postinc-1.c: Likewise.
* gcc.target/sh/pr50749-sf-postinc-2.c: Likewise.
* gcc.target/sh/pr50749-sf-postinc-3.c: Likewise.
* gcc.target/sh/pr50749-sf-postinc-4.c: Likewise.
* gcc.target/sh/pr50749-sf-predec-1.c: Likewise.
* gcc.target/sh/pr50749-sf-predec-2.c: Likewise.
* gcc.target/sh/pr50749-sf-predec-3.c: Likewise.
* gcc.target/sh/pr50749-sf-predec-4.c: Likewise.
* gcc.target/sh/pr50751-2.c: Likewise.
* gcc.target/sh/pr50751-3.c: Likewise.
* gcc.target/sh/pr50751-5.c: Likewise.
* gcc.target/sh/pr50751-6.c: Likewise.
* gcc.target/sh/pr50751-8.c: Likewise.
* gcc.target/sh/pr51244-15.c: Likewise.
* gcc.target/sh/pr51244-2.c: Likewise.
* gcc.target/sh/pr51244-20.c: Likewise.
* gcc.target/sh/pr51244-6.c: Likewise.
* gcc.target/sh/pr52483-4.c: Likewise.
* gcc.target/sh/pr53511-1.c: Likewise.
* gcc.target/sh/pr53512-1.c: Likewise.
* gcc.target/sh/pr53512-2.c: Likewise.
* gcc.target/sh/pr53512-3.c: Likewise.
* gcc.target/sh/pr53512-4.c: Likewise.
* gcc.target/sh/pr53513-1.c: Likewise.
* gcc.target/sh/pr54089-2.c: Likewise.
* gcc.target/sh/pr54089-3.c: Likewise.
* gcc.target/sh/pr54089-4.c: Likewise.
* gcc.target/sh/pr54602-2.c: Likewise.
* gcc.target/sh/pr54602-3.c: Likewise.
* gcc.target/sh/pr54602-4.c: Likewise.
* gcc.target/sh/pr54680.c: Likewise.
* gcc.target/sh/pr55303-1.c: Likewise.
* gcc.target/sh/pr55303-2.c: Likewise.
* gcc.target/sh/pr55303-3.c: Likewise.
* gcc.target/sh/pr56547-1.c: Likewise.
* gcc.target/sh/pr56547-2.c: Likewise.
* gcc.target/sh/pr61195.c: Likewise.
* gcc.target/sh/pr61996.c: Likewise.
* gcc.target/sh/pr6526.c: Likewise.
* gcc.target/sh/pragma-isr-nosave_low_regs.c: Likewise.
* gcc.target/sh/pragma-isr-trapa2.c: Likewise.
* gcc.target/sh/prefetch.c: Likewise.
* gcc.target/sh/rte-delay-slot.c: Likewise.
* gcc.target/sh/sh2a-band.c: Likewise.
* gcc.target/sh/sh2a-bclr.c: Likewise.
* gcc.target/sh/sh2a-bclrmem.c: Likewise.
* gcc.target/sh/sh2a-bld.c: Likewise.
* gcc.target/sh/sh2a-bor.c: Likewise.
* gcc.target/sh/sh2a-bset.c: Likewise.
* gcc.target/sh/sh2a-bsetmem.c: Likewise.
* gcc.target/sh/sh2a-bxor.c: Likewise.
* gcc.target/sh/sh2a-jsrn.c: Likewise.
* gcc.target/sh/sh2a-movi20s.c: Likewise.
* gcc.target/sh/sh2a-movrt.c: Likewise.
* gcc.target/sh/sh2a-resbank.c: Likewise.
* gcc.target/sh/sh2a-rtsn.c: Likewise.
* gcc.target/sh/sh2a-tbr-jump.c: Likewise.
* gcc.target/sh/sh4a-bitmovua.c: Likewise.
* gcc.target/sh/sh4a-cosf.c: Likewise.
* gcc.target/sh/sh4a-fsrra.c: Likewise.
* gcc.target/sh/sh4a-memmovua.c: Likewise.
* gcc.target/sh/sh4a-sincosf.c: Likewise.
* gcc.target/sh/sh4a-sinf.c: Likewise.

From-SVN: r227944

9 years ago[PATCH] Fix 47679 by improving jump threading
Jeff Law [Sun, 20 Sep 2015 06:37:39 +0000 (00:37 -0600)]
[PATCH] Fix 47679 by improving jump threading

PR tree-optimization/47679
* tree-ssa-dom.c (record_temporary_equivalences): No longer static.
* tree-ssa-dom.h (record_temporary_equivalences): Add prototype.
* tree-ssa-threadedge.c: Include tree-ssa-dom.h.
(thread_through_normal_block): Use record_temporary_equivalences.

        PR tree-optimization/47679
* g++.dg/warn/Wuninitialized-6.C: New test.

From-SVN: r227942