Michael Meissner [Fri, 11 Nov 2016 19:12:12 +0000 (19:12 +0000)]
re PR target/78243 (incorrect byte offset in vextractuh with -mcpu=power9)
2016-11-11 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/78243
* config/rs6000/vsx.md (vsx_extract_<mode>_p9): Correct the
element order for little endian ordering.
* config/rs6000/altivec.md (reduc_plus_scal_<mode>): Use
VECTOR_ELT_ORDER_BIG and not BYTES_BIG_ENDIAN to adjust element
number.
From-SVN: r242317
Szabolcs Nagy [Fri, 11 Nov 2016 17:31:07 +0000 (17:31 +0000)]
[i386][musl] Add cpuinfo to static libgcc only on *-musl*
The __cpu_indicator_init and __cpu_model symbols are not safe to use
from shared libgcc_s.so from ifunc resolvers, so since gcc-6, only
the definitions from static libgcc.a are used, however the symbols
are kept in libgcc_s as well for backward compatibility (with
appropriate symbol version). On targets without such backward
compatibility concern add cpuinfo to the static library only (this
avoids running the ctor, reduces libgcc_s size and elf abi concerns
about the versioned symbols).
libgcc/
2016-11-11 Szabolcs Nagy <szabolcs.nagy@arm.com>
* config.host (i[3456]86-*-musl*, x86_64-*-musl*): Use
i386/t-cpuinfo-static instead of i386/t-cpuinfo.
* config/i386/t-cpuinfo-static: New.
From-SVN: r242268
Uros Bizjak [Fri, 11 Nov 2016 16:21:52 +0000 (17:21 +0100)]
re PR target/78310 (ICE: insn does not satisfy its constraints: {*bmi2_rorxdi3_1} with -mbmi2)
PR target/78310
* config/i386/i386.md (rotate to rotatex splitter): Avoid overflow
when calculating operand 2.
(rotate to rotatex zext splitter): Ditto.
testsuite/ChangeLog:
PR target/78310
* gcc.target/i386/pr78310.c: New test.
From-SVN: r242076
Jeff Law [Fri, 11 Nov 2016 16:00:47 +0000 (09:00 -0700)]
gimple-ssa-isolate-paths.c (is_divmod_with_given_divisor): New function.
* gimple-ssa-isolate-paths.c (is_divmod_with_given_divisor): New
function.
(stmt_uses_name_in_undefined_way): New function, extracted from
find_implicit_erroneous_behavior and extended for div/mod case.
(stmt_uses_0_or_null_in_undefined_way): New function, extracted from
find_explicit_erroneous_behavior and extended for div/mod case.
(find_implicit_erroneous_behavior): Use new helper function.
(find_explicit_erroneous_behavior): Use new helper function.
* gcc.dg/tree-ssa/isolate-6.c: New test.
* gcc.dg/tree-ssa/isolate-7.c: New test.
From-SVN: r242075
Bin Cheng [Fri, 11 Nov 2016 14:59:48 +0000 (14:59 +0000)]
re PR testsuite/78292 (test case gcc.dg/vect/vect-cond-2.c fails starting with r241967)
gcc/testsuite
PR testsuite/78292
* gcc.dg/vect/vect-cond-2.c: Only drop xfail for targets supporting
vect_max_reduc.
From-SVN: r242073
Ian Lance Taylor [Fri, 11 Nov 2016 14:52:35 +0000 (14:52 +0000)]
libgo: fix GOARCH_INT64ALIGN for several targets
From Andreas Schwab.
Reviewed-on: https://go-review.googlesource.com/33130
From-SVN: r242072
Jakub Jelinek [Fri, 11 Nov 2016 13:39:06 +0000 (14:39 +0100)]
re PR c++/72774 (ICE on invalid C++ code on x86_64-linux-gnu (tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_list’ in consider_binding_level, at cp/name-lookup.c:4721))
PR c++/72774
* g++.dg/parse/pr72774.C: New test.
From-SVN: r242070
Richard Biener [Fri, 11 Nov 2016 12:54:25 +0000 (12:54 +0000)]
re PR tree-optimization/71575 ([graphite] internal compiler error: in copy_cond_phi_nodes, at graphite-isl-ast-to-gimple.c:2500)
2016-11-11 Richard Biener <rguenther@suse.de>
PR tree-optimization/71575
* graphite-isl-ast-to-gimple.c (copy_cond_phi_nodes): Remove
bogus assert.
* gcc.dg/graphite/pr71575-1.c: New testcase.
* gcc.dg/graphite/pr71575-2.c: Likewise.
From-SVN: r242069
Richard Biener [Fri, 11 Nov 2016 12:53:36 +0000 (12:53 +0000)]
re PR middle-end/78295 (Spurious -Wuninitialized warning for vector element assignment)
2016-11-11 Richard Biener <rguenther@suse.de>
PR middle-end/78295
* tree-ssa-uninit.c (warn_uninitialized_vars): Do not warn
about uninitialized destination arg of BIT_INSERT_EXPR.
* gcc.dg/uninit-pr78295.c: New testcase.
From-SVN: r242068
GCC Administrator [Fri, 11 Nov 2016 00:16:19 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r242065
Sandra Loosemore [Thu, 10 Nov 2016 23:56:30 +0000 (18:56 -0500)]
re PR c/37998 (Unclear documentation of -fno-common)
2016-11-10 Sandra Loosemore <sandra@codesourcery.com>
PR c/37998
gcc/
* doc/invoke.texi (Code Gen Options) [-fno-common]: Use correct
terminology. Expand to remove ambiguity.
From-SVN: r242062
Ian Lance Taylor [Thu, 10 Nov 2016 22:53:23 +0000 (22:53 +0000)]
runtime: copy signal code from Go 1.7 runtime
Add a little shell script to auto-generate runtime.sigtable from the
known signal names.
Force the main package to always import the runtime package. Otherwise
some runtime package global variables may never be initialized.
Set the syscallsp and syscallpc fields of g when entering a syscall, so
that the runtime package knows when a g is executing a syscall.
Fix runtime.funcPC to avoid dead store elimination of the interface
value when the function is inlined.
Reviewed-on: https://go-review.googlesource.com/33025
From-SVN: r242060
Segher Boessenkool [Thu, 10 Nov 2016 22:45:39 +0000 (23:45 +0100)]
combine: Do not call simplify from inside change_zero_ext (PR78232)
When combine splits a three-insn combination into two instructions it
can reuse i2dest for the temporary result of the first new instruction.
However all information it has in reg_stat about that register will be
stale. This results in the simplify_gen_binary calls in change_zero_ext
using out-of-date information, which makes it think one of the ANDs
generated there always results in 0, and it doesn't get better from there.
This can also happen if a splitter in the MD uses nonzero_bits (for
example). I tried to make the splitting code in combine save and restore
the i2dest reg_stat info, but that causes one of the acats tests to fail.
This whole reg_stat thing needs an overhaul, and/or we shouldn't reuse
i2dest for unrelated purposes when splitting.
This patch changes change_zero_ext to do the expected simplifications
itself and not call simplify_gen_*.
PR rtl-optimization/78232
* combine.c (try_combine): Add a big comment about why reusing i2dest
is undesirable.
(change_zero_ext): Do not call simplify_gen_binary, do the
simplifications manually.
From-SVN: r242059
Fritz O. Reese [Thu, 10 Nov 2016 21:57:13 +0000 (21:57 +0000)]
Fix ICE and improve errors for invalid anonymous structure declarations.
PR fortran/78277
* gcc/fortran/decl.c (gfc_match_data_decl): Gracefully handle bad
anonymous structure declarations.
PR fortran/78277
* gcc/testsuite/gfortran.dg/dec_structure_17.f90: New test.
From-SVN: r242058
Fritz O. Reese [Thu, 10 Nov 2016 21:54:48 +0000 (21:54 +0000)]
Fix some whitespace.
gcc/fortran/
* decl.c (get_struct_decl, gfc_match_map, gfc_match_union): Fix
whitespace.
* interface.c (gfc_compare_union_types): Likewise.
From-SVN: r242057
Jason Merrill [Thu, 10 Nov 2016 21:42:36 +0000 (16:42 -0500)]
PR c++/77337 - auto return and lambda
* pt.c (tsubst_friend_function): Don't set DECL_INITIAL.
(instantiate_decl): It's OK to defer a constexpr function.
* cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): Check
DECL_LANG_SPECIFIC.
* decl2.c (decl_defined_p): Use it. No longer static.
* decl.c (redeclaration_error_message): Use decl_defined_p.
* constexpr.c (cxx_eval_call_expression): Set input_location around
call to instantiate_decl.
From-SVN: r242056
François Dumont [Thu, 10 Nov 2016 21:29:43 +0000 (21:29 +0000)]
debug.cc (format_word): Delete.
2016-11-10 François Dumont <fdumont@gcc.gnu.org>
* src/c++11/debug.cc (format_word): Delete.
(print_literal): New. Replace call to print_word for literals.
From-SVN: r242055
Michael Meissner [Thu, 10 Nov 2016 19:38:33 +0000 (19:38 +0000)]
rs6000.c (rs6000_hard_regno_mode_ok): If ISA 3.0...
[gcc]
2016-11-10 Michael Meissner <meissner@linux.vnet.ibm.com>
* config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): If ISA 3.0,
enable HImode and QImode to go in vector registers by default if
the -mvsx-small-integer option is enabled.
(rs6000_secondary_reload_simple_move): Likewise.
(rs6000_preferred_reload_class): Don't force integer constants to
be loaded into vector registers that we can easily make into
memory (or being created in the GPRs and moved over with direct
move).
* config/rs6000/vsx.md (UNSPEC_P9_MEMORY): Delete, no longer
used.
(vsx_extract_<mode>): Rework V4SImode, V8HImode, and V16QImode
vector extraction on ISA 3.0 when the scalar integer can be
allocated in vector registers. Generate the VEC_SELECT directy,
and don't use UNSPEC's to avoid having the scalar type in a vector
register. Make the expander target registers, and let the
combiner fold in results storing to memory, if the machine
supports stores.
(vsx_extract_<mode>_di): Likewise.
(vsx_extract_<mode>_p9): Likewise.
(vsx_extract_<mode>_di_p9): Likewise.
(vsx_extract_<mode>_store_p9): Likewise.
(vsx_extract_si): Likewise.
(vsx_extract_<mode>_p8): Likewise.
(p9_lxsi<wd>zx): Delete, no longer used.
(p9_stxsi<wd>x): Likewise.
* config/rs6000/rs6000.md (INT_ISA3): New mode iterator for
integers in vector registers for ISA 3.0.
(QHI): Update comment.
(zero_extendqi<mode>2): Add support for ISA 3.0 scalar load or
vector extract instructions in sign/zero extend.
(zero_extendhi<mode>): Likewise.
(extendqi<mode>): Likewise.
(extendhi<mode>2): Likewise.
(HImode splitter for load/sign extend in vector register):
Likewise.
(float<QHI:mode><FP_ISA3:mode>2): Eliminate old method of
optimizing floating point conversions to/from small data types and
rewrite it to support QImode/HImode being allowed in vector
registers on ISA 3.0.
(float<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
(floatuns<QHI:mode><FP_ISA3:mode>2): Likewise.
(floatuns<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
(fix_trunc<SFDF:mode><QHI:mode>2): Likewise.
(fix_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
(fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
(fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
VSPLITISW on ISA 2.07.
(movhi_internal): Combine movhi_internal and movqi_internal into
one mov<mode>_internal with an iterator. Add support for QImode
and HImode being allowed in vector registers. Make large number
of attributes and constraints easier to read.
(movqi_internal): Likewise.
(mov<mode>_internal): Likewise.
(movdi_internal64): Fix constraint to allow loading -16..15 with
VSPLITISW on ISA 2.07.
(integer XXSPLTIB splitter): Add support for QI, HI, and SImode as
well as DImode.
[gcc/testsuite]
2016-11-10 Michael Meissner <meissner@linux.vnet.ibm.com>
* gcc.target/powerpc/vsx-qimode.c: New test for QImode, HImode
being allowed in vector registers.
* gcc.target/powerpc/vsx-qimode2.c: Likewise.
* gcc.target/powerpc/vsx-qimode3.c: Likewise.
* gcc.target/powerpc/vsx-himode.c: Likewise.
* gcc.target/powerpc/vsx-himode2.c: Likewise.
* gcc.target/powerpc/vsx-himode3.c: Likewise.
* gcc.target/powerpc/p9-extract-1.c: Change MFVSRD to just MFVSR,
to allow matching MFVSRD or MFVSRW.
From-SVN: r242048
Pat Haugen [Thu, 10 Nov 2016 18:55:57 +0000 (18:55 +0000)]
re PR rtl-optimization/78241 (wrong code with -funroll-loops)
PR rtl-optimization/78241
* loop-unroll.c (unroll_loop_runtime_iterations): Don't adjust 'niter', but
emit initial peel copy if niter expr is not reliable.
* gcc.dg/pr78241.c: New test.
From-SVN: r242047
Segher Boessenkool [Thu, 10 Nov 2016 17:43:02 +0000 (18:43 +0100)]
dwarf2cfi: Dump row differences before asserting
If maybe_record_trace_start fails because the CFI is inconsistent on two
paths into a block it currently just ICEs. This changes it to also dump
the CFI on those two paths in the dump file; debugging it without that
information is hopeless.
* dwarf2cfi.c (dump_cfi_row): Add forward declaration.
(maybe_record_trace_start): If the CFI is different on the new and
old paths, print out both to the dump file before ICEing.
From-SVN: r242046
Jakub Jelinek [Thu, 10 Nov 2016 17:05:18 +0000 (18:05 +0100)]
cpp.c (cpp_define_builtins): Define _OPENMP to 201511 instead of 201307.
gcc/fortran/
* cpp.c (cpp_define_builtins): Define _OPENMP to 201511 instead
of 201307.
* gfortran.texi: Mention partial OpenMP 4.5 support.
* intrinsic.texi: Update for OpenMP 4.5.
gcc/testsuite/
* gfortran.dg/openmp-define-3.f90: Expect 201511 instead of
201307.
libgomp/
* omp_lib.f90.in (openmp_version): Change to 201511 from 201307.
* omp_lib.h.in (openmp_version): Likewise.
* testsuite/libgomp.fortran/openmp_version-1.f: Expect 201511 instead
of 201307.
* testsuite/libgomp.fortran/openmp_version-2.f90: Likewise.
From-SVN: r242044
Vladimir Makarov [Thu, 10 Nov 2016 17:04:31 +0000 (17:04 +0000)]
target.def (additional_allocno_class_p): New.
2016-11-10 Vladimir Makarov <vmakarov@redhat.com>
* target.def (additional_allocno_class_p): New.
* hooks.h (hook_bool_reg_class_t_false): New prototype.
* hooks.c (hook_bool_reg_class_t_false): New.
* ira.c (setup_allocno_and_important_classes): Use the new hook.
* doc/tm.texi.in (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Add it.
* doc/tm.texi: Update.
From-SVN: r242043
Jakub Jelinek [Thu, 10 Nov 2016 17:04:06 +0000 (18:04 +0100)]
mangle.c (mangle_decl): Only emit -Wc++1z-compat warnings for public or external symbols.
* mangle.c (mangle_decl): Only emit -Wc++1z-compat warnings for
public or external symbols.
* g++.dg/cpp1z/noexcept-type14.C: New test.
* g++.dg/asan/asan_test.C: Remove -Wno-c++1z-compat from dg-options.
From-SVN: r242042
James Greenhalgh [Thu, 10 Nov 2016 16:53:58 +0000 (16:53 +0000)]
[Patch testsuite] Check range of exponent for tests added in r241817
gcc/ChangeLog
2016-11-10 James Greenhalgh <james.greenhalgh@arm.com>
* gcc.dg/torture/fp-int-convert.h (M_OK2): New, use it in
WVAL0S tests added in r241817.
From-SVN: r242041
Jason Merrill [Thu, 10 Nov 2016 16:49:08 +0000 (11:49 -0500)]
gengtype.c (new_structure): Append to structures list.
* gengtype.c (new_structure): Append to structures list.
(find_structure): Likewise.
From-SVN: r242040
Jim Wilson [Thu, 10 Nov 2016 15:20:59 +0000 (15:20 +0000)]
Fix loop distribution bug with merging edges that creates too many edges.
gcc/
* tree-loop-distribution.c (pg_add_dependence_edges): Return 2 if
this_dir is 2. Check for this_dir non-zero before dir != this_dir
check.
From-SVN: r242038
Jakub Jelinek [Thu, 10 Nov 2016 11:38:05 +0000 (12:38 +0100)]
omp-low.c (lower_omp_target): Fix up argument to is_reference.
gcc/
* omp-low.c (lower_omp_target): Fix up argument to is_reference.
(expand_omp_ordered_sink): Handle TREE_PURPOSE of deps being
TRUNC_DIV_EXPR.
* gimplify.c (gimplify_scan_omp_clauses): Likewise. Set
ctx->target_map_scalars_firstprivate on OMP_TARGET even for Fortran.
Remove omp_no_lastprivate callers. Propagate lastprivate on combined
teams distribute parallel for simd even to distribute and teams
construct. For OMP_CLAUSE_DEPEND add missing break at the end of
OMP_CLAUSE_DEPEND_SINK case.
(omp_notice_variable): Use lang_hooks.decls.omp_scalar_p.
(omp_no_lastprivate): Removed.
(gimplify_adjust_omp_clauses): Remove omp_no_lastprivate callers.
(gimplify_omp_for): Likewise.
(computable_teams_clause): Fail for automatic vars from current
function not yet seen in bind expr.
* langhooks.c (lhd_omp_scalar_p): New function.
* langhooks.h (struct lang_hooks_for_decls): Add omp_scalar_p.
* varpool.c (varpool_node::get_create): Set node->offloading
even for DECL_EXTERNAL decls.
* langhooks-def.h (lhd_omp_scalar_p): New prototype.
(LANG_HOOKS_OMP_SCALAR_P): Define.
(LANG_HOOKS_DECLS): Use it.
gcc/fortran/
* openmp.c (gfc_free_omp_clauses): Free critical_name, grainsize,
hint, num_tasks, priority and if_exprs.
(gfc_match_omp_to_link, gfc_match_omp_depend_sink): New functions.
(enum omp_mask1, enum omp_mask2): New enums.
Change all OMP_CLAUSE_* defines into enum values, and change their
values from ((uint64_t) 1 << bit) to just bit.
(omp_mask, omp_inv_mask): New classes. Add ctors and operators.
(gfc_match_omp_clauses): Change mask argument from uint64_t to
const omp_mask. Assert OMP_MASK1_LAST and OMP_MASK2_LAST are
at most 64. Move delete clause handling to where it
alphabetically belongs. Parse defaultmap, grainsize, hint,
is_device_ptr, nogroup, nowait, num_tasks, priority, simd, threads
and use_device_ptr clauses. Parse if clause modifier. Parse map
clause always modifier, and release and delete kinds. Parse ordered
clause with argument. Parse schedule clause modifiers. Differentiate
device clause parsing based on openacc flag. Guard link clause
parsing with openacc flag. Add support for parsing
linear clause modifiers. Parse depend(source) and depend(sink: ...).
Use gfc_match_omp_to_link for to and link clauses in declare target
construct.
(match_acc): Change mask type from uint64_t to const omp_mask.
(OMP_SINGLE_CLAUSES, OMP_ORDERED_CLAUSES,
OMP_DECLARE_TARGET_CLAUSES, OMP_TASKLOOP_CLAUSES,
OMP_TARGET_ENTER_DATA_CLAUSES, OMP_TARGET_EXIT_DATA_CLAUSES): Define.
(OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_DATA_CLAUSES,
OACC_LOOP_CLAUSES, OACC_HOST_DATA_CLAUSES, OACC_DECLARE_CLAUSES,
OACC_ENTER_DATA_CLAUSES, OACC_EXIT_DATA_CLAUSES, OACC_WAIT_CLAUSES,
OACC_ROUTINE_CLAUSES, OMP_PARALLEL_CLAUSES, OMP_DECLARE_SIMD_CLAUSES,
OMP_SECTIONS_CLAUSES, OMP_TEAMS_CLAUSES, OMP_DISTRIBUTE_CLAUSES):
Replace first or only OMP_CLAUSE_* value in bitset with
omp_mask (OMP_CLAUSE_*).
(OMP_DO_CLAUSES): Likewise. Add OMP_CLAUSE_LINEAR.
(OMP_SIMD_CLAUSES): Replace first or only OMP_CLAUSE_* value in
bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_SIMDLEN.
(OACC_UPDATE_CLAUSES): Replace first or only OMP_CLAUSE_* value in
bitset with omp_mask (OMP_CLAUSE_*). Replace OMP_CLAUSE_OACC_DEVICE
with OMP_CLAUSE_DEVICE.
(OMP_TASK_CLAUSES): Replace first or only OMP_CLAUSE_* value in
bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_PRIORITY.
(OMP_TARGET_CLAUSES): Replace first or only OMP_CLAUSE_* value in
bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_DEPEND,
OMP_CLAUSE_NOWAIT, OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE,
OMP_CLAUSE_DEFAULTMAP and OMP_CLAUSE_IS_DEVICE_PTR.
(OMP_TARGET_DATA_CLAUSES): Replace first or only OMP_CLAUSE_* value in
bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_USE_DEVICE_PTR.
(OMP_TARGET_UPDATE_CLAUSES): Replace first or only OMP_CLAUSE_* value
in bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_DEPEND and
OMP_CLAUSE_NOWAIT.
(match_omp): Change mask argument from unsigned int to
const omp_mask.
(gfc_match_omp_critical): Parse optional clauses and use omp_clauses
union member instead of omp_name.
(gfc_match_omp_end_critical): New function.
(gfc_match_omp_distribute_parallel_do): Remove ordered and linear
clauses from the mask.
(gfc_match_omp_distribute_parallel_do_simd): Use
& ~(omp_mask (OMP_CLAUSE_*)) instead of & ~OMP_CLAUSE_*.
(gfc_match_omp_target_teams_distribute_parallel_do_simd): Likewise.
(gfc_match_omp_teams_distribute_parallel_do_simd): Likewise.
(gfc_match_omp_do_simd): Likewise. Don't remove ordered clause from
the mask.
(gfc_match_omp_parallel_do_simd): Likewise.
(gfc_match_omp_target_teams_distribute_parallel_do): Likewise.
(gfc_match_omp_teams_distribute_parallel_do): Likewise.
(gfc_match_omp_declare_simd): If not using the form with
(proc-name), require space before first clause. Make (proc-name)
optional. If not present, set proc_name to NULL.
(gfc_match_omp_declare_target): Rewritten for OpenMP 4.5.
(gfc_match_omp_single): Use OMP_SINGLE_CLAUSES.
(gfc_match_omp_task, gfc_match_omp_taskwait, gfc_match_omp_taskyield):
Move around to where they belong alphabetically.
(gfc_match_omp_target_enter_data, gfc_match_omp_target_exit_data,
gfc_match_omp_target_parallel, gfc_match_omp_target_parallel_do,
gfc_match_omp_target_parallel_do_simd, gfc_match_omp_target_simd,
gfc_match_omp_taskloop, gfc_match_omp_taskloop_simd):
New functions.
(gfc_match_omp_ordered): Parse clauses.
(gfc_match_omp_ordered_depend): New function.
(gfc_match_omp_cancel, gfc_match_omp_end_single): Use
omp_mask (OMP_CLAUSE_*) instead of OMP_CLAUSE_*.
(resolve_oacc_scalar_int_expr): Renamed to ...
(resolve_scalar_int_expr): ... this. Fix up formatting.
(resolve_oacc_positive_int_expr): Renamed to ...
(resolve_positive_int_expr): ... this. Fix up formatting.
(resolve_nonnegative_int_expr): New function.
(resolve_omp_clauses): Adjust callers, use the above functions
even for OpenMP clauses, add handling of new OpenMP 4.5 clauses.
Require orderedc >= collapse if specified. Handle depend(sink:)
and depend(source) restrictions. Disallow linear clause when
orderedc is non-zero. Diagnose linear clause modifiers when not in
declare simd. Only check for integer type if ref modifier
is not used. Remove diagnostics for required VALUE attribute.
Diagnose VALUE attribute with ref or uval modifiers. Allow
non-constant linear-step, if it is a dummy argument alone and is
mentioned in uniform clause. Diagnose map kinds not allowed
for various constructs. Diagnose target {enter ,exit ,}data without
any map clauses. Add dummy OMP_LIST_IS_DEVICE_PTR and
OMP_LIST_USE_DEVICE_PTR cases.
(gfc_resolve_omp_do_blocks): Set omp_current_do_collapse to orderedc
if non-zero.
(gfc_resolve_omp_parallel_blocks): Handle new OpenMP 4.5 constructs,
replace underscores with spaces in a few construct names.
(resolve_omp_do): Set collapse to orderedc if non-zero. Handle new
OpenMP 4.5 constructs.
(resolve_oacc_loop_blocks): Call resolve_positive_int_expr instead
of resolve_oacc_positive_int_expr.
(gfc_resolve_omp_directive): Handle new OpenMP 4.5 constructs.
(gfc_resolve_omp_declare_simd): Allow ods->proc_name to be NULL.
* trans-openmp.c (gfc_omp_scalar_p): New function.
(doacross_steps): New variable.
(gfc_trans_omp_clauses): Handle new OpenMP 4.5 clauses and new clause
modifiers.
(gfc_trans_omp_critical): Adjust EXEC_OMP_CRITICAL handling.
(gfc_trans_omp_do): Handle doacross loops. Clear sched_simd flag.
Handle EXEC_OMP_TASKLOOP.
(gfc_trans_omp_ordered): Translate omp clauses, allow NULL
code->block.
(GFC_OMP_SPLIT_TASKLOOP, GFC_OMP_MASK_TASKLOOP): New enum constants.
(gfc_split_omp_clauses): Copy orderedc together with ordered. Change
firstprivate and lastprivate handling for OpenMP 4.5.
Handle EXEC_OMP_TARGET_SIMD, EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD}
and EXEC_OMP_TASKLOOP{,_SIMD}. Add handling for new OpenMP 4.5
clauses and clause modifiers and handle if clause without/with
modifiers.
(gfc_trans_omp_teams): Add omp_clauses argument, add it to other
teams clauses. Don't wrap into OMP_TEAMS if -fopenmp-simd.
(gfc_trans_omp_target): For -fopenmp, translate num_teams and
thread_limit clauses on combined target teams early and pass to
gfc_trans_omp_teams. Set OMP_TARGET_COMBINED if needed.
Handle EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD} and
EXEC_OMP_TARGET_SIMD.
(gfc_trans_omp_taskloop, gfc_trans_omp_target_enter_data,
gfc_trans_omp_target_exit_data): New functions.
(gfc_trans_omp_directive): Handle EXEC_OMP_TARGET_{ENTER,EXIT}_DATA
EXEC_OMP_TASKLOOP{,_SIMD}, EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD}
and EXEC_OMP_TARGET_SIMD. Adjust gfc_trans_omp_teams caller.
* symbol.c (check_conflict): Handle omp_declare_target_link.
(gfc_add_omp_declare_target_link): New function.
(gfc_copy_attr): Copy omp_declare_target_link.
* dump-parse-tree.c (show_omp_namelist): Handle OMP_DEPEND_SINK_FIRST
depend_op. Print linear clause modifiers.
(show_omp_clauses): Adjust for OpenMP 4.5 clause changes.
(show_omp_node): Print clauses for EXEC_OMP_ORDERED. Allow NULL
c->block for EXEC_OMP_ORDERED. Formatting fixes. Adjust handling of
EXEC_OMP_CRITICAL, handle new OpenMP 4.5 constructs and some
forgotten OpenMP 4.0 constructs.
(show_code_node): Handle new OpenMP 4.5 constructs and some forgotten
OpenMP 4.0 constructs.
* gfortran.h (symbol_attribute): Add omp_declare_target_link bitfield.
(struct gfc_omp_namelist): Add u.common and u.linear_op fields.
(struct gfc_common_head): Change omp_declare_target into bitfield.
Add omp_declare_target_link bitfield.
(gfc_add_omp_declare_target_link): New prototype.
(enum gfc_statement): Add ST_OMP_TARGET_PARALLEL,
ST_OMP_END_TARGET_PARALLEL, ST_OMP_TARGET_PARALLEL_DO,
ST_OMP_END_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD,
ST_OMP_END_TARGET_PARALLEL_DO_SIMD, ST_OMP_TARGET_ENTER_DATA,
ST_OMP_TARGET_EXIT_DATA, ST_OMP_TARGET_SIMD, ST_OMP_END_TARGET_SIMD,
ST_OMP_TASKLOOP, ST_OMP_END_TASKLOOP, ST_OMP_TASKLOOP_SIMD,
ST_OMP_END_TASKLOOP_SIMD and ST_OMP_ORDERED_DEPEND.
(enum gfc_omp_depend_op): Add OMP_DEPEND_SINK_FIRST and
OMP_DEPEND_SINK.
(enum gfc_omp_linear_op): New.
(struct gfc_omp_clauses): Add critical_name, depend_source,
orderedc, defaultmap, nogroup, sched_simd, sched_monotonic,
sched_nonmonotonic, simd, threads, grainsize, hint, num_tasks,
priority and if_exprs fields.
(enum gfc_exec_op): Add EXEC_OMP_END_CRITICAL,
EXEC_OMP_TARGET_ENTER_DATA, EXEC_OMP_TARGET_EXIT_DATA,
EXEC_OMP_TARGET_PARALLEL, EXEC_OMP_TARGET_PARALLEL_DO,
EXEC_OMP_TARGET_PARALLEL_DO_SIMD, EXEC_OMP_TARGET_SIMD,
EXEC_OMP_TASKLOOP, EXEC_OMP_TASKLOOP_SIMD.
(enum gfc_omp_map_op): Add OMP_MAP_RELEASE,
OMP_MAP_ALWAYS_TO, OMP_MAP_ALWAYS_FROM and OMP_MAP_ALWAYS_TOFROM.
(OMP_LIST_IS_DEVICE_PTR, OMP_LIST_USE_DEVICE_PTR): New.
(enum gfc_omp_if_kind): New.
* module.c (enum ab_attribute): Add AB_OMP_DECLARE_TARGET_LINK.
(attr_bits): Add AB_OMP_DECLARE_TARGET_LINK entry.
(mio_symbol_attribute): Save and restore omp_declare_target_link bit.
* trans.h (gfc_omp_scalar_p): New prototype.
* frontend-passes.c (gfc_code_walker): Handle new OpenMP 4.5
expressions.
* trans.c (trans_code): Handle new OpenMP 4.5 constructs.
* resolve.c (gfc_resolve_blocks): Likewise.
(gfc_resolve_code): Likewise.
* f95-lang.c (LANG_HOOKS_OMP_SCALAR_P): Redefine to gfc_omp_scalar_p.
(gfc_attribute_table): Add "omp declare target link".
* st.c (gfc_free_statement): Handle EXEC_OMP_END_CRITICAL like
EXEC_OMP_CRITICAL before, free clauses for EXEC_OMP_CRITICAL
and new OpenMP 4.5 constructs. Free omp clauses even for
EXEC_OMP_ORDERED.
* match.c (match_exit_cycle): Rename collapse variable to count,
set it to orderedc if non-zero, instead of collapse.
* trans-decl.c (add_attributes_to_decl): Add "omp declare target link"
instead of "omp declare target" for omp_declare_target_link.
* trans-common.c (build_common_decl): Likewise.
* match.h (gfc_match_omp_target_enter_data,
gfc_match_omp_target_exit_data, gfc_match_omp_target_parallel,
gfc_match_omp_target_parallel_do,
gfc_match_omp_target_parallel_do_simd, gfc_match_omp_target_simd,
gfc_match_omp_taskloop, gfc_match_omp_taskloop_simd,
gfc_match_omp_end_critical, gfc_match_omp_ordered_depend): New
prototypes.
* parse.c (decode_omp_directive): Use gfc_match_omp_end_critical
instead of gfc_match_omp_critical for !$omp end critical.
Handle new OpenMP 4.5 constructs. If ordered directive has
depend clause as the first of the clauses, use
gfc_match_omp_ordered_depend and ST_OMP_ORDERED_DEPEND instead of
gfc_match_omp_ordered and ST_OMP_ORDERED.
(case_executable): Add ST_OMP_TARGET_ENTER_DATA,
ST_OMP_TARGET_EXIT_DATA and ST_OMP_ORDERED_DEPEND cases.
(case_exec_markers): Add ST_OMP_TARGET_PARALLEL,
ST_OMP_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD,
ST_OMP_TARGET_SIMD, ST_OMP_TASKLOOP and ST_OMP_TASKLOOP_SIMD cases.
(gfc_ascii_statement): Handle new OpenMP 4.5 constructs.
(parse_omp_do): Handle ST_OMP_TARGET_PARALLEL_DO,
ST_OMP_TARGET_PARALLEL_DO_SIMD, ST_OMP_TASKLOOP and
ST_OMP_TASKLOOP_SIMD.
(parse_omp_structured_block): Handle EXEC_OMP_END_CRITICAL instead
of EXEC_OMP_CRITICAL, adjust for EXEC_OMP_CRITICAL having omp clauses
now.
(parse_executable): Handle ST_OMP_TARGET_PARALLEL,
ST_OMP_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD,
ST_OMP_TASKLOOP and ST_OMP_TASKLOOP_SIMD.
gcc/testsuite/
* gfortran.dg/gomp/pr77516.f90: Add dg-warning.
* gfortran.dg/gomp/target1.f90: Remove ordered clause where it is
no longer allowed and corresponding ordered construct.
* gfortran.dg/gomp/linear-1.f90: New test.
* gfortran.dg/gomp/declare-simd-2.f90: New test.
* gfortran.dg/gomp/declare-target-1.f90: New test.
* gfortran.dg/gomp/declare-target-2.f90: New test.
libgomp/
* testsuite/libgomp.fortran/examples-4/declare_target-1.f90
(fib_wrapper): Add map(from: x) clause.
* testsuite/libgomp.fortran/examples-4/declare_target-2.f90
(e_53_2): Likewise.
* testsuite/libgomp.fortran/examples-4/declare_target-4.f90
(accum): Add map(tmp) clause.
* testsuite/libgomp.fortran/examples-4/declare_target-5.f90
(accum): Add map(tofrom: tmp) clause.
* testsuite/libgomp.fortran/examples-4/target_data-3.f90
(gramSchmidt): Likewise.
* testsuite/libgomp.fortran/examples-4/teams-2.f90 (dotprod): Add
map(tofrom: sum) clause.
* testsuite/libgomp.fortran/nestedfn5.f90 (foo): Add twice
map (alloc: a, l) clause. Add defaultmap(tofrom: scalar) clause.
* testsuite/libgomp.fortran/pr66199-2.f90: Adjust for linear clause
only allowed on the loop iterator.
* testsuite/libgomp.fortran/target4.f90 (foo): Add map(t) clause.
* testsuite/libgomp.fortran/taskloop2.f90: New test.
* testsuite/libgomp.fortran/taskloop4.f90: New test.
* testsuite/libgomp.fortran/doacross1.f90: New test.
* testsuite/libgomp.fortran/doacross3.f90: New test.
* testsuite/libgomp.fortran/taskloop1.f90: New test.
* testsuite/libgomp.fortran/taskloop3.f90: New test.
* testsuite/libgomp.fortran/doacross2.f90: New test.
* testsuite/libgomp.c/doacross-1.c (main): Add missing
#pragma omp atomic read.
* testsuite/libgomp.c/doacross-2.c (main): Likewise.
* testsuite/libgomp.c/doacross-3.c (main): Likewise.
From-SVN: r242037
Martin Liska [Thu, 10 Nov 2016 11:21:03 +0000 (12:21 +0100)]
Create live_switch_vars conditionally (PR sanitizer/78270)
PR sanitizer/78270
* gcc.dg/asan/pr78270.c: New test.
PR sanitizer/78270
* gimplify.c (gimplify_switch_expr): Create live_switch_vars
only when SWITCH_BODY is a BIND_EXPR.
From-SVN: r242036
Pierre-Marie de Rodat [Thu, 10 Nov 2016 11:06:32 +0000 (11:06 +0000)]
debug/78112: remove recent duplicates for DW_TAG_subprogram attributes
Disable unnecessary calls to dwarf2out_decl for the parents of nested
functions. This fixes a libstdc++ build regression on
x86_64-apple-darwin, as these calls used to add duplicate attributes
(for instance DW_AT_inline and DW_AT_object_pointer) to the
corresponding DW_TAG_subprogram DIE.
Bootstrapped and regtested on x86_64-linux.
gcc/
PR debug/78112
* dwarf2out.c (dwarf2out_early_global_decl): Call dwarf2out_decl
on the context only when it has no DIE yet.
testsuite/
PR debug/78112
* g++.dg/pr78112.C: New testcase
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r242035
Richard Earnshaw [Thu, 10 Nov 2016 10:38:03 +0000 (10:38 +0000)]
[ARM] Remove duplicated enum type for CPU identifiers
* arm.h (target_cpus): Delete.
* arm-opts.h (enum processor_type): Prefix entires with TARGET_CPU_.
* arm.c (all_cores): Prefix IDENT with TARGET_CPU_.
(all_architectures): Likewise.
(arm_option_override): Adjust use of CPU enums.
(arm_sched_reorder): Likewise.
* vfp.md (movdi_vfp, movdi_vfp_cortexa8): Likewise.
* arm.opt (mcpu, mtune): Adjust use of CPU enums.
* arm/genopt.sh (processor_type): Prefix enumeration entries with
TARGET_CPU_.
* arm-tables.opt: Regenerated.
From-SVN: r242034
Siddhesh Poyarekar [Thu, 10 Nov 2016 10:24:53 +0000 (10:24 +0000)]
[ARM/AArch64] Add Falkor CPU support.
2016-11-10 Siddhesh Poyarekar <siddhesh.poyarekar@linaro.org>
* config/aarch64/aarch64-cores.def (qdf24xx): Update part
number.
(falkor): New core.
* config/aarch64/aarch64-tune.md: Regenerated.
* config/arm/arm-cores.def (falkor): New core.
* config/arm/arm-tables.opt: Regenerated.
* config/arm/arm-tune.md: Regenerated.
* config/arm/bpabi.h (BE8_LINK_SPEC): Add falkor support.
* config/arm/t-aprofile (MULTILIB_MATCHES): Likewise.
* doc/invoke.texi (AArch64 Options/-mtune): Document it.
(ARM Options/-mtune): Likewise.
From-SVN: r242033
Kugan Vivekanandarajah [Thu, 10 Nov 2016 07:13:39 +0000 (07:13 +0000)]
revert: ipa-cp.c (ipa_get_jf_pass_through_result): Handle unary expressions.
2016-11-10 Kugan Vivekanandarajah <kuganv@linaro.org>
Revert
2016-11-09 Kugan Vivekanandarajah <kuganv@linaro.org>
* ipa-cp.c (ipa_get_jf_pass_through_result): Handle unary expressions.
(propagate_vr_accross_jump_function): Likewise.
* ipa-prop.c (ipa_set_jf_unary_pass_through): New.
(load_from_param_1): New.
(load_from_unmodified_param): Factor common part into load_from_param_1.
(load_from_param): New.
(compute_complex_assign_jump_func): Handle unary expressions.
(ipa_write_jump_function): Likewise.
(ipa_read_jump_function): Likewise.
From-SVN: r242032
Segher Boessenkool [Thu, 10 Nov 2016 00:32:43 +0000 (01:32 +0100)]
simplify-rtx: Transform (xor (and (xor A B) C) B) with C const
match.pd transforms (A&C)|(B&~C) to ((A^B)&C)^B, which is fewer
operations if C is not const (and it is not on simple tests at least,
this transform is done very early already).
Various processors have "insert" instructions that can do this, but
combine cannot build those from the xor-and-xor, especially it has no
chance at all to do that if A or B or multiple instructions as well
(on PowerPC, the rl[wd]imi instructions can do this with together with
a rotate, or a simple shift with appropriate C; other ISAs have similar
insns).
This patch makes RTL simplify transform (xor (and (xor A B) C) B) back
to (ior (and A C) (and B ~C)) for constant C (and similar with A instead
of B for that last term).
* simplify-rtx.c (simplify_binary_operation_1): Simplify
(xor (and (xor A B) C) B) to (ior (and A C) (and B ~C)) and
(xor (and (xor A B) C) A) to (ior (and A ~C) (and B C)) if C
is a const_int.
From-SVN: r242031
GCC Administrator [Thu, 10 Nov 2016 00:16:18 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r242030
Jakub Jelinek [Wed, 9 Nov 2016 23:00:26 +0000 (00:00 +0100)]
asan_test.C: Remove -Wno-format, add -Wno-c++1z-compat.
* g++.dg/asan/asan_test.C: Remove -Wno-format, add
-Wno-c++1z-compat.
* g++.dg/asan/dejagnu-gtest.h (EXPECT_TRUE): Use "%s" format
string in case condition contains % characters.
From-SVN: r242027
Jakub Jelinek [Wed, 9 Nov 2016 22:56:35 +0000 (23:56 +0100)]
re PR c++/78283 (-Wc++1z-compat warning is sticky)
PR c++/78283
* mangle.c (start_mangling): Reset G.need_cxx1z_warning.
* g++.dg/cpp1z/noexcept-type13.C: New test.
From-SVN: r242026
Tim Shen [Wed, 9 Nov 2016 22:11:32 +0000 (22:11 +0000)]
regex.h (regex_iterator::regex_iterator()): Define end() as _M_pregex == nullptr.
* libstdc++-v3/include/bits/regex.h (regex_iterator::regex_iterator()):
Define end() as _M_pregex == nullptr.
* libstdc++-v3/include/bits/regex.tcc (regex_iterator::operator==(),
regex_iterator::operator++()): Fix operator==() and operator++() to
look at null-ness of _M_pregex on both sides.
* testsuite/28_regex/regression.cc: New testcase.
From-SVN: r242025
Ian Lance Taylor [Wed, 9 Nov 2016 21:41:58 +0000 (21:41 +0000)]
compiler: rework static initializer code
Rename is_immutable to is_static_initializer to try to capture what it
really means. Be more precise about when an address expression, or a
binary expression, can be a static initializer. Don't check whether a
type has pointers when deciding whether an initializer must be
read-write, just check whether it is being used to initialize a global
variable. To make that work set the Translate_context function to NULL
for a global variable with a static initializer.
The effect of this is to let more global variables be initialized
directly, rather than being initialized in the generated init function.
Reviewed-on: https://go-review.googlesource.com/32917
From-SVN: r242024
David Malcolm [Wed, 9 Nov 2016 20:55:03 +0000 (20:55 +0000)]
print-rtl-function.c: add (param) directive to dump
gcc/ChangeLog:
* print-rtl-function.c: Include varasm.h.
(print_any_param_name): New function.
(print_param): New function.
(print_rtx_function): Call print_param for each argument.
* print-rtl.c (rtx_writer::finish_directive): New function.
* print-rtl.h (rtx_writer::finish_directive): New decl.
From-SVN: r242023
Toma Tabacu [Wed, 9 Nov 2016 20:34:21 +0000 (20:34 +0000)]
mips.exp (mips-dg-options): Upgrade to MIPS IV if using (HAS_MOVN) with MIPS III.
2016-11-09 Toma Tabacu <toma.tabacu@imgtec.com>
* gcc.target/mips/mips.exp (mips-dg-options): Upgrade to MIPS IV if
using (HAS_MOVN) with MIPS III.
From-SVN: r242021
Janus Weil [Wed, 9 Nov 2016 20:33:24 +0000 (21:33 +0100)]
[multiple changes]
2016-11-09 Mikael Morin <mikael@gcc.gnu.org>
Janus Weil <janus@gcc.gnu.org>
PR fortran/46459
* interface.c (compare_actual_formal): Add safety checks to avoid ICE.
2016-11-09 Janus Weil <janus@gcc.gnu.org>
PR fortran/46459
* gfortran.dg/volatile14.f90: New test.
From-SVN: r242020
Jason Merrill [Wed, 9 Nov 2016 20:02:56 +0000 (15:02 -0500)]
Fix C++17 template placeholder for template template parm.
* parser.c (cp_parser_simple_type_specifier): Allow placeholder
for template template parameter.
(cp_parser_type_id_1): Improve diagnostic.
* decl.c (grokdeclarator): Handle class deduction diagnostics here.
* pt.c (splice_late_return_type): Not here.
(tsubst) [TEMPLATE_TYPE_PARM]: Substitute into placeholder template.
(do_class_deduction): Handle non-class templates.
From-SVN: r242018
Jason Merrill [Wed, 9 Nov 2016 20:02:50 +0000 (15:02 -0500)]
Implement P0127R2, Declaring non-type parameters with auto.
gcc/cp/
* cp-tree.h (enum auto_deduction_context): Add adc_unify.
* decl.c (grokdeclarator): Allow 'auto' in C++17 template non-type
parameter types.
* pt.c (do_auto_deduction): Add outer_targs parameter.
(convert_template_argument): Call do_auto_deduction. If adc_unify,
don't give up on dependent init.
(unify): Likewise. In C++17, walk into the type of a
TEMPLATE_PARM_INDEX.
(for_each_template_parm): Add any_fn parameter.
(struct pair_fn_data): Likewise.
(for_each_template_parm_r): Call it for any tree. In C++17, walk
into the type of a TEMPLATE_PARM_INDEX.
(zero_r, array_deduction_r, try_array_deduction): New.
(type_unification_real): Call try_array_deduction.
(get_partial_spec_bindings): Likewise.
gcc/c-family/
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
From-SVN: r242017
Uros Bizjak [Wed, 9 Nov 2016 19:21:11 +0000 (20:21 +0100)]
re PR target/78262 (wrong code with -fschedule-insns)
PR target/78262
* config/i386/i386.md (*<shift_insn><mode>3_doubleword): Mark
operand 0 as earlyclobber.
testsuite/ChangeLog:
PR target/78262
* gcc.target/i386/pr78262.c: New test.
From-SVN: r242013
Martin Liska [Wed, 9 Nov 2016 17:55:12 +0000 (18:55 +0100)]
* fold-const-call.c (fold_const_call): Fix up type of s0 and s1.
From-SVN: r242011
Fritz O. Reese [Wed, 9 Nov 2016 17:31:27 +0000 (17:31 +0000)]
Fix ICE in gfc_trans_subcomponent_assign due to NULL components.
PR fortran/78259
* gcc/fortran/trans-expr.c (gfc_trans_subcomponent_assign): Guard
against NULL values.
PR fortran/78259
* gcc/testsuite/gfortran.dg/pr78259.f90: New test.
From-SVN: r242010
Janus Weil [Wed, 9 Nov 2016 17:22:02 +0000 (18:22 +0100)]
[multiple changes]
2016-11-09 Steve Kargl <kargl@gcc.gnu.org>
Janus Weil <janus@gcc.gnu.org>
PR fortran/60777
* expr.c (external_spec_function): Allow recursive specification
functions in F03.
2016-11-09 Janus Weil <janus@gcc.gnu.org>
PR fortran/60777
* gfortran.dg/spec_expr_7.f90: New test.
From-SVN: r242009
Jakub Jelinek [Wed, 9 Nov 2016 16:21:45 +0000 (17:21 +0100)]
re PR middle-end/77718 (expand_builtin_memcmp swaps args)
PR target/77718
* builtins.c (expand_builtin_memcmp): Formatting fix.
* gcc.c-torture/execute/pr77718.c: New test.
From-SVN: r242007
Jakub Jelinek [Wed, 9 Nov 2016 15:37:28 +0000 (16:37 +0100)]
flag-types.h (enum sanitize_code): Add SANITIZE_SHIFT_BASE and SANITIZE_SHIFT_EXPONENT...
* flag-types.h (enum sanitize_code): Add SANITIZE_SHIFT_BASE
and SANITIZE_SHIFT_EXPONENT, change SANITIZE_SHIFT to bitwise
or of them, renumber other enumerators.
* opts.c (sanitizer_opts): Add shift-base and shift-exponent.
* doc/invoke.texi: Document -fsanitize=shift-base and
-fsanitize-shift-exponent, document -fsanitize=shift as
having those 2 suboptions.
c-family/
* c-ubsan.c (ubsan_instrument_shift): Handle split
-fsanitize=shift-base and -fsanitize=shift-exponent.
testsuite/
* gcc.dg/ubsan/c99-shift-3.c: New test.
* gcc.dg/ubsan/c99-shift-4.c: New test.
* gcc.dg/ubsan/c99-shift-5.c: New test.
* gcc.dg/ubsan/c99-shift-6.c: New test.
From-SVN: r242005
Richard Biener [Wed, 9 Nov 2016 15:15:28 +0000 (15:15 +0000)]
fold-const.c (tree_swap_operands_p): Remove unused arg.
2016-11-09 Richard Biener <rguenther@suse.de>
* fold-const.c (tree_swap_operands_p): Remove unused arg.
* fold-const.c (tree_swap_operands_p): Likewise.
(fold_binary_loc): Adjust.
(fold_ternary_loc): Likewise.
* genmatch.c (dt_operand::gen_gimple_exp): Likewise.
* gimple-fold.c (fold_stmt_1): Likewise.
* gimple-match-head.c (gimple_resimplify2): Likewise.
(gimple_resimplify3): Likewise.
(gimple_simplify): Likewise.
* tree-ssa-dom.c (record_equality): Likewise.
* tree-ssa-reassoc.c (optimize_range_tests_var_bound): Likewise.
* tree-ssa-sccvn.c (vn_nary_op_compute_hash): Likewise.
* tree-ssa-threadedge.c (simplify_control_stmt_condition_1): Likewise.
From-SVN: r242004
Richard Biener [Wed, 9 Nov 2016 15:09:12 +0000 (15:09 +0000)]
tree-ssa-dom.c (canonicalize_comparison): Remove.
2016-11-09 Richard Biener <rguenther@suse.de>
* tree-ssa-dom.c (canonicalize_comparison): Remove.
(optimize_stmt): Remove redundant pre-propagation canonicalization
of comparison operand order.
From-SVN: r242003
Martin Liska [Wed, 9 Nov 2016 14:07:32 +0000 (15:07 +0100)]
Fix folding of memcmp("a", "a", 2) (PR
* fold-const-call.c (fold_const_call): Fix the folding.
* gcc.dg/tree-ssa/builtins-folding-generic.c (main): Add new
test-case for memcmp.
* gcc.dg/tree-ssa/builtins-folding-gimple.c: Likewise.
From-SVN: r242000
Richard Biener [Wed, 9 Nov 2016 12:37:10 +0000 (12:37 +0000)]
common.opt (flag_evaluation_order): Remove.
2016-11-09 Richard Biener <rguenther@suse.de>
* common.opt (flag_evaluation_order): Remove.
* expr.c (expand_operands): Remove code guarded by
flag_evaluation_order.
* fold-const.c (reorder_operands_p): Remove, it always returns
true.
(negate_expr_p): Remove calls to reorder_operands_p.
(fold_negate_expr): Likewise.
(tree_swap_operands_p): Likewise.
(fold_binary_loc): Likewise.
From-SVN: r241998
Thomas Preud'homme [Wed, 9 Nov 2016 10:50:21 +0000 (10:50 +0000)]
re PR c++/78269 (FAIL: FAIL: g++.dg/cpp1z/noexcept-type11.C and FAIL: g++.dg/cpp1z/noexcept-type9.C)
2016-11-09 Thomas Preud'homme <thomas.preudhomme@arm.com>
gcc/testsuite/
PR testsuite/78269
* g++.dg/cpp1z/noexcept-type9.C: Make it a compile test.
From-SVN: r241997
Andreas Schwab [Wed, 9 Nov 2016 10:40:00 +0000 (10:40 +0000)]
re PR target/78254 (FAIL: g++.dg/torture/pr77822.C -O3 -g (internal compiler error))
PR target/78254
* config/m68k/m68k.md: Reject out-of-range bit pos in bit-fields
insns operating on a register.
From-SVN: r241996
Paul Thomas [Wed, 9 Nov 2016 10:10:41 +0000 (10:10 +0000)]
check.c (gfc_check_move_alloc): Prevent error that avoids aliasing between to and from arguments from rejecting...
2016-11-09 Paul Thomas <pault@gcc.gnu.org>
* check.c (gfc_check_move_alloc): Prevent error that avoids
aliasing between to and from arguments from rejecting valid
code.
2016-11-09 Paul Thomas <pault@gcc.gnu.org>
* gfortran.dg/move_alloc_18.f90: New test.
From-SVN: r241995
Prathamesh Kulkarni [Wed, 9 Nov 2016 09:46:13 +0000 (09:46 +0000)]
re PR testsuite/78256 (test case gcc.dg/pr35691-1.c fails starting with its introduction in r241915)
2016-11-09 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR middle-end/78256
testsuite/
* gcc.dg/pr35691-1.c (foo): Use & instead of &&.
* gcc.dg/pr35691-2.c (foo): Use | instead of ||.
From-SVN: r241994
Janus Weil [Wed, 9 Nov 2016 09:22:52 +0000 (10:22 +0100)]
re PR fortran/71894 ([OOP] ICE in gfc_add_component_ref, at fortran/class.c:227)
2016-11-09 Janus Weil <janus@gcc.gnu.org>
PR fortran/71894
* class.c (gfc_add_component_ref): Add safety checks to avoid ICE.
2016-11-09 Janus Weil <janus@gcc.gnu.org>
PR fortran/71894
* gfortran.dg/class_59.f90: New test.
From-SVN: r241993
Richard Biener [Wed, 9 Nov 2016 08:19:05 +0000 (08:19 +0000)]
re PR target/78007 (Important loop from 482.sphinx3 is not vectorized)
2016-11-09 Richard Biener <rguenther@suse.de>
PR tree-optimization/78007
* tree-vect-stmts.c (vectorizable_bswap): New function.
(vectorizable_call): Call vectorizable_bswap for
BUILT_IN_BSWAP{16,32,64} if arguments are not promoted.
* gcc.dg/vect/vect-bswap32.c: Adjust.
* gcc.dg/vect/vect-bswap64.c: Likewise.
From-SVN: r241992
Richard Biener [Wed, 9 Nov 2016 08:08:58 +0000 (08:08 +0000)]
tree-vect-data-refs.c (vect_compute_data_ref_alignment): Look at the DR_BASE_ADDRESS object for forcing alignment.
2016-11-09 Richard Biener <rguenther@suse.de>
* tree-vect-data-refs.c (vect_compute_data_ref_alignment):
Look at the DR_BASE_ADDRESS object for forcing alignment.
From-SVN: r241991
Kugan Vivekanandarajah [Wed, 9 Nov 2016 01:44:04 +0000 (01:44 +0000)]
Handle unary pass-through jump functions for ipa-vrp
Handle unary pass-through jump functions for ipa-vrp
gcc/testsuite/ChangeLog:
2016-11-09 Kugan Vivekanandarajah <kuganv@linaro.org>
* gcc.dg/ipa/vrp7.c: New test.
gcc/ChangeLog:
2016-11-09 Kugan Vivekanandarajah <kuganv@linaro.org>
* ipa-cp.c (ipa_get_jf_pass_through_result): Handle unary expressions.
(propagate_vr_accross_jump_function): Likewise.
* ipa-prop.c (ipa_set_jf_unary_pass_through): New.
(load_from_param_1): New.
(load_from_unmodified_param): Factor common part into load_from_param_1.
(load_from_param): New.
(compute_complex_assign_jump_func): Handle unary expressions.
(ipa_write_jump_function): Likewise.
(ipa_read_jump_function): Likewise.
From-SVN: r241990
Kugan Vivekanandarajah [Wed, 9 Nov 2016 01:41:26 +0000 (01:41 +0000)]
Fix ice in set_value_range
Fix ice in set_value_range
gcc/ChangeLog:
2016-11-09 Kugan Vivekanandarajah <kuganv@linaro.org>
PR ipa/78121
* ipa-cp.c (propagate_vr_accross_jump_function): Pass param type.
Also fold constant passed as argument while computing value range.
(propagate_constants_accross_call): Pass param type.
* ipa-prop.c: export ipa_get_callee_param_type.
* ipa-prop.h: export ipa_get_callee_param_type.
gcc/testsuite/ChangeLog:
2016-11-09 Kugan Vivekanandarajah <kuganv@linaro.org>
PR ipa/78121
* gcc.dg/ipa/pr78121.c: New test.
From-SVN: r241989
GCC Administrator [Wed, 9 Nov 2016 00:16:18 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r241987
Maxim Ostapenko [Tue, 8 Nov 2016 22:16:58 +0000 (22:16 +0000)]
asan.h (asan_intercepted_p): Handle BUILT_IN_STRCSPN, BUILT_IN_STRPBRK, BUILT_IN_STRSPN and BUILT_IN_STRSTR.
gcc/
* asan.h (asan_intercepted_p): Handle BUILT_IN_STRCSPN,
BUILT_IN_STRPBRK, BUILT_IN_STRSPN and BUILT_IN_STRSTR.
gcc/testsuite/
* c-c++-common/asan/default_options.h: New file.
* c-c++-common/asan/strcasestr-1.c: New test.
* c-c++-common/asan/strcasestr-2.c: Likewise.
* c-c++-common/asan/strcspn-1.c: Likewise.
* c-c++-common/asan/strcspn-2.c: Likewise.
* c-c++-common/asan/strpbrk-1.c: Likewise.
* c-c++-common/asan/strpbrk-2.c: Likewise.
* c-c++-common/asan/strspn-1.c: Likewise.
* c-c++-common/asan/strspn-2.c: Likewise.
* c-c++-common/asan/strstr-1.c: Likewise.
* c-c++-common/asan/strstr-2.c: Likewise.
* c-c++-common/asan/halt_on_error_suppress_equal_pcs-1.c: Likewise.
From-SVN: r241984
Maxim Ostapenko [Tue, 8 Nov 2016 22:15:35 +0000 (22:15 +0000)]
asan.h (ASAN_STACK_MAGIC_PARTIAL): Remove.
gcc/
* asan.h (ASAN_STACK_MAGIC_PARTIAL): Remove.
* asan.c (ASAN_STACK_MAGIC_PARTIAL): Replace with
ASAN_STACK_MAGIC_MIDDLE.
(asan_global_struct): Increase the size of fields.
(asan_add_global): Add new field constructor.
* sanitizer.def (__asan_version_mismatch_check_v6): Replace with
__asan_version_mismatch_check_v8.
gcc/testsuite/
* c-c++-common/asan/null-deref-1.c: Adjust testcase.
From-SVN: r241983
Maxim Ostapenko [Tue, 8 Nov 2016 22:09:33 +0000 (22:09 +0000)]
asan_globals.cc (RegisterGlobal): Do not call CheckODRViolationViaPoisoning.
libsanitizer/
* asan/asan_globals.cc (RegisterGlobal): Do not call
CheckODRViolationViaPoisoning.
(CheckODRViolationViaPoisoning): Remove.
From-SVN: r241981
Maxim Ostapenko [Tue, 8 Nov 2016 22:07:50 +0000 (22:07 +0000)]
sanitizer_stacktrace.cc (GetCanonicFrame): Assume we compiled code with GCC when extracting the caller PC for ARM if...
libsanitizer/
* sanitizer_common/sanitizer_stacktrace.cc (GetCanonicFrame): Assume we
compiled code with GCC when extracting the caller PC for ARM if no
valid frame pointer is available.
From-SVN: r241980
Janus Weil [Tue, 8 Nov 2016 22:07:21 +0000 (23:07 +0100)]
re PR fortran/68440 ([OOP] ICE on declaring class variable with wrong attribute)
2016-11-08 Janus Weil <janus@gcc.gnu.org>
PR fortran/68440
* expr.c (check_alloc_comp_init): Loosen an assert.
* resolve.c (resolve_fl_parameter): Reject class parameters.
2016-11-08 Janus Weil <janus@gcc.gnu.org>
PR fortran/68440
* gfortran.dg/class_58.f90: New test.
From-SVN: r241979
Maxim Ostapenko [Tue, 8 Nov 2016 22:06:02 +0000 (22:06 +0000)]
re PR sanitizer/63958 (bootstrap failure in the sanitizer libs on sparc-linux-gnu)
PR sanitizer/63958
Reapply:
2014-10-14 David S. Miller <davem@davemloft.net>
* sanitizer_common/sanitizer_platform_limits_linux.cc (time_t):
Define at __kernel_time_t, as needed for sparc.
(struct __old_kernel_stat): Don't check if __sparc__ is defined.
* libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
(__sanitizer): Define struct___old_kernel_stat_sz,
struct_kernel_stat_sz, and struct_kernel_stat64_sz for sparc.
(__sanitizer_ipc_perm): Adjust for sparc targets.
(__sanitizer_shmid_ds): Likewsie.
(__sanitizer_sigaction): Likewise.
(IOC_SIZE): Likewsie.
From-SVN: r241978
Maxim Ostapenko [Tue, 8 Nov 2016 22:04:09 +0000 (22:04 +0000)]
All source files: Merge from upstream 285547.
libsanitizer/
* All source files: Merge from upstream 285547.
* configure.tgt (SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS): New
variable.
* configure.ac (SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS): Handle it.
* asan/Makefile.am (asan_files): Add new files.
* asan/Makefile.in: Regenerate.
* ubsan/Makefile.in: Likewise.
* lsan/Makefile.in: Likewise.
* tsan/Makefile.am (tsan_files): Add new files.
* tsan/Makefile.in: Regenerate.
* sanitizer_common/Makefile.am (sanitizer_common_files): Add new files.
(EXTRA_libsanitizer_common_la_SOURCES): Define.
(libsanitizer_common_la_LIBADD): Likewise.
(libsanitizer_common_la_DEPENDENCIES): Likewise.
* sanitizer_common/Makefile.in: Regenerate.
* interception/Makefile.in: Likewise.
* libbacktace/Makefile.in: Likewise.
* Makefile.in: Likewise.
* configure: Likewise.
* merge.sh: Handle builtins/assembly.h merging.
* builtins/assembly.h: New file.
* asan/libtool-version: Bump the libasan SONAME.
From-SVN: r241977
David Edelsohn [Tue, 8 Nov 2016 19:40:54 +0000 (19:40 +0000)]
dwarf2asm.c (USE_LINKONCE_INDIRECT): Test XCOFF_DEBUGGING_INFO at runtime.
* dwarf2asm.c (USE_LINKONCE_INDIRECT): Test XCOFF_DEBUGGING_INFO
at runtime.
From-SVN: r241975
Uros Bizjak [Tue, 8 Nov 2016 19:06:54 +0000 (20:06 +0100)]
re PR target/70799 (STV pass does not convert DImode shifts)
PR target/70799
* config/i386/i386.c (dimode_scalar_to_vector_candidate_p):
Handle ASHIFT and LSHIFTRT.
(dimode_scalar_chain::compute_convert_gain): Ditto.
(dimode_scalar_chain::convert_insn): Ditto.
testsuite/ChangeLog:
PR target/70799
* gcc.target/i386/pr70799-2.c: New test.
From-SVN: r241974
Janus Weil [Tue, 8 Nov 2016 16:10:56 +0000 (17:10 +0100)]
re PR fortran/77596 ([F03] procedure pointer component with implicit interface can point to a function)
2016-11-08 Janus Weil <janus@gcc.gnu.org>
PR fortran/77596
* expr.c (gfc_check_pointer_assign): Add special check for procedure-
pointer component with absent interface.
2016-11-08 Janus Weil <janus@gcc.gnu.org>
PR fortran/77596
* gfortran.dg/proc_ptr_comp_46.f90: New test.
From-SVN: r241972
Kyrylo Tkachov [Tue, 8 Nov 2016 16:04:20 +0000 (16:04 +0000)]
[2/2] Add store merging unit tests
* gimple-ssa-store-merging.c: Include selftest.h
(verify_array_eq): New function.
(verify_shift_bytes_in_array): Likewise.
(verify_shift_bytes_in_array_right): Likewise.
(verify_clear_bit_region): Likewise.
(verify_clear_bit_region_be): Likewise.
(store_merging_c_tests): Likewise.
* selftest.h (store_merging_c_tests): Declare prototype.
* selftest-run-tests.c (selftest::run_tests): Run
store_merging_c_tests.
From-SVN: r241971
Bin Cheng [Tue, 8 Nov 2016 14:11:36 +0000 (14:11 +0000)]
pr56541.c: Xfail on !vect_cond_mixed targets.
gcc/testsuite
* gcc.dg/vect/pr56541.c: Xfail on !vect_cond_mixed targets.
From-SVN: r241969
Bin Cheng [Tue, 8 Nov 2016 14:09:21 +0000 (14:09 +0000)]
pr71347.c: Drop xfail.
gcc/testsuite
* gcc.dg/tree-ssa/pr71347.c: Drop xfail.
From-SVN: r241968
Bin Cheng [Tue, 8 Nov 2016 14:08:06 +0000 (14:08 +0000)]
vect-cond-2.c: Drop xfail.
gcc/testsuite
* gcc.dg/vect/vect-cond-2.c: Drop xfail.
From-SVN: r241967
Kyrylo Tkachov [Tue, 8 Nov 2016 13:47:23 +0000 (13:47 +0000)]
[ARM][2/2] Remove old rtx costs
* config/arm/arm.opt (mold-rtx-costs): Delete.
(mnew-generic-costs): Delete.
* config/arm/arm-protos.h (struct tune_params): Delete rtx_costs field.
* config/arm/arm.c (arm_rtx_costs_1): Delete.
(arm_size_rtx_costs): Likewise.
(arm_slowmul_rtx_costs): Likewise.
(arm_fastmul_rtx_costs): Likewise.
(arm_xscale_rtx_costs): Likewise.
(arm_9e_rtx_costs): Likewise.
(arm_slowmul_tune, arm_fastmul_tune, arm_strongarm_tune,
arm_xscale_tune, arm_9e_tune, arm_v6t2_tune, arm_cortex_tune,
arm_cortex_a8_tune, arm_cortex_a7_tune, arm_cortex_a15_tune,
arm_cortex_a53_tune, arm_cortex_a57_tune, arm_cortex_a9_tune,
arm_cortex_a12_tune, arm_v7m_tune, arm_v6m_tune, arm_fa726te_tune
arm_cortex_a5_tune, arm_xgene1_tune, arm_marvell_pj4_tune,
arm_cortex_a35_tune, arm_exynosm1_tune, arm_cortex_a73_tune,
arm_cortex_m7_tune):
Delete rtx_costs field.
(arm_new_rtx_costs): Rename to...
(arm_rtx_costs_internal): ... This.
(arm_rtx_costs): Remove old way of doing rtx costs.
From-SVN: r241966
Kyrylo Tkachov [Tue, 8 Nov 2016 13:45:52 +0000 (13:45 +0000)]
[ARM][1/2] Use generic_extra_costs in all remaining tuning structs
* config/arm/arm.c (arm_slowmul_tune): Use generic_extra_costs.
(arm_fastmul_tune): Likewise.
(arm_strongarm_tune): Likewise.
(arm_xscale_tune): Likewise.
(arm_9e_tune): Likewise.
(arm_marvell_pj4_tune): Likewise.
(arm_v6t2_tune): Likewise.
(arm_v6m_tune): Likewise.
(arm_fa726te_tune): Likewise.
From-SVN: r241965
Richard Earnshaw [Tue, 8 Nov 2016 13:29:32 +0000 (13:29 +0000)]
[AArch64] Optimized implementation of search_line_fast for the CPP lexer
* lex.c (search_line_fast): New implementation for AArch64.
From-SVN: r241964
Kyrylo Tkachov [Tue, 8 Nov 2016 12:31:31 +0000 (12:31 +0000)]
[1/2] Fix off-by-one error in clear_bit_region in store merging (PR tree-optimization/78234 ?)
PR tree-optimization/78234
* gimple-ssa-store-merging.c (clear_bit_region): Fix off-by-one error
in start != 0 case.
From-SVN: r241962
Martin Liska [Tue, 8 Nov 2016 12:28:33 +0000 (13:28 +0100)]
use-after-scope fallout
PR testsuite/78242
* g++.dg/asan/use-after-scope-4.C: New test.
* g++.dg/asan/use-after-scope-types-4.C: Update scanned pattern.
* gcc.dg/asan/use-after-scope-8.c: Remove.
PR testsuite/78242
* dbgcnt.def: Add new debug counter asan_use_after_scope.
* gimplify.c (gimplify_decl_expr): Do not sanitize vars
with a value expr. Do not add artificial variables to
live_switch_vars. Use the debug counter.
(gimplify_target_expr): Use the debug counter.
* internal-fn.def: Remove ECF_TM_PURE from ASAN_MARK builtin.
* sanitizer.def: Set ATTR_NOTHROW_LEAF_LIST to
BUILT_IN_ASAN_CLOBBER_N and BUILT_IN_ASAN_UNCLOBBER_N.
From-SVN: r241961
Richard Biener [Tue, 8 Nov 2016 10:23:57 +0000 (10:23 +0000)]
tree-vect-stmts.c (get_group_load_store_type): If the access is aligned do not trigger peeling for gaps.
2016-11-08 Richard Biener <rguenther@suse.de>
* tree-vect-stmts.c (get_group_load_store_type): If the
access is aligned do not trigger peeling for gaps.
* tree-vect-data-refs.c (vect_compute_data_ref_alignment): Do not
force alignment of vars with DECL_USER_ALIGN.
* gcc.dg/vect/vect-nb-iter-ub-2.c: Adjust.
From-SVN: r241959
James Greenhalgh [Tue, 8 Nov 2016 09:53:07 +0000 (09:53 +0000)]
[Patch AArch64] aarch64-c.o should depend on TARGET_H
gcc/
* config/aarch64/t-aarch64 (aarch64-c.o): Depend on TARGET_H.
From-SVN: r241958
Tamar Christina [Tue, 8 Nov 2016 09:41:11 +0000 (09:41 +0000)]
Fix traditional cpp test failure
* gcc.dg/cpp/trad/trad.exp
(dg-runtest): Added $srcdir/$subdir/ to Include dirs.
* gcc.dg/cpp/trad/include.c: Use local header file.
From-SVN: r241957
Richard Biener [Tue, 8 Nov 2016 08:06:42 +0000 (08:06 +0000)]
re PR tree-optimization/78205 (BB vectorization confused by too large load groups)
2016-11-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/78205
* tree-vect-stmts.c (vectorizable_load): Move check whether
we may run into gaps when BB vectorizing SLP permutations ...
* tree-vect-slp.c (vect_supported_load_permutation_p): ...
here where we can do a more precise check.
* gcc.dg/vect/bb-slp-pr78205.c: New testcase.
From-SVN: r241956
Richard Biener [Tue, 8 Nov 2016 08:03:54 +0000 (08:03 +0000)]
re PR tree-optimization/78224 (g++ ICE at -O2(-O1 on gcc6) and above in verify_loop_structure, at cfgloop.c:1646)
2016-11-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/78224
* tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
Split the fallthru edge in case its successor may have PHIs.
Do not free dominance info.
* g++.dg/torture/pr78224.C: New testcase.
From-SVN: r241955
Senthil Kumar Selvaraj [Tue, 8 Nov 2016 06:30:31 +0000 (06:30 +0000)]
Fix bogus store_merging_x.c failures for avr.
Store merging isn't profitable for the avr. Add a new
effective target keyword "store_merge", and turn it on
only if non_strict_align *and* int32plus, as targets with
smallish word sizes are unlikely to profit from this optimization.
gcc/testsuite/ChangeLog
2016-11-03 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
* gcc.dg/store_merging_1.c: Require store_merge.
* gcc.dg/store_merging_2.c: Likewise.
* gcc.dg/store_merging_4.c: Likewise.
* gcc.dg/store_merging_5.c: Likewise.
* gcc.dg/store_merging_6.c: Likewise.
* gcc.dg/store_merging_7.c: Likewise.
* gcc.dg/store_merging_8.c: Likewise.
* lib/target-supports.exp (check_effective_target_store_merge): New.
From-SVN: r241953
GCC Administrator [Tue, 8 Nov 2016 00:16:22 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r241949
David Edelsohn [Mon, 7 Nov 2016 23:09:44 +0000 (23:09 +0000)]
fold-vec-add-1.c: Add dg-options -maltivec.
* gcc.target/powerpc/fold-vec-add-1.c: Add dg-options -maltivec.
* gcc.target/powerpc/fold-vec-add-2.c: Add dg-options -maltivec.
* gcc.target/powerpc/fold-vec-add-3.c: Add dg-options -maltivec.
* gcc.target/powerpc/fold-vec-add-4.c: Add dg-options -maltivec
-mvsx -mpower8-vector.
* gcc.target/powerpc/fold-vec-add-5.c: Add dg-options -maltivec -mno-vs\
x.
* gcc.target/powerpc/fold-vec-add-6.c: Add dg-options -maltivec -mvsx.
* gcc.target/powerpc/fold-vec-add-7.c: Add dg-options -maltivec
-mvsx -mpower8-vector.
From-SVN: r241945
Jason Merrill [Mon, 7 Nov 2016 23:09:29 +0000 (18:09 -0500)]
Implement P0012R1, Make exception specifications part of the type system.
gcc/cp/
* cp-tree.h (enum tsubst_flags): Add tf_fndecl_type.
(flag_noexcept_type, ce_type): New.
* call.c (build_conv): Add ck_fnptr.
(enum conversion_kind): Change ck_tsafe to ck_fnptr.
(convert_like_real): Likewise.
(standard_conversion): Likewise. Allow function pointer
conversions for pointers to member functions.
(reference_compatible_p): Allow function pointer conversions.
(direct_reference_binding): Likewise.
(reference_binding): Reference-compatible is no longer a subset of
reference-related.
(is_subseq): Also strip ck_lvalue after next_conversion.
* class.c (instantiate_type): Check fnptr_conv_p.
(resolve_address_of_overloaded_function): Likewise.
* cvt.c (can_convert_tx_safety): Now static.
(noexcept_conv_p, fnptr_conv_p, strip_fnptr_conv): New.
* decl.c (flag_noexcept_type): Define.
(cxx_init_decl_processing): Set it.
(bad_specifiers): Check it.
(grokdeclarator) [cdk_function]: Add exception-spec to type here.
* lambda.c (maybe_add_lambda_conv_op): Add exception-spec to
returned pointer.
* mangle.c (struct globals): Add need_cxx1z_warning.
(mangle_decl): Check it.
(write_exception_spec): New.
(write_function_type): Call it.
(canonicalize_for_substitution): Handle exception spec.
(write_type): Likewise.
(write_encoding): Set processing_template_decl across mangling of
partially-instantiated type.
* pt.c (determine_specialization): Pass tf_fndecl_type.
(tsubst_decl, fn_type_unification): Likewise.
(tsubst): Strip tf_fndecl_type, pass it to
tsubst_exception_specification.
(convert_nontype_argument_function): Handle function pointer
conversion.
(convert_nontype_argument): Likewise.
(unify, for_each_template_parm_r): Walk into noexcept-specifier.
* rtti.c (ptr_initializer): Encode noexcept.
* tree.c (canonical_eh_spec): New.
(build_exception_variant): Use it.
* typeck.c (composite_pointer_type): Handle fnptr conversion.
(comp_except_specs): Compare canonical EH specs.
(structural_comptypes): Call it.
gcc/c-family/
* c.opt (Wc++1z-compat): New.
* c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
libstdc++-v3/
* include/bits/c++config (_GLIBCXX_NOEXCEPT_PARM)
(_GLIBCXX_NOEXCEPT_QUAL): New.
* include/std/type_traits (is_function): Use them.
* libsubc++/new (launder): Likewise.
* libsupc++/cxxabi.h (__pbase_type_info::__masks): Add
__noexcept_mask.
* libsupc++/pbase_type_info.cc (__do_catch): Handle function
pointer conversion.
libiberty/
* cp-demangle.c (is_fnqual_component_type): New.
(d_encoding, d_print_comp_inner, d_print_mod_list): Use it.
(FNQUAL_COMPONENT_CASE): New.
(d_make_comp, has_return_type, d_print_comp_inner)
(d_print_function_type): Use it.
(next_is_type_qual): New.
(d_cv_qualifiers, d_print_mod): Handle noexcept and throw-spec.
include/
* demangle.h (enum demangle_component_type): Add
DEMANGLE_COMPONENT_NOEXCEPT, DEMANGLE_COMPONENT_THROW_SPEC.
From-SVN: r241944
Jason Merrill [Mon, 7 Nov 2016 23:09:21 +0000 (18:09 -0500)]
C++ cleanups before C++17 noexcept in types.
* call.c (standard_conversion): Reorganize pointer conversions.
* pt.c (convert_nontype_argument_function): Convert to ref here.
(convert_nontype_argument): Not here.
(convert_template_argument): Add original type to error message.
(RECUR_AND_CHECK_FAILURE): Remove trailing semicolon.
(unify): Compare function-qualifiers.
* typeck.c (same_type_ignoring_top_level_qualifiers_p): Use
cp_build_qualified_type rather than TYPE_MAIN_VARIANT.
From-SVN: r241943
Jakub Jelinek [Mon, 7 Nov 2016 22:35:43 +0000 (23:35 +0100)]
re PR target/78229 (ICE in redirect_eh_edge_1, at tree-eh.c:2305)
PR target/78229
* config/i386/i386.c (ix86_gimple_fold_builtin): Do not adjust
EH info even for bzhi and pdep/pext.
From-SVN: r241942
David Edelsohn [Mon, 7 Nov 2016 22:33:10 +0000 (17:33 -0500)]
Fix dates.
From-SVN: r241941
Peter Bergner [Mon, 7 Nov 2016 21:39:30 +0000 (15:39 -0600)]
Add missing ChangeLog entry.
* config.gcc (powerpc*-*-*, rs6000*-*-*): Remove setting of
INCLUDE_EXTRA_SPEC for Advance Toolchain builds.
From-SVN: r241939
Peter Bergner [Mon, 7 Nov 2016 21:22:02 +0000 (15:22 -0600)]
config.gcc (powerpc*-*-*, [...]): Remove setting of INCLUDE_EXTRA_SPEC for Advance Toolchain builds.
* config.gcc (powerpc*-*-*, rs6000*-*-*): Remove setting of
INCLUDE_EXTRA_SPEC for Advance Toolchain builds.
From-SVN: r241937
François Dumont [Mon, 7 Nov 2016 21:12:36 +0000 (21:12 +0000)]
gnu-versioned-namespace.ver: Export C++17 new of over-aligned types symbols.
2016-11-07 François Dumont <fdumont@gcc.gnu.org>
* config/abi/pre/gnu-versioned-namespace.ver: Export C++17 new of
over-aligned types symbols.
From-SVN: r241936
Segher Boessenkool [Mon, 7 Nov 2016 20:54:42 +0000 (21:54 +0100)]
rs6000: Do swdiv at expand time
We transform floating point divide instructions to a faster series of
simple instructions, "swdiv". Currently we do not do that until the
first splitter pass, which is much too late for most optimisations
that can happen on those new instructions, e.g. the constant loads
are not CSEd inside an unrolled loop. This patch changes things so
those divide instructions are expanded during expand already.
* config/rs6000/rs6000.md (div<mode>3): Expand using rs6000_emit_swdiv
if appropriate.
* config/rs6000/vector.md (div<mode>3): Ditto.
From-SVN: r241935
David Edelsohn [Mon, 7 Nov 2016 20:33:30 +0000 (20:33 +0000)]
scanasm.exp (hidden-scan-for): Add XCOFF support.
* lib/scanasm.exp (hidden-scan-for): Add XCOFF support.
* gfortran.dg/implicit_class_1.f90: Skip on AIX.
* gcc.dg/visibility-14.c: XFAIL AIX.
* gcc.dg/visibility-15.c: XFAIL AIX.
* gcc.dg/visibility-16.c: XFAIL AIX.
* gcc.dg/visibility-17.c: XFAIL AIX.
* gcc.dg/visibility-18.c: XFAIL AIX.
* gcc.dg/visibility-19.c: XFAIL AIX.
* g++.dg/ext/visibility/anon1.C: XFAIL AIX.
* g++.dg/ext/visibility/anon2.C: XFAIL AIX.
* g++.dg/ext/visibility/pragma-override1.C: XFAIL AIX.
* g++.dg/ext/visibility/pragma-override2.C: XFAIL AIX.
From-SVN: r241934
David Edelsohn [Mon, 7 Nov 2016 20:30:30 +0000 (15:30 -0500)]
Fix typo.
From-SVN: r241932