platform/upstream/linaro-gcc.git
8 years agoAdd simple sign-stripping cases to match.pd
rsandifo [Wed, 21 Oct 2015 09:49:13 +0000 (09:49 +0000)]
Add simple sign-stripping cases to match.pd

This patch makes sure that, for every simplification that uses
fold_strip_sign_ops, there are associated match.pd rules for the
leaf sign ops, i.e. abs, negate and copysign.  A follow-on patch
will add a pass to handle more complex cases.

Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.

gcc/
* match.pd: Add rules to simplify ccos, ccosh, hypot, copysign
and x*x in cases where the operands are sign ops.  Extend these
rules to handle copysign as a sign op (including for cos, cosh
and pow, which already treated negate and abs as sign ops).

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229123 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR target/68018
uros [Wed, 21 Oct 2015 08:43:44 +0000 (08:43 +0000)]
PR target/68018
* config/i386/i386.c (ix86_compute_frame_layout): Realign the stack
for 64-bit MS_ABI targets also when default incoming stack boundary
is overriden.

testsuite/ChangeLog:

PR target/68018
* gcc.target/i386/pr68018.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229120 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-21 Richard Biener <rguenther@suse.de>
rguenth [Wed, 21 Oct 2015 08:12:15 +0000 (08:12 +0000)]
2015-10-21  Richard Biener  <rguenther@suse.de>

* tree-ssa-sccvn.c (cond_stmts_equal_p): Compare two GIMPLE
cond stmts, enhanced and split out from ...
(vn_phi_eq): ... here.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229119 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-21 Richard Biener <rguenther@suse.de>
rguenth [Wed, 21 Oct 2015 08:08:05 +0000 (08:08 +0000)]
2015-10-21  Richard Biener  <rguenther@suse.de>

PR middle-end/68031
* fold-const.c: Include tree-ssa-operands.h and tree-into-ssa.h.
(tree_ssa_name_nonnegative_warnv_p): Fold into ...
(tree_single_nonnegative_warnv_p): ... here.  For SSA names
make sure they are not registered for update.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229118 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-21 Richard Biener <rguenther@suse.de>
rguenth [Wed, 21 Oct 2015 07:56:54 +0000 (07:56 +0000)]
2015-10-21  Richard Biener  <rguenther@suse.de>

PR tree-optimization/68026
* tree-ssa-ccp.c (get_value_for_expr): Zero-extend mask for
unsigned VARYING values.

* gcc.dg/tree-ssa/ssa-ccp-39.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229117 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agolibsanitizer/
chefmax [Wed, 21 Oct 2015 07:53:22 +0000 (07:53 +0000)]
libsanitizer/

* HOWTO_MERGE: New file.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229116 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agolibsanitizer/
chefmax [Wed, 21 Oct 2015 07:51:03 +0000 (07:51 +0000)]
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229115 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agolibsanitizer/
chefmax [Wed, 21 Oct 2015 07:47:54 +0000 (07:47 +0000)]
libsanitizer/

PR bootstrap/63888
Reapply:
2015-02-20  Jakub Jelinek  <jakub@redhat.com>

* asan/asan_globals.cc (RegisterGlobal): Disable detect_odr_violation
support until it is rewritten upstream.

* c-c++-common/asan/pr63888.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229114 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agolibsanitizer/
chefmax [Wed, 21 Oct 2015 07:44:35 +0000 (07:44 +0000)]
libsanitizer/

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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229113 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agolibsanitizer merge from upstream r250806, compiler part.
chefmax [Wed, 21 Oct 2015 07:40:54 +0000 (07:40 +0000)]
libsanitizer merge from upstream r250806, compiler part.

gcc/

* asan.c (asan_emit_stack_protection): Don't pass local stack to
asan_stack_malloc_[n] anymore. Check if asan_stack_malloc_[n] returned
NULL and use local stack than.
(asan_finish_file): Insert __asan_version_mismatch_check_v[n] call
in addition to __asan_init.
* sanitizer.def (BUILT_IN_ASAN_INIT): Rename to __asan_init.
(BUILT_IN_ASAN_VERSION_MISMATCH_CHECK): Add new builtin call.
* asan.h (asan_intercepted_p): Handle new string builtins.
* ubsan.c (ubsan_use_new_style_p): New function.
(ubsan_instrument_float_cast): If location is unknown, assign
input_location to loc. Propagate loc to ubsan_create_data if
ubsan_use_new_style_p returned true.

config/

* bootstrap-asan.mk: Replace ASAN_OPTIONS=detect_leaks with
LSAN_OPTIONS=detect_leaks.

gcc/testsuite/

* c-c++-common/ubsan/float-cast-overflow-10.c: Adjust test.
* c-c++-common/ubsan/float-cast-overflow-8.c: Likewise.
* c-c++-common/ubsan/float-cast-overflow-9.c: Likewise.
* g++.dg/asan/default-options-1.C: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229112 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agolibsanitizer merge from upstream r250806.
chefmax [Wed, 21 Oct 2015 07:32:45 +0000 (07:32 +0000)]
libsanitizer merge from upstream r250806.

libsanitizer/

2015-10-20  Maxim Ostapenko  <m.ostapenko@partner.samsung.com>

* All source files: Merge from upstream r250806.
* configure.ac (link_sanitizer_common): Add -lrt flag.
* configure.tgt: Enable TSAN and LSAN for aarch64-linux targets.
Set CXX_ABI_NEEDED=true for darwin.
* asan/Makefile.am (asan_files): Add new files.
(DEFS): Add DCAN_SANITIZE_UB=0 and remove unused and legacy
DASAN_FLEXIBLE_MAPPING_AND_OFFSET=0.
* asan/Makefile.in: Regenerate.
* ubsan/Makefile.am (ubsan_files): Add new files.
(DEFS): Add DCAN_SANITIZE_UB=1.
(libubsan_la_LIBADD): Add -lc++abi if CXX_ABI_NEEDED is true.
* ubsan/Makefile.in: Regenerate.
* tsan/Makefile.am (tsan_files): Add new files.
(DEFS): Add DCAN_SANITIZE_UB=0.
* tsan/Makefile.in: Regenerate.
* sanitizer_common/Makefile.am (sanitizer_common_files): Add new files.
* sanitizer_common/Makefile.in: Regenerate.
* asan/libtool-version: Bump the libasan SONAME.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229111 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[PATCH] Move RTL printing code from sched-vis.c into print-rtl.c
law [Wed, 21 Oct 2015 05:56:37 +0000 (05:56 +0000)]
[PATCH] Move RTL printing code from sched-vis.c into print-rtl.c

* Makefile.in (OBJS): Remove sched-vis.c
* sched-vis.c: Removed.  Code moved into...
* print-rtl.c: Here.  Include cfg.h, pretty-print.h and print-rtl.h.
* rtl.h: Remove prototypes for functions now living in print-rtl.c
* print-rtl.h Add prototypes for new functions in print-rtl.c.
* auto-inc-dec.c: Include print-rtl.h
* cfgrtl.c, combine.c, final.c haifa-sched.c: Likewise.
* ira.c, lra-constraints.c, lra.c, sel-sched-dump.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229110 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[PATCH]Fix various ports failing due to unused parameter
law [Wed, 21 Oct 2015 04:57:56 +0000 (04:57 +0000)]
[PATCH]Fix various ports failing due to unused parameter

* varasm.c (handle_vtv_comdat_section): Mark 2nd parameter with
ATTRIBUTE_UNUSED.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229109 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR c++/66583
jason [Wed, 21 Oct 2015 02:24:08 +0000 (02:24 +0000)]
PR c++/66583

* init.c (innermost_aggr_scope): New.
(build_field_list): Change uses_unions_p to uses_unions_or_anon_p.
(sort_mem_initializers): Handle initializers for entire anonymous
aggregates.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229108 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Richard Biener <rguenther@suse.de>
naveenh [Wed, 21 Oct 2015 02:22:04 +0000 (02:22 +0000)]
2015-10-20  Richard Biener  <rguenther@suse.de>
    Naveen H.S  <Naveen.Hurugalawadi@caviumnetworks.com>

* fold-const.c (fold_binary_loc) : Move (-A) * (-B) -> A * B
to match.pd.
Move (a * (1 << b)) is (a << b) to match.pd.
Move convert (C1/X)*C2 into (C1*C2)/X to match.pd.
Move ~X & X, (X == 0) & X, and !X & X are zero to match.pd.
Move X & ~X , X & (X == 0), and X & !X are zero to match.pd.

* match.pd (mult:c @0 (convert? (lshift integer_onep@1 @2))):
New simplifier.
(mult (rdiv:s REAL_CST@0 @1) REAL_CST@2): New simplifier.
(bit_and:c (convert? @0) (convert? (bit_not @0))): New simplifier.
(bit_ior (bit_and:s @0 (bit_not:s @1)) (bit_and:s (bit_not:s @0) @1))
: New simplifier.
(mult:c (convert1? (negate @0)) (convert2? negate_expr_p@1)):
New simplifier.
(match (logical_inverted_value @0) (truth_not @0)) : New Predicate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229107 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoDaily bump.
gccadmin [Wed, 21 Oct 2015 00:16:14 +0000 (00:16 +0000)]
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229106 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoPass --secure-plt to the linker
amodra [Tue, 20 Oct 2015 23:42:17 +0000 (23:42 +0000)]
Pass --secure-plt to the linker

* config/rs6000/secureplt.h (LINK_SECURE_PLT_DEFAULT_SPEC): Define.
* config/rs6000/sysv4.h (LINK_SECURE_PLT_SPEC): Define.
(LINK_SPEC): Add %(link_secure_plt).
(SUBTARGET_EXTRA_SPECS): Add "link_secure_plt".
* config/rs6000/linux64.h (LINK_SECURE_PLT_SPEC): Redefine.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229102 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * testsuite/libgomp.oacc-c-c++-common/reduction-5.c: Set sane
nathan [Tue, 20 Oct 2015 21:09:09 +0000 (21:09 +0000)]
* testsuite/libgomp.oacc-c-c++-common/reduction-5.c: Set sane
vector_length.
* testsuite/libgomp.oacc-fortran/reduction-6.f90: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229100 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * array-notation-common.c (is_cilkplus_vector_p): Define.
mpolacek [Tue, 20 Oct 2015 20:46:45 +0000 (20:46 +0000)]
* array-notation-common.c (is_cilkplus_vector_p): Define.
* c-common.h (is_cilkplus_vector_p): Declare.

* c-parser.c (is_cilkplus_vector_p): Don't define here.

* parser.c (is_cilkplus_vector_p): Don't define here.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229099 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago compiler: Report errors after evaluating invalid constant.
ian [Tue, 20 Oct 2015 20:44:23 +0000 (20:44 +0000)]
compiler: Report errors after evaluating invalid constant.

    The fix for golang/go#11541 made the assertion that getting an invalid
    Numeric_constant after evaluating an invalid constant must result in
    an error in a binary expression.  However, a Numeric_constant can be
    invalid if it is unset, which occurs when either operand cannot be
    converted to the right type.  These errors are issued after the
    Numeric_constant is lowered.

    Fixes golang/go#12615.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229098 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago compiler: Report errors for non-integral shift counts.
ian [Tue, 20 Oct 2015 18:14:30 +0000 (18:14 +0000)]
compiler: Report errors for non-integral shift counts.

    Fixes golang/go#12618.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229096 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agomusl support for sh
nsz [Tue, 20 Oct 2015 18:13:15 +0000 (18:13 +0000)]
musl support for sh

* config/sh/linux.h (MUSL_DYNAMIC_LINKER): Define.
(MUSL_DYNAMIC_LINKER_E, MUSL_DYNAMIC_LINKER_FP): Define.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229095 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[AArch64] Add support for 64-bit vector-mode ldp/stp
ktkachov [Tue, 20 Oct 2015 17:18:24 +0000 (17:18 +0000)]
[AArch64] Add support for 64-bit vector-mode ldp/stp

* config/aarch64/aarch64.c (aarch64_mode_valid_for_sched_fusion_p):
New function.
(fusion_load_store): Use it.
* config/aarch64/aarch64-ldpstp.md: Add new peephole2s for
ldp and stp in VD modes.
* config/aarch64/aarch64-simd.md (load_pair<mode>, VD): New pattern.
(store_pair<mode>, VD): Likewise.

* gcc.target/aarch64/stp_vec_64_1.c: New test.
* gcc.target/aarch64/ldp_vec_64_1.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229094 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[Testsuite] Turn on 64-bit-vector tests for AArch64.
alalaw01 [Tue, 20 Oct 2015 16:56:52 +0000 (16:56 +0000)]
[Testsuite] Turn on 64-bit-vector tests for AArch64.

* lib/target-supports.exp (check_effective_target_vect64): Add AArch64.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229092 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR c/67964
mpolacek [Tue, 20 Oct 2015 16:53:45 +0000 (16:53 +0000)]
PR c/67964
* c-parser.c (c_parser_attributes): Break out of the loop if the
token after an attribute isn't a comma.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229091 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoAdd --enable-compressed-debug-sections={all,gas,gold,ld}
hjl [Tue, 20 Oct 2015 16:29:28 +0000 (16:29 +0000)]
Add --enable-compressed-debug-sections={all,gas,gold,ld}

This patch removes the gas configure option:

--enable-compressed-debug-sections

and adds a toplevel configure option:

--enable-compressed-debug-sections={all,gas,gold,ld}

to enable compressed debug sections for gas, gold or ld by default.  At
the moment, this configure option is ignored by gold and ld.  For x86
Linux targets, default to compressing debug sections in gas.

Sync with binutils-gdb:
PR gas/19109
* configure.ac: Add
--enable-compressed-debug-sections={all,gas,gold,ld}.
* configure: Regenerated.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229088 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Vladimir Makarov <vmakarov@redhat.com>
vmakarov [Tue, 20 Oct 2015 16:26:05 +0000 (16:26 +0000)]
2015-10-20  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/67609
* lra-splill.c (lra_final_code_change): Don't remove all
sub-registers.

2015-10-20  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/67609
* gcc.target/i386/pr67609.c: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229087 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[simplify-rtx][2/2] Use constants from pool when simplifying binops
ktkachov [Tue, 20 Oct 2015 16:13:29 +0000 (16:13 +0000)]
[simplify-rtx][2/2] Use constants from pool when simplifying binops

* simplify-rtx.c (simplify_binary_operation): If either operand was
a constant pool reference use them if all other simplifications failed.

* gcc.target/aarch64/fmul_fcvt_1.c: Add multiply-by-32 cases.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229086 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[AArch64][1/2] Add fmul-by-power-of-2+fcvt optimisation
ktkachov [Tue, 20 Oct 2015 16:01:53 +0000 (16:01 +0000)]
[AArch64][1/2] Add fmul-by-power-of-2+fcvt optimisation

* config/aarch64/aarch64.md
(*aarch64_fcvt<su_optab><GPF:mode><GPI:mode>2_mult): New pattern.
* config/aarch64/aarch64-simd.md
(*aarch64_fcvt<su_optab><VDQF:mode><fcvt_target>2_mult): Likewise.
* config/aarch64/aarch64.c (aarch64_rtx_costs): Handle above patterns.
(aarch64_fpconst_pow_of_2): New function.
(aarch64_vec_fpconst_pow_of_2): Likewise.
* config/aarch64/aarch64-protos.h (aarch64_fpconst_pow_of_2): Declare
prototype.
(aarch64_vec_fpconst_pow_of_2): Likewise.
* config/aarch64/predicates.md (aarch64_fp_pow2): New predicate.
(aarch64_fp_vec_pow2): Likewise.

* gcc.target/aarch64/fmul_fcvt_1.c: New test.
* gcc.target/aarch64/fmul_fcvt_2.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229085 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * config/alpha/alpha.h (HARD_REGNO_NREGS): Use CEIL macro.
uros [Tue, 20 Oct 2015 15:31:07 +0000 (15:31 +0000)]
* config/alpha/alpha.h (HARD_REGNO_NREGS): Use CEIL macro.
(ALPHA_ARG_SIZE): Ditto.  Remove unused NAMED argument.
* config/alpha/alpha.c (alpha_function_arg_advance): Update
ALPHA_ARG_SIZE usage.
(alpha_arg_partial_bytes): Ditto.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229084 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoSkip local error_mark_node decls
hjl [Tue, 20 Oct 2015 15:20:29 +0000 (15:20 +0000)]
Skip local error_mark_node decls

There is no need to finalize local error_mark_node decls.

gcc/

PR target/66810
* cgraphbuild.c (pass_build_cgraph_edges::execute): Skip local
error_mark_node decls.

gcc/testsuite/

PR target/66810
* gcc.target/i386/pr66810.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229083 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoProperly handle -miamcu and -march=lakemont
hjl [Tue, 20 Oct 2015 15:12:37 +0000 (15:12 +0000)]
Properly handle -miamcu and -march=lakemont

-miamcu specifies how parameters are passed to functions and how value
is returned from a function.  Inside function,  we can use instructions
supported by -march=XXX.  -miamcu -march=haswell can generate x87, SSE
and AVX instructions as long as the IA MCU psABI is followed.  But since
Lakemont processor doesn't support x87 instructions, we shouldn't
generate x87 instructions with -march=lakemont.  This patch separates
code generation from -miamcu and makes -march=lakemont not to generate
x87 instructions.

gcc/

PR target/67963
PR target/67985
* common/config/i386/i386-common.c (ix86_handle_option): Remove
OPT_miamcu handling.
* config/i386/i386.c (PTA_NO_80387): New macro.
(processor_alias_table): Add PTA_NO_80387 to lakemont.
(ix86_option_override_internal): Update MASK_80387 from
PTA_NO_80387.  Don't warn x87/MMX/SSE/AVX for -miamcu.  Warn
SSE math only if 80387 is supported.  Don't change
MASK_FLOAT_RETURNS.
(ix86_valid_target_attribute_tree): Enable FPMATH_387 only if
80387 is supported.
* config/i386/i386.h (TARGET_FLOAT_RETURNS_IN_80387): True only
if TARGET_80387 is true and TARGET_IAMCU is false.
(TARGET_FLOAT_RETURNS_IN_80387_P): True only if TARGET_80387_P
is true and TARGET_IAMCU_P is false.

gcc/testsuite/

PR target/67963
PR target/67985
* gcc.target/i386/pr67963-1.c: New test.
* gcc.target/i386/pr67963-2.c: Likewise.
* gcc.target/i386/pr67963-3.c: Likewise.
* gcc.target/i386/pr67985-1.c: Likewise.
* gcc.target/i386/pr67985-2.c: Likewise.
* gcc.target/i386/pr67985-3.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229082 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * c.opt (std=gnu++11): Do not describe as experimental.
mpolacek [Tue, 20 Oct 2015 14:51:34 +0000 (14:51 +0000)]
* c.opt (std=gnu++11): Do not describe as experimental.
(std=gnu++14): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229081 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[AArch64] Remove divisions-to-produce-NaN from vdiv_f.c
alalaw01 [Tue, 20 Oct 2015 14:46:59 +0000 (14:46 +0000)]
[AArch64] Remove divisions-to-produce-NaN from vdiv_f.c

* gcc.target/aarch64/vdiv_f.c: Use __builtin_nan.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229080 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Yannick Moy <moy@adacore.com>
charlet [Tue, 20 Oct 2015 12:42:53 +0000 (12:42 +0000)]
2015-10-20  Yannick Moy  <moy@adacore.com>

* fmap.adb, a-cihama.adb, sem_ch5.adb, make.adb, inline.adb,
a-cfhase.adb, scng.adb, sem_ch12.adb, freeze.adb, tempdir.adb,
sem_util.adb, sem_res.adb, s-regexp.adb, a-clrefi.adb: Fix coding
style for marking start of processing of subprograms.

2015-10-20  Yannick Moy  <moy@adacore.com>

* lib-xref-spark_specific.adb (Add_SPARK_File): Start traversal
by requesting info from stubs. (Traverse_All_Compilation_Units):
Remove unused procedure.
(Traverse_Declarations_Or_Statements): Handle protected and task units.
* lib-xref.ads (Traverse_All_Compilation_Units): Remove unused
procedure.
* restrict.adb (Check_Restriction): Do not ignore
restrictions in GNATprove_Mode.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229078 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Arnaud Charlet <charlet@adacore.com>
charlet [Tue, 20 Oct 2015 12:40:36 +0000 (12:40 +0000)]
2015-10-20  Arnaud Charlet  <charlet@adacore.com>

* s-valllu.adb, sem_ch3.adb, layout.adb, a-crbtgo.adb, exp_ch9.adb,
make.adb, g-diopit.adb, s-valuns.adb, sem_ch9.adb, sem_ch10.adb,
sem_ch12.adb, a-tifiio.adb, g-dynhta.adb, uintp.adb,
sem_util.adb, sem_res.adb, s-htable.adb, exp_tss.adb, s-soflin.ads,
exp_ch6.adb, sem_ch6.adb, a-rbtgbo.adb, par-ch12.adb, sem_ch8.adb,
sem_eval.adb, mdll.adb, par-ch5.adb, s-poosiz.adb, sem_ch4.adb,
a-ngelfu.adb, s-taspri-solaris.ads, a-cforse.adb: Fix typos.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229077 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Arnaud Charlet <charlet@adacore.com>
charlet [Tue, 20 Oct 2015 12:37:13 +0000 (12:37 +0000)]
2015-10-20  Arnaud Charlet  <charlet@adacore.com>

* sem_aggr.adb, mlib-prj.adb, prep.adb, eval_fat.adb, rtsfind.adb,
freeze.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnatlink.adb,
par-ch6.adb, exp_tss.adb, exp_ch4.adb, s-shasto.adb, exp_fixd.adb,
sem_ch6.adb, clean.adb, sem_ch8.adb, sem_eval.adb, sem_ch9.adb: Fix
typos.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229074 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Richard Biener <rguenther@suse.de>
rguenth [Tue, 20 Oct 2015 12:34:19 +0000 (12:34 +0000)]
2015-10-20  Richard Biener  <rguenther@suse.de>

PR tree-optimization/68017
* tree-tailcall.c (eliminate_tail_call): Remove stmts backwards.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229073 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Ed Schonberg <schonberg@adacore.com>
charlet [Tue, 20 Oct 2015 12:32:21 +0000 (12:32 +0000)]
2015-10-20  Ed Schonberg  <schonberg@adacore.com>

* sem_ch11.adb (Analyze_Handled_Statements): If the scope is a
postcondition subprogram, do not check for useless assignments
because there are no source references in such a body, and the
call will lose deferred references from the enclosing subprogram.

2015-10-20  Ed Schonberg  <schonberg@adacore.com>

* sem_ch13.adb: nalyze_Attribute_Definition_Clause, case
'Address):  If either object is controlled the overlay is
erroneous, but analysis must be completed so that back-end sees
address clause and completes code generation.  Improve text
of warning.

2015-10-20  Thomas Quinot  <quinot@adacore.com>

* exp_ch4.adb: Minor reformatting.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229072 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Bob Duff <duff@adacore.com>
charlet [Tue, 20 Oct 2015 12:29:00 +0000 (12:29 +0000)]
2015-10-20  Bob Duff  <duff@adacore.com>

* s-mudido-affinity.adb (Create): Correct subranges of slices of CPU
arrays.

2015-10-20  Arnaud Charlet  <charlet@adacore.com>

* sinfo.ads, g-pehage.adb, par-ch12.adb,
layout.adb, exp_util.adb, sem_aux.adb, make.adb, checks.adb,
sem_ch12.adb, sem_res.adb, sem_attr.adb, a-ngelfu.adb, sem_ch4.adb,
switch-b.adb, sem_ch6.adb, prj-dect.adb, gnatxref.adb, sem_ch13.adb,
lib-xref.adb: Fix typos.

2015-10-20  Tristan Gingold  <gingold@adacore.com>

* exp_ch4.adb (Expand_Array_Comparison): Use
generic code if runtime routine is not available.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229071 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Yannick Moy <moy@adacore.com>
charlet [Tue, 20 Oct 2015 12:24:52 +0000 (12:24 +0000)]
2015-10-20  Yannick Moy  <moy@adacore.com>

* a-sytaco.ads (Ada.Synchronous_Task_Control): Package
now withs System.Task_Identification. The visible part
of the spec has SPARK_Mode. The private part has pragma
SPARK_Mode (Off).
(Set_True): Added Global and Depends aspects
(Set_False): Added Global and Depends aspects (Current_State):
Added Volatile_Function aspect and added external state
Ada.Task_Identification.Tasking_State as a Global input.
(Suspend_Until_True): Added Global and Depends aspects
* a-sytaco.adb (Ada.Synchronous_Task_Control):
Package body has SPARK_Mode => Off
* a-extiin.ads (Ada.Execution_Time.Interrupts):
Package now withs Ada.Real_Time and has SPARK_Mode.
(Clock): Added Volatile_Function aspect and added external state
Ada.Real_Time.Clock_Time as a Global input.
* a-reatim.ads (Ada.Real_Time): The visible part of the spec has
SPARK_Mode. The private part has pragma SPARK_Mode (Off). The package
declares external state Clock_Time with properties Async_Readers and
Async_Writers.
(Clock): Added Volatile_Function aspect and
added external state Clock_Time as a Global input.
* a-reatim.adb (Ada.Real_Time): Package body has SPARK_Mode => Off
* a-exetim-default.ads, a-exetim-mingw.ads (Ada.Execution_Time):
The visible part of the spec has SPARK_Mode. The private part
has pragma SPARK_Mode (Off).
(Clock): Added Volatile_Function
aspect and added external state Clock_Time as a Global input.
(Clock_For_Interrupts): Added Volatile_Function aspect and added
external state Ada.Real_Time.Clock_Time as a Global input.
* a-exetim-mingw.adb (Ada.Execution_Time): Package body has
SPARK_Mode => Off
* a-interr.ads (Ada.Interrupts): Package now
withs Ada.Task_Identification (Is_Reserved): Added
SPARK_Mode, Volatile_Function and external state
Ada.Task_Identification.Tasking_State as a Global input.
(Is_Attached): Added SPARK_Mode, Volatile_Function and external
state Ada.Task_Identification.Tasking_State as a Global input.
(Attach_Handler): Added SPARK_Mode => Off (Exchange_Handler):
Added SPARK_Mode => Off (Detach_Handler): Added SPARK_Mode
and external state Ada.Task_Identification.Tasking_State as a
Global In_Out. (Reference): Added SPARK_Mode => Off
* a-disedf.ads (Get_Deadline): Added SPARK_Mode, Volatile_Function
and external state Ada.Task_Identification.Tasking_State as a
Global input.
* a-taside.ads (Ada.Task_Identification): The visible part of
the spec has SPARK_Mode.  The private part has pragma SPARK_Mode
(Off). The package declares external state Tasking_State with
properties Async_Readers and Async_Writers.
(Current_Task): Added
Volatile_Function aspect and added external state Tasking_State
as a Global input.
(Environment_Task): Added SPARK_Mode => Off
(Is_Terminated): Added Volatile_Function aspect and added external
state Tasking_State as a Global input. (Is_Callable): Added
Volatile_Function aspect and added external state Tasking_State as
a Global input.
(Activation_Is_Complete): Added Volatile_Function
aspect and added external state Tasking_State as a Global input.
* a-taside.adb (Ada.Task_Identification): Package body has
SPARK_Mode => Off.

2015-10-20  Ed Schonberg  <schonberg@adacore.com>

* atree.ads, atree.adb: Enable List38 and List39 on entities.
* einfo.ads, einfo.adb (Class_Wide_Preconds) new attribute defined
on subprograms. Holds the list of class-wide precondition
functions inherited from ancestors. Each such function is an
instantiation of the generic function generated from an explicit
aspect specification for a class-wide precondition. A type is
an ancestor of itself, and therefore a root type has such an
instance on its own list.
(Class_Wide_Postconds): ditto for postconditions.

2015-10-20  Vincent Celier  <celier@adacore.com>

* prj-attr.adb: Add packages Prove and GnatTest.

2015-10-20  Steve Baird  <baird@adacore.com>

* a-conhel.adb: Add an Annotate pragma to help suppress CodePeer's
analysis of internals of container generic instances. This pragma
has no other effect.
* a-conhel.adb (Generic_Implementation) Add "pragma Annotate
(CodePeer, Skip_Analysis);".

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229070 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Steve Baird <baird@adacore.com>
charlet [Tue, 20 Oct 2015 12:21:37 +0000 (12:21 +0000)]
2015-10-20  Steve Baird  <baird@adacore.com>

* pprint.adb: Code clean up.

2015-10-20  Bob Duff  <duff@adacore.com>

* a-cfinve.ads, a-coboho.ads: Improve comments.
* a-coboho.adb (Size_In_Storage_Elements): Improve error message
in case of "Size is too big" exception.

2015-10-20  Bob Duff  <duff@adacore.com>

* a-contai.ads: Remove check names (moved to snames.ads-tmpl).
* snames.ads-tmpl: Add check names that were previously in
a-contai.ads, so they are now visible in configuration files.
* types.ads: Add checks corresponding to snames.ads-tmpl.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229069 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Ed Schonberg <schonberg@adacore.com>
charlet [Tue, 20 Oct 2015 12:20:20 +0000 (12:20 +0000)]
2015-10-20  Ed Schonberg  <schonberg@adacore.com>

* sem_ch5.adb (Analyze_Loop_Statement): Attach generated loop
identifier to the tree, because it may be the root of a tree
traversal in Pop_Scope when freeze actions are pending.

2015-10-20  Steve Baird  <baird@adacore.com>

* pprint.ads (Expression_Image) Add new generic formal flag
Hide_Parameter_Blocks.
* pprint.adb (Expression_Image) If new flag is set, then display
dereferences of parameter block components accordingly.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229068 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Ed Schonberg <schonberg@adacore.com>
charlet [Tue, 20 Oct 2015 12:18:09 +0000 (12:18 +0000)]
2015-10-20  Ed Schonberg  <schonberg@adacore.com>

* sem_prag.adb: Code clean up.

2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>

* exp_ch6.adb (Expand_N_Extended_Return_Statement): Code cleanup.
(Make_Build_In_Place_Call_In_Object_Declaration): Update the
parameter profile.  Code cleanup. Request debug info for the
object renaming declaration.
(Move_Activation_Chain): Add new formal parameter and update the
comment on usage.
* exp_ch6.ads (Make_Build_In_Place_Call_In_Object_Declaration):
Update the parameter profile and comment on usage.
* sem_util.ads, sem_util.adb (Remove_Overloaded_Entity): New routine,
currently unused.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229067 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Ed Schonberg <schonberg@adacore.com>
charlet [Tue, 20 Oct 2015 12:16:37 +0000 (12:16 +0000)]
2015-10-20  Ed Schonberg  <schonberg@adacore.com>

* sem_ch13.adb (Analyze_One_Aspect, case
Aspect_Disable_Controlled): If expander is not active, pre-analyze
expression anyway for ASIS and other tools use.
* sem_prag.adb (Build_Generic_Class_Condition): Handle properly
anonymous access types in parameter specifications. Make the
formal type a formal derived type of the controlling type of
the subprogram.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229064 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Tristan Gingold <gingold@adacore.com>
charlet [Tue, 20 Oct 2015 12:15:46 +0000 (12:15 +0000)]
2015-10-20  Tristan Gingold  <gingold@adacore.com>

* s-rident.ads: No_Task_At_Interrupt_Priority: New restriction.
* sem_prag.adb (Analyze_Pragma): Check the restriction.
* sem_ch13.adb (Analyze_Attribute_Definition_Clause):
Check the restriction (for aspects).

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229063 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Gary Dismukes <dismukes@adacore.com>
charlet [Tue, 20 Oct 2015 12:14:27 +0000 (12:14 +0000)]
2015-10-20  Gary Dismukes  <dismukes@adacore.com>

* sem_prag.adb: Minor reformatting.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229061 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Tristan Gingold <gingold@adacore.com>
charlet [Tue, 20 Oct 2015 12:13:11 +0000 (12:13 +0000)]
2015-10-20  Tristan Gingold  <gingold@adacore.com>

* sem_util.adb (Is_Protected_Self_Reference): Remove reference to
UET_Address in comment.
* sem_attr.adb (Check_Unit_Name): Adjust comment.
(Analyze_Attribute): Remove handling of UET_Address.
* sem_attr.ads (Attribute_Impl_Def): Remove Attribute_UET_Address.
* snames.ads-tmpl Remove Name_UET_Address, Attribute_UET_Address.
* exp_attr.adb (Expand_N_Attribute_Reference): Remove
Attribute_UET_Address.

2015-10-20  Bob Duff  <duff@adacore.com>

* a-cbdlli.adb, a-cdlili.adb, a-chtgop.adb, a-cidlli.adb,
* a-cobove.adb, a-coinve.adb, a-convec.adb, a-crbtgo.adb ("="): Avoid
modifying the tampering counts unnecessarily.
(Adjust): Zero tampering counts unconditionally.

2015-10-20  Jerome Lambourg  <lambourg@adacore.com>

* init.c: Fix build issue on arm-vx6 when building the RTP
run-time.

2015-10-20  Ed Schonberg  <schonberg@adacore.com>

* sem_ch3.adb (Analyze_Object_Declaration): If the expression
is an aggregate and compilation is in -gnatI mode (ignore rep
clauses) do not delay resolution of aggregate, to prevent freeze
actions out of order in the backend.

2015-10-20  Ed Schonberg  <schonberg@adacore.com>

* sem_prag.ads, sem_prag.adb (Build_Generic_Class_Condition):
New procedure to construct a generic function for a class-wide
precondition, to implement AI12-0113  concerning the new semantics
of class-wide preconditions for overriding uperations.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229060 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
charlet [Tue, 20 Oct 2015 12:10:18 +0000 (12:10 +0000)]
2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_util.adb (Find_Actual): The routine is
now capable of operating on entry calls.

2015-10-20  Ed Schonberg  <schonberg@adacore.com>

* sem_res.adb: Remove redundant check.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229059 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Jerome Lambourg <lambourg@adacore.com>
charlet [Tue, 20 Oct 2015 12:09:17 +0000 (12:09 +0000)]
2015-10-20  Jerome Lambourg  <lambourg@adacore.com>

* init.c (__gnat_vxsim_error_handler): Completely disable on
VxWorks-7 as the VSBs used to build gcc do not support vxsim
architecture.

2015-10-20  Claire Dross  <dross@adacore.com>

* a-cfdlli.ads, a-cfinve.ads, a-cofove.ads (Generic_Sorting): Explicit
SPARK_Mode.
* a-cfhase.ads, a-cforse.ads (Generic_Keys): Explicit SPARK_Mode.

2015-10-20  Tristan Gingold  <gingold@adacore.com>

* exp_ch9.adb (Expand_N_Protected_Type_Declaration):
Check for No_Implicit_Protected_Object_Allocations.
* fe.h (Check_No_Implicit_Task_Alloc,
Check_No_Implicit_Protected_Alloc): Define and declare.
* restrict.ads, restrict.adb (Check_No_Implicit_Task_Alloc,
Check_No_Implicit_Protected_Alloc): New procedures to check the
restrictions.
* s-rident.ads (No_Implicit_Task_Allocations)
(No_Implicit_Protected_Object_Allocations): Declare new
restrictions.

2015-10-20  Yannick Moy  <moy@adacore.com>

* sem_res.adb (Resolve_Selected_Component): Only set flag
when component is defined in a variant part.
* sem_util.adb,
* sem_util.ads (Is_Declared_Within_Variant): Promote local query
as publicy visible one for use in Resolve_Selected_Component.

2015-10-20  Philippe Gil  <gil@adacore.com>

* g-debpoo.adb: allow instrumented System.Memory to use Debug_Pool
from foreign threads.
* g-debpoo.adb (Print_Traceback): NEW print traceback if available
added to support Stack_Trace_Depth = 0.
(Print_Address): NEW print System.Address without no secondary
stack use (Address_Image uses secondary stack)

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229058 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Yannick Moy <moy@adacore.com>
charlet [Tue, 20 Oct 2015 12:05:48 +0000 (12:05 +0000)]
2015-10-20  Yannick Moy  <moy@adacore.com>

* exp_ch9.adb (Expand_Entry_Barrier): Default initialize local variable
Func.

2015-10-20  Jerome Lambourg  <lambourg@adacore.com>

* init.c (__gnat_error_handler for vxworks): Force
SPE bit in the MSR when handling signals

2015-10-20  Arnaud Charlet  <charlet@adacore.com>

* einfo.ads, sem_ch12.adb, sem_ch6.adb, table.ads, s-stposu.ads,
g-table.ads, g-dyntab.ads, makeutl.ads, a-crdlli.ads: Fix typos.

2015-10-20  Ed Schonberg  <schonberg@adacore.com>

* sem_ch5.adb (Analyze_Loop_Statement): Element iterators
over multidimensional arrays create additional loops during
expansion. For such loops we create a label as a scope
name. Attach this label  properly to tree, for use in GNATProve
over such element iterators.
* sem_attr.adb (Analyze_Attribute, case Loop_Entry): The loop to
which the attribute applies comes from source, not from expansion
of an element iterator or a quantified expression.
* exp_attr.adb (Expand_N_Attribute_Reference): Ditto.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229057 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Ed Schonberg <schonberg@adacore.com>
charlet [Tue, 20 Oct 2015 12:02:30 +0000 (12:02 +0000)]
2015-10-20  Ed Schonberg  <schonberg@adacore.com>

* exp_ch6.adb (Expand_Call): Check for a call to a function
declared in a Dimension I/O package, to handle the new Image
function.

2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>

* inline.ads: Minor comment fixes.

2015-10-20  Bob Duff  <duff@adacore.com>

* a-comutr.ads (Tree_Node_Access): Add No_Strict_Aliasing, because
we're doing unchecked conversions with this pointer.

2015-10-20  Ed Schonberg  <schonberg@adacore.com>

* exp_ch9.adb (Next_Protected_Operation): An expression function
used as a completion can be the next protected operation in a
protected body.

2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_res.adb (Is_OK_Volatile_Context): Add a guard when checking a
possible call to an instance of Ada.Unchecked_Conversion to avoid
testing protected function calls. Allow references to protected objects
in prefixed protected calls.
(Is_Protected_Operation_Call): New routine.

2015-10-20  Yannick Moy  <moy@adacore.com>

* exp_ch5.adb, exp_ch5.ads (Expand_Iterator_Loop_Over_Array): Make
query public. Remove code handling with iterator loop over array
of the 'in' form, which is not allowed in Ada. * exp_spark.adb
(Expand_SPARK): Expand loop statements that take the form of an
iterator over an array.
* sem_ch5.adb (Analyze_Loop_Statement): Do not analyze loop statements
that take the form of an iterator over an array, so that the rewritten
form gets analyzed instead.
* sem_util.adb, sem_util.ads (Is_Iterator_Over_Array): New query
to recognize iterators over arrays.

2015-10-20  Arnaud Charlet  <charlet@adacore.com>

* s-excdeb.ads, s-excdeb.adb (Debug_Raise_Exception): Add
parameter Message.
* a-except.adb (Raise_Current_Excep): Update call to
Debug_Raise_Exception.
* a-except-2005.adb (Complete_Occurrence): Ditto.
* sem_ch12.adb: Whitespace fix.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229056 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoCorrectly fill up cgraph_node::local.versionable flag.
marxin [Tue, 20 Oct 2015 11:59:51 +0000 (11:59 +0000)]
Correctly fill up cgraph_node::local.versionable flag.

* cgraphclones.c (cgraph_node::create_virtual_clone):
Verify cgraph_node.local.versionable instead of calling
tree_versionable_function_p.
* ipa-cp.c (determine_versionability): Save the information
to ipa_node_params summary.
(ipcp_versionable_function_p): Use it.
(ipcp_propagate_stage): Pass IPA_NODE_REF to a called function.
(ipcp_generate_summary): Do not compute cgraph_node
versionability.
* ipa-inline-analysis.c (inline_generate_summary): Compute
versionability for all cgraph nodes.
* ipa-prop.c (ipa_node_params_t::duplicate): Duplicate
ipa_node_params::versionability.
* ipa-prop.h (struct ipa_node_params): Declare it.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229055 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoFix typos.
charlet [Tue, 20 Oct 2015 11:59:47 +0000 (11:59 +0000)]
Fix typos.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229054 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Yannick Moy <moy@adacore.com>
charlet [Tue, 20 Oct 2015 11:59:22 +0000 (11:59 +0000)]
2015-10-20  Yannick Moy  <moy@adacore.com>

* sem_warn.adb (Is_OK_Fully_Initialized): Consider types with DIC as
fully default initialized.
* sem_ch6.adb: minor style fix in comment

2015-10-20  Ed Schonberg  <schonberg@adacore.com>

* s-diflio.ads, s-diflio.adb (Image): New function for dimensioned
quantities, to produce a string that includes the dimension
synbol for the quantity, or the vector of dimensions in standard
notation.
* sem_dim.adb (Expand_Put_Call_With_Symbol): Process new function
Image, to include dimension information in the generated string,
identical to the string produced by the Put procedure on a string
for a dimensioned quantity.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229053 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
charlet [Tue, 20 Oct 2015 11:49:17 +0000 (11:49 +0000)]
2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>

* exp_ch7.adb (Process_Declarations): A loop
parameter does not require finalization actions.

2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>

* exp_ch6.adb (Expand_Simple_Function_Return): Do not create an
actual subtype for a mutable record return type if the expression
is itself a function call.

2015-10-20  Dmitriy Anisimkov  <anisimko@adacore.com>

* s-atocou.adb, s-atocou-builtin.adb: Fix implementation description
related to new type support.

2015-10-20  Ed Schonberg  <schonberg@adacore.com>

* sem_res.adb (Resolve_Explicit_Dererence): Call Analyze_Dimension
to propagate dimension information from prefix.
* sem_dim.adb (Analyze_Dimension): Handle Explicit_Dereference.
* inline.ads: minor whitespace fix in comment
* sem_ch6.adb: minor gramar fix in comment

2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_ch3.adb (Analyze_Object_Contract):
A protected type or a protected object is allowed to have a
discriminated part.

2015-10-20  Bob Duff  <duff@adacore.com>

* sem_util.adb (Requires_Transient_Scope):
Return true for mutable records if the maximum size is very large.

2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>

* a-except-2005.adb (To_Stderr): Import Put_Char_Stderr with
the same signature as in System.IO.Put.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229052 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Bob Duff <duff@adacore.com>
charlet [Tue, 20 Oct 2015 11:45:37 +0000 (11:45 +0000)]
2015-10-20  Bob Duff  <duff@adacore.com>

* a-cobove.adb (Set_Length): Restore previous logic, but with "Checks
and then" on the check.

2015-10-20  Ed Schonberg  <schonberg@adacore.com>

* par-ch3.adb (P_Known_Discriminant_Part_Opt): Handle properly
a misplaced "constant" keyword in a discriminant specification.

2015-10-20  Steve Baird  <baird@adacore.com>

* einfo.ads (Is_Param_Block_Component_Type): New function decl
for querying the flag.
(Set_Is_Param_Block_Component_Type): New procedure decl for setting
the flag.
* einfo.adb (Is_Param_Block_Component_Type): New function body.
(Set_Is_Param_Block_Component_Type): New procedure body.
(Write_Entity_Flags): Display the new flag.
* exp_ch9.adb (Build_Parameter_Block): Set flag on parameter
block component types.
(Expand_N_Entry_Declaration): Set flag on parameter block component
types.

2015-10-20  Steve Baird  <baird@adacore.com>

* sem_elab.adb: Do not pass an N_Attribute_Reference node to
Sinfo.Set_No_Elaboration_Check.
* sem_elab.adb (Check_Elab_Call) Do not pass a non-call
node (specifically, an N_Attribute_Reference node) to
Sinfo.Set_No_Elaboration_Check.

2015-10-20  Tristan Gingold  <gingold@adacore.com>

* adaint.c: File names are case sensitive on aarch64-ios.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229051 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Bob Duff <duff@adacore.com>
charlet [Tue, 20 Oct 2015 10:56:25 +0000 (10:56 +0000)]
2015-10-20  Bob Duff  <duff@adacore.com>

* a-cbdlli.ads, a-cbhase.ads, a-cbmutr.ads, a-cborse.ads,
* a-cdlili.ads, a-cidlli.ads, a-cihase.ads, a-cimutr.ads,
* a-ciorse.ads, a-cobove.ads, a-cohase.ads, a-coinve.ads,
* a-comutr.ads, a-convec.ads, a-coorse.ads: Use non-private with clause.

2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>

* exp_util.adb (Requires_Cleanup_Actions): A loop parameter does not
require finalization actions.

2015-10-20  Ed Schonberg  <schonberg@adacore.com>

* par-ch3.adb (P_Declarative_Items): In case of misplaced
aspect specifications, ensure that flag Done is properly set to
continue parse.

2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>

* rtsfind.ads Remove the entries for Ada.Synchronous_Task_Control
and Suspension_Object from tables RE_Id, RE_Unit_Table and RTU_Id.
* sem_util.adb (Is_Descendant_Of_Suspension_Object): Update
the comment on usage. Use routine Is_Suspension_Object to detect
whether a type matches Suspension_Object.
(Is_Suspension_Object): New routine.
* snames.ads-tmpl: Add predefined names for Suspension_Object
and Synchronous_Task_Control.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229049 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Ed Schonberg <schonberg@adacore.com>
charlet [Tue, 20 Oct 2015 10:53:39 +0000 (10:53 +0000)]
2015-10-20  Ed Schonberg  <schonberg@adacore.com>

* sem_smem.adb (Check_Shared_Var): Clean up code that handles
type declarations with discriminants, remove obsolete check.

2015-10-20  Arnaud Charlet  <charlet@adacore.com>

* par_sco.adb: Minor style fixes.

2015-10-20  Vincent Celier  <celier@adacore.com>

* debug.adb: Update documentation of -gnatdu.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229048 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
charlet [Tue, 20 Oct 2015 10:43:21 +0000 (10:43 +0000)]
2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>

* aspects.adb Add aspect Volatile_Function to table
Canonical_Aspect.
* aspect.ads Add aspect Volatile_Function to tables
Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names
and Implementation_Defined_Aspect.  Aspects Async_Readers,
Async_Writers, Effective_Reads and Effective_Writes are no
longer Boolean.
* einfo.adb (Get_Pragma): Add an entry for pragma
Volatile_Function.
* par-prag.adb (Prag): Pragma Volatile_Function does not need
special processing by the parser.
* rtsfind.ads Add an entry for Ada.Synchronous_Task_Control in
table RTU_Id. Add an entry for Suspension_Object in table RE_Id.
* sem_ch3.adb Fix SPARK RM references.
(Analyze_Object_Contract): Update the error guard.
* sem_ch5.adb Fix SPARK RM references.
* sem_ch6.adb (Analyze_Subprogram_Body_Contract): Ensure
that a non-volatile function does not contain an effectively
volatile parameter.
(Analyze_Subprogram_Contract): Ensure
that a non-volatile function does not contain an effectively
volatile parameter.
* sem_ch12.adb (Instantiate_Object): Remove the reference to
the SPARK RM from the error message.
* sem_ch13.adb (Analyze_Aspect_Specifications): Add
processing for aspects Async_Readers, Async_Writers,
Effective_Reads, Effective_Writes and Volatile_Function.
(Check_Aspect_At_Freeze_Point): Aspects Async_Readers,
Async_Writers, Effective_Reads, Effective_Writes and
Volatile_Function do not need special processing at the freeze
point.
* sem_prag.adb Add an entry for pragma Volatile_Function in
table Sig_Flags.
(Analyze_External_Property_In_Decl_Part):
Reimplemented as Async_Readers, Async_Writers, Effective_Reads
and Effective_Writes are no longer Boolean pragmas.
(Analyze_Global_Item): An external state or effectively
volatile object cannot appear as an item in pragma
[Refined_]Global.
(Analyze_Pragma): Change the implementation
of Async_Readers, Async_Writers, Effective_Reads and
Effective_Writes as these are no longer Boolean pragmas.
Use routine Check_Static_Boolean_Expression to verify the
optional Boolean expression of Async_Readers, Async_Writers,
Constant_After_Elaboration, Effective_Reads, Effective_Writes,
Extensions_Visible and Volatile_Function.  Add processing for
pragma Volatile_Function.
(Check_Static_Boolean_Expression): New routine.
(Find_Related_Context): Update the comment on usage.
(Is_Enabled_Pragma): New routine.
* sem_prag.ads (Is_Enabled_Pragma): New routine.
* sem_res.adb Fix SPARK RM references.
(Is_OK_Volatile_Context): Add detection for return statements.
(Resolve_Actuals): Remove the check concerning an effectively volatile
OUT actual parameter as this is now done by the SPARK flow analyzer.
(Resolve_Entity_Name): Remove the check concerning an effectively
volatile OUT formal parameter as this is now done by the SPARK
flow analyzer. (Within_Volatile_Function): New routine.
* sem_util.adb (Add_Contract_Item): Add processing for pragma
Volatile_Function.
(Check_Nonvolatile_Function_Profile): New routine.
(Is_Descendant_Of_Suspension_Object): New routine.
(Is_Effectively_Volatile): Protected types and descendants of
Suspension_Object are now treated as effectively volatile.
(Is_Enabled): The optional Boolean expression of pragmas
Async_Readers, Async_Writers, Effective_Reads and Effective_Writes
now appears as the first argument.
(Is_Volatile_Function): New routine.
* sem_util.ads Add SPARK RM references.
(Add_Contract_Item): Update the comment on usage.
(Check_Nonvolatile_Function_Profile): New routine.
(Is_Effectively_Volatile): Update the comment on usage.
(Is_Volatile_Function): New routine.
* snames.ads-tmpl Add a predefined name and pragma id for
Volatile_Function.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229047 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * gnat_ugn.texi, gnat_rm.texi: Regenerate.
charlet [Tue, 20 Oct 2015 10:41:38 +0000 (10:41 +0000)]
* gnat_ugn.texi, gnat_rm.texi: Regenerate.
* doc/gnat_ugn/gnat_project_manager.rst,
doc/gnat_ugn/building_executable_programs_with_gnat.rst,
doc/gnat_ugn/the_gnat_compilation_model.rst,
doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
doc/gnat_rm/implementation_defined_pragmas.rst,
doc/gnat_rm/the_gnat_library.rst,
doc/gnat_rm/implementation_defined_characteristics.rst: Update doc.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229046 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoEnable VTV for aarch64 and arm
ramana [Tue, 20 Oct 2015 10:39:30 +0000 (10:39 +0000)]
Enable VTV for aarch64 and arm

Requires fix for section anchors with VTV i.e. PR other/67868

2015-10-20  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

* configure.tgt (aarch64*-*-linux): Enable.
(arm*-*-linux*): Enable.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229045 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoFix VTV for targets with section anchors.
ramana [Tue, 20 Oct 2015 10:36:54 +0000 (10:36 +0000)]
Fix VTV for targets with section anchors.

2015-10-20  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

PR other/67868
* varasm.c (assemble_variable): Move special vtv handling to..
(handle_vtv_comdat_sections): .. here. New function.
(output_object_block): Handle vtv sections.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229044 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoFix VTV for targets with section anchors.
ramana [Tue, 20 Oct 2015 10:36:33 +0000 (10:36 +0000)]
Fix VTV for targets with section anchors.

2015-10-20  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

PR other/67868
* varasm.c (assemble_variable): Move special vtv handling to..
(handle_vtv_comdat_sections): .. here. New function.
(output_object_block): Handle vtv sections.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229043 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoUpdate targets.
charlet [Tue, 20 Oct 2015 10:36:00 +0000 (10:36 +0000)]
Update targets.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229042 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Bob Duff <duff@adacore.com>
charlet [Tue, 20 Oct 2015 10:23:46 +0000 (10:23 +0000)]
2015-10-20  Bob Duff  <duff@adacore.com>

* sem_ch13.adb (Analyze_One_Aspect): Avoid
analyzing the expression in a 'Disable_Controlled attribute when
Expander_Active is False, because otherwise, we get errors about
nonstatic expressions in pragma-Preelaborate generic packages.
* restrict.ads: minor whitespace cleanup in comment

2015-10-20  Bob Duff  <duff@adacore.com>

* a-conhel.adb: Remove "use SAC;", because otherwise the compiler
complains about use clauses in run-time units. Use "use type"
instead.
* a-btgbso.adb, a-btgbso.ads, a-cbdlli.adb, a-cbdlli.ads,
* a-cbhama.adb, a-cbhama.ads, a-cbhase.adb, a-cbhase.ads,
* a-cbmutr.adb, a-cbmutr.ads, a-cborma.adb, a-cborma.ads,
* a-cborse.adb, a-cborse.ads, a-cdlili.adb, a-cdlili.ads,
* a-chtgbk.adb, a-chtgbk.ads, a-chtgbo.adb, a-chtgbo.ads,
* a-chtgke.adb, a-chtgke.ads, a-chtgop.adb, a-chtgop.ads,
* a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
* a-cihase.adb, a-cihase.ads, a-cimutr.adb, a-cimutr.ads,
* a-ciorma.adb, a-ciorma.ads, a-ciormu.adb, a-ciormu.ads,
* a-ciorse.adb, a-ciorse.ads, a-cobove.adb, a-cobove.ads,
* a-cohama.adb, a-cohama.ads, a-cohase.adb, a-cohase.ads,
* a-cohata.ads, a-coinve.adb, a-comutr.adb, a-comutr.ads,
* a-convec.adb, a-coorma.adb, a-coorma.ads, a-coormu.adb,
* a-coormu.ads, a-coorse.adb, a-coorse.ads, a-crbltr.ads,
* a-crbtgk.adb, a-crbtgk.ads, a-crbtgo.adb, a-crbtgo.ads,
* a-rbtgbk.adb, a-rbtgbk.ads, a-rbtgbo.adb, a-rbtgbo.ads,
* a-rbtgso.adb, a-rbtgso.ads: Change all the predefined containers
to share the tampering machinery in Ada.Containers.Helpers. This
reduces the amount of duplicated code, and takes advantage of
efficiency improvements in Helpers.
Protect all run-time checks and supporting machinery with "if
Checks" or "if T_Check", so this code can be suppressed with
pragma Suppress or -gnatp.
Add Pseudo_Reference and Get_Element_Access to remaining
containers, so that the compiler can optimize "for ... of" loops.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229041 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Bob Duff <duff@adacore.com>
charlet [Tue, 20 Oct 2015 10:20:37 +0000 (10:20 +0000)]
2015-10-20  Bob Duff  <duff@adacore.com>

* a-contai.adb, a-coinve.ads, a-contai.ads, a-conhel.adb, a-conhel.ads,
Makefile.rtl, a-convec.ads: Move helper code from Ada.Containers to a
new package Ada.Containers.Helpers, because otherwise it's not
visible everywhere it needs to be (e.g. in the package
Ada.Containers.Red_Black_Trees, Generic_Tree_Types wants to have
a component of type Tamper_Counts).

2015-10-20  Ed Schonberg  <schonberg@adacore.com>

* sem_type.adb (Intersect_Types): Specialize error message when
one operand is a limited view which is a priori incompatible
with all other named types.
* sem_prag.adb: minor fix in comment
* sem_ch13.adb: Code clean up.

2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>

* sem_ch12.adb (Need_Subprogram_Instance_Body): Also return true
for a subprogram nested in an inlined subprogram.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229040 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Bob Duff <duff@adacore.com>
charlet [Tue, 20 Oct 2015 10:13:47 +0000 (10:13 +0000)]
2015-10-20  Bob Duff  <duff@adacore.com>

* a-coinve.adb, a-contai.adb: Update comments.
* pprint.ads: Minor reformatting.

2015-10-20  Tristan Gingold  <gingold@adacore.com>

* env.c, init.c: Handle arm64-darwin like arm-darwin.
* tracebak.c: Handle arm64-darwin.

2015-10-20  Bob Duff  <duff@adacore.com>

* s-trasym.adb (Symbolic_Traceback): When giving the traceback
as hexadecimal code addresses, separate by blanks instead of LF.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229039 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Ed Schonberg <schonberg@adacore.com>
charlet [Tue, 20 Oct 2015 10:10:20 +0000 (10:10 +0000)]
2015-10-20  Ed Schonberg  <schonberg@adacore.com>

* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate freeze
node for subprogram in Compile_Only mode.

2015-10-20  Dmitriy Anisimkov  <anisimko@adacore.com>

* s-atocou.adb, s-atocou.ads, a-contai.adb, a-contai.ads,
s-atocou-x86.adb, s-atocou-builtin.adb: Task safe over container
iterations.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229037 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Philippe Gil <gil@adacore.com>
charlet [Tue, 20 Oct 2015 10:07:09 +0000 (10:07 +0000)]
2015-10-20  Philippe Gil  <gil@adacore.com>

* g-debpoo.ads (Dump): NEW print Debug_Pool statistics & main
contributors.
(Dump_Stdout): NEW print to stdout Debug_Pool statistics &
main contributors.
(Reset): NEW reset counters to 0.
(Get_Size): NEW return size allocated at parameter.
(High_Water_Mark): NEW.
(Current_Water_Mark): NEW.
(System_Memory_Debug_Pool): NEW tell Debug_Pools that
System.Memory uses it.
* g-debpoo.adb (Traceback_Htable_Elem): add Frees, Total_Frees
components.
(Find_Or_Create_Traceback): don't manage in System.Memory
Debug_Pool Deallocate Traceback's.
(Validity): add optional Handled table when System.Memory asked
for Allow_Unhandled_Memory.
(Allocate): handle Allocate reentrancy occuring when System.Memory
uses Debug_Pools.
(Deallocate): handle when Allow_Unhandled_Memory
is set deallocation of unhandled memory. Dont't check
Size_In_Storage_Elements if equal to Storage_Count'Last. update
Frees, Total_Frees new components.

2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>

* fe.h: Minor tweak.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229036 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Vincent Celier <celier@adacore.com>
charlet [Tue, 20 Oct 2015 10:04:44 +0000 (10:04 +0000)]
2015-10-20  Vincent Celier  <celier@adacore.com>

* sem_cat.adb (Check_Categorization_Dependencies): Do nothing
when -gnatdu is specified.

2015-10-20  Ed Schonberg  <schonberg@adacore.com>

* sem_ch8.adb (analyze_Subprogram_Renaming): The actual for a
formal abstract subprogram must have a controlling type.
* stand.ads: Minor whitespace cleanup.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229035 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Gary Dismukes <dismukes@adacore.com>
charlet [Tue, 20 Oct 2015 10:00:15 +0000 (10:00 +0000)]
2015-10-20  Gary Dismukes  <dismukes@adacore.com>

* sem_ch13.adb: Minor reference change (RM => AARM).

2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>

* make.adb (Check): Skip multilib switches reinstated by the
compiler only when counting the number of switches, since it is
what really matters in the regular operating mode.

2015-10-20  Arnaud Charlet  <charlet@adacore.com>

* einfo.adb: Add extra assertion for small clause.
* cstand.adb: Minor style fix in comment.
* debug.adb: Minor reformatting.
* exp_util.adb: Fix minor typo.

2015-10-20  Ed Schonberg  <schonberg@adacore.com>

* sem_ch12.adb (Same_Instantiated_Function): New predicate in
Check_Formal_Package_Instance, used to verify that the formal
and the actual of an actual package match when both are functions
given as attribute references.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229034 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Bob Duff <duff@adacore.com>
charlet [Tue, 20 Oct 2015 09:56:56 +0000 (09:56 +0000)]
2015-10-20  Bob Duff  <duff@adacore.com>

* a-coinve.ads, a-coinve.adb: Do the same efficiency
improvements that were already done in the definite case
(Ada.Containers.Vectors, i.e. a-convec). This includes the
ability to suppress checks, the fast path for Append, inlining
as appropriate, and special-casing of "for ... of" loops. Reuse
the tampering machinery that is now in Ada.Containers. Simplify
many operations.
* a-convec.ads, a-convec.adb: Change the code to be more similar
to a-coinve.
* a-finali.ads, a-finali.adb: Expose the "null"-ness of the
operations. This may enable optimizations in the future, and
seems cleaner anyway.

2015-10-20  Ed Schonberg  <schonberg@adacore.com>

* sem_ch13.adb (Is_Operational_Item): Attributes related to
Ada 2012 iterators are operational items, and can be specified
on partial views.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229033 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Hristian Kirtchev <kirtchev@adacore.com>
charlet [Tue, 20 Oct 2015 09:55:20 +0000 (09:55 +0000)]
2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_prag.adb (Check_Usage): Update the calls to Usage_Error.
(Usage_Error): Remove formal parameter Item. Emit a clearer message
concerning a missing dependency item and place it on the related pragma.

2015-10-20  Bob Duff  <duff@adacore.com>

* debug.adb, expander.adb: Implement -gnatd.B switch, which
triggers a bug box when an abort_statement is seen. This is
useful for testing Comperr.Compiler_Abort.
* gnat1drv.adb: Trigger bug box on all exceptions other than
Unrecoverable_Error.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229032 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Thomas Quinot <quinot@adacore.com>
charlet [Tue, 20 Oct 2015 09:53:11 +0000 (09:53 +0000)]
2015-10-20  Thomas Quinot  <quinot@adacore.com>

* Makefile.rtl: add the following...
* g-binenv.ads, g-binenv.adb: New unit providing runtime access
to bind time captured values ("bind environment")
* init.c: declare new global variable __gl_bind_env_addr.
* bindgen.ads, bindgen.adb (Set_Bind_Env): record a bind
environment key=value pair.
(Gen_Bind_Env_String): helper to produce the bind environment data
called  in the binder generated file.
(Gen_Output_File_Ada): Call the above (Gen_Adainit): Set
__gl_bind_env_addr accordingly.
* switch-b.adb: Support for command line switch -V (user interface
to set a build environment key=value pair)
* bindusg.adb: Document the above

2015-10-20  Vincent Celier  <celier@adacore.com>

* sem_prag.adb (Analyse_Pragma: Pragma Pure): Do not set the
entity as Pure if Debug_Flag_U is set.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229031 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Bob Duff <duff@adacore.com>
charlet [Tue, 20 Oct 2015 09:48:00 +0000 (09:48 +0000)]
2015-10-20  Bob Duff  <duff@adacore.com>

* output.adb (Write_Int): Work with negative numbers in order to avoid
negating Int'First and thereby causing overflow.
* sem_util.adb: Minor comment fix.

2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>

* make.adb (Check): Skip multilib switches reinstated by the
compiler when doing the comparison with switches passed to
gnatmake.

2015-10-20  Yannick Moy  <moy@adacore.com>

* inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Return
False for procedures marked No_Return.
* sem_util.ads (Enclosing_Declaration): Improve comment.
* einfo.adb (Is_Completely_Hidden): Remove spurious assertion.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229029 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Thomas Quinot <quinot@adacore.com>
charlet [Tue, 20 Oct 2015 09:45:29 +0000 (09:45 +0000)]
2015-10-20  Thomas Quinot  <quinot@adacore.com>

* types.ads: Minor reformatting.

2015-10-20  Hristian Kirtchev  <kirtchev@adacore.com>

* einfo.adb (Get_Pragma): Minor reformatting. Rename local constant
Is_CDG to Is_CLS. Add pragma Constant_After_Elaboration to the list of
classification pragmas.

2015-10-20  Ed Schonberg  <schonberg@adacore.com>

* sem_ch3.adb (Analyze_Declarations); At the of the visible part,
perform name resolution on the expressions in aspects of visible
entities.
* sem_ch13.ads, sem_ch13.adb (Resolve_Aspect_Expressions): Resolve
expressions in aspects independently of whether corresponding
entity is frozen. Used to complete name resolution of aspect
expressions for entities declared in the visible part of a
package or generic package declaration.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229028 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Vincent Celier <celier@adacore.com>
charlet [Tue, 20 Oct 2015 09:42:53 +0000 (09:42 +0000)]
2015-10-20  Vincent Celier  <celier@adacore.com>

* prj-attr.adb: Add package Codepeer and its attributes.

2015-10-20  Thomas Quinot  <quinot@adacore.com>

* sem_ch3.adb, sem_ch13.adb: Minor reformatting.

2015-10-20  Eric Botcazou  <ebotcazou@adacore.com>

* gnatlink.adb (Gnatlink): Do not translate --RTS switch
for the linker and instead pass the switches that were
reinstated by the compiler.

2015-10-20  Bob Duff  <duff@adacore.com>

* a-contai.ads, a-convec.ads: Move Count_Type_Last from
a-convec.ads to a-contai.ads, so other containers can refer to it.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229027 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Ed Schonberg <schonberg@adacore.com>
charlet [Tue, 20 Oct 2015 09:40:24 +0000 (09:40 +0000)]
2015-10-20  Ed Schonberg  <schonberg@adacore.com>

* sem_ch3.adb (Check_Nonoverridable_Aspects): New procedure within
Analyze_Full_Type_ Declaration, used to apply legality rules in
13,1,1 (18.3.3) concerning aspects that cannot be overridden in
a type extension.
(Check_Duplicate_Aspects): It is not legal to specify the
Implicit_Dereference aspect on a full view if partial view has
known discriminants.
* sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Verify that
the specification of the aspect on a derived type confirms the
value of the inherited one.
* sem_util.adb (Reference_Discriminant): Return empty if none
specified.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229026 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-20 Thomas Quinot <quinot@adacore.com>
charlet [Tue, 20 Oct 2015 09:38:17 +0000 (09:38 +0000)]
2015-10-20  Thomas Quinot  <quinot@adacore.com>

* exp_ch5.adb, sem_ch3.adb: Minor reformatting.

2015-10-20  Vincent Celier  <celier@adacore.com>

* a-strsup.adb (Super_Trim): Remove statements that put NUL
characters in unused portion of the Data string.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229025 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoFix default_binds_local_p_2 for extern protected data
nsz [Tue, 20 Oct 2015 09:37:27 +0000 (09:37 +0000)]
Fix default_binds_local_p_2 for extern protected data

gcc:

PR target/66912
* varasm.c (default_binds_local_p_2): Turn on extern_protected_data.

gcc/testsuite:

PR target/66912
* gcc.target/aarch64/pr66912.c: New.
* gcc.target/arm/pr66912.c: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229024 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR c++/67064
jason [Tue, 20 Oct 2015 06:49:13 +0000 (06:49 +0000)]
PR c++/67064

* semantics.c (force_paren_expr): Don't mess with hard register vars.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229021 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[PATCH] c/67925 - update documentation on `inline'
law [Tue, 20 Oct 2015 05:52:00 +0000 (05:52 +0000)]
[PATCH] c/67925 - update documentation on `inline'

* doc/extend.texi: Update documentation WRT inline functions.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229020 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago Implement N4268, Do constant evaluation of all non-type template args.
jason [Tue, 20 Oct 2015 02:48:51 +0000 (02:48 +0000)]
Implement N4268, Do constant evaluation of all non-type template args.

gcc/c-family/
* c-cppbuiltin.c (c_cpp_builtins): Define
__cpp_nontype_template_args.
gcc/cp/
* parser.c (cp_parser_template_argument): For C++1z just parse a
constant-expression.
* pt.c (convert_nontype_argument): For C++1z always call
maybe_constant_value.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229019 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago Expand PTRMEM_CST only when necessary.
jason [Tue, 20 Oct 2015 02:48:43 +0000 (02:48 +0000)]
Expand PTRMEM_CST only when necessary.

* constexpr.c (cxx_eval_constant_expression): Expand PTRMEM_CST
only when necessary.
(cxx_eval_component_reference): Like here.
* decl2.c (lower_var_init): And here.
(c_parse_final_cleanups): Call it.
* typeck2.c (digest_init_r): Not here.
* decl.c (complete_vars): Or here.
(cp_finish_decl): Add local statics to symbol table.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229018 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * c-cppbuiltin.c (c_cpp_builtins): Define
jason [Tue, 20 Oct 2015 02:48:36 +0000 (02:48 +0000)]
* c-cppbuiltin.c (c_cpp_builtins): Define
__cpp_enumerator_attributes, __cpp_fold_expressions,
__cpp_unicode_characters.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229017 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agotypo
jason [Tue, 20 Oct 2015 02:48:25 +0000 (02:48 +0000)]
typo

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229016 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-19 Steven G. Kargl <kargl@gcc.gnu.org>
kargl [Tue, 20 Oct 2015 00:31:48 +0000 (00:31 +0000)]
2015-10-19  Steven G. Kargl  <kargl@gcc.gnu.org>

* resolve.c (gfc_verify_binding_labels): Check for NULL pointer.

2015-10-19  Steven G. Kargl  <kargl@gcc.gnu.org>

* gfortran.dg/pr67900.f90: New tests.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229013 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoDaily bump.
gccadmin [Tue, 20 Oct 2015 00:16:15 +0000 (00:16 +0000)]
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229012 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoPR66870 PowerPC64 Enable gold linker with split stack
amodra [Mon, 19 Oct 2015 23:50:30 +0000 (23:50 +0000)]
PR66870 PowerPC64 Enable gold linker with split stack

A powerpc-linux/powerpc64-linux biarch compiler can default to either
-m32 or -m64, and we need to notice both -m32 and -m64 on the gccgo
command line.  It's also possible to build a -m64 only compiler, so in
that case we can define TARGET_CAN_SPLIT_STACK.

gcc/
PR go/66870
* config/rs6000/sysv4.h (TARGET_CAN_SPLIT_STACK_64BIT): Don't define.
* config/rs6000/linux64.h (TARGET_CAN_SPLIT_STACK): Define.
(TARGET_CAN_SPLIT_STACK_64BIT): Define.
gcc/go/
PR go/66870
* gospec.c (saw_opt_m32): Rename to..
(is_m64): ..this, initialised by TARGET_CAN_SPLIT_STACK_64BIT.
Update uses.
(lang_specific_driver): Set is_m64 if OPT_m64, clear if OPT_m32.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229009 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoREE: fix uninitialized registers handling
pmderodat [Mon, 19 Oct 2015 23:47:35 +0000 (23:47 +0000)]
REE: fix uninitialized registers handling

gcc/ChangeLog:

PR rtl-optimization/66790
* df.h (DF_MIR): New macro.
(DF_LAST_PROBLEM_PLUS1): Update to be past DF_MIR
(DF_MIR_INFO_BB): New macro.
(DF_MIR_IN, DF_MIR_OUT): New macros.
(struct df_mir_bb_info): New.
(df_mir): New macro.
(df_mir_add_problem, df_mir_simulate_one_insn): New forward
declarations.
(df_mir_get_bb_info): New.
* df-problems.c (struct df_mir_problem_data): New.
(df_mir_free_bb_info, df_mir_alloc, df_mir_reset,
df_mir_bb_local_compute, df_mir_local_compute, df_mir_init,
df_mir_confluence_0, df_mir_confluence_n,
df_mir_transfer_function, df_mir_free, df_mir_top_dump,
df_mir_bottom_dump, df_mir_verify_solution_start,
df_mir_verify_solution_end): New.
(problem_MIR): New.
(df_mir_add_problem, df_mir_simulate_one_insn): New.
* timevar.def (TV_DF_MIR): New.
* ree.c: Include bitmap.h
(add_removable_extension): Add an INIT_REGS parameter.  Use it
to skip zero-extensions that may get an uninitialized register.
(find_removable_extensions): Compute must-initialized registers
using the MIR dataflow problem. Update the call to
add_removable_extension.
(find_and_remove_re): Call df_mir_add_problem.

gcc/testsuite/ChangeLog:

* gnat.dg/opt50.adb: New test.
* gnat.dg/opt50_pkg.adb: New helper.
* gnat.dg/opt50_pkg.ads: New helper.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229008 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agomn10300: Use the STC bb-reorder algorithm at -Os
segher [Mon, 19 Oct 2015 22:03:13 +0000 (22:03 +0000)]
mn10300: Use the STC bb-reorder algorithm at -Os

For mn10300, STC still gives better results for optimise-for-size than
"simple" does.  So use STC at -Os as well.

2015-10-19  Segher Boessenkool  <segher@kernel.crashing.org>

* common/config/mn10300/mn10300-common.c
(mn10300_option_optimization_table) <OPT_freorder_blocks_algorithm_>:
Use REORDER_BLOCKS_ALGORITHM_STC at -Os and up.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229006 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoProposed doc update for Explicit Reg Vars 1/3
law [Mon, 19 Oct 2015 21:15:41 +0000 (21:15 +0000)]
Proposed doc update for Explicit Reg Vars 1/3
        * doc/extend.texi (Explicit Register Variables): Simplify and
        avoid unnecessary and confusion abbreviations.  Update cross
        references.
        doc/implement-c.tex: Update cross reference.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229004 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-19 Steven G. Kargl <kargl@gcc.gnu.org>
kargl [Mon, 19 Oct 2015 21:09:21 +0000 (21:09 +0000)]
2015-10-19  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/68019
* decl.c (add_init_expr_to_sym): Remove an assert() to allow an error
message to be issued.

2015-10-19  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/68019
* gfortran.dg/pr68019.f90: new test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229003 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[PATCH] Don't allow FSM threader to create irreducible loops unless it eliminates...
law [Mon, 19 Oct 2015 16:24:00 +0000 (16:24 +0000)]
[PATCH] Don't allow FSM threader to create irreducible loops unless it eliminates a multi-way branch

* tree-ssa-threadupdate.c (valid_jump_thread_path): Reject paths
that create irreducible loops unless the path elimiantes a multiway
branch.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228974 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-19 Richard Biener <rguenther@suse.de>
rguenth [Mon, 19 Oct 2015 14:00:28 +0000 (14:00 +0000)]
2015-10-19  Richard Biener  <rguenther@suse.de>

PR tree-optimization/67975
* tree-cfg.h (extract_true_false_controlled_edges): Declare.
* tree-cfg.c (extract_true_false_controlled_edges): Split out
core worker from ...
* tree-ssa-loop-im.c (extract_true_false_args_from_phi): ... here.
* tree-ssa-sccvn.c (vn_phi_compute_hash): Hash number of args
instead of block number for PHIs with two or one args.
(vn_phi_eq): Compare edge predicates of PHIs that are in different
blocks.

* gcc.dg/tree-ssa/ssa-fre-50.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228971 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2015-10-19 Richard Biener <rguenther@suse.de>
rguenth [Mon, 19 Oct 2015 13:58:27 +0000 (13:58 +0000)]
2015-10-19  Richard Biener  <rguenther@suse.de>

* gimple-fold.c (gimple_phi_nonnegative_warnv_p): New function.
(gimple_stmt_nonnegative_warnv_p): Use it.
* match.pd (CPROJ): New operator list.
(cproj (complex ...)): Move simplifications from ...
* builtins.c (fold_builtin_cproj): ... here.

* gcc.dg/torture/builtin-cproj-1.c: Skip for -O0.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228970 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoUse GET_MODE_BITSIZE to get vector natural alignment
hjl [Mon, 19 Oct 2015 11:41:03 +0000 (11:41 +0000)]
Use GET_MODE_BITSIZE to get vector natural alignment

Since GET_MODE_ALIGNMENT is defined by psABI and the biggest alignment
is 4 byte for IA MCU psABI, we should use GET_MODE_BITSIZE for IA MCU
psABI to get vector natural alignment to check misaligned vector move.

* config/i386/i386.c (ix86_expand_vector_move): Use
GET_MODE_BITSIZE for IA MCU psABI to get vector natural
alignment.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228969 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoReplace @optindex with @opindex
hjl [Mon, 19 Oct 2015 11:30:46 +0000 (11:30 +0000)]
Replace @optindex with @opindex

* doc/invoke.texi: Replace @optindex with @opindex.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228968 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoDon't leak ISA to __attribute__ ((target("arch=XXX")))
hjl [Mon, 19 Oct 2015 11:18:14 +0000 (11:18 +0000)]
Don't leak ISA to __attribute__ ((target("arch=XXX")))

When processing __attribute__ ((target("arch=XXX"))), we should clear
the ISA bits in x_ix86_isa_flags first to avoid leaking ISA from
command line.

gcc/

PR target/67995
* config/i386/i386.c (ix86_valid_target_attribute_tree): If
arch= is set,  clear all bits in x_ix86_isa_flags, except for
ISA_64BIT, ABI_64, ABI_X32, and CODE16.

gcc/testsuite/

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228967 138bc75d-0d04-0410-961f-82ee72b054a4