Nathan Sidwell [Tue, 27 Oct 2015 20:22:50 +0000 (20:22 +0000)]
* omp-low.c (pass_oacc_device_lower::execute): Ignore errors.
From-SVN: r229462
Cesar Philippidis [Tue, 27 Oct 2015 20:21:31 +0000 (13:21 -0700)]
c-parser.c (c_parser_oacc_shape_clause): New.
gcc/c/
* c-parser.c (c_parser_oacc_shape_clause): New.
(c_parser_oacc_simple_clause): New.
(c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
(OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
gcc/testsuite/
* c-c++-common/goacc/loop-shape.c: New test.
Co-Authored-By: Bernd Schmidt <bernds@redhat.com>
Co-Authored-By: James Norris <jnorris@codesourcery.com>
Co-Authored-By: Joseph Myers <joseph@codesourcery.com>
Co-Authored-By: Julian Brown <julian@codesourcery.com>
Co-Authored-By: Thomas Schwinge <thomas@codesourcery.com>
From-SVN: r229461
Nathan Sidwell [Tue, 27 Oct 2015 20:19:24 +0000 (20:19 +0000)]
parser.c (cp_parser_omp_clause_name): Add auto, gang, seq, vector, worker.
gcc/cp/
* parser.c (cp_parser_omp_clause_name): Add auto, gang, seq,
vector, worker.
(cp_parser_oacc_simple_clause): New.
(cp_parser_oacc_shape_clause): New.
(cp_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
(OACC_LOOP_CLAUSE_MASK): Likewise.
* semantics.c (finish_omp_clauses): Add auto, gang, seq, vector,
worker. Unify the handling of teams, tasks and vector_length with
the other loop shape clauses.
gcc/testsuite/
* g++.dg/g++.dg/gomp/pr33372-1.C: Adjust diagnostic.
* gcc/testsuite/g++.dg/gomp/pr33372-3.C: Likewise.
From-SVN: r229460
Nathan Sidwell [Tue, 27 Oct 2015 20:16:04 +0000 (20:16 +0000)]
internal-fn.c (expand_UNIQUE): New.
* internal-fn.c (expand_UNIQUE): New.
* internal-fn.h (enum ifn_unique_kind): New.
* internal-fn.def (IFN_UNIQUE): New.
* target-insns.def (unique): Define.
* gimple.h (gimple_call_internal_unique_p): New.
* gimple.c (gimple_call_same_target_p): Check internal fn
uniqueness.
* tracer.c (ignore_bb_p): Check for IFN_UNIQUE call.
* tree-ssa-threadedge.c
(record_temporary_equivalences_from_stmts): Likewise.
* tree-cfg.c (gmple_call_initialize_ctrl_altering): Likewise.
From-SVN: r229459
Richard Henderson [Tue, 27 Oct 2015 19:59:41 +0000 (12:59 -0700)]
re PR rtl-optimization/67609 (Generates wrong code for SSE2 _mm_load_pd)
PR rtl-opt/67609
* config/i386/i386.c (ix86_cannot_change_mode_class): Disallow
narrowing subregs on SSE and MMX registers.
* doc/tm.texi.in (CANNOT_CHANGE_MODE_CLASS): Clarify when subregs that
appear to be sub-words of multi-register pseudos must be rejected.
* doc/tm.texi: Regenerate.
testsuite/
* gcc.target/i386/pr67609-2.c: New test.
From-SVN: r229458
Kyrylo Tkachov [Tue, 27 Oct 2015 18:32:37 +0000 (18:32 +0000)]
[AArch64] PR 68102: Check that operand is REG before checking the REGNO in mov-immediate splitters
PR target/68102
* config/aarch64/aarch64.md (*movsi_aarch64): Check that
operands[0] is a reg before taking its REGNO in split condition.
(*movdi_aarch64): Likewise.
* gcc.target/aarch64/pr68102_1.c: New test.
From-SVN: r229455
Kyrylo Tkachov [Tue, 27 Oct 2015 18:30:55 +0000 (18:30 +0000)]
[AArch64] Handle vector float modes properly in aarch64_output_simd_mov_immediate
* config/aarch64/aarch64.c (aarch64_output_simd_mov_immediate):
Handle floating point inner modes properly.
From-SVN: r229454
Paul Thomas [Tue, 27 Oct 2015 18:03:18 +0000 (18:03 +0000)]
re PR fortran/67933 (ICE for array of a derived type with allocatable class in derived type object)
2015-01-27 Paul Thomas <pault@gcc.gnu.org>
PR fortran/67933
* gfortran.dg/allocate_with_source_15.f03: New test
From-SVN: r229452
Thomas Schwinge [Tue, 27 Oct 2015 16:54:52 +0000 (17:54 +0100)]
[PR fortran/63865] OpenACC cache directive: match Fortran support with C/C++
gcc/fortran/
PR fortran/63865
* openmp.c (resolve_oacc_cache): Remove function.
(gfc_match_oacc_cache): Enable array sections.
(resolve_omp_clauses, gfc_resolve_oacc_directive): Change
accordingly.
* trans-openmp.c (gfc_trans_omp_clauses): Likewise.
gcc/testsuite/
PR fortran/63865
* gfortran.dg/goacc/coarray.f95: Expect the OpenACC cache
directive to work.
* gfortran.dg/goacc/loop-1.f95: Likewise.
* gfortran.dg/goacc/cache-1.f95: Likewise, and extend testing.
* gfortran.dg/goacc/cray.f95: Likewise.
* gfortran.dg/goacc/parameter.f95: Likewise.
Co-Authored-By: James Norris <jnorris@codesourcery.com>
From-SVN: r229448
Alan Hayward [Tue, 27 Oct 2015 16:43:13 +0000 (16:43 +0000)]
2015-10-27 Alan Hayward <alan.hayward@arm.com>
* tree-vect-looop.c
(vectorizable_live_operation): Change iterator.
From-SVN: r229447
Steven G. Kargl [Tue, 27 Oct 2015 16:42:24 +0000 (16:42 +0000)]
re PR fortran/68108 (erroneous error message 'scalar integer expression expected')
2015-10-27 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/68108
* decl.c (char_len_param_value): Check for REF_ARRAY.
2015-10-27 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/68108
* gfortran.dg/pr67805_2.f90: New test.
From-SVN: r229446
Abderrazek Zaafrani [Tue, 27 Oct 2015 15:58:05 +0000 (15:58 +0000)]
isl schedule tree
Use isl_schedule_node instead of isl_band_list for isl-0.15.
Passes regtest and bootstrap for isl-0.15 and isl-0.12.2 on x86_64-linux.
gcc/ChangeLog:
* graphite-optimize-isl.c (get_schedule_for_node_st): New callback
function to schedule based on isl_schedule_node.
(get_schedule_map_st): New schedule optimizer based on isl_schedule_node.
(scop_get_domains): New. Return the isl_union_set containing the domains of all the pbbs.
(optimize_isl): Call the new function get_schedule_map_st for isl-0.15
gcc/testsuite/ChangeLog:
* gcc.dg/graphite/block-0.c: Changed to match pattern.
* gcc.dg/graphite/interchange-1.c: Same.
* gcc.dg/graphite/interchange-10.c: Same.
* gcc.dg/graphite/interchange-11.c: Same.
* gcc.dg/graphite/interchange-13.c: Same.
* gcc.dg/graphite/interchange-3.c: Same.
* gcc.dg/graphite/interchange-4.c: Same.
* gcc.dg/graphite/interchange-7.c: Same.
* gcc.dg/graphite/interchange-9.c: Same.
* gcc.dg/graphite/uns-interchange-9.c: Same.
* gfortran.dg/graphite/interchange-3.f90: Same.
Co-Authored-By: Aditya Kumar <aditya.k7@samsung.com>
From-SVN: r229445
H.J. Lu [Tue, 27 Oct 2015 14:29:31 +0000 (14:29 +0000)]
Properly handle -fno-plt in ix86_expand_call
prepare_call_address in calls.c is the wrong place to handle -fno-plt.
We shoudn't force function address into register and hope that load
function address via GOT and indirect call via register will be folded
into indirect call via GOT, which doesn't always happen. Also non-PIC
case can only be handled in backend. Instead, backend should expand
external function call into indirect call via GOT for -fno-plt.
This patch reverts -fno-plt in prepare_call_address and handles it in
ix86_expand_call. Other backends may need similar changes to support
-fno-plt. Alternately, we can introduce a target hook to indicate
whether an external function should be called via register for -fno-plt
so that i386 backend can disable it in prepare_call_address.
gcc/
PR target/67215
* calls.c (prepare_call_address): Don't handle -fno-plt here.
* config/i386/i386.c (ix86_expand_call): Generate indirect call
via GOT for -fno-plt. Support indirect call via GOT for x32.
* config/i386/predicates.md (sibcall_memory_operand): Allow
GOT memory operand.
gcc/testsuite/
PR target/67215
* gcc.target/i386/pr67215-1.c: New test.
* gcc.target/i386/pr67215-2.c: Likewise.
* gcc.target/i386/pr67215-3.c: Likewise.
From-SVN: r229444
Richard Biener [Tue, 27 Oct 2015 13:48:15 +0000 (13:48 +0000)]
re PR tree-optimization/68104 (ice in vect_update_misalignment_for_peel with -O3)
2015-10-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/68104
* tree-vect-data-refs.c (vect_compute_data_ref_alignment): Move
strided access check ...
(vect_compute_data_refs_alignment): ... here.
* gcc.dg/torture/pr68104.c: New testcase.
From-SVN: r229440
Daniel Jacobowitz [Tue, 27 Oct 2015 13:36:47 +0000 (13:36 +0000)]
config.gcc: Handle --enable-fdpic.
gcc/ChangeLog
* config.gcc: Handle --enable-fdpic.
* config/sh/constraints.md (Ccl): New constraint.
* config/sh/linux.h (SUBTARGET_LINK_EMUL_SUFFIX): Handle -mfdpic.
* config/sh/sh-c.c (sh_cpu_cpp_builtins): Add __FDPIC__ and
__SH_FDPIC__.
* config/sh/sh-mem.cc (expand_block_move): Support FDPIC for calls to
library functions.
* config/sh/sh-protos.h (function_symbol_result): New struct.
(function_symbol): Return function_symbol_result.
(sh_get_fdpic_reg_initial_val, sh_load_function_descriptor): New
declarations.
* config/sh/sh.c (TARGET_ASM_INTEGER, sh_assemble_integer): Implement
target hook.
(TARGET_CANNOT_FORCE_CONST_MEM, sh_cannot_force_const_mem_p): Likewise.
(sh_option_override): Force -fPIC if FDPIC is in effect.
(sh_asm_output_addr_const_extra): Add UNSPEC_GOTFUNCDESC and
UNSPEC_GOTOFFFUNCDESC cases.
(prepare_move_operands): Use FDPIC initial GOT register for
TLS-related GOT access; inhibit cross-section address offset constants
for FDPIC.
(sh_assemble_integer): New function.
(sh_cannot_copy_insn_p): Inhibit copying insns that are FDPIC
PC-relative call sites.
(expand_ashiftrt): Adapt invocation of function_symbol.
(sh_expand_prologue): Inhibit PC-relative GOT address load for FDPIC.
(nonpic_symbol_mentioned_p): Add cases for UNSPEC_GOTFUNCDESC and
UNSPEC_GOTOFFFUNCDESC.
(legitimize_pic_address): Resolve function symbols to function
descriptors for FDPIC. Do not use GOT-relative addressing for local
data that may be read-only on FDPIC.
(sh_emit_storesi, sh_emit_storehi): New functions.
(sh_trampoline_init): Generate FDPIC trampolines.
(sh_function_ok_for_sibcall): Add TARGET_FDPIC check.
(sh_expand_sym_label2reg): Don't assume sibcalls are local.
(sh_output_mi_thunk): Generate FDPIC call.
(function_symbol): Return function_symbol_result. For SFUNC_STATIC on
FDPIC, generate call site labels to use PC-relative addressing rather
than GOT-relative addressing.
(sh_conditional_register_usage): Make PIC register fixed and call used
when FDPIC is in effect.
(sh_legitimate_constant_p): Impose FDPIC constant constraints.
(sh_cannot_force_const_mem_p, sh_load_function_descriptor,
sh_get_fdpic_reg_initial_val): New functions.
* config/sh/sh.h (SUBTARGET_ASM_SPEC, SUBTARGET_LINK_EMUL_SUFFIX):
Handle -mfdpic.
(FDPIC_SELF_SPECS, SUBTARGET_DRIVER_SELF_SPECS,
PIC_OFFSET_TABLE_REG_CALL_CLOBBERED,
SH_OFFSETS_MUST_BE_WITHIN_SECTIONS_P): New macros.
(DRIVER_SELF_SPECS): Add SUBTARGET_DRIVER_SELF_SPECS and
FDPIC_SELF_SPECS.
(TRAMPOLINE_SIZE): Select trampoline size for FDPIC.
(ASM_PREFERRED_EH_DATA_FORMAT): Add EH format constraints for FDPIC.
(ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Handle FDPIC case.
* config/sh/sh.md (UNSPEC_GOTFUNCDESC, UNSPEC_GOTOFFFUNCDESC): New
constants.
(calli_fdpic, call_valuei_fdpic, sibcalli_fdpic, sibcalli_pcrel_fdpic,
sibcall_pcrel_fdpic, sibcall_valuei_fdpic, sibcall_valuei_pcrel_fdpic,
sibcall_value_pcrel_fdpic, sym2GOTFUNCDESC, symGOTFUNCDESC2reg,
sym2GOTOFFFUNCDESC, symGOTOFFFUNCDESC2reg): New patterns.
(udivsi3_i1, udivsi3_i4, udivsi3_i4_single, udivsi3,
*divsi_inv_call_combine, divsi3_i4, divsi3_i4_single, divsi3, ashlsi3,
ashlsi3_d_call, ashrsi3_n, lshrsi3, lshrsi3_d_call, calli, call_valuei,
call, call_value, sibcalli, sibcalli_pcrel, sibcall_pcrel, sibcall,
sibcall_valuei, sibcall_valuei_pcrel, sibcall_value_pcrel,
sibcall_value, GOTaddr2picreg, symGOT_load, symGOTOFF2reg,
block_move_real, block_lump_real, block_move_real_i4,
block_lump_real_i4): Add support for FDPIC calls.
(mulsi3, ic_invalidate_line, initialize_trampoline, call_pop,
call_value_pop): Adjust for new function_symbol signature.
* config/sh/sh.opt (-mfdpic): New option.
* doc/install.texi (Options specification): Document --enable-fdpic.
* doc/invoke.texi (SH Options): Document -mfdpic.
include/ChangeLog:
* longlong.h (udiv_qrnnd): Add FDPIC compatible version for SH.
libitm/ChangeLog:
* config/sh/sjlj.S (_ITM_beginTransaction): Bypass PLT calling
GTM_begin_transaction for compatibility with FDPIC.
Co-Authored-By: Andrew Stubbs <ams@codesourcery.com>
Co-Authored-By: Joseph Myers <joseph@codesourcery.com>
Co-Authored-By: Mark Shinwell <shinwell@codesourcery.com>
Co-Authored-By: Rich Felker <dalias@libc.org>
From-SVN: r229438
Alan Lawrence [Tue, 27 Oct 2015 12:36:55 +0000 (12:36 +0000)]
tree-scalar-evolution.c: Handle LSHIFT by constant
gcc/:
tree-scalar-evolution.c (interpret_rhs_expr): Handle some LSHIFT_EXPRs
as equivalent MULT_EXPRs.
gcc/testsuite/:
gcc.dg/vect/vect-strided-shift.c: New.
From-SVN: r229437
Kyrylo Tkachov [Tue, 27 Oct 2015 12:23:51 +0000 (12:23 +0000)]
[ARM] PR target/67929 Tighten vfp3_const_double_for_bits checks
PR target/67929
* config/arm/arm.c (vfp3_const_double_for_bits): Rewrite.
* config/arm/constraints.md (Dp): Update callsite.
* config/arm/predicates.md (const_double_vcvt_power_of_two): Likewise.
* gcc.target/arm/pr67929_1.c: New test.
From-SVN: r229436
Richard Sandiford [Tue, 27 Oct 2015 12:00:34 +0000 (12:00 +0000)]
Move ldexp, scalbn and scalbln folds to match.pd
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
gcc/
* builtins.c (fold_builtin_load_exponent): Rename to...
(fold_const_builtin_load_exponent): ...this and only handle
constant arguments.
(fold_builtin_2): Update accordingly.
* match.pd: Add rules previously handled by fold_builtin_load_exponent.
gcc/testsuite/
* gcc.dg/torture/builtin-ldexp-1.c: Skip at -O9,
From-SVN: r229434
Richard Sandiford [Tue, 27 Oct 2015 11:59:21 +0000 (11:59 +0000)]
Rename logb and significand folds
fold_builtin_logb and fold_builtin_significand now only handle
constant arguments, so this patch renames them to fold_const...,
to match fold_const_builtin_pow. The idea is to differentiate
constant-only folds so that they can be moved to a const_binop-like
function in future.
The functions also had some unnecessary calls to STRIP_NOPS, which
I think are left over from code that has already moved to match.pd.
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
gcc/
* builtins.c (fold_builtin_logb): Rename to...
(fold_const_builtin_logb): ...this and remove STRIP_NOPS call.
(fold_builtin_significand): Rename to...
(fold_const_builtin_significand): ...this and remove STRIP_NOPS call.
(fold_builtin_1): Update accordingly.
From-SVN: r229433
Richard Sandiford [Tue, 27 Oct 2015 11:57:34 +0000 (11:57 +0000)]
Move fmin and fmax folds to match.pd
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
gcc/
* builtins.c (fold_builtin_fmin_fmax): Delete.
(fold_builtin_2): Handle constant fmin and fmax arguments here.
* match.pd: Add rules previously handled by fold_builtin_fmin_fmax.
From-SVN: r229432
Evandro Menezes [Tue, 27 Oct 2015 11:57:01 +0000 (11:57 +0000)]
[PATCH] [AArch64] Distinct costs for sign and zero extension
gcc/
* config/aarch64/aarch64-protos.h (cpu_addrcost_table): Split member
for register extension into sign and zero register extension.
* config/aarch64/aarch64.c (generic_addrcost_table): Infer values
for sign and zero register extension.
(cortexa57_addrcost_table): Likewise.
(xgene1_addrcost_table): Likewise.
From-SVN: r229431
Richard Sandiford [Tue, 27 Oct 2015 11:56:18 +0000 (11:56 +0000)]
Move min(max...) and max(min...) folds to match.pd
This handles both integer and floating-point arguments. It's needed
for the follow-on patch to move fmin and fmax to match.pd.
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
gcc/
* fold-const.c (fold_minmax): Delete.
(fold_binary_loc): Don't call it.
* match.pd: Add rules previously handled by fold_minmax.
From-SVN: r229430
Arnaud Charlet [Tue, 27 Oct 2015 11:56:12 +0000 (12:56 +0100)]
[multiple changes]
2015-10-27 Tristan Gingold <gingold@adacore.com>
* bindgen.adb (System_BB_CPU_Primitives_Multiprocessors_Used):
New variable.
(Gen_Adainit): Call Start_All_CPUs if the above
variable is set to true.
2015-10-27 Emmanuel Briot <briot@adacore.com>
* adaint.c, s-os_lib.adb, s-os_lib.ads (Copy_File_Attributes): New
subprogram.
From-SVN: r229429
Richard Sandiford [Tue, 27 Oct 2015 11:55:38 +0000 (11:55 +0000)]
Split constant handling out of fold_builtin_fma
Just makes an upcoming patch a bit clearer.
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
gcc/
* builtins.c (fold_builtin_fma): Remove constant handling.
(fold_builtin_3): Handle constant fma arguments here.
From-SVN: r229428
Richard Sandiford [Tue, 27 Oct 2015 11:54:51 +0000 (11:54 +0000)]
Remove constant handling from fold_builtin_{,f}abs
fold_builtin_fabs and fold_builtin_abs had code to handle constant
arguments, but this simply duplicated what the following fold_build1_loc
would do for ABS_EXPR.
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
gcc/
* builtins.c (fold_builtin_fabs): Remove constant handling.
(fold_builtin_abs): Likewise.
From-SVN: r229427
Hristian Kirtchev [Tue, 27 Oct 2015 11:54:29 +0000 (11:54 +0000)]
namet.adb, namet.ads: Minor reformatting.
2015-10-27 Hristian Kirtchev <kirtchev@adacore.com>
* namet.adb, namet.ads: Minor reformatting.
From-SVN: r229426
Richard Sandiford [Tue, 27 Oct 2015 11:53:45 +0000 (11:53 +0000)]
Move copysign folds to match.pd
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
gcc/
* builtins.c (fold_builtin_copysign): Delete.
(fold_builtin_2): Handle constant copysign arguments here.
* match.pd: Add rules previously handled by fold_builtin_copysign.
From-SVN: r229425
Arnaud Charlet [Tue, 27 Oct 2015 11:53:08 +0000 (12:53 +0100)]
[multiple changes]
2015-10-27 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Analyze_Allocator): Do not perform legality check
on allocators for limited objects in a qualified expression,
because expression has not been resolved.
* sem_res.adb (Resolve_Allocator): Perform check on legality of
limited objects after resolution. Add sem_ch3.adb to context.
2015-10-27 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Refined_Global_In_Decl_Part): Add variable
States.
(Check_Refined_Global_Item): An object or state acts as a
constituent only when the corresponding encapsulating state
appears in pragma Global.
(Collect_Global_Item): Add a state with non-null visible refinement to
list States.
2015-10-27 Gary Dismukes <dismukes@adacore.com>
* sem_util.ads, par.adb, sem_ch6.adb: Minor reformatting and a few
typo corrections.
2015-10-27 Pierre-Marie de Rodat <derodat@adacore.com>
* namet.ads, namet.adb (Name_Equals): New function.
* namet.h (Name_Equals): New macro.
2015-10-27 Arnaud Charlet <charlet@adacore.com>
* exp_ch6.adb (Build_Procedure_Form): Use 'RESULT' for the extra
parameter, to avoid ambiguity when generating tmps using _xxx which
might end up reusing _result.
From-SVN: r229424
Richard Sandiford [Tue, 27 Oct 2015 11:52:54 +0000 (11:52 +0000)]
Move signbit folds to match.pd
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
gcc/
* builtins.c (fold_builtin_signbit): Delete.
(fold_builtin_2): Handle constant signbit arguments here.
* match.pd: Add rules previously handled by fold_builtin_signbit.
gcc/testsuite/
PR tree-optimization/68097
* gcc.dg/torture/builtin-nonneg-1.c: Skip at -O0. Add
--param max-ssa-name-query-depth=3 to dg-options.
From-SVN: r229423
Richard Sandiford [Tue, 27 Oct 2015 11:51:43 +0000 (11:51 +0000)]
Fold comparisons between sqrt and zero
The expression:
signbit(sqrt(x))
is always 0 for -ffast-math. The signbit fold first converts it to:
sqrt(x) < 0
and whether we realise that this is false depends on a race between two
folders: the sqrt comparison folder, which wants to convert it to
x < 0*0
and the generic tree_expr_nonnegative_p rule for ... < 0, which would
give the hoped-for 0.
The sqrt code already handles comparisons with negative values specially,
so this patch simply extends that idea to comparisons with zero.
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
gcc/
* match.pd: Handle sqrt(x) cmp 0 specially.
gcc/testsuite/
* gcc.dg/torture/builtin-sqrt-cmp-1.c: New test.
From-SVN: r229422
Arnaud Charlet [Tue, 27 Oct 2015 11:50:29 +0000 (12:50 +0100)]
[multiple changes]
2015-10-27 Javier Miranda <miranda@adacore.com>
* sem_util.ads, sem_util.adb (Defining_Identifier): Adding a formal to
indicate the needed behavior in case of nodes with errors.
2015-10-27 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Eval_Attribute): If the prefix of attribute
Enum_Rep is an object that is a generated loop variable for an
element iterator, no folding is possible.
* sem_res.adb (Resolve_Entity_Name): Do not check for a missing
initialization in the case of a constant that is an object
renaming.
* exp_attr.adb (Expand_N_Attribute_Reference, case Enum_Rep):
If the prefix is a constant that renames an expression there is
nothing to evaluate statically.
2015-10-27 Vincent Celier <celier@adacore.com>
* gnatlink.adb: Always delete the response file, even when the
invocation of gcc to link failed.
2015-10-27 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper):
Do not inherit the SPARK_Mode from the context if it has been
set already.
(Build_Subprogram_Declaration): Relocate relevant
pragmas from the subprogram body to the generated corresponding
spec. Do not copy aspect SPARK_Mode as this leads to circularity
in Copy_Separate_Tree. Inherit the attributes that describe
pragmas Ghost and SPARK_Mode.
(Move_Pragmas): New routine.
From-SVN: r229421
Hristian Kirtchev [Tue, 27 Oct 2015 11:46:38 +0000 (11:46 +0000)]
inline.adb (Is_Expression_Function): Removed.
2015-10-27 Hristian Kirtchev <kirtchev@adacore.com>
* inline.adb (Is_Expression_Function): Removed.
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): An internally
generated subprogram body that completes an expression function
inherits the SPARK_Mode from the spec.
* sem_res.adb (Resolve_Call): Update all calls to
Is_Expression_Function.
* sem_util.ads, sem_util.adb (Is_Expression_Function): Reimplemented.
(Is_Expression_Function_Or_Completion): New routine.
From-SVN: r229420
Hristian Kirtchev [Tue, 27 Oct 2015 11:23:07 +0000 (11:23 +0000)]
lib-xref-spark_specific.adb, [...]: Minor reformatting.
2015-10-27 Hristian Kirtchev <kirtchev@adacore.com>
* lib-xref-spark_specific.adb, a-dirval-mingw.adb, exp_ch6.adb,
sem_ch8.adb, s-os_lib.adb: Minor reformatting.
From-SVN: r229419
Arnaud Charlet [Tue, 27 Oct 2015 11:21:23 +0000 (12:21 +0100)]
[multiple changes]
2015-10-27 Yannick Moy <moy@adacore.com>
* lib-xref-spark_specific.adb
(Enclosing_Subprogram_Or_Library_Package): detect library-level
subprograms and handle entries as subprograms, i.e. now both
library-level subprograms and entry bodies act as enclosing
scopes.
(Traverse_Declarations_Or_Statements): process entry bodies just
like subprogram bodies.
* lib-xref.ads (Enclosing_Subprogram_Or_Library_Package): comment
simplified while keeping its the meaning and minor typo fixed
("of" -> "or").
* spark_xrefs.ads (Xref Section): fix in description of the ALI
line for subprogram calls; such lines start with captial "F"
followed by a space.
2015-10-27 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (Find_Direct_Name): A parameter association is
a legal context for applying an implicit dereference.
(Analyze_Expanded_Name): Minor code cleanup.
From-SVN: r229418
Arnaud Charlet [Tue, 27 Oct 2015 11:20:01 +0000 (11:20 +0000)]
sinput.ads, [...]: Fix typos.
2015-10-27 Arnaud Charlet <charlet@adacore.com>
* sinput.ads, spark_xrefs.ads, lib-xref.adb: Fix typos.
From-SVN: r229417
Arnaud Charlet [Tue, 27 Oct 2015 11:15:27 +0000 (12:15 +0100)]
[multiple changes]
2015-10-27 Pascal Obry <obry@adacore.com>
* a-dirval-mingw.adb: Remove some characters from Invalid_Character set.
2015-10-27 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Rewrite_Function_Call_For_C): Use a named
associaion for the added actual in the call because previous
actuals may also have been given by explicit associations.
* lib-xref.adb: Minor style fixes.
From-SVN: r229416
Arnaud Charlet [Tue, 27 Oct 2015 11:13:20 +0000 (12:13 +0100)]
[multiple changes]
2015-10-27 Arnaud Charlet <charlet@adacore.com>
* gnat1drv.adb: Remove hard coded restrictions.
2015-10-27 Pascal Obry <obry@adacore.com>
* a-dirval-mingw.adb: Minor reformatting.
From-SVN: r229415
Arnaud Charlet [Tue, 27 Oct 2015 11:12:14 +0000 (12:12 +0100)]
[multiple changes]
2015-10-27 Javier Miranda <miranda@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Improve previous patch.
2015-10-27 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch12.adb (Analyze_Formal_Package_Declaration): Code cleanup. Set
and restore the value of global flag Ignore_Pragma_SPARK_Mode. A
formal package declaration acts as a package instantation with
respect to SPARK_Mode legality.
2015-10-27 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Check_Constituent_Usage): Use
logical operators rather than short circuit operators. Emit an
error when a state with visible refinement is not refined.
* snames.ads-tmpl: Add names for detecting
predefined potentially blocking subprograms.
2015-10-27 Arnaud Charlet <charlet@adacore.com>
* exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Revert previous
change.
(Expand_Array_Aggregate): Rewrite previous change here
as done for other non GCC back-ends.
(Build_Record_Aggr_Code): Add special case.
From-SVN: r229414
Ilya Enkovich [Tue, 27 Oct 2015 11:08:16 +0000 (11:08 +0000)]
tree-vect-generic.c (expand_vector_operations_1): Check optab type before using it.
gcc/
* tree-vect-generic.c (expand_vector_operations_1): Check
optab type before using it.
From-SVN: r229413
Kyrylo Tkachov [Tue, 27 Oct 2015 10:57:32 +0000 (10:57 +0000)]
[AArch64] Enable autoprefetcher modelling in the scheduler
* config/aarch64/aarch64-protos.h
(struct tune_params): Add autoprefetcher_model field.
* config/aarch64/aarch64.c: Include params.h
(generic_tunings): Specify autoprefetcher_model value.
(cortexa53_tunings): Likewise.
(cortexa57_tunings): Likewise.
(cortexa72_tunings): Likewise.
(thunderx_tunings): Likewise.
(xgene1_tunings): Likewise.
(aarch64_first_cycle_multipass_dfa_lookahead_guard): New function.
(TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD): Define.
(aarch64_override_options_internal): Set
PARAM_SCHED_AUTOPREF_QUEUE_DEPTH param.
From-SVN: r229412
Thomas Schwinge [Tue, 27 Oct 2015 10:32:32 +0000 (11:32 +0100)]
[PR testsuite/68063] Add missing private clause in libgomp.c++/member-1.C
PR testsuite/68063
* testsuite/libgomp.c++/member-1.C (A::m1): Add missing private clause.
From-SVN: r229411
Richard Sandiford [Tue, 27 Oct 2015 09:32:11 +0000 (09:32 +0000)]
Move expN folds to match.pd
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
gcc/
* builtins.c (fold_builtin_exponent): Delete.
(fold_builtin_2): Handle constant expN arguments here.
* match.pd: Fold expN(logN(x)) -> x.
From-SVN: r229410
Richard Sandiford [Tue, 27 Oct 2015 09:31:28 +0000 (09:31 +0000)]
Move powi folds to match.pd
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
gcc/
* builtins.c (fold_builtin_powi): Delete.
(fold_builtin_2): Handle constant powi arguments here.
* match.pd: Add rules previously handled by fold_builtin_powi.
gcc/testsuite/
* gcc.dg/builtins-52.c: Add -O to dg-options.
From-SVN: r229409
Richard Sandiford [Tue, 27 Oct 2015 09:30:32 +0000 (09:30 +0000)]
Move pow folds to match.pd
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
gcc/
* builtins.c (fold_builtin_pow): Delete in favor of...
(fold_const_builtin_pow): ...this new function. Only handle constant
arguments.
(fold_builtin_2): Update accordingly.
* match.pd: Add rules previously handled by fold_builtin_pow.
gcc/testsuite/
* gcc.dg/torture/builtin-math-1.c: Skip at -O0.
From-SVN: r229408
Richard Sandiford [Tue, 27 Oct 2015 09:29:40 +0000 (09:29 +0000)]
Move hypot folds to match.pd
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
gcc/
* builtins.c (fold_builtin_hypot): Delete.
(fold_builtin_2): Handle constant hypot arguments here.
* match.pd: Fold hypot(x, 0) and hypot(0, x) to x. Canonicalize
hypot(x, x) to fabs(x)*sqrt(2).
From-SVN: r229407
Richard Sandiford [Tue, 27 Oct 2015 09:07:44 +0000 (09:07 +0000)]
Don't create SSA names until in SSA form
An upcoming patch adds a fold from hypot(x,x) to fabs(x)*sqrt(2).
This is unusual in that it could trigger in the gimplifier but would
require new SSA names to be created. This patch makes sure that we
use the usual:
if (gimple_in_ssa_p (cfun))
res = make_ssa_name (type);
else
res = create_tmp_reg (type);
formula to cope with cases where we're not yet in SSA form.
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
gcc/
* gimple-match-head.c (maybe_push_res_to_seq): Use create_tmp_reg
instead of make_ssa_name if not yet in SSA form.
From-SVN: r229406
Richard Biener [Tue, 27 Oct 2015 08:56:03 +0000 (08:56 +0000)]
cfg.c (free_edge): Add function argument and use it instead of cfun.
2015-10-27 Richard Biener <rguenther@suse.de>
* cfg.c (free_edge): Add function argument and use it instead of cfun.
(clear_edges): Likewise.
* cfg.h (clear_edges): Adjust prototype.
* cfgexpand.c (pass_expand::execute): Adjust.
* cfgloop.c (release_recorded_exits): Add function argument and use
it instead of cfun.
* cfgloop.h (release_recorded_exits): Adjust prototype.
(loops_state_satisfies_p): Add overload with function argument.
(loops_state_set): Likewise.
(loops_state_clear): Likewise.
(struct loop_iterator): Add function argument to constructor
and iterator and use it instead of cfun.
(FOR_EACH_LOOP_FN): New macro.
(loop_optimizer_finalize): Add overload with function argument.
* loop-init.c (loop_optimizer_init): Adjust.
(fix_loop_structure): Likewise.
(loop_optimizer_finaliz): Add function argument and use it
instead of cfun.
* tree-cfg.c (delete_tree_cfg_annotations): Likewise.
* tree-cfg.h (delete_tree_cfg_annotations): Adjust prototype.
* cgraph.c (release_function_body): Do not push/pop cfun.
* final.c (rest_of_clean_state): Adjust.
* graphite.c (graphite_finalize): Likewise.
* tree-ssa-copy.c (fini_copy_prop): Likewise.
* tree-ssa-dce.c (perform_tree_ssa_dce): Likewise.
* tree-ssa-loop-ivcanon.c (canonicalize_induction_variables): Likewise.
(tree_unroll_loops_completely): Likewise.
(pass_complete_unrolli::execute): Likewise.
* tree-ssa-loop-niter.c (free_numbers_of_iterations_estimates):
Add function argument and use it instead of cfun.
* tree-ssa-loop-niter.h (free_numbers_of_iterations_estimates):
Adjust prototype.
* tree-ssa-loop.c (tree_ssa_loop_done): Adjust.
* tree-ssa.c (delete_tree_ssa): Add function argument and use it
instead of cfun.
* tree-ssa.h (delete_tree_ssa): Adjust prototype.
* tree-ssanames.c (fini_ssanames): Add function argument and use it
instead of cfun.
* tree-ssanames.c (fini_ssanames): Adjust prototype.
* tree-vrp.c (execute_vrp): Adjust.
* value-prof.c (free_histograms): Add function argument and use it
instead of cfun.
* value-prof.h (free_histograms): Adjust prototype.
From-SVN: r229405
Thomas Schwinge [Tue, 27 Oct 2015 08:39:15 +0000 (09:39 +0100)]
[PR c/64765, c/64880] Support OpenACC Combined Directives in C, C++
gcc/c-family/
PR c/64765
PR c/64880
* c-common.h (c_oacc_split_loop_clauses): Declare function.
* c-omp.c (c_oacc_split_loop_clauses): New function.
gcc/c/
PR c/64765
PR c/64880
* c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
parameters, and handle these. Adjust all users.
(c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
into...
(c_parser_oacc_kernels_parallel): ... this new function. Adjust
all users.
* c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
declare functions.
(c_finish_omp_construct): Declare function.
* c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
Merge functions into...
(c_finish_omp_construct): ... this new function.
gcc/cp/
PR c/64765
PR c/64880
* cp-tree.h (finish_oacc_kernels, finish_oacc_parallel): Don't
declare functions.
(finish_omp_construct): Declare function.
* parser.c (cp_parser_oacc_loop): Add p_name, mask, cclauses
formal parameters, and handle these. Adjust all users.
(cp_parser_oacc_kernels, cp_parser_oacc_parallel): Merge functions
into...
(cp_parser_oacc_kernels_parallel): ... this new function. Adjust
all users.
* semantics.c (finish_oacc_kernels, finish_oacc_parallel): Merge functions into...
(finish_omp_construct): ... this new function.
gcc/
* tree.h (OACC_PARALLEL_BODY, OACC_PARALLEL_CLAUSES)
(OACC_KERNELS_BODY, OACC_KERNELS_CLAUSES, OACC_KERNELS_COMBINED)
(OACC_PARALLEL_COMBINED): Don't define macros. Adjust all users.
gcc/testsuite/
PR c/64765
PR c/64880
* c-c++-common/goacc/loop-1.c: Don't skip for C++. Don't prune
sorry message.
(PR64765): New function.
* gfortran.dg/goacc/coarray_2.f90: XFAIL.
* gfortran.dg/goacc/combined_loop.f90: Extend. Don't prune
sorry message.
* gfortran.dg/goacc/cray.f95: Refine prune directive.
* gfortran.dg/goacc/parameter.f95: Likewise.
libgomp/
* testsuite/libgomp.oacc-c-c++-common/combdir-1.c: New file.
* testsuite/libgomp.oacc-fortran/combdir-1.f90: Likewise.
From-SVN: r229404
Tom de Vries [Tue, 27 Oct 2015 07:09:58 +0000 (07:09 +0000)]
Add var in push_fields_onto_fieldstack
2015-10-27 Tom de Vries <tom@codesourcery.com>
* tree-ssa-structalias.c (push_fields_onto_fieldstack): Add and use var
field_type.
From-SVN: r229403
Bin Cheng [Tue, 27 Oct 2015 05:26:27 +0000 (05:26 +0000)]
loop-invariant.c (struct def): New field can_prop_to_addr_uses.
* loop-invariant.c (struct def): New field can_prop_to_addr_uses.
(inv_can_prop_to_addr_use): New function.
(record_use): Call can_prop_to_addr_uses, set the new field.
(get_inv_cost): Count cost if inv can't be propagated into its
address uses.
From-SVN: r229402
John David Anglin [Tue, 27 Oct 2015 00:39:32 +0000 (00:39 +0000)]
re PR libffi/65441 (FAIL: libffi.call/float2.c -W -Wall -Wno-psabi (test for excess errors))
PR libffi/65441
* testsuite/lib/libffi.exp: Load target-supports-dg.exp.
* testsuite/libffi.call/float2.c: Don't run on hppa*-*-hpux*.
From-SVN: r229400
GCC Administrator [Tue, 27 Oct 2015 00:16:12 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r229399
Jason Merrill [Mon, 26 Oct 2015 21:17:50 +0000 (17:17 -0400)]
DR 2179
DR 2179
* pt.c (process_partial_specialization): Handle error_mark_node
from most_specialized_partial_spec.
From-SVN: r229395
Doug Evans [Mon, 26 Oct 2015 20:07:43 +0000 (20:07 +0000)]
* config/linux.h (INCLUDE_DEFAULTS): Add INCLUDE_DEFAULTS_MUSL_LOCAL.
From-SVN: r229392
Louis Krupp [Mon, 26 Oct 2015 19:18:08 +0000 (19:18 +0000)]
re PR fortran/66056 (ICEs and endless compilation for lonely labels/numbers in type)
2015-10-26 Louis Krupp <louis.krupp@zoho.com>
PR fortran/66056
* fortran.h: Include namespace pointer in statement label
structure.
* symbol.c (gfc_get_st_label): Store pointer to namespace
that owns the statement label tree in each label.
(gfc_free_st_label): Use namespace owning statement label
tree when deleting statement label.
* io.c: Initialize format_asterisk with NULL namespace pointer.
2015-10-26 Louis Krupp <louis.krupp@zoho.com>
PR fortran/66056
* gfortran.dg/empty_label_typedecl.f90: New test
From-SVN: r229390
Mike Frysinger [Mon, 26 Oct 2015 18:32:41 +0000 (18:32 +0000)]
libjava: fix locale handling when sorting JNI methods
When building under LANG=cs_CZ.UTF-8, the JNI method check fails:
/bin/bash ../../scripts/check_jni_methods.sh
Found a problem with the JNI methods declared and implemented.
(<) missing in implementation, (>) missing in header files
> Java_gnu_java_awt_peer_gtk_GtkClipboard_advertiseContent
> Java_gnu_java_awt_peer_gtk_GtkClipboard_initNativeState
... lots more ...
While the sed commands are run under LC_ALL=C, the two sort commands are
not, and they end up producing unexpected output (for the test). Once we
run both under LC_ALL=C, the check passes. While we're here, we can also
combine latter the `sort|uniq` into `sort -u` to match the earlier code.
URL: https://bugs.gentoo.org/563710
Reported-by: Miroslav Å ulc <fordfrog@gentoo.org>
From-SVN: r229388
Steven G. Kargl [Mon, 26 Oct 2015 17:39:07 +0000 (17:39 +0000)]
re PR fortran/36192 (ICE with wrong index types and bad parens)
2015-10-26 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/36192
* array.c (gfc_ref_dimen_size): Check for BT_INTEGER before calling
mpz_set.
2015-10-26 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/36192
* gfortran.dg/pr36192.f90: New test.
From-SVN: r229387
Eric Botcazou [Mon, 26 Oct 2015 17:02:48 +0000 (17:02 +0000)]
match.pd (fold_widened_comparison): Apply simplifications to all integral types.
* match.pd (fold_widened_comparison): Apply simplifications to all
integral types.
From-SVN: r229384
Simon Dardis [Mon, 26 Oct 2015 16:29:31 +0000 (16:29 +0000)]
target.def (TARGET_NO_SPECULATION_IN_DELAY_SLOTS_P): New hook.
gcc/
* target.def (TARGET_NO_SPECULATION_IN_DELAY_SLOTS_P): New hook.
* doc/tm.texi.in (TARGET_NO_SPECULATION_IN_DELAY_SLOTS_P): Document.
* doc/tm.texi: Regenerated.
* reorg.c (dbr_schedule): Use new hook.
* config/mips/mips.c (mips_no_speculation_in_delay_slots_p): New.
testsuite/
* gcc.target/mips/ds-schedule-1.c: New.
* gcc.target/mips/ds-schedule-2.c: New.
From-SVN: r229383
Thomas Schwinge [Mon, 26 Oct 2015 16:25:04 +0000 (17:25 +0100)]
abort might not flush all open streams before process termination
libgomp/
* testsuite/libgomp.oacc-c-c++-common/abort-1.c: Print to stderr.
* testsuite/libgomp.oacc-c-c++-common/abort-3.c: Likewise.
From-SVN: r229382
Thomas Schwinge [Mon, 26 Oct 2015 16:24:54 +0000 (17:24 +0100)]
libgomp testsuite: Remove some explicit acc_device_nvidia usage.
libgomp/
* testsuite/libgomp.oacc-c-c++-common/lib-1.c: Remove explicit
acc_device_nvidia usage.
* testsuite/libgomp.oacc-c-c++-common/lib-10.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-2.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-9.c: Likewise.
From-SVN: r229381
Thomas Schwinge [Mon, 26 Oct 2015 16:24:44 +0000 (17:24 +0100)]
libgomp: Additional acc_shutdown bug fixing and testing
libgomp/
* oacc-init.c (acc_shutdown): Call gomp_init_targets_once.
* testsuite/libgomp.oacc-c-c++-common/lib-8.c: New file.
From-SVN: r229380
Thomas Schwinge [Mon, 26 Oct 2015 16:24:28 +0000 (17:24 +0100)]
[libgomp/66518] Resolve XFAIL in libgomp.oacc-c-c++-common/lib-3.c
libgomp/
PR libgomp/66518
* testsuite/libgomp.oacc-c-c++-common/lib-3.c: Resolve XFAIL.
From-SVN: r229379
Thomas Schwinge [Mon, 26 Oct 2015 16:24:17 +0000 (17:24 +0100)]
[PR libgomp/65437, libgomp/66518] Initialize runtime in acc_update_device, acc_update_self
libgomp/
PR libgomp/65437
PR libgomp/66518
* oacc-mem.c (update_dev_host): Call goacc_lazy_initialize.
* testsuite/libgomp.oacc-c-c++-common/lib-42.c: Remove XFAIL.
From-SVN: r229378
Arnaud Charlet [Mon, 26 Oct 2015 15:44:32 +0000 (16:44 +0100)]
[multiple changes]
2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Add_Item_To_Name_Buffer): Update the comment on usage.
Add an output string for loop parameters.
(Analyze_Global_Items): Loop parameters are now a
valid global item. The share the legality checks of constants.
(Analyze_Input_Output): Loop parameters are now a valid dependency item.
(Find_Role): Loop parameters share the role of constants.
2015-10-26 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Resolve_Generalized_Indexing): In ASIS mode,
preserve the Generalized_ indexing link if the context is not
a spec expression that will be analyzed anew.
2015-10-26 Javier Miranda <miranda@adacore.com>
* exp_ch6.ads, exp_ch6.adb (Build_Procedure_Body_Form): Promote it to
library level (to invoke this routine from the semantic analyzer).
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): When generating
C code, invoke Build_Procedure_Body_Form to transform a function
that returns a constrained array type into a procedure with an
out parameter that carries the return value.
2015-10-26 Arnaud Charlet <charlet@adacore.com>
* a-reatim.ads: Add "Clock_Time with Synchronous" contract in package
Ada.Real_Time.
* a-taside.ads: Add "Tasking_State with Synchronous" contract in
package Ada.Task_Identification.
* sem_ch12.adb: minor typo in comment
From-SVN: r229377
Hristian Kirtchev [Mon, 26 Oct 2015 15:40:10 +0000 (15:40 +0000)]
contracts.adb (Analyze_Object_Contract): Set and restore the SPARK_Mode for both constants and objects.
2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
* contracts.adb (Analyze_Object_Contract): Set and restore
the SPARK_Mode for both constants and objects. Factor out the
semantic checks concerning Ghost objects.
* freeze.adb (Freeze_Array_Type): A Ghost array type cannot have a
concurrent component type.
(Freeze_Entity): A Ghost type cannot also be concurrent.
(Freeze_Record_Type): A Ghost record type cannot have a concurrent
component.
* sem_prag.adb (Analyze_Abstract_State): A Ghost abstract
state cannot also be synchronized.
(Check_Ghost_Synchronous): New routine.
* sem_util.adb (Yields_Synchronized_Object): Correct the case
of record components to account for the case where the type has
no component list.
2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
* expander.adb (Expand): Expand a single protected declaration.
* exp_ch9.ads, exp_ch9.adb (Expand_N_Single_Protected_Declaration): New
routine.
2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
* sem_res.adb (Is_OK_Volatile_Context): A volatile object may appear
in an object declaration as long as it denotes the name.
From-SVN: r229376
Jeff Law [Mon, 26 Oct 2015 15:36:04 +0000 (09:36 -0600)]
[PATCH] [PR tree-optimization/68013] Make sure first block in FSM path
is in VISITED_BBs
PR tree-optimization/68013
* tree-ssa-threadbackward.c
(fsm_find_control_statement_thread_paths): Make sure the first block
in the path is in VISITED_BBs.
PR tree-optimization/68013
* gcc.c-torture/compile/pr68013.c: New test.
From-SVN: r229375
Arnaud Charlet [Mon, 26 Oct 2015 15:35:49 +0000 (16:35 +0100)]
[multiple changes]
2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch9.adb (Analyze_Single_Protected_Declaration): The anonymous
object no longer comes from source.
(Analyze_Single_Task_Declaration): The anonymous object no longer
comes from source.
* sem_prag.adb (Analyze_Pragma): The analysis of pragma SPARK_Mode
now recognizes the internal anonymous object created for a single
concurren type as a valid context.
(Find_Related_Context): The internal anonymous object created for a
single concurrent type is now a valid context.
(Find_Related_Declaration_Or_Body): The internal anonymous object
created for a single concurrent type is now a valid context.
2015-10-26 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Inherit_Rep_Item_Chain): Another another guard
to prevent circularities in the rep_item_chain of the full view
of a type extension in a child unit that extends a private type
from the parent.
From-SVN: r229374
Arnaud Charlet [Mon, 26 Oct 2015 15:34:11 +0000 (16:34 +0100)]
[multiple changes]
2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
* atree.ads, atree.adb (Ekind_In): New 10 and 11 parameter versions.
* contracts.ads, contracts.adb (Analyze_Initial_Declaration_Contract):
New routine.
* sem_ch6.adb (Analyze_Generic_Subprogram_Body):
Analyze the contract of the initial declaration.
(Analyze_Subprogram_Body_Helper): Analyze the contract of the
initial declaration.
* sem_ch7.adb (Analyze_Package_Body_Helper): Analyze the contract
of the initial declaration.
* sem_ch9.adb (Analyze_Entry_Body): Analyze the contract of
the initial declaration.
(Analyze_Protected_Body): Analyze
the contract of the initial declaration.
(Analyze_Task_Body): Analyze the contract of the initial declaration.
* sem_prag.adb (Add_Entity_To_Name_Buffer): Use "type" rather
than "unit" as it makes the error messages sound better.
(Add_Item_To_Name_Buffer): Update comment on usage. The routine
now supports discriminants and current instances of concurrent
types.
(Analyze_Depends_In_Decl_Part): Install the discriminants
of a task type.
(Analyze_Global_In_Decl_Part): Install the discriminants of a task type.
(Analyze_Global_Item): Add processing for current instances of
concurrent types and include discriminants as valid global items.
(Analyze_Input_Output): Discriminants and current instances of
concurrent types are now valid items. Update various error messages.
(Check_Usage): Current instances of protected and task types behaves
as formal parameters.
(Collect_Subprogram_Inputs_Outputs): There is
no longer need to manually analyze [Refined_]Global thanks to
freezing of initial declaration contracts. Add processing for
the current instance of a concurrent type.
(Find_Role): Add categorizations for discriminants, protected and task
types.
(Is_CCT_Instance): New routine.
(Match_Items): Update the comment on usage. Update internal comments.
* sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update the
comment on usage.
* sem_util.adb (Entity_Of): Ensure that the entity is an object
when traversing a potential renaming chain.
(Fix_Msg): Use "type" rather than "unit" as it makes the error messages
sound better.
* sem_util.ads (Fix_Msg): Update the comment on usage.
2015-10-26 Arnaud Charlet <charlet@adacore.com>
* par.adb (Par): Do not generate an error when generating
SCIL for predefined units or new children of system and co.
2015-10-26 Ed Schonberg <schonberg@adacore.com>
* einfo.adb: Access_Disp_Table applies to a private
extension.
From-SVN: r229373
Richard Biener [Mon, 26 Oct 2015 15:24:45 +0000 (15:24 +0000)]
re PR rtl-optimization/67443 (DSE removes required store instruction)
2015-10-26 Richard Biener <rguenther@suse.de>
Dominik Vogt <vogt@linux.vnet.ibm.com>
PR middle-end/67443
* alias.c (ao_ref_from_mem): Remove promoted subreg handling.
Properly prune ref->ref for accesses outside of ref.
* gcc.target/s390/pr67443.c: New testcase.
Co-Authored-By: Dominik Vogt <vogt@linux.vnet.ibm.com>
From-SVN: r229372
Richard Sandiford [Mon, 26 Oct 2015 14:59:36 +0000 (14:59 +0000)]
Allow more complex call replacements in gimple-fold.c
An upcoming patch adds a match.pd rule that folds pow(pow(x,y),z)
to pow(x,y*z). This fold can reuse the existing pow gimple statement
and simply replace the operands with x and y*z. However, the y*z
itself requires a separate gimple statement and the code wasn't
prepared to handle that.
Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
gcc/
* gimple-fold.c (replace_stmt_with_simplification): Don't allow
new statements to be inserted if inplace. Allow calls to have
nonempty sequences.
From-SVN: r229371
Ilya Verbin [Mon, 26 Oct 2015 14:38:02 +0000 (14:38 +0000)]
offload_host.cpp (OffloadDescriptor::setup_misc_data): Use calloc instead of malloc.
liboffloadmic/
* runtime/offload_host.cpp (OffloadDescriptor::setup_misc_data): Use
calloc instead of malloc.
(__offload_fini_library): Set mic_engines_total to zero.
Co-Authored-By: Aleksander Ivanushenko <aleksander.ivanushenko@intel.com>
From-SVN: r229368
Richard Sandiford [Mon, 26 Oct 2015 14:34:02 +0000 (14:34 +0000)]
Fix attribution in ChangeLog
While going through some history, I noticed that I'd committed one
of Alan's changes with my email address rather than his. Sorry for
the screw-up.
From-SVN: r229366
Richard Biener [Mon, 26 Oct 2015 14:22:20 +0000 (14:22 +0000)]
tree-object-size.c: Remove builtins.h include, include tree-cfg.h.
2015-10-26 Richard Biener <rguenther@suse.de>
* tree-object-size.c: Remove builtins.h include, include tree-cfg.h.
(do_valueize): New function.
(pass_object_sizes::execute): Use gimple_fold_stmt_to_constant and
replace_uses_by.
* tree-ssa-threadedge.c: Remove builtins.h include, include
gimple-fold.h
(fold_assignment_stmt): Remove.
(threadedge_valueize): New function.
(record_temporary_equivalences_from_stmts): Use
gimple_fold_stmt_to_constant_1, note additional cleanup
opportunities.
From-SVN: r229364
Arnaud Charlet [Mon, 26 Oct 2015 13:37:54 +0000 (14:37 +0100)]
[multiple changes]
2015-10-26 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Resolve_Generalized_Indexing): In ASIS mode, when
restoring original node, remove Generalized_Indexing operation
so that it is recreated during re- analysis.
2015-10-26 Javier Miranda <miranda@adacore.com>
* exp_unst.adb: (Unnest_Subprogram):
Replace absolute references to 1 and 0 by their counterpart
relative references through Subps_First.
2015-10-26 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.
* sem_prag.adb, sem_prag.ads: Remove Build_Generic_Class_Condition,
unused.
From-SVN: r229362
Arnaud Charlet [Mon, 26 Oct 2015 13:30:23 +0000 (14:30 +0100)]
[multiple changes]
2015-10-26 Emmanuel Briot <briot@adacore.com>
* s-os_lib.adb (Argument_String_To_List): Remove backslashes in
argument value.
2015-10-26 Javier Miranda <miranda@adacore.com>
* exp_unst.ads, exp_unst.adb (Is_Uplevel_Referenced): Removed.
From-SVN: r229361
Richard Biener [Mon, 26 Oct 2015 13:27:59 +0000 (13:27 +0000)]
match.pd ((A & ~B) - (A & B) -> (A ^ B) - B): Add missing :c.
2015-10-26 Richard Biener <rguenther@suse.de>
* match.pd ((A & ~B) - (A & B) -> (A ^ B) - B): Add missing :c.
( (X & ~Y) | (~X & Y) -> X ^ Y): Remove redundant :c.
From-SVN: r229360
Arnaud Charlet [Mon, 26 Oct 2015 13:27:48 +0000 (14:27 +0100)]
[multiple changes]
2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
* exp_util.adb, sem_aux.adb, exp_attr.adb, sem_eval.adb: Minor
reformatting.
* sem_util.adb, sem_ch5.adb: Minor reformatting.
2015-10-26 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Unnest_Subprogram): Add guard to prevent compiler
abort when handling a reference to a formal in an aspect of a
nested subprogram declaration as an uplevel reference.
From-SVN: r229359
Arnaud Charlet [Mon, 26 Oct 2015 13:26:11 +0000 (14:26 +0100)]
[multiple changes]
2015-10-26 Bob Duff <duff@adacore.com>
* snames.ads-tmpl, aspects.adb, aspects.ads: Add the aspect and
pragma names and enter into relevant tables.
* sem_ch13.adb (Analyze_Aspect_Specifications): Analyze aspect
Predicate_Failure.
* sem_prag.adb (Predicate_Failure): Analyze pragma Predicate_Failure.
* exp_util.adb (Make_Predicate_Check): When building the Check
pragma, if Predicate_Failure has been specified, add the relevant
String argument to the pragma.
* par-prag.adb (Prag): Add Predicate_Failure to list of pragmas
handled during semantic analysis.
2015-10-26 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Analyze_Assignment): If the left-hand side
is an indexed component with generalized indexing, discard
interpretation that yields a reference type, which is not
assignable. This prevent spurious ambiguities when the right-hand
side is an aggregate which does not provide a target type.
From-SVN: r229358
Arnaud Charlet [Mon, 26 Oct 2015 13:23:35 +0000 (14:23 +0100)]
[multiple changes]
2015-10-26 Bob Duff <duff@adacore.com>
* exp_ch7.adb, exp_ch6.adb: Minor comment fix.
2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
* aspects.adb (Move_Or_Merge_Aspects): Move all aspects related
to a single concurrent type declaration to the declaration
of the anonymous object if they qualify.
(Relocate_Aspect): Update comment on usage.
* aspects.ads Add new sectioon on aspect specifications on single
concurrent types. Add new table Aspect_On_Anonymous_Object_OK.
(Move_Or_Merge_Aspects): Udate the comment on usage.
* atree.adb (Elist36): New routine.
(Set_Elist36): New routine.
* atree.ads (Elist36): New routine along with pragma Inline.
(Set_Elist36): New routine along with pragma Inline.
* atree.h: Elist36 is now an alias for Field36.
* contracts.adb (Add_Contract_Item): Add processing
for protected units and extra processing for variables.
(Analyze_Object_Contract): Code cleanup. The processing of
Part_Of now depends on wherer the object is a constant or
a variable. Add processing for pragmas Depends and Global
when they apply to a single concurrent object. Verify that a
variable which is part of a single concurrent type has full
default initialization. Set/restore the SPARK_Mode of a single
concurrent object.
(Analyze_Protected_Contract): New routine.
* contracts.ads (Add_Contract_Item): Update the comment on usage.
(Analyze_Object_Contract): Update the comment on usage.
(Analyze_Protected_Contract): New routine.
(Analyze_Task_Contract): Update the comment on usage.
* einfo.adb Part_Of_Constituents now uses Elist10.
(Anonymous_Object): New routine.
(Contract): Code cleanup.
(Has_Option): Remove the assumption that the only simple
option is External.
(Is_Synchronized_State): New routine.
(Part_Of_Constituents): This attribute applies to
variables and uses Elist10.
(Set_Anonymous_Object): New routine.
(Set_Contract): Code cleanup.
(Set_Part_Of_Constituents): This attribute applies to variables and
uses Elist10.
(Set_SPARK_Aux_Pragma): Code cleanup.
(Set_SPARK_Aux_Pragma_Inherited): Code cleanup.
(Set_SPARK_Pragma): Code cleanup. This attribute applies to
variables.
(Set_SPARK_Pragma_Inherited): Code cleanup. This
attribute applies to variables.
(SPARK_Aux_Pragma): Code cleanup.
(SPARK_Aux_Pragma_Inherited): Code cleanup.
(SPARK_Pragma): Code cleanup. This attribute applies to variables.
(SPARK_Pragma_Inherited): Code cleanup. This attribute applies
to variables.
(Write_Field9_Name): Remove the output for Part_Of_Constituents.
(Write_Field10_Name): Add output for Part_Of_Constituents.
(Write_Field30_Name): Add output for Anonymous_Object.
(Write_Field34_Name): Output SPARK_Pragma
for protected types and variables.
* einfo.ads: New attributes Anonymous_Object and
Is_Synchronized_State along with usage in entities. Update
the documentation of attributes Contract Encapsulating_State
Part_Of_Constituents SPARK_Aux_Pragma SPARK_Aux_Pragma_Inherited
SPARK_Pragma SPARK_Pragma_Inherited (Anonymous_Object): New
routine along with pragma Inline.
(Is_Synchronized_State): New routine.
(Set_Anonymous_Object): New routine along with pragma Inline.
* freeze.adb (Freeze_Record_Type): Ensure that a non-synchronized
record does not have synchronized components.
* sem_ch3.adb (Analyze_Declarations): Code cleanup. Analyze the
contract of protected units.
* sem_ch9.adb Add with and use clauses for Sem_Prag. Code cleanup.
(Analyze_Single_Protected_Declaration): Reimplemented.
(Analyze_Single_Task_Declaration): Reimplemented.
* sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Part_Of
can now apply to a single concurrent type declaration. Rely on
Insert_Pragma to place the pragma. Update the error message on
usage to reflect the new context.
(Insert_Pragma): When inserting
pragmas for a protected or task type, create a definition if
the type lacks one.
* sem_elab.adb (Check_A_Call): Code cleanup. Issue error message
related to elaboration issues for SPARK when SPARK_Mode is "on"
and the offending entity comes from source.
* sem_prag.adb (Analyze_Abstract_State): Add new flag
Synchronous_Seen. Update the analysis of simple options Externa,
Ghost and Synchronous. Update various error messages to reflect
the use of single concurrent types.
(Analyze_Depends_Global): Pragmas Depends and Global can now apply to
a single task type or a single concurrent object created for a task
type.
(Analyze_Depends_In_Decl_Part): Do not push a scope when the
context is a single concurrent object. (Analyze_Part_Of):
Moved out of Analyze_Pragma. The routine has a new profile
and comment on usage.
(Analyze_Part_Of_In_Decl_Part): New routine.
(Analyze_Part_Of_Option): Update the call to Analyze_Part_Of.
(Analyze_Pragma): Pragma Abstract_State can
now carry simple option Synchronous. Pragma Part_Of can now
apply to a single concurrent type declaration. The analysis
of pragma Part_Of is delayed when the context is a single
concurrent object.
(Analyze_Refined_Depends_In_Decl_Part): Use the anonymous object when
the context is a single concurren type.
(Analyze_Refined_Global_In_Decl_Part): Use the
anonymous object when the context is a single concurren type.
(Check_Ghost_Constituent): Removed.
(Check_Matching_Constituent): Renamed to Match_Constituent.
(Check_Matching_State): Renamed to Match_State.
(Collect_Constituent): Update the comment
on usage. Verify various legality rules related to ghost and
synchronized entities.
(Find_Related_Declaration_Or_Body): A single task declaration is no
longer a valid context for a pragma.
(Fix_Msg): Moved to Sem_Util.
(Process_Overloadable): Add processing for single task objects.
(Process_Visible_Part): Add processing for single concurrent
types.
(Relocate_Pragmas_To_Anonymous_Object): New routine.
* sem_prag.ads Add new table Pragma_On_Anonymous_Object_OK.
(Analyze_Part_Of_In_Decl_Part): New routine.
(Relocate_Pragmas_To_Anonymous_Object): New routine.
* sem_util.adb (Defining_Entity): Code cleanup.
(Fix_Msg): Moved from Sem_Prag and augmented to handle
mode replacements.
(Has_Full_Default_Initialization): New routine.
(Is_Descendant_Of_Suspension_Object): Moved out of
Is_Effectively_Volatile.
(Is_Single_Concurrent_Object): New routine.
(Is_Single_Concurrent_Type): New routine.
(Is_Single_Concurrent_Type_Declaration): New routine.
(Is_Synchronized_Object): New routine.
(Yields_Synchronized_Object): New routine.
* sem_util.ads (Fix_Msg): Moved form Sem_Prag. Update the
comment on usage.
(Has_Full_Default_Initialization): New routine.
(Is_Single_Concurrent_Object): New routine.
(Is_Single_Concurrent_Type): New routine.
(Is_Single_Concurrent_Type_Declaration): New routine.
(Is_Synchronized_Object): New routine.
(Yields_Synchronized_Object): New routine.
* snames.ads-tmpl: Add name Synchronous.
From-SVN: r229357
Jerome Lambourg [Mon, 26 Oct 2015 13:14:49 +0000 (13:14 +0000)]
sysdep.c (__gnat_get_task_options): Refine the workaround for the VX_USR_TASK_OPTION bug in VxWorks 7...
2015-10-26 Jerome Lambourg <lambourg@adacore.com>
* sysdep.c (__gnat_get_task_options): Refine the workaround for
the VX_USR_TASK_OPTION bug in VxWorks 7, as we cannot check the
value of VX_DEALLOC_TCB in RTP mode, the macro value not being
defined in the headers.
* g-arrspl.ads: Fix typo.
From-SVN: r229356
Arnaud Charlet [Mon, 26 Oct 2015 13:10:12 +0000 (14:10 +0100)]
[multiple changes]
2015-10-26 Jerome Lambourg <lambourg@adacore.com>
* sysdep.c (__gnat_get_task_options): Workaround a VxWorks
bug where VX_DEALLOC_TCB task option is forbidden when calling
taskCreate but allowed in VX_USR_TASK_OPTIONS.
2015-10-26 Javier Miranda <miranda@adacore.com>
* exp_unst.ads, exp_unst.adb (Is_Uplevel_Referenced): New subprogram.
2015-10-26 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Constant_Indexing_OK): New predicate, subsidiary
of Try_Container_Indexing, that implements the name resolution
rules given in RM 4.1.6 (13-15).
From-SVN: r229355
Hristian Kirtchev [Mon, 26 Oct 2015 13:04:09 +0000 (13:04 +0000)]
sem_ch3.adb, [...]: Minor reformatting.
2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch3.adb, sem_util.adb: Minor reformatting.
From-SVN: r229354
Andre Vehreschild [Mon, 26 Oct 2015 13:03:22 +0000 (14:03 +0100)]
re PR fortran/66927 (ICE in gfc_conf_procedure_call)
gcc/fortran/ChangeLog:
2015-10-26 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/66927
* trans-array.c (evaluate_bound): For deferred length arrays get the
bounds directly from the descriptor, i.e., prevent using constant
zero lower bound from the gfc_conv_array_lbound () routine.
(gfc_conv_section_startstride): Hand deferred array status to
evaluate_bound ().
(gfc_conv_expr_descriptor): Same.
From-SVN: r229353
Arnaud Charlet [Mon, 26 Oct 2015 13:01:25 +0000 (14:01 +0100)]
[multiple changes]
2015-10-26 Javier Miranda <miranda@adacore.com>
* exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Return False when
generating C code.
* sem_ch3.adb: Fix typos.
2015-10-26 Bob Duff <duff@adacore.com>
* sem_ch13.adb (Build_Predicate_Functions): Change the
structure of the predicate functions to reflect the requirements
of AI12-0071.
(Add_Condition): New procedure to do the "and-then-ing" in Add_Call
and Add_Predicates.
* einfo.ads (Static_Real_Or_String_Predicate): Change the
documentation to reflect the new structure.
* sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
Change the walking of the predicate expression to reflect the
new structure.
* exp_util.adb: Minor comment fix.
From-SVN: r229352
Bob Duff [Mon, 26 Oct 2015 12:05:58 +0000 (12:05 +0000)]
s-rident.ads (No_Dynamic_Sized_Objects): New restriction name.
2015-10-26 Bob Duff <duff@adacore.com>
* s-rident.ads (No_Dynamic_Sized_Objects): New restriction name.
* sem_util.ads, sem_util.adb (All_Composite_Constraints_Static):
New function to check that all relevant constraints are static.
* sem_aggr.adb (Resolve_Array_Aggregate): Call
All_Composite_Constraints_Static on the bounds of named array
aggregates.
* sem_ch3.adb (Analyze_Subtype_Declaration): Call
All_Composite_Constraints_Static if the type is composite and
the subtype is constrained.
From-SVN: r229351
Arnaud Charlet [Mon, 26 Oct 2015 12:03:29 +0000 (13:03 +0100)]
[multiple changes]
2015-10-26 Javier Miranda <miranda@adacore.com>
* exp_ch6.adb (Expand_N_Subprogram_Declaration): Skip the frontend
transformation of functions that return a constrained array into
a procedure when they are unchecked_conversion instances.
2015-10-26 Gary Dismukes <dismukes@adacore.com>
* s-os_lib.ads: Minor reformatting/rewording.
From-SVN: r229350
Arnaud Charlet [Mon, 26 Oct 2015 12:00:55 +0000 (12:00 +0000)]
debug.adb: Introduce debug flag -gnatd.5.
2015-10-26 Arnaud Charlet <charlet@adacore.com>
* debug.adb: Introduce debug flag -gnatd.5.
From-SVN: r229349
Pascal Obry [Mon, 26 Oct 2015 11:59:42 +0000 (11:59 +0000)]
s-os_lib.ads, [...] (Kill): New routine.
2015-10-26 Pascal Obry <obry@adacore.com>
* s-os_lib.ads, s-os_lib.adb (Kill): New routine. This routine
makes visible support for killing processes in expect.c.
* expect.c (__gnat_kill): Removed from here.
* adaint.c (__gnat_kill): Added here to be usable in the compiler
(System.OS_Lib).
* make.adb (Sigint_Intercepted): Use the Kill routine from
System.OS_Lib.
From-SVN: r229348
Arnaud Charlet [Mon, 26 Oct 2015 11:56:57 +0000 (11:56 +0000)]
einfo.ads, [...] (Needs_Typedef, [...]): Removed, no longer used.
2015-10-26 Arnaud Charlet <charlet@adacore.com>
* einfo.ads, einfo.adb, exp_unst.adb (Needs_Typedef,
Set_Needs_Typedef): Removed, no longer used.
From-SVN: r229347
Alan Hayward [Mon, 26 Oct 2015 11:55:45 +0000 (11:55 +0000)]
tree-vect-loop.c (vect_create_epilog_for_reduction): Fix VEC_COND_EXPR types.
2015-10-26 Alan Hayward <alan.hayward@arm.com>
* tree-vect-loop.c (vect_create_epilog_for_reduction): Fix
VEC_COND_EXPR types.
From-SVN: r229346
Arnaud Charlet [Mon, 26 Oct 2015 11:55:18 +0000 (12:55 +0100)]
[multiple changes]
2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb (First_Component): Update the assertion to allow
for concurrent types.
(First_Component_Or_Discriminant): Update the assertion to allow for
concurrent types.
* einfo.ads: Update the documentation of attributes First_Component
and First_Component_Or_Discriminant along with uses in entities.
2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
* sem_res.adb (Resolve_Actuals): An effectively
volatile object may act as an actual when the corresponding
formal is of a non-scalar effectively volatile type, not just
a non-scalar volatile type.
2015-10-26 Bob Duff <duff@adacore.com>
* sinfo.ads, sem_util.ads: Update comments.
2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Refined_Depends_Global_Post): When dealing with
protected entries or protected subprograms, use the enclosing protected
type to ensure that the protected type declaration is declared
in a package spec. Remove an obsolete attempt to ensure the
aggregate for of pragma Refined_State as this routine is never
called in that case.
2015-10-26 Ed Schonberg <schonberg@adacore.com>
* exp_ch5.adb (Expand_Iterator_Loop_Over_Container): For
an element iterator loop, the element is a constant if the
container object is a constant, even if the container type has
a Variable_Indexing aspect.
From-SVN: r229345
Kyrylo Tkachov [Mon, 26 Oct 2015 11:51:47 +0000 (11:51 +0000)]
[auto-inc-dec.c] Account for cost of move operation in FORM_PRE_ADD and FORM_POST_ADD cases
* auto-inc-dec.c (insert_move_insn_before): Delete.
(attempt_change): Remember to cost the simple move in the
FORM_PRE_ADD and FORM_POST_ADD cases.
From-SVN: r229344
Arnaud Charlet [Mon, 26 Oct 2015 11:51:46 +0000 (12:51 +0100)]
[multiple changes]
2015-10-26 Bob Duff <duff@adacore.com>
* s-fileio.adb (Fopen_Mode): Use "r+" for Out_File/Stream_IO,
so the file won't be truncated on 'fopen', as required by
AI95-00283-1.
2015-10-26 Bob Duff <duff@adacore.com>
* gnat1drv.adb, prj.adb, sem_ch6.adb, s-regpat.adb,
sem_prag.adb: Fix typos.
* einfo.ads, restrict.ads: Minor comment fixes.
* err_vars.ads, sem_util.adb, errout.ads: Code clean up.
2015-10-26 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Analyze_Assignment): Do not check that the
Left-hand side is legal in an inlined body, check is done on
the original template.
2015-10-26 Ed Schonberg <schonberg@adacore.com>
* exp_util.ads, exp_util.adb (Find_Primitive_Operations): New
subprogram to retrieve by name the possibly overloaded set of
primitive operations of a type.
* sem_ch4.adb (Try_Container_Indexing): Use
Find_Primitive_Operations to handle overloaded indexing operations
of a derived type.
From-SVN: r229343
Arnaud Charlet [Mon, 26 Oct 2015 11:44:33 +0000 (11:44 +0000)]
osint-c.ads: Minor comment update.
2015-10-26 Arnaud Charlet <charlet@adacore.com>
* osint-c.ads: Minor comment update.
2015-10-26 Arnaud Charlet <charlet@adacore.com>
* s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
s-osinte-darwin.ads, s-osinte-android.ads, s-osinte-freebsd.ads,
s-taprop-posix.adb (Get_Page_Size): C function returns an int. Adjust
callers accordingly.
From-SVN: r229342
Arnaud Charlet [Mon, 26 Oct 2015 11:38:57 +0000 (12:38 +0100)]
[multiple changes]
2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb (Is_OK_Object_Reference): New routine.
(Substitute_Valid_Check): Perform the 'Valid subsitution but do
not suggest the use of the attribute if the left hand operand
does not denote an object as it leads to illegal code.
2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
* exp_unst.adb: Minor reformatting.
2015-10-26 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb: Improve error msg.
From-SVN: r229341
Arnaud Charlet [Mon, 26 Oct 2015 11:37:17 +0000 (12:37 +0100)]
[multiple changes]
2015-10-26 Ed Schonberg <schonberg@adacore.com>
* sem_disp.adb (Check_Controlling_Type): Handle properly the
case of an incomplete type whose full view is tagged, when a
primitive operation of the type is declared between the two views.
2015-10-26 Bob Duff <duff@adacore.com>
* adaint.c (__gnat_locate_exec_on_path): If the PATH environment
variable is not set, do not return NULL, because we can still find
the executable if it includes a directory name.
2015-10-26 Ed Schonberg <schonberg@adacore.com>
* sem_elab.adb (Elab_Warning): Under dynamic elaboration, when
elaboration warnings are enabled, emit proper warning header
when triggered by an access attribute.
2015-10-26 Steve Baird <baird@adacore.com>
* exp_ch11.adb: If CodePeer_Mode is true, generate simplified
SCIL for exception declarations.
* exp_ch11.adb (Expand_N_Exception_Declaration) If CodePeer_Mode
is True, initialize the Full_Name component of the exception
record to null instead of to the result of an unchecked
conversion.
2015-10-26 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Note_Uplevel_Ref) : Handle properly a reference
that denotes a function returning a constrained array, that has
been rewritten as a procedure.
* makeutl.ads: Minor edit.
From-SVN: r229340
Arnaud Charlet [Mon, 26 Oct 2015 11:32:50 +0000 (12:32 +0100)]
Minor reformatting.
From-SVN: r229339
Arnaud Charlet [Mon, 26 Oct 2015 11:32:36 +0000 (12:32 +0100)]
[multiple changes]
2015-10-26 Yannick Moy <moy@adacore.com>
* lib-xref-spark_specific.adb (Traverse_Protected_Declaration): New
procedure for traversal.
(Add_SPARK_Xrefs): Remove debugging code.
(Traverse_Declaration_Or_Statement): Call the new traversal
procedure.
2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Pragma): Pragma
Extensions_Visible can now appear on an abstract subprogram
declaration.
From-SVN: r229338
Arnaud Charlet [Mon, 26 Oct 2015 11:31:06 +0000 (12:31 +0100)]
[multiple changes]
2015-10-26 Yannick Moy <moy@adacore.com>
* lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Use character 'r' to
denote a reference to a constant which may have variable input, and
thus may be treated as a variable in GNATprove, instead of the
character 'c' used for constants.
2015-10-26 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Object_Access_Level): Only aliased formals of
functions have the accessibility level of the point of call;
aliased formals of procedures have the same level as unaliased
formals.
(New_Copy_Tree): Add guard on copying itypes. From code reading.
From-SVN: r229337