Hristian Kirtchev [Wed, 20 Apr 2016 10:05:41 +0000 (10:05 +0000)]
s-imgllu.adb, [...]: Minor reformatting.
2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
* s-imgllu.adb, sem_util.adb, s-imgint.adb, s-imguns.adb,
s-imglli.adb: Minor reformatting.
From-SVN: r235251
Marek Polacek [Wed, 20 Apr 2016 09:32:45 +0000 (09:32 +0000)]
re PR tree-optimization/70725 (Internal compiler error (ICE) on valid code)
PR tree-optimization/70725
* tree-if-conv.c (is_false_predicate): New function.
(predicate_mem_writes): Use it.
* gcc.dg/pr70725.c: New test.
From-SVN: r235250
Hristian Kirtchev [Wed, 20 Apr 2016 09:22:59 +0000 (09:22 +0000)]
sem_res.adb (Rewrite_Renamed_Operator): Do not rewrite the renamed operator when the associated node appears within a...
2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
* sem_res.adb (Rewrite_Renamed_Operator): Do not rewrite the
renamed operator when the associated node appears within a
pre/postcondition.
* sem_util.ads, sem_util.adb (In_Pre_Post_Condition): New routine.
From-SVN: r235249
Arnaud Charlet [Wed, 20 Apr 2016 09:21:59 +0000 (11:21 +0200)]
[multiple changes]
2016-04-20 Yannick Moy <moy@adacore.com>
* osint.adb (Relocate_Path): Fix test when Path is shorter than Prefix.
* einfo.adb (Set_Overridden_Operation): Add assertion.
* sem_util.adb (Unique_Entity): for renaming-as-body return the spec
entity.
2016-04-20 Javier Miranda <miranda@adacore.com>
* exp_unst.adb (Append_Unique_Call): New subprogram.
(Unnest_Subprogram): Replace the unique occurrence
of Call.Append() by Append_Unique_Call() which protects us from
adding to the Calls table duplicated entries.
2016-04-20 Arnaud Charlet <charlet@adacore.com>
* exp_attr.adb (Is_GCC_Target): Fix for C backend.
* xref_lib.ads (Dependencies_Tables): instantiate
Table package with types that guarantee its safe use.
* s-imgllu.adb, s-imgint.adb, s-imguns.adb, s-imglli.adb: Avoid nested
procedures.
From-SVN: r235248
Arnaud Charlet [Wed, 20 Apr 2016 09:18:59 +0000 (09:18 +0000)]
exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]): Disable expansion when generating C code.
2016-04-20 Arnaud Charlet <charlet@adacore.com>
* exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]):
Disable expansion when generating C code.
* sinfo.ads, inline.ads: Minor editing.
From-SVN: r235247
Hristian Kirtchev [Wed, 20 Apr 2016 09:17:15 +0000 (09:17 +0000)]
sem_util.adb, [...]: Minor reformatting.
2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
* sem_util.adb, contracts.adb, ghost.adb, exp_ch6.adb: Minor
reformatting.
From-SVN: r235246
Javier Miranda [Wed, 20 Apr 2016 09:15:47 +0000 (09:15 +0000)]
contracts.adb (Build_Postconditions_Procedure): Code cleanup.
2016-04-20 Javier Miranda <miranda@adacore.com>
* contracts.adb (Build_Postconditions_Procedure): Code cleanup.
* ghost.adb (Os_OK_Ghost_Context.Is_OK_Declaration): Handle the
declaration of the internally built _postcondition procedure.
From-SVN: r235245
Arnaud Charlet [Wed, 20 Apr 2016 09:14:02 +0000 (11:14 +0200)]
[multiple changes]
2016-04-20 Arnaud Charlet <charlet@adacore.com>
* snames.ads-tmpl (Internal_Attribute_Id, Attribute_Class_Array): Fix
indentation.
* sem_util.adb (Is_Unchecked_Conversion_Instance):
defense against library-level renamings of other functions,
which are never instances of Unchecked_Conversion.
* einfo.ads: minor fix of casing in comment
2016-04-20 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Expand_N_Subprogram_Stub): Do not expand a body
that has been analyzed and expanded already. Qualify the names
in the proper body for use in the generation of C code.
From-SVN: r235244
Arnaud Charlet [Wed, 20 Apr 2016 09:11:42 +0000 (11:11 +0200)]
[multiple changes]
2016-04-20 Javier Miranda <miranda@adacore.com>
* contracts.adb (Build_Postconditions_Procedure): Force its
inlining when generating C code.
* sem_attr.adb (Analyze_Attribute_Old_Result): Handle inlined
_postconditions when generating C code.
* exp_ch6.adb (Inlined_Subprogram): Inline calls to
_postconditions when generating C code.
* sinfo.ads, sinfo.adb (Corresponding_Spec, Set_Corresponding_Spec):
types of return value and argument changed from Node_Id to
Entity_Id.
2016-04-20 Vincent Celier <celier@adacore.com>
* make.adb, clean.adb, gnatname.adb: Revert previous change for now.
2016-04-20 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
the Has_Delayed_Freeze flag on the anonymous instance node.
From-SVN: r235243
Arnaud Charlet [Wed, 20 Apr 2016 09:08:55 +0000 (11:08 +0200)]
[multiple changes]
2016-04-20 Javier Miranda <miranda@adacore.com>
* sem_ch5.adb (Analyze_Iterator_Specification): Remove transient
scope associated with the renaming object declaration.
* exp_util.adb (Insert_Actions): Remove handling of iterator
loop marked as requiring the secondary stack.
2016-04-20 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Analyze_Attribute, case 'Image): Implement
AI12-0124, which extends the functionality of the attribute so it
reflects the semantics of GNAT 'Img when applied to scalar types.
* lib-xref.adb: minor whitespace layout fix.
From-SVN: r235242
Arnaud Charlet [Wed, 20 Apr 2016 09:07:12 +0000 (11:07 +0200)]
[multiple changes]
2016-04-20 Vincent Celier <celier@adacore.com>
* clean.adb (Gnatclean): Fail if project file specified and
gprclean is not available.
* gnatname.adb: Fail is -P is used and gprname is not available.
* make.adb (Initialize): Fail if project file specified and
gprbuild is not available.
2016-04-20 Bob Duff <duff@adacore.com>
* sem_ch5.adb (Analyze_Iterator_Specification): Do not use secondary
stack when possible.
From-SVN: r235241
Arnaud Charlet [Wed, 20 Apr 2016 09:04:48 +0000 (11:04 +0200)]
[multiple changes]
2016-04-20 Gary Dismukes <dismukes@adacore.com>
* par_sco.adb, sem_util.adb, sem_ch13.adb: Minor typo corrections and
reformatting.
2016-04-20 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
If the pragma comes from an aspect specification, verify that
the aspect applies to an entity with a declarative part.
* exp_ch5.adb: Code cleanup.
2016-04-20 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Resolve_If_Expression): If first expression is
universal, resolve subsequent ones with the corresponding class
type (Any_Integer or Any_Real).
2016-04-20 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Analyze_Iterator_Specification): If expansion is
disabled, complete the analysis of the iterator name to ensure
that reference for entities within are properly generated.
2016-04-20 Arnaud Charlet <charlet@adacore.com>
* a-dispat.ads (Yield): add Global contract.
* a-calend.ads, a-reatim.ads: Added Initializes => Clock_Time.
* a-taside.adb: Added Initializes => Tasking_State.
From-SVN: r235240
Hristian Kirtchev [Wed, 20 Apr 2016 09:00:58 +0000 (09:00 +0000)]
sem_ch13.adb (Build_Invariant_Procedure): Reimplement the invariant procedure spec and body insertion.
2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch13.adb (Build_Invariant_Procedure):
Reimplement the invariant procedure spec and body insertion.
From-SVN: r235239
Arnaud Charlet [Wed, 20 Apr 2016 08:59:02 +0000 (10:59 +0200)]
[multiple changes]
2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch13.adb (Add_Invariant): Do not replace
the saved expression of an invariatn aspect when inheriting
a class-wide type invariant as this clobbers the existing
expression. Do not use New_Copy_List as it is unnecessary
and leaves the parent pointers referencing the wrong part of
the tree. Do not replace the type references for ASIS when
inheriting a class-wide type invariant as this clobbers the
existing replacement.
2016-04-20 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Build_Explicit_Dereference): If the designated
expression is an entity name, generate reference to the entity
because it will not be resolved again.
From-SVN: r235238
Richard Biener [Wed, 20 Apr 2016 07:20:16 +0000 (07:20 +0000)]
re PR tree-optimization/70726 (Internal compiler error (ICE) on valid code)
2016-04-20 Richard Biener <rguenther@suse.de>
PR tree-optimization/70726
* tree-vect-stmts.c (vectorizable_shift): Do not use scalar
shift amounts from a pattern stmt operand.
* g++.dg/vect/pr70726.cc: New testcase.
From-SVN: r235236
Andreas Krebbel [Wed, 20 Apr 2016 07:13:23 +0000 (07:13 +0000)]
PR70674: S/390: Add memory barrier to stack pointer restore from fpr.
This patches fixes a problem with stack variable accesses being
scheduled after the stack pointer restore instructions. In the
testcase this happened with the stack variable 'a' accessed through the
frame pointer.
The existing stack_tie we have in the backend is basically useless
when trying to block stack variable accesses from being scheduled
across an insn. The alias set of stack variables and the frame alias
set usually differ and hence aren't in conflict with each other. The
solution appears to be a magic MEM term with a scratch register which
is handled as a full memory barrier when analyzing scheduling
dependencies.
With the patch a (clobber (mem:BLK (scratch))) is being added to the
restore instruction in order to prevent any memory operations to be
scheduled across the insn. The patch does that only for the one case
where the stack pointer is restored from an FPR. Theoretically this
might happen also in the case where the stack pointer gets restored
using a load multiple. However, triggering that problem with
load-multiple appears to be much harder since the load-multiple will
restore the frame pointer as well. So in order to see the problem a
different call-clobbered register would need to be used as temporary
stack pointer.
Another case which needs to be handled some day is the stack pointer
allocation part. It needs to be a memory barrier as well.
Bootstrapped and regression tested with --with-arch z196 and z13 on
s390 and s390x.
-Andreas-
gcc/ChangeLog:
2016-04-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
PR target/70674
* config/s390/s390.c (s390_restore_gprs_from_fprs): Pick the new
stack_restore_from_fpr pattern when restoring r15.
(s390_optimize_prologue): Strip away the memory barrier in the
parallel when trying to get rid of restore insns.
* config/s390/s390.md ("stack_restore_from_fpr"): New insn
definition for loading the stack pointer from an FPR. Compared to
the normal move insn this pattern includes a full memory barrier.
gcc/testsuite/ChangeLog:
2016-04-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
PR target/70674
* gcc.target/s390/pr70674.c: New test.
From-SVN: r235234
Jakub Jelinek [Wed, 20 Apr 2016 01:42:24 +0000 (03:42 +0200)]
re PR middle-end/70680 (OpenMP SIMD linear variable privatized too eagerly)
PR middle-end/70680
* gimplify.c (gimplify_omp_for): Call omp_notice_variable for
implicitly linear or lastprivate iterator on the outer context.
* testsuite/libgomp.c/pr70680-1.c: New test.
* testsuite/libgomp.c/pr70680-2.c: New test.
From-SVN: r235232
Ben Elliston [Wed, 20 Apr 2016 00:44:21 +0000 (10:44 +1000)]
Attach PR number to most recent entry.
From-SVN: r235231
GCC Administrator [Wed, 20 Apr 2016 00:16:22 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r235230
H.J. Lu [Tue, 19 Apr 2016 22:39:28 +0000 (22:39 +0000)]
Remove ssememalign
From INSTRUCTION EXCEPTION SPECIFICATION section in Intel software
developer manual volume 2, only legacy SSE instructions with memory
operand not 16-byte aligned get General Protection fault. There is
no need to check 1, 2, 4, 8 byte alignments. Since x86 backend has
accurate constraints and predicates for 16-byte alignment, we can
remove alignment check in ix86_legitimate_combined_insn.
* config/i386/i386.c (ix86_legitimate_combined_insn): Remove
alignment check.
* config/i386/i386.md (ssememalign): Removed.
* config/i386/sse.md: Remove ssememalign attribute from patterns.
From-SVN: r235224
Ben Elliston [Tue, 19 Apr 2016 21:08:47 +0000 (07:08 +1000)]
libjava.exp (libjava_arguments): Use 'file normalize' rather than the defunct DejaGnu 'absolute' proc.
* testsuite/lib/libjava.exp (libjava_arguments): Use 'file
normalize' rather than the defunct DejaGnu 'absolute' proc.
From-SVN: r235222
Jason Merrill [Tue, 19 Apr 2016 19:30:22 +0000 (15:30 -0400)]
PR c++/66543 - -Wunused-but-set* false positives
* expr.c (mark_exp_read): Handle NON_DEPENDENT_EXPR.
* pt.c (make_pack_expansion): Call mark_exp_read.
* semantics.c (finish_id_expression): Call mark_type_use in
unevaluated context.
From-SVN: r235221
Jerry DeLisle [Tue, 19 Apr 2016 19:24:28 +0000 (19:24 +0000)]
re PR libfortran/70684 (incorrect reading of values from file on Windows)
2016-04-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/70684
* io/list_read (check_buffers): Add '\r' to check for end of line.
factor.
* gfortran.dg/list_read_14.f90: New test.
From-SVN: r235220
Jason Merrill [Tue, 19 Apr 2016 18:50:08 +0000 (14:50 -0400)]
DR 2137 - copy-constructor rank in list-initialization
* call.c (implicit_conversion): If we choose a copy constructor
for list-initialization from the same type, the conversion is an
exact match.
From-SVN: r235219
Jason Merrill [Tue, 19 Apr 2016 18:50:01 +0000 (14:50 -0400)]
Improve constexpr handling of other loop forms.
* constexpr.c (breaks): Handle EXIT_EXPR.
(cxx_eval_loop_expr): Handle COMPOUND_EXPR body.
(cxx_eval_constant_expression): Handle EXIT_EXPR, improve handling
of COMPOUND_EXPR.
From-SVN: r235218
Jason Merrill [Tue, 19 Apr 2016 18:49:54 +0000 (14:49 -0400)]
PR c++/68206 - Fix constexpr diagnostics with loops.
PR c++/68530
* constexpr.c (potential_constant_expression_1): Handle LOOP_EXPR
and GOTO_EXPR.
From-SVN: r235217
Jonathan Wakely [Tue, 19 Apr 2016 18:02:46 +0000 (19:02 +0100)]
libstdc++/69703 ignore endianness in codecvt_utf8
PR libstdc++/69703
* src/c++11/codecvt.cc (__codecvt_utf8_base<char16_t>::do_in)):
Override endianness bit in mode.
* testsuite/22_locale/codecvt/codecvt_utf8/69703.cc: New test.
* testsuite/22_locale/codecvt/codecvt_utf8_utf16/66855.cc: Test
that little_endian mode is ignored.
* testsuite/experimental/filesystem/path/native/string.cc: New test.
From-SVN: r235216
Jonathan Wakely [Tue, 19 Apr 2016 18:02:39 +0000 (19:02 +0100)]
libstdc++/70609 fix filesystem::copy()
PR libstdc++/70609
* src/filesystem/ops.cc (close_fd): New function.
(do_copy_file): Set permissions before copying file contents. Check
result of closing file descriptors. Don't copy streambuf when file
is empty.
(copy(const path&, const path&, copy_options, error_code&)): Use
lstat for source file when copy_symlinks is set.
* testsuite/experimental/filesystem/operations/copy.cc: Test copy().
From-SVN: r235215
Jonathan Wakely [Tue, 19 Apr 2016 18:02:32 +0000 (19:02 +0100)]
Add noexcept to Filesystem TS operators
* include/experimental/bits/fs_fwd.h (operator&, operator|, operator^,
operator~ operator&=, operator|=, operator^=): Add noexcept to
overloaded operators for copy_options, perms and directory_options.
* src/filesystem/ops.cc (make_file_type, make_file_status,
is_not_found_errno, file_time): Add noexcept.
From-SVN: r235214
Jason Merrill [Tue, 19 Apr 2016 17:49:34 +0000 (13:49 -0400)]
Tiny C++ cleanups.
* pt.c (tsubst_expr): Remove shadowing declaration.
(tsubst_pack_expansion): Add assert.
* semantics.c (add_decl_expr): Use DECL_SOURCE_LOCATION.
From-SVN: r235213
H.J. Lu [Tue, 19 Apr 2016 17:01:11 +0000 (17:01 +0000)]
Allocate memory on cache line if requested
Since GTM::gtm_thread has
gtm_thread *next_thread __attribute__((__aligned__(HW_CACHELINE_SIZE)));
GTM::gtm_thread::operator new () calls xmalloc with separate_cl == true.
xmalloc must return memory on cache line in this case.
PR libitm/70456
* util.cc (xmalloc): Use posix_memalign to allocate memory on
on cache line if requested.
From-SVN: r235211
Edward Smith-Rowland [Tue, 19 Apr 2016 16:29:05 +0000 (16:29 +0000)]
c++14_warning.h: Do not refer C++14 as experimental.
2016-04-19 Edward Smith-Rowland <3dw4rd@verizon.net>
* include/bits/c++14_warning.h: Do not refer C++14 as experimental.
From-SVN: r235210
H.J. Lu [Tue, 19 Apr 2016 14:33:36 +0000 (14:33 +0000)]
Remove UNSPEC_LOADU and UNSPEC_STOREU
Since *mov<mode>_internal and <avx512>_(load|store)<mode>_mask patterns
can handle unaligned load and store, we can remove UNSPEC_LOADU and
UNSPEC_STOREU. We use function prototypes with pointer to scalar for
unaligned load/store builtin functions so that memory passed to
*mov<mode>_internal is unaligned.
gcc/
PR target/69201
* config/i386/avx512bwintrin.h (_mm512_mask_loadu_epi16): Pass
const short * to __builtin_ia32_loaddquhi512_mask.
(_mm512_maskz_loadu_epi16): Likewise.
(_mm512_mask_storeu_epi16): Pass short * to
__builtin_ia32_storedquhi512_mask.
(_mm512_mask_loadu_epi8): Pass const char * to
__builtin_ia32_loaddquqi512_mask.
(_mm512_maskz_loadu_epi8): Likewise.
(_mm512_mask_storeu_epi8): Pass char * to
__builtin_ia32_storedquqi512_mask.
* config/i386/avx512fintrin.h (_mm512_loadu_pd): Pass
const double * to __builtin_ia32_loadupd512_mask.
(_mm512_mask_loadu_pd): Likewise.
(_mm512_maskz_loadu_pd): Likewise.
(_mm512_storeu_pd): Pass double * to
__builtin_ia32_storeupd512_mask.
(_mm512_mask_storeu_pd): Likewise.
(_mm512_loadu_ps): Pass const float * to
__builtin_ia32_loadups512_mask.
(_mm512_mask_loadu_ps): Likewise.
(_mm512_maskz_loadu_ps): Likewise.
(_mm512_storeu_ps): Pass float * to
__builtin_ia32_storeups512_mask.
(_mm512_mask_storeu_ps): Likewise.
(_mm512_mask_loadu_epi64): Pass const long long * to
__builtin_ia32_loaddqudi512_mask.
(_mm512_maskz_loadu_epi64): Likewise.
(_mm512_mask_storeu_epi64): Pass long long *
to __builtin_ia32_storedqudi512_mask.
(_mm512_loadu_si512): Pass const int * to
__builtin_ia32_loaddqusi512_mask.
(_mm512_mask_loadu_epi32): Likewise.
(_mm512_maskz_loadu_epi32): Likewise.
(_mm512_storeu_si512): Pass int * to
__builtin_ia32_storedqusi512_mask.
(_mm512_mask_storeu_epi32): Likewise.
* config/i386/avx512vlbwintrin.h (_mm256_mask_storeu_epi8): Pass
char * to __builtin_ia32_storedquqi256_mask.
(_mm_mask_storeu_epi8): Likewise.
(_mm256_mask_loadu_epi16): Pass const short * to
__builtin_ia32_loaddquhi256_mask.
(_mm256_maskz_loadu_epi16): Likewise.
(_mm_mask_loadu_epi16): Pass const short * to
__builtin_ia32_loaddquhi128_mask.
(_mm_maskz_loadu_epi16): Likewise.
(_mm256_mask_loadu_epi8): Pass const char * to
__builtin_ia32_loaddquqi256_mask.
(_mm256_maskz_loadu_epi8): Likewise.
(_mm_mask_loadu_epi8): Pass const char * to
__builtin_ia32_loaddquqi128_mask.
(_mm_maskz_loadu_epi8): Likewise.
(_mm256_mask_storeu_epi16): Pass short * to.
__builtin_ia32_storedquhi256_mask.
(_mm_mask_storeu_epi16): Pass short * to.
__builtin_ia32_storedquhi128_mask.
* config/i386/avx512vlintrin.h (_mm256_mask_loadu_pd): Pass
const double * to __builtin_ia32_loadupd256_mask.
(_mm256_maskz_loadu_pd): Likewise.
(_mm_mask_loadu_pd): Pass onst double * to
__builtin_ia32_loadupd128_mask.
(_mm_maskz_loadu_pd): Likewise.
(_mm256_mask_storeu_pd): Pass double * to
__builtin_ia32_storeupd256_mask.
(_mm_mask_storeu_pd): Pass double * to
__builtin_ia32_storeupd128_mask.
(_mm256_mask_loadu_ps): Pass const float * to
__builtin_ia32_loadups256_mask.
(_mm256_maskz_loadu_ps): Likewise.
(_mm_mask_loadu_ps): Pass const float * to
__builtin_ia32_loadups128_mask.
(_mm_maskz_loadu_ps): Likewise.
(_mm256_mask_storeu_ps): Pass float * to
__builtin_ia32_storeups256_mask.
(_mm_mask_storeu_ps): ass float * to
__builtin_ia32_storeups128_mask.
(_mm256_mask_loadu_epi64): Pass const long long * to
__builtin_ia32_loaddqudi256_mask.
(_mm256_maskz_loadu_epi64): Likewise.
(_mm_mask_loadu_epi64): Pass const long long * to
__builtin_ia32_loaddqudi128_mask.
(_mm_maskz_loadu_epi64): Likewise.
(_mm256_mask_storeu_epi64): Pass long long * to
__builtin_ia32_storedqudi256_mask.
(_mm_mask_storeu_epi64): Pass long long * to
__builtin_ia32_storedqudi128_mask.
(_mm256_mask_loadu_epi32): Pass const int * to
__builtin_ia32_loaddqusi256_mask.
(_mm256_maskz_loadu_epi32): Likewise.
(_mm_mask_loadu_epi32): Pass const int * to
__builtin_ia32_loaddqusi128_mask.
(_mm_maskz_loadu_epi32): Likewise.
(_mm256_mask_storeu_epi32): Pass int * to
__builtin_ia32_storedqusi256_mask.
(_mm_mask_storeu_epi32): Pass int * to
__builtin_ia32_storedqusi128_mask.
* config/i386/i386-builtin-types.def (PCSHORT): New.
(PINT64): Likewise.
(V64QI_FTYPE_PCCHAR_V64QI_UDI): Likewise.
(V32HI_FTYPE_PCSHORT_V32HI_USI): Likewise.
(V32QI_FTYPE_PCCHAR_V32QI_USI): Likewise.
(V16SF_FTYPE_PCFLOAT_V16SF_UHI): Likewise.
(V8DF_FTYPE_PCDOUBLE_V8DF_UQI): Likewise.
(V16SI_FTYPE_PCINT_V16SI_UHI): Likewise.
(V16HI_FTYPE_PCSHORT_V16HI_UHI): Likewise.
(V16QI_FTYPE_PCCHAR_V16QI_UHI): Likewise.
(V8SF_FTYPE_PCFLOAT_V8SF_UQI): Likewise.
(V8DI_FTYPE_PCINT64_V8DI_UQI): Likewise.
(V8SI_FTYPE_PCINT_V8SI_UQI): Likewise.
(V8HI_FTYPE_PCSHORT_V8HI_UQI): Likewise.
(V4DF_FTYPE_PCDOUBLE_V4DF_UQI): Likewise.
(V4SF_FTYPE_PCFLOAT_V4SF_UQI): Likewise.
(V4DI_FTYPE_PCINT64_V4DI_UQI): Likewise.
(V4SI_FTYPE_PCINT_V4SI_UQI): Likewise.
(V2DF_FTYPE_PCDOUBLE_V2DF_UQI): Likewise.
(V2DI_FTYPE_PCINT64_V2DI_UQI): Likewise.
(VOID_FTYPE_PDOUBLE_V8DF_UQI): Likewise.
(VOID_FTYPE_PDOUBLE_V4DF_UQI): Likewise.
(VOID_FTYPE_PDOUBLE_V2DF_UQI): Likewise.
(VOID_FTYPE_PFLOAT_V16SF_UHI): Likewise.
(VOID_FTYPE_PFLOAT_V8SF_UQI): Likewise.
(VOID_FTYPE_PFLOAT_V4SF_UQI): Likewise.
(VOID_FTYPE_PINT64_V8DI_UQI): Likewise.
(VOID_FTYPE_PINT64_V4DI_UQI): Likewise.
(VOID_FTYPE_PINT64_V2DI_UQI): Likewise.
(VOID_FTYPE_PINT_V16SI_UHI): Likewise.
(VOID_FTYPE_PINT_V8SI_UHI): Likewise.
(VOID_FTYPE_PINT_V4SI_UHI): Likewise.
(VOID_FTYPE_PSHORT_V32HI_USI): Likewise.
(VOID_FTYPE_PSHORT_V16HI_UHI): Likewise.
(VOID_FTYPE_PSHORT_V8HI_UQI): Likewise.
(VOID_FTYPE_PCHAR_V64QI_UDI): Likewise.
(VOID_FTYPE_PCHAR_V32QI_USI): Likewise.
(VOID_FTYPE_PCHAR_V16QI_UHI): Likewise.
(V64QI_FTYPE_PCV64QI_V64QI_UDI): Removed.
(V32HI_FTYPE_PCV32HI_V32HI_USI): Likewise.
(V32QI_FTYPE_PCV32QI_V32QI_USI): Likewise.
(V16HI_FTYPE_PCV16HI_V16HI_UHI): Likewise.
(V16QI_FTYPE_PCV16QI_V16QI_UHI): Likewise.
(V8HI_FTYPE_PCV8HI_V8HI_UQI): Likewise.
(VOID_FTYPE_PV32HI_V32HI_USI): Likewise.
(VOID_FTYPE_PV16HI_V16HI_UHI): Likewise.
(VOID_FTYPE_PV8HI_V8HI_UQI): Likewise.
(VOID_FTYPE_PV64QI_V64QI_UDI): Likewise.
(VOID_FTYPE_PV32QI_V32QI_USI): Likewise.
(VOID_FTYPE_PV16QI_V16QI_UHI): Likewise.
* config/i386/i386.c (ix86_emit_save_reg_using_mov): Don't
use UNSPEC_STOREU.
(ix86_emit_restore_sse_regs_using_mov): Don't use UNSPEC_LOADU.
(ix86_avx256_split_vector_move_misalign): Don't use unaligned
load nor store.
(ix86_expand_vector_move_misalign): Likewise.
(bdesc_special_args): Use CODE_FOR_movvNXY_internal and pointer
to scalar function prototype for unaligned load/store builtins.
(ix86_expand_special_args_builtin): Updated.
* config/i386/sse.md (UNSPEC_LOADU): Removed.
(UNSPEC_STOREU): Likewise.
(VI_ULOADSTORE_BW_AVX512VL): Likewise.
(VI_ULOADSTORE_F_AVX512VL): Likewise.
(ssescalarsize): Handle V4TI, V2TI and V1TI.
(<sse>_loadu<ssemodesuffix><avxsizesuffix><mask_name>): Likewise.
(*<sse>_loadu<ssemodesuffix><avxsizesuffix><mask_name>): Likewise.
(<sse>_storeu<ssemodesuffix><avxsizesuffix>): Likewise.
(<avx512>_storeu<ssemodesuffix><avxsizesuffix>_mask): Likewise.
(<sse2_avx_avx512f>_loaddqu<mode><mask_name>): Likewise.
(*<sse2_avx_avx512f>_loaddqu<mode><mask_name>"): Likewise.
(sse2_avx_avx512f>_storedqu<mode>): Likewise.
(<avx512>_storedqu<mode>_mask): Likewise.
(*sse4_2_pcmpestr_unaligned): Likewise.
(*sse4_2_pcmpistr_unaligned): Likewise.
(*mov<mode>_internal): Renamed to ...
(mov<mode>_internal): This. Remove check of AVX and IAMCU on
misaligned operand. Replace vmovdqu64 with vmovdqu<ssescalarsize>.
(movsd/movhpd to movupd peephole): Don't use UNSPEC_LOADU.
(movlpd/movhpd to movupd peephole): Don't use UNSPEC_STOREU.
gcc/testsuite/
PR target/69201
* gcc.target/i386/avx256-unaligned-store-1.c (a): Make it
extern to force it misaligned.
(b): Likewise.
(c): Likewise.
(d): Likewise.
Check vmovups.*movv8sf_internal/3 instead of avx_storeups256.
Don't check `*' before movv4sf_internal.
* gcc.target/i386/avx256-unaligned-store-2.c: Check
vmovups.*movv32qi_internal/3 instead of avx_storeups256.
Don't check `*' before movv16qi_internal.
* gcc.target/i386/avx256-unaligned-store-3.c (a): Make it
extern to force it misaligned.
(b): Likewise.
(c): Likewise.
(d): Likewise.
Check vmovups.*movv4df_internal/3 instead of avx_storeupd256.
Don't check `*' before movv2df_internal.
* gcc.target/i386/avx256-unaligned-store-4.c (a): Make it
extern to force it misaligned.
(b): Likewise.
(c): Likewise.
(d): Likewise.
Check movv8sf_internal instead of avx_storeups256.
Check movups.*movv4sf_internal/3 instead of avx_storeups256.
From-SVN: r235209
Richard Biener [Tue, 19 Apr 2016 14:03:59 +0000 (14:03 +0000)]
re PR tree-optimization/70171 (Poor code generated when return struct using ternary operator)
2016-04-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/70171
* tree-ssa-phiprop.c: Include stor-layout.h.
(phiprop_insert_phi): Handle the aggregate copy case.
(propagate_with_phi): Likewise.
* g++.dg/tree-ssa/pr70171.C: New testcase.
From-SVN: r235208
Uros Bizjak [Tue, 19 Apr 2016 14:01:21 +0000 (16:01 +0200)]
i386.c (ix86_decompose_address): Use lowpart_subreg instead of simplify_gen_subreg (...
* config/i386/i386.c (ix86_decompose_address): Use lowpart_subreg
instead of simplify_gen_subreg (... , 0).
(ix86_delegitimize_address): Ditto.
(ix86_split_divmod): Ditto.
(ix86_split_copysign_const): Ditto.
(ix86_split_copysign_var): Ditto.
(ix86_expand_args_builtin): Ditto.
(ix86_expand_round_builtin): Ditto.
(ix86_expand_special_args_builtin): Ditto.
* config/i386/i386.md (TARGET_USE_VECTOR_FP_CONVERTS splitters): Ditto.
(TARGET_SSE_PARTIAL_REG_DEPENDENCY splitters and peephole2s): Ditto.
(udivmodqi4): Ditto.
(absneg splitters): Ditto.
(*jcc_bt<mode>_1): Ditto.
From-SVN: r235207
Jason Merrill [Tue, 19 Apr 2016 13:40:03 +0000 (09:40 -0400)]
re PR c++/70522 (Hidden friend functions block qualified name lookup into nested unnamed namespace)
PR c++/70522
* name-lookup.c (qualified_lookup_using_namespace): Look through
hidden names.
From-SVN: r235206
Arnaud Charlet [Tue, 19 Apr 2016 13:30:03 +0000 (13:30 +0000)]
standard_and_implementation_defined_restrictions.rst, [...]: Update documentation.
* doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
gnat_rm.texi: Update documentation.
From-SVN: r235205
Arnaud Charlet [Tue, 19 Apr 2016 13:24:36 +0000 (15:24 +0200)]
[multiple changes]
2016-04-19 Olivier Hainque <hainque@adacore.com>
* par_sco.adb (Traverse_One, case N_Case_Statement):
Skip pragmas before the first alternative.
(Traverse_Handled_Statement_Sequence, Exception_Handlers): Likewise.
2016-04-19 Tristan Gingold <gingold@adacore.com>
* adaint.c (__gnat_lwp_self): New function (for darwin).
* s-osinte-darwin.ads, s-osinte-darwin.adb (lwp_self): Import
of __gnat_lwp_self.
From-SVN: r235204
Richard Biener [Tue, 19 Apr 2016 13:22:19 +0000 (13:22 +0000)]
re PR tree-optimization/70724 (Miscompiles python3 with FDO)
2016-04-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/70724
* tree-ssa-sccvn.c (scc_vn_restore_ssa_info): Split SSA info
restoring out from ...
(free_scc_vn): ... here.
* tree-ssa-sccvn.h (scc_vn_restore_ssa_info): Declare.
* tres-ssa-pre.c (pass_pre::execute): Restore SSA info before
tail merging.
(pass_fre::execute): Restore SSA info.
* gcc.dg/torture/pr70724.c: New testcase.
From-SVN: r235203
Olivier Hainque [Tue, 19 Apr 2016 13:19:45 +0000 (13:19 +0000)]
sem_util.adb (Build_Elaboration_Entity): Always request an elab counter when preserving control-flow.
2016-04-19 Olivier Hainque <hainque@adacore.com>
* sem_util.adb (Build_Elaboration_Entity): Always request an
elab counter when preserving control-flow.
2016-04-19 Olivier Hainque <hainque@adacore.com>
* sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set
Needs_Debug_Info when producing SCOs.
* par_sco.adb (Traverse_Aspects): Fix categorization of
Type_Invariant to match actual processing as activated depending
on pragma Assertion_Policy.
* sem_prag.adb (Analyze_Pragma): Remove special case for
Name_Invariant regarding SCO generation, which completely disabled
the production of SCOs for Invariant pragmas and aspects.
From-SVN: r235202
Arnaud Charlet [Tue, 19 Apr 2016 13:10:35 +0000 (15:10 +0200)]
[multiple changes]
2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
* checks.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
reformatting.
2016-04-19 Ed Schonberg <schonberg@adacore.com>
* freeze.adb (Freeze_Profile): Refine predicate that checks
whether a function that returns a limited view is declared in
another unit and cannot be frozen at this point.
2016-04-19 Ed Schonberg <schonberg@adacore.com>
* exp_aggr.adb (Component_Count): Handle properly superflat
arrays, i.e. empty arrays where Hi < Lo - 1, to ensure that the
return value of the function is Natural, rather than leaving
the handling of such arrays to the caller of this function.
From-SVN: r235200
Arnaud Charlet [Tue, 19 Apr 2016 13:09:07 +0000 (15:09 +0200)]
[multiple changes]
2016-04-19 Arnaud Charlet <charlet@adacore.com>
* sem_prag.adb, sem_attr.adb, par-prag.adb, exp_aggr.adb, sem_type.adb
sem_ch12.adb, sem_ch3.adb, exp_ch7.adb, exp_ch9.adb: Code cleanup.
* sem_res.adb, sem_util.ads, sem_util.adb (Is_OK_Volatile_Context):
Promoted from being a nested subprogram in Sem_Res.Resolve_Entity_Name
to publicly visible routine in Sem_Util.
2016-04-19 Ed Schonberg <schonberg@adacore.com>
* checks.adb (Apply_Parameter_Aliasing_Checks): Do not apply
the check if the type of the actual is By_Reference.
From-SVN: r235199
Arnaud Charlet [Tue, 19 Apr 2016 13:06:01 +0000 (13:06 +0000)]
sem_res.adb (Within_Subprogram_Call): Detect also nodes that appear in entry calls.
2016-04-19 Arnaud Charlet <charlet@adacore.com>
* sem_res.adb (Within_Subprogram_Call): Detect
also nodes that appear in entry calls.
(Resolve_Actuals, Insert_Default): Propagate
dimension information if any, from default expression to the
copy that appears in the list of actuals.
* uintp.ads: minor whitespace fix in comment.
* sem_prag.adb, stringt.adb, inline.adb, lib-xref-spark_specific.adb:
Minor code cleanup.
* set_targ.adb (Set_Targ): convert directly from
Natural to Pos, without intermediate conversion to Int.
From-SVN: r235197
Arnaud Charlet [Tue, 19 Apr 2016 13:03:49 +0000 (13:03 +0000)]
sem_ch6.adb (Process_Formals): Mark suspicious reference to SPARK RM in comment.
2016-04-19 Arnaud Charlet <charlet@adacore.com>
* sem_ch6.adb (Process_Formals): Mark suspicious reference to
SPARK RM in comment.
* sem_prag.adb (Analyze_Global_Item): Fix reference to SPARK RM
in comment.
* sem_res.adb (Property_Error, Resolve_Actuals): Fix reference
to SPARK RM in both comment and error message.
From-SVN: r235196
Eric Botcazou [Tue, 19 Apr 2016 13:02:27 +0000 (13:02 +0000)]
sem_ch6.adb (Possible_Freeze): If the type is an incomplete CW type...
2016-04-19 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch6.adb (Possible_Freeze): If the type is an incomplete
CW type, then the subprogram must have a delayed freeze. This
ensures that the backend can properly recover the full view when
elaborating the access subprogram declaration.
From-SVN: r235195
Arnaud Charlet [Tue, 19 Apr 2016 12:59:27 +0000 (14:59 +0200)]
[multiple changes]
2016-04-19 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Resolve_Attribute, case 'Access): Freeze
overloadable entity if originally overloaded.
2016-04-19 Arnaud Charlet <charlet@adacore.com>
* exp_aggr.adb, exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_code.adb,
exp_fixd.adb, namet.adb, osint.adb, osint.ads, par-ch2.adb,
sem_ch10.adb, sem_ch12.adb, sem_disp.adb, sem_elab.adb, sem_elim.adb
sem_util.adb, styleg.adb, styleg.ads, stylesw.ads: Minor code
clean up.
From-SVN: r235194
Arnaud Charlet [Tue, 19 Apr 2016 12:24:29 +0000 (12:24 +0000)]
sem_util.adb (Copy_Node_With_Replacement): use Set_Comes_From_Source instead of directly manipulating internals of the...
2016-04-19 Arnaud Charlet <charlet@adacore.com>
* sem_util.adb (Copy_Node_With_Replacement):
use Set_Comes_From_Source instead of directly manipulating
internals of the node table.
* sem_util.adb (Within_Scope): refactored to remove duplicated code.
* sem_aux.adb (Get_Rep_Pragma,
Subprogram_Body_Entity, Subprogram_Spec): declare variables that
do not change as constants and initialize them in the declaration.
(Get_Rep_Pragma, Subprogram_Body_Entity, Subprogram_Spec): declare
variables that do not change as constants and initialize them
in the declaration.
From-SVN: r235193
Arnaud Charlet [Tue, 19 Apr 2016 12:22:12 +0000 (14:22 +0200)]
[multiple changes]
2016-04-19 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Resolve_Entry_Call): If the entry has
preconditions it is rewritten by means of a wrapper that
incorporates the original call. Before rewriting generate a
reference to the entry being called to prevent spurious warnings
and provide correct cross-reference information.
2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
* sem_disp.adb (Check_Dispatching_Context): Code cleanup. Add
local constant Scop. Ignore any internally generated loops when
performing the check concerning an abstract subprogram call
without a controlling argument.
* sem_util.ads, sem_util.adb (Current_Scope_No_Loops): New routine.
From-SVN: r235192
Arnaud Charlet [Tue, 19 Apr 2016 12:18:59 +0000 (14:18 +0200)]
[multiple changes]
2016-04-19 Bob Duff <duff@adacore.com>
* sem_elab.adb (Check_A_Call): There are cases where we have No
(Ent) after the Alias loop, even when there was no previous error,
so we can't assert that there was an error.
2016-04-19 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Analyze_Access_Attribute, OK_Self_Reference):
Reject use of type name as a prefix to 'access within an aggregate
in a context that is not the declarative region of a type.
2016-04-19 Vincent Celier <celier@adacore.com>
* gnatcmd.adb: Make "gnat ls -P" invoke gprls Make "gnat bind
-P" invoke "gprbuild -b" Make "gnat link -P" invoke "gprbuild
-l" Fail if the invocation is "gnat find -P" or "gnat xref -P"
Remove anything related to project files
* g-mbdira.adb: minor whitespace cleanup
* g-spipat.adb: minor removal of extra spaces after closing paren
2016-04-19 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Expand_Actuals): If post-statements are present
and the enclosing context is a function call or indexing, build
an Expression_With_Actions for the call.
2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
* lib-writ.adb (Write_With_Lines): Code cleanup. Do not generate
a with line for an ignored Ghost unit.
* sem_ch7.adb (Analyze_Package_Declaration): Add local constant
Par. A child package is Ghost when its parent is Ghost.
* sem_prag.adb (Analyze_Pragma): Pragma Ghost can now apply to
a subprogram declaration that acts as a compilation unit.
From-SVN: r235191
Richard Biener [Tue, 19 Apr 2016 12:13:04 +0000 (12:13 +0000)]
gimple-walk.h (struct walk_stmt_info): Add stmt member.
2016-04-19 Richard Biener <rguenther@suse.de>
* gimple-walk.h (struct walk_stmt_info): Add stmt member.
* gimple-walk.c (walk_gimple_op): Initialize it.
(walk_gimple_asm): Set wi->is_lhs before each callback invocation.
* tree-inline.c (remap_gimple_op_r): Set SSA_NAME_DEF_STMT when
remapping SSA names of defs.
(copy_bb): Remove walk over all SSA defs and SSA_NAME_DEF_STMT
adjustment.
From-SVN: r235190
Vladimir Makarov [Tue, 19 Apr 2016 02:49:54 +0000 (02:49 +0000)]
re PR middle-end/70689 (ICE on valid code at -O1 in 32-bit mode on x86_64-linux-gnu in curr_insn_transform, at lra-constraints.c:3564)
2016-04-18 Vladimir Makarov <vmakarov@redhat.com>
PR middle-end/70689
* lra-constraints.c (equiv_substition_p): New.
(process_alt_operands): Use it.
(swap_operands): Swap it.
(curr_insn_transform): Update it.
2016-04-18 Vladimir Makarov <vmakarov@redhat.com>
PR middle-end/70689
* testsuite/gcc.target/i386/pr70689.c: New.
From-SVN: r235184
GCC Administrator [Tue, 19 Apr 2016 00:16:20 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r235182
Michael Matz [Mon, 18 Apr 2016 20:36:27 +0000 (20:36 +0000)]
tree.h (TYPE_ALIGN, DECL_ALIGN): Return shifted amount.
* tree.h (TYPE_ALIGN, DECL_ALIGN): Return shifted amount.
(SET_TYPE_ALIGN, SET_DECL_ALIGN): New.
* tree-core.h (tree_type_common.align): Use bit-field.
(tree_type_common.spare): New.
(tree_decl_common.off_align): Make smaller.
(tree_decl_common.align): Use bit-field.
* expr.c (expand_expr_addr_expr_1): Use SET_TYPE_ALIGN.
* omp-low.c (install_var_field): Use SET_DECL_ALIGN.
(scan_sharing_clauses): Ditto.
(finish_taskreg_scan): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
(omp_finish_file): Ditto.
* stor-layout.c (do_type_align): Use SET_DECL_ALIGN.
(layout_decl): Ditto.
(relayout_decl): Ditto.
(finalize_record_size): Use SET_TYPE_ALIGN.
(finalize_type_size): Ditto.
(finish_builtin_struct): Ditto.
(layout_type): Ditto.
(initialize_sizetypes): Ditto.
* targhooks.c (std_gimplify_va_arg_expr): Use SET_TYPE_ALIGN.
* tree-nested.c (insert_field_into_struct): Use SET_TYPE_ALIGN.
(lookup_field_for_decl): Use SET_DECL_ALIGN.
(get_chain_field): Ditto.
(get_trampoline_type): Ditto.
(get_nl_goto_field): Ditto.
* tree-streamer-in.c (unpack_ts_decl_common_value_fields): Use
SET_DECL_ALIGN.
(unpack_ts_type_common_value_fields): Use SET_TYPE_ALIGN.
* gimple-expr.c (copy_var_decl): Use SET_DECL_ALIGN.
* tree.c (make_node_stat): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
(build_qualified_type): Use SET_TYPE_ALIGN.
(build_aligned_type, build_range_type_1): Ditto.
(build_atomic_base): Ditto.
(build_common_tree_nodes): Ditto.
* cfgexpand.c (align_local_variable): Use SET_DECL_ALIGN.
(expand_one_stack_var_at): Ditto.
* coverage.c (build_var): Use SET_DECL_ALIGN.
* except.c (init_eh): Ditto.
* function.c (assign_parm_setup_block): Ditto.
* symtab.c (increase_alignment_1): Ditto.
* tree-ssa-ccp.c (fold_builtin_alloca_with_align): Ditto.
* tree-vect-stmts.c (ensure_base_align): Ditto.
* varasm.c (align_variable): Ditto.
(assemble_variable): Ditto.
(build_constant_desc): Ditto.
(output_constant_def_contents): Ditto.
* config/arm/arm.c (arm_relayout_function): Use SET_DECL_ALIGN.
* config/avr/avr.c (avr_adjust_type_node): Use SET_TYPE_ALIGN.
* config/mips/mips.c (mips_std_gimplify_va_arg_expr): Ditto.
* config/msp430/msp430.c (msp430_gimplify_va_arg_expr): Ditto.
* config/spu/spu.c (spu_build_builtin_va_list): Use SET_DECL_ALIGN.
ada/
* gcc-interface/decl.c (gnat_to_gnu_entity): Use SET_TYPE_ALIGN.
(gnat_to_gnu_field): Ditto.
(components_to_record): Ditto.
(create_variant_part_from): Ditto.
(copy_and_substitute_in_size): Ditto.
(substitute_in_type): Ditto.
* gcc-interface/utils.c (make_aligning_type): Use SET_TYPE_ALIGN.
(make_packable_type): Ditto.
(maybe_pad_type): Ditto.
(finish_fat_pointer_type): Ditto.
(finish_record_type): Ditto and use SET_DECL_ALIGN.
(rest_of_record_type_compilation): Use SET_TYPE_ALIGN.
(create_field_decl): Use SET_DECL_ALIGN.
c-family/
* c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
and SET_DECL_ALIGN.
c/
* c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
(grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
cp/
* class.c (build_vtable): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
(layout_class_type): Ditto.
(build_base_field): Use SET_DECL_ALIGN.
(fixup_attribute_variants): Use SET_TYPE_ALIGN.
* decl.c (duplicate_decls): Use SET_DECL_ALIGN.
(record_unknown_type): Use SET_TYPE_ALIGN.
(cxx_init_decl_processing): Ditto.
(copy_type_enum): Ditto.
(grokfndecl): Use SET_DECL_ALIGN.
(copy_type_enum): Use SET_TYPE_ALIGN.
* pt.c (instantiate_class_template_1): Use SET_TYPE_ALIGN.
(tsubst): Ditto.
* tree.c (cp_build_qualified_type_real): Use SET_TYPE_ALIGN.
* lambda.c (maybe_add_lambda_conv_op): Use SET_DECL_ALIGN.
* method.c (implicitly_declare_fn): Use SET_DECL_ALIGN.
* rtti.c (emit_tinfo_decl): Ditto.
fortran/
* trans-io.c (gfc_build_io_library_fndecls): Use SET_TYPE_ALIGN.
* trans-common.c (build_common_decl): Use SET_DECL_ALIGN.
* trans-types.c (gfc_add_field_to_struct): Use SET_DECL_ALIGN.
go/
* go-gcc.cc (Gcc_backend::implicit_variable): Use SET_DECL_ALIGN.
java/
* class.c (add_method_1): Use SET_DECL_ALIGN.
(make_class_data): Ditto.
(emit_register_classes_in_jcr_section): Ditto.
* typeck.c (build_java_array_type): Ditto.
objc/
* objc-act.c (objc_build_struct): Use SET_DECL_ALIGN.
libcc1/
* plugin.cc (plugin_finish_record_or_union): Use SET_TYPE_ALIGN.
From-SVN: r235172
H.J. Lu [Mon, 18 Apr 2016 19:40:30 +0000 (19:40 +0000)]
Optimize load double into xmm with zero_extend
"movq" should used to load double into xmm register with zero_extend:
(set (reg:V2DF 90)
(vec_concat:V2DF (reg/v:DF 88 [ d ])
(const_double:DF 0.0 [0x0.0p+0])))
Unlike "movsd", which only works with load from memory, "movq" works
with both memory and xmm register.
gcc/
PR target/70708
* config/i386/sse.md (sse2_loadlpd): Accept load from "xm" and
replace %vmovsd with "%vmovq".
(vec_concatv2df): Likewise.
gcc/testsuite/
PR target/70708
* gcc.target/i386/pr70708.c: New test.
From-SVN: r235169
Jason Merrill [Mon, 18 Apr 2016 19:00:00 +0000 (15:00 -0400)]
re PR c++/70690 (r235002 miscompiles tcmalloc)
PR c++/70690
PR c++/70528
* class.c (type_maybe_constexpr_default_constructor): New.
(type_has_constexpr_default_constructor): Revert.
From-SVN: r235165
Uros Bizjak [Mon, 18 Apr 2016 18:52:47 +0000 (20:52 +0200)]
mmx.md (*vec_extractv2sf_0): Use gen_lowpart.
* config/i386/mmx.md (*vec_extractv2sf_0): Use gen_lowpart.
(*vec_extractv2si_0): Ditto.
* config/i386/sse.md (*vec_extractv4sf_0): Ditto.
(zero_extended_scalar_load_operand splitters): Ditto.
(vec_extract splitters): Ditto.
(*vec_extractv4si_0_zext): Ditto.
(avx_<castmode><avxsizesuffix>_<castmode>): Use gen_lowpart
and lowpart_subreg.
(avx512f_<castmode><avxsizesuffix>_<castmode>): Ditto.
(avx512f_<castmode><avxsizesuffix>_256<castmode>): Ditto.
(*sse4_1_extractps): Use lowpart_subreg.
From-SVN: r235164
Rainer Orth [Mon, 18 Apr 2016 18:39:03 +0000 (18:39 +0000)]
Update install.texi for GCC 6 on Solaris
* doc/install.texi (Specific, i?86-*-solaris2.10): Update gas and
gld requirements.
(Specific, *-*-solaris2*): Update Solaris 11 bundled gcc
versions.
Mention Solaris 11 packaging changes.
Update gas and gld requirements.
Remove reference to pre-Solaris 10 bug.
(Specific, sparc-sun-solaris2*): Remove reference to pre-Solaris 10
systems and bugs.
(Specific, sparc64-*-solaris2*): Remove reference to bootstrap
with cc.
From-SVN: r235162
Jonathan Wakely [Mon, 18 Apr 2016 18:03:50 +0000 (19:03 +0100)]
PR libstdc++/41759 reword static assertions in <random>
PR libstdc++/41759
* include/bits/random.h: Reword static assertion messages to state
positive conditions.
* include/bits/random.tcc: Likewise.
* include/bits/uniform_int_dist.h: Likewise.
* testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
patterns.
From-SVN: r235160
Jan Hubicka [Mon, 18 Apr 2016 17:16:27 +0000 (19:16 +0200)]
tree-ssa-loop-ivopts.c (avg_loop_niter): Use also max_loop_iterations_int.
* tree-ssa-loop-ivopts.c (avg_loop_niter): Use also
max_loop_iterations_int.
From-SVN: r235158
Jonathan Wakely [Mon, 18 Apr 2016 16:37:56 +0000 (17:37 +0100)]
Remove unused typedefs in std::bind types
* include/std/function (_Bind, _Bind_result): Remove unused typedefs.
From-SVN: r235157
Jonathan Wakely [Mon, 18 Apr 2016 16:19:25 +0000 (17:19 +0100)]
* config/cpu/sh/atomicity.h: Fix typo in comment.
From-SVN: r235156
Jonathan Wakely [Mon, 18 Apr 2016 16:16:14 +0000 (17:16 +0100)]
Define std::thread::id comparison operators at namespace-scope
From-SVN: r235155
Jonathan Wakely [Mon, 18 Apr 2016 15:44:25 +0000 (16:44 +0100)]
Make use of extensions more explicit in libstdc++ tests
* testsuite/18_support/bad_exception/23591_thread-1.c: Add
-Wno-pedantic to dg-options.
* testsuite/20_util/align/2.cc: Use type as operand of alignof.
* testsuite/20_util/is_floating_point/value.cc: Add -Wno-pedantic
to dg-options.
* testsuite/20_util/specialized_algorithms/uninitialized_fill/32158.cc:
Remove extra semi-colon.
* testsuite/23_containers/array/tuple_interface/tuple_element.cc:
Always supply second argument to static_assert.
* testsuite/25_algorithms/lower_bound/no_operator_ne.cc: Remove extra
semi-colon.
* testsuite/26_numerics/complex/c99.cc: Add -Wno-pedantic to
dg-options.
* testsuite/26_numerics/complex/literals/values.cc: Likewise.
* testsuite/29_atomics/atomic/60695.cc: Likewise.
* testsuite/29_atomics/atomic/62259.cc: use __alignof__ instead of
alignof when operand is an object not a type.
* testsuite/decimal/ctor.cc: Add -Wno-pedantic to dg-options.
* testsuite/decimal/make-decimal.cc: Likewise.
* testsuite/experimental/type_traits/value.cc: Always supply second
argument to static_assert.
* testsuite/util/testsuite_common_types.h: Use __extension__ for
__int128 types.
From-SVN: r235154
Jonathan Wakely [Mon, 18 Apr 2016 15:44:16 +0000 (16:44 +0100)]
Don't include internal header in libstdc++ tests
* testsuite/experimental/type_erased_allocator/1.cc: Don't include
internal header.
* testsuite/experimental/type_erased_allocator/1_neg.cc: Likewise.
* testsuite/experimental/type_erased_allocator/2.cc: Likewise.
* testsuite/experimental/type_erased_allocator/uses_allocator.cc:
Likewise. Add licence and change to compile-only test.
From-SVN: r235153
Jonathan Wakely [Mon, 18 Apr 2016 15:44:12 +0000 (16:44 +0100)]
Add attribute((unused)) in libstdc++ headers
* include/bits/locale_facets.h (ctype::do_narrow): Add attribute to
unused parameter.
* include/bits/regex_automaton.h (_NFA::_M_insert_alt): Likewise.
From-SVN: r235152
Jonathan Wakely [Mon, 18 Apr 2016 15:43:50 +0000 (16:43 +0100)]
Avoid -Wsign-compare warnings in std::to_string()
* include/ext/string_conversions.h (__stoa): Avoid -Wsign-compare
warnings.
From-SVN: r235151
Richard Biener [Mon, 18 Apr 2016 13:09:53 +0000 (13:09 +0000)]
re PR tree-optimization/43434 (Missed vectorization: "not vectorized: data ref analysis": pointer incremented by a parameter)
2016-04-18 Richard Biener <rguenther@suse.de>
PR tree-optimization/43434
* tree-ssa-structalias.c (struct vls_data): New.
(visit_loadstore): Handle all pointer-based accesses.
(compute_dependence_clique): Compute a bitmap of restrict tags
assigned bases and pass it to visit_loadstore.
* gcc.dg/vect/pr43434.c: New testcase.
* c-c++-common/goacc/kernels-alias-3.c: Adjust.
* c-c++-common/goacc/kernels-alias-4.c: Likewise.
* c-c++-common/goacc/kernels-alias-5.c: Likewise.
* c-c++-common/goacc/kernels-alias-6.c: Likewise.
* c-c++-common/goacc/kernels-alias-7.c: Likewise.
* c-c++-common/goacc/kernels-alias-8.c: Likewise.
* gcc.dg/gomp/pr68640.c: Likewise.
* gfortran.dg/goacc/kernels-alias-3.f95: Likewise.
* gfortran.dg/goacc/kernels-alias-4.f95: Likewise.
From-SVN: r235147
Arnaud Charlet [Mon, 18 Apr 2016 12:58:22 +0000 (14:58 +0200)]
[multiple changes]
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* einfo.adb (Overridden_Operation): assert that
function is called for valid arguments.
* sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_type.adb,
s-osinte-vxworks.ads, a-ngcefu.adb, sem_ch10.adb, einfo.ads,
sem_prag.adb, sem_ch12.adb, sem.adb, i-cobol.ads, freeze.adb,
sem_util.adb, a-chtgop.ads, s-rannum.adb, exp_ch6.adb, s-bignum.adb,
s-osinte-freebsd.ads, par-ch5.adb, a-chtgbo.ads, a-cofove.adb:
No space after closing parenthesis except where required for
layout.
* sem_res.adb: Minor reformatting.
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* exp_ch4.adb (Expand_N_Case_Expression): Convert into a case
statement when relevant.
2016-04-18 Bob Duff <duff@adacore.com>
* a-cuprqu.adb (Enqueue): Properly handle the
case where the new element has a unique priority.
2016-04-18 Tristan Gingold <gingold@adacore.com>
* adaint.h: Define stat structures and functions for iOS
simulator.
From-SVN: r235146
Arnaud Charlet [Mon, 18 Apr 2016 12:53:35 +0000 (14:53 +0200)]
[multiple changes]
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* sem_res.adb (Resolve_Entry_Call): reset
Is_Overloaded flag after resolving calls to overloaded protected
operations.
* exp_spark.adb (Expand_SPARK): call
Qualify_Entity_Names for tasking nodes, i.e. protected types,
task types and entries.
* exp_ch4.adb (Expand_N_If_Expression): Refine previous change
in case of an unconstrained type.
2016-04-18 Yannick Moy <moy@adacore.com>
* sem_eval.adb, sem_eval.ads (Check_Non_Static_Context): Add
comment to document usage of subprogram in GNATprove.
From-SVN: r235145
Arnaud Charlet [Mon, 18 Apr 2016 12:48:42 +0000 (14:48 +0200)]
[multiple changes]
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Analyze_Pragma, case Test_Case): Improve error
message for wrong placement of aspect Test_Case.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.ads: Update the documentation of attribute Renamed_Object.
* exp_spark.adb (Expand_Potential_Renaming): Reimplemented.
2016-04-18 Gary Dismukes <dismukes@adacore.com>
* exp_ch4.adb (Optimize_Length_Comparison): Return immediately
in the case of AAMP (same as for use of the -gnatd.P switch) to
suppress this optimization, which avoids creating a dependence
on the 64-bit arithmetic package.
From-SVN: r235144
Arnaud Charlet [Mon, 18 Apr 2016 12:47:22 +0000 (14:47 +0200)]
Minor editing.
From-SVN: r235143
Arnaud Charlet [Mon, 18 Apr 2016 12:47:02 +0000 (14:47 +0200)]
[multiple changes]
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* exp_ch4.adb: Update comment.
2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch6.adb (Expand_Call): Make sure instantiations are
registered only once as pending here.
From-SVN: r235142
Arnaud Charlet [Mon, 18 Apr 2016 12:44:01 +0000 (14:44 +0200)]
[multiple changes]
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* exp_ch4.adb, gnat1drv.adb, opt.ads, sem_res.adb
(Minimize_Expression_With_Actions): New flag.
(Adjust_Global_Switches): Set Minimize_Expression_With_Actions
when generating C.
(Resolve_Short_Circuit): Redo previous change
using Minimize_Expression_With_Actions.
(Expand_N_If_Expression,
Expand_Short_Circuit_Operator): Restore old code to avoid
Expression_With_Actions when Minimize_Expression_With_Actions
is set.
2016-04-18 Vincent Celier <celier@adacore.com>
* s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File and
Stderr_File): Close local file descriptors when no longer needed.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Analyze_Iterator_Specification): Remove SPARK
mode check that the type of the cursor in an iteration over
a formal container is not volatile. The proper check on the
element type is done elsewhere.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Process_Formals): Do not set a delay freeze on
a subprogram that returns a class-wide type, if the subprogram
is a compilation unit, because otherwise gigi will treat the
subprogram as external, leading to link errors.
From-SVN: r235141
Arnaud Charlet [Mon, 18 Apr 2016 12:41:08 +0000 (12:41 +0000)]
sem_res.adb (Resolve_Short_Circuit): Do not use expression-with-actions when generating C.
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* sem_res.adb (Resolve_Short_Circuit): Do not use
expression-with-actions when generating C.
From-SVN: r235140
Arnaud Charlet [Mon, 18 Apr 2016 12:39:36 +0000 (14:39 +0200)]
[multiple changes]
2016-04-18 Yannick Moy <moy@adacore.com>
* sem_util.adb (Apply_Compile_Time_Constraint_Error): Do not generate
raise node in GNATprove mode.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* s-fileio.adb: Minor reformatting.
* sem_prag.adb (Analyze_Input_Item): Add local
variable Input_OK. Do not consider mappings of generic formal
parameters to actuals.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Get_Cursor_Type): If iterator type is a derived
type, the cursor is declared in the scope of the parent type.
(Analyze_Parameter_Specification): A qualified expression with an
iterator type indicates an iteration over a container (explicit
or implicit).
From-SVN: r235139
Arnaud Charlet [Mon, 18 Apr 2016 12:33:46 +0000 (14:33 +0200)]
[multiple changes]
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* osint-c.ads, osint-c.adb (Delete_C_File, Delete_H_File): New.
* gnat1drv.adb (Gnat1drv): Delete old C files before regenerating them.
* debug.adb: Reserve -gnatd.4 to force generation of C files.
2016-04-18 Yannick Moy <moy@adacore.com>
* sem_eval.adb (Eval_Arithmetic_Op): Do not issue error on static
division by zero, instead possibly issue a warning.
* sem_res.adb (Resolve_Arithmetic_Op): Do not issue error on
static division by zero, instead add check flag on original
expression.
* sem_util.adb, sem_util.ads (Compile_Time_Constraint_Error):
Only issue error when both SPARK_Mode is On and Warn is False.
2016-04-18 Yannick Moy <moy@adacore.com>
* checks.adb (Apply_Scalar_Range_Check): Force
warning instead of error when SPARK_Mode is On, on index out of
bounds, and set check flag for GNATprove.
From-SVN: r235138
Arnaud Charlet [Mon, 18 Apr 2016 12:30:55 +0000 (14:30 +0200)]
[multiple changes]
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Check_In_Out_States.Check_Constituent_Usage):
Update the comment on usage. Reimplemented.
(Check_Input_States.Check_Constituent_Usage): Update the comment
on usage. A Proof_In constituent can now refine an Input state
as long as there is at least one Input constituent present.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Check_Inline_Pragma): Use the Sloc of the
body id as the sloc of the entity in the generated subprogram
declaration, to avoid spurious conformance errors when style
checks are enabled.
From-SVN: r235137
Arnaud Charlet [Mon, 18 Apr 2016 12:29:53 +0000 (14:29 +0200)]
[multiple changes]
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Analyze_Selected_Component, Has_Dereference):
Refine check on illegal calls to entities within a task body,
when the entity is declared in an object of the same type. In
a generic context there might be no explicit dereference but if
the prefix includes an access type the construct is legal.
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* rtsfind.ads, rtsfind.adb (RE_Id, RE_Unit_Table): add
RE_Default_Priority.
2016-04-18 Bob Duff <duff@adacore.com>
* sem_prag.adb (Check_Arg_Is_Local_Name): Don't do the check
if the pragma came from an aspect specification.
2016-04-18 Gary Dismukes <dismukes@adacore.com>
* gnat1drv.adb, contracts.adb: Minor reformatting and wording fixes.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): To suppress
superfluous conformance check on an inlined body with a previous
spec, use the fact that the generated declaration does not come
from source. We must treat the entity as coming from source to
enable some back-end inlining when pragma appears after the body.
From-SVN: r235136
Arnaud Charlet [Mon, 18 Apr 2016 12:27:10 +0000 (14:27 +0200)]
[multiple changes]
2016-04-18 Gary Dismukes <dismukes@adacore.com>
* lib-xref-spark_specific.adb, par-ch2.adb, errout.ads,
exp_intr.adb: Minor reformatting and typo corrections.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb: Code cleanup.
2016-04-18 Thomas Quinot <quinot@adacore.com>
* sem_ch13.adb: Minor reformatting and error message tweaking
(remove extraneous spaces).
2016-04-18 Johannes Kanig <kanig@adacore.com>
* gnat1drv.adb (Gnat1drv): Force loading of System unit for SPARK.
2016-04-18 Bob Duff <duff@adacore.com>
* s-fileio.adb (Fopen_Mode): If Mode = Out_File, and the file
exists, and it's a fifo, we use "w" as the open string instead of
"r+". This is necessary to make a write to the fifo block until
a reader is ready.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* sem_attr.adb (Denote_Same_Function): Account
for a special case where a primitive of a tagged type inherits
a class-wide postcondition from a parent type.
From-SVN: r235135
Hristian Kirtchev [Mon, 18 Apr 2016 12:18:16 +0000 (12:18 +0000)]
par-ch2.adb (P_Expression_Or_Reserved_Word): New routine.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* par-ch2.adb (P_Expression_Or_Reserved_Word): New routine.
(P_Pragma): Signal Scan_Pragma_Argument_Association when the use
of reserved words is OK.
(Scan_Pragma_Argument_Association):
Add new formal Reserved_Words_OK and update the comment on
usage. Code cleanup. Parse an expression or a reserved word in
identifier form for pragmas Restriction_Warnings and Restrictions
No_Use_Of_Attribute.
* restrict.adb (Check_Restriction_No_Use_Of_Attribute):
Reimplemented. (Check_Restriction_No_Use_Of_Pragma): Code cleanup.
(Set_Restriction_No_Specification_Of_Aspect): Properly set the warning
flag for an aspect.
(Set_Restriction_No_Use_Of_Attribute): Properly set the warning
flag for an attribute. (Set_Restriction_No_Use_Of_Entity):
Update the parameter profile.
(Set_Restriction_No_Use_Of_Pragma): Properly set the warning flag for
a pragma.
* restrict.ads (Check_Restriction_No_Use_Of_Attribute): Update
the comment on usage.
(Set_Restriction_No_Use_Of_Entity): Update the parameter profile.
* sem_attr.adb (Analyze_Attribute): Check restriction
No_Use_Of_Attribute.
* sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
restriction No_Use_Of_Attribute before any rewritings have
taken place.
* sem_prag.adb (Analyze_Pragma): Check restriction
No_Use_Of_Pragma before any rewritings have taken place.
From-SVN: r235134
Matthew Wahab [Mon, 18 Apr 2016 12:11:03 +0000 (12:11 +0000)]
re PR target/70711 (GCC ARM big-endian ARMv8.1 code fails.)
PR target/70711
* config/arm/bpabi.h (BE8_LINK_SPEC): Add entries for armv8+crc,
armv8.1-a and armv8.1-a+crc.
From-SVN: r235132
Richard Biener [Mon, 18 Apr 2016 11:39:04 +0000 (11:39 +0000)]
re PR tree-optimization/70701 (incomplete value numbering when memcpy-ing from array)
2016-04-18 Richard Biener <rguenther@suse.de>
PR tree-optimization/70701
* tree-ssa-sccvn.c (vn_reference_lookup_3): Resolve fully constant
references after translating through a memcpy.
* gcc.dg/tree-ssa/ssa-fre-53.c: New testcase.
From-SVN: r235131
Richard Biener [Mon, 18 Apr 2016 11:38:05 +0000 (11:38 +0000)]
tree-ssa-pre.c (postorder, [...]): Make locals ...
2016-04-18 Richard Biener <rguenther@suse.de>
* tree-ssa-pre.c (postorder, postorder_num): Make locals ...
(compute_antic): ... here. For partial antic use regular
postorder and scrap iteration.
(compute_partial_antic_aux): Remove unused return value.
(init_pre): Do not allocate postorder.
(fini_pre): Do not free postorder.
From-SVN: r235130
Bob Duff [Mon, 18 Apr 2016 10:53:32 +0000 (10:53 +0000)]
sem_ch6.adb (Is_Inline_Pragma): The pragma argument can be a selected component...
2016-04-18 Bob Duff <duff@adacore.com>
* sem_ch6.adb (Is_Inline_Pragma): The pragma
argument can be a selected component, which has no Chars field,
so we need to deal with that case (use the Selector_Name).
(Check_Inline_Pragma): We need to test Is_List_Member before
calling In_Same_List, because in case of a library unit, they're
not in lists, so In_Same_List fails an assertion.
2016-04-18 Bob Duff <duff@adacore.com>
* namet.ads, namet.adb: Add an Append that appends a
Bounded_String onto a Bounded_String. Probably a little more
efficient than "Append(X, +Y);". Also minor cleanup.
(Append_Decoded, Append_Decoded_With_Brackets, Append_Unqualified,
Append_Unqualified_Decoded): Make sure these work with non-empty
buffers.
* casing.ads, casing.adb (Set_Casing): Pass a Bounded_String
parameter, defaulting to Global_Name_Buffer.
* errout.ads, errout.adb (Adjust_Name_Case): Pass a
Bounded_String parameter, no default.
* exp_ch11.adb (Expand_N_Raise_Statement): Use local
Bounded_String instead of Global_Name_Buffer.
* exp_intr.ads, exp_intr.adb (Write_Entity_Name): Rename it
to Append_Entity_Name, and pass a Bounded_String parameter,
instead of using globals.
(Add_Source_Info): Pass a Bounded_String parameter, instead of
using globals.
(Expand_Source_Info): Use local instead of globals.
* stringt.ads, stringt.adb (Append): Add an Append procedure
for appending a String_Id onto a Bounded_String.
(String_To_Name_Buffer, Add_String_To_Name_Buffer): Rewrite in
terms of Append.
* sem_prag.adb (Set_Error_Msg_To_Profile_Name): Adjust for new
Adjust_Name_Case parameter.
* erroutc.adb, uname.adb: Don't pass D => Mixed_Case to
Set_Casing; that's the default.
* lib-xref-spark_specific.adb (Add_SPARK_Scope): Pretend that calls to
protected subprograms are entry calls; otherwise it is not possible to
distinguish them from regular subprogram calls.
From-SVN: r235129
Arnaud Charlet [Mon, 18 Apr 2016 10:52:05 +0000 (12:52 +0200)]
[multiple changes]
2016-04-18 Gary Dismukes <dismukes@adacore.com>
* sem_ch13.adb (Has_Good_Profile): Improvement
of error message. Now indicates subtype_mark of formal parameter
rather than the formal's name, plus minor rewording.
2016-04-18 Pascal Obry <obry@adacore.com>
* adaint.c, adaint.h, s-os_lib.ads: Add new routine Current_Process_Id.
From-SVN: r235128
Arnaud Charlet [Mon, 18 Apr 2016 10:50:37 +0000 (12:50 +0200)]
[multiple changes]
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* stringt.adb, exp_ch6.adb, sem_ch13.adb: Minor reformatting.
2016-04-18 Gary Dismukes <dismukes@adacore.com>
* par-ch4.adb, sem_prag.adb: Minor reformatting.
From-SVN: r235127
Bob Duff [Mon, 18 Apr 2016 10:48:33 +0000 (10:48 +0000)]
sinput.ads, sinput.adb (Build_Location_String): Take a parameter instead of using a global variable.
2016-04-18 Bob Duff <duff@adacore.com>
* sinput.ads, sinput.adb (Build_Location_String): Take a
parameter instead of using a global variable. The function
version no longer destroys the Name_Buffer.
* stringt.ads, stringt.adb (String_From_Name_Buffer): Take a
parameter, which defaults to the Global_Name_Buffer, so some
calls can avoid the global.
* exp_ch11.adb, exp_intr.adb: Use new interfaces above
to avoid using globals. All but one call to Build_Location_String
avoids the global. Only one call to String_From_Name_Buffer
avoids it.
From-SVN: r235126
Arnaud Charlet [Mon, 18 Apr 2016 10:47:29 +0000 (12:47 +0200)]
Minor code cleanups.
From-SVN: r235125
Arnaud Charlet [Mon, 18 Apr 2016 10:46:40 +0000 (12:46 +0200)]
[multiple changes]
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* namet.adb, namet.ads, exp_unst.adb: Minor reformatting.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* sem_eval.adb (Choice_Matches): Check the expression
against the predicate values when the choice denotes a
subtype with a static predicate.
(Eval_Membership_Op): Code cleanup. Remove the suspicious guard which
tests for predicates.
(Is_OK_Static_Subtype): A subtype with a dynamic predicate
is not static. (Is_Static_Subtype): A subtype with a dynamic
predicate is not static.
* sem_eval.ads (Is_OK_Static_Subtype): Update the comment on usage.
(Is_Static_Subtype): Update the comment on usage.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Input_Item): Allow
generic formals to appear as initialization items.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Analyze_Stream_TSS_Definition,
Has_Good_Profile): Additional error message to indicate that
the second parameter of the subprogram must be a first subtype.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper, Is_Inline_Pragma):
Use the pragma lookahead that determines whether a subprogram
is to be inlined, when some level of backend optimization is
required.
* sem_ch12.ads, sem_ch12.adb (Add_Pending_Instantiation): Factorize
code used to create an instance body when needed for inlining.
* exp_ch6.adb (Expand_Call): When a call is to be inlined, and the
call appears within an instantiation that is not a compilation
unit, add a pending instantiation for the enclosing instance,
so the backend can inline in turn the calls contained in the
inlined body.
From-SVN: r235124
Arnaud Charlet [Mon, 18 Apr 2016 10:44:09 +0000 (12:44 +0200)]
[multiple changes]
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Build_Pragma_Check_Equivalent): The mapping
that relates operations of the parent type to the operations of
the derived type has three distinct sources:
a) explicit operations of the derived type carry an
Overridden_Operation that designates the operation in the
ancestor.
b) Implicit operations that are inherited by the derived type
carry an alias that may be an explicit subprogram (in which case
it may have an Overridden_ Operation indicator) or may also be
inherited and carry its own alias.
c) If the parent type is an interface, the operation of the
derived type does not override, but the interface operation
indicates the operation that implements it.
* sem_prag.adb: Minor reformatting.
* sem_prag.adb (Check_External_Property): Update
the comment on usage. Reimplement.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* exp_ch5.adb (Expand_Assignment_Statement): In restricted
profiles such as ZFP, ceiling priority is not available.
2016-04-18 Bob Duff <duff@adacore.com>
* namet-sp.ads: Minor typo fix, ironically in 'Spelling_Checker'.
2016-04-18 Bob Duff <duff@adacore.com>
* sem_elab.adb (Output_Calls): Use
Get_Name_String, to clearly indicate that the global Name_Buffer
is being used. The previous code used Is_Internal_Name, which
returns a Boolean, but also has a side effect of setting the
Name_Buffer. Then it called the other Is_Internal_Name, which uses
the Name_Buffer for its input. And then it called Error_Msg_N,
again using the Name_Buffer. We haven't eliminated the global
usage here, but we've made it a bit clearer.
This also allows us to have a side-effect-free version of
Is_Internal_Name.
* namet.ads, namet.adb: Provide a type Bounded_String, along with
routines that can be used without using global variables. Provide
Global_Name_Buffer so existing code can continue to use the
global. Mark the routines that use globals as obsolete. New code
shouldn't call the obsolete ones, and we should clean up existing
code from time to time.
Name_Find_Str is renamed as Name_Find.
* namet.h: Changed as necessary to interface to the new version
of Namet.
* bindgen.adb, exp_unst.adb: Name_Find_Str is renamed as
Name_Find.
From-SVN: r235123
Arnaud Charlet [Mon, 18 Apr 2016 10:41:18 +0000 (12:41 +0200)]
[multiple changes]
2016-04-18 Yannick Moy <moy@adacore.com>
* sem_util.adb, sem_util.ads (Has_Full_Default_Initialization): used
outside of GNATprove, hence it should not be removed.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Refinement_Clause):
The refinement of an external abstract state can now mention
non-external constituents.
(Check_External_Property): Update all SPARK RM references.
2016-04-18 Bob Duff <duff@adacore.com>
* exp_intr.adb: Remove some duplicated code.
2016-04-18 Yannick Moy <moy@adacore.com>
* a-nudira.adb, a-nudira.ads, a-nuflra.adb, a-nuflra.ads: Mark
package spec and body out of SPARK.
2016-04-18 Johannes Kanig <kanig@adacore.com>
* spark_xrefs.ads: Minor comment update.
2016-04-18 Johannes Kanig <kanig@adacore.com>
* gnat1drv.adb (Gnat1drv): Force loading of System
unit for SPARK.
2016-04-18 Bob Duff <duff@adacore.com>
* a-cuprqu.adb: Correction to previous change. If a new node
is inserted at the front of the queue (because it is higher
priority than the previous front node), we need to update
Header.Next_Unequal -- not just in the case where the queue was
previously empty.
From-SVN: r235122
Arnaud Charlet [Mon, 18 Apr 2016 10:37:47 +0000 (12:37 +0200)]
[multiple changes]
2016-04-18 Bob Duff <duff@adacore.com>
* a-cuprqu.ads: Change the representation of List_Type from a
singly-linked list to a doubly-linked list. In addition, add a
pointer Next_Unequal, which points past a possibly-long chain
of equal-priority items. This increases efficiency, especially
in the case of many equal-priority items.
* a-cuprqu.adb (Dequeue, Enqueue): Rewrite algorithms to take
advantage of new data structure.
(Finalize): Rewrite in terms of Dequeue, for simplicity.
2016-04-18 Yannick Moy <moy@adacore.com>
* contracts.adb (Analyze_Object_Contract,
Analyze_Protected_Contract): Remove tests performed in GNATprove.
* sem_util.adb, sem_util.ads (Has_Full_Default_Initialization):
Remove query for tests performed in GNATprove.
From-SVN: r235121
Arnaud Charlet [Mon, 18 Apr 2016 10:35:36 +0000 (12:35 +0200)]
[multiple changes]
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_aggr.adb (Resolve_Record_Aggregate): If
Warn_On_Redundant_Constructs is enabled, report a redundant box
association that does not cover any components, as it done for
redundant others associations in case statements.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Collect_Inherited_Class_Wide_Conditions):
Analyze the generated Check pragma for an inherited condition so
that it does not freeze the dispatching type of the primitive
operation, because it is pre-analyzed at the point of the
subprogram declaration (and not in the subprogram body, as is
done during regular expansion).
2016-04-18 Vincent Celier <celier@adacore.com>
* ali.ads: Increase the range of all _Id types to 100 millions.
2016-04-18 Gary Dismukes <dismukes@adacore.com>
* sem_warn.adb (Check_References): Change warning to suggest
using pragma Export rather than saying "volatile has no effect".
2016-04-18 Bob Duff <duff@adacore.com>
* g-souinf.ads (Compilation_ISO_Date): New function to return
the current date in ISO form.
* exp_intr.adb (Expand_Source_Info, Add_Source_Info): Expand
a call to Compilation_ISO_Date into a string literal containing
the current date in ISO form.
* exp_intr.ads (Add_Source_Info): Improve documentation.
* sem_intr.adb (Check_Intrinsic_Subprogram): Recognize
Compilation_ISO_Date.
* snames.ads-tmpl (Name_Compilation_ISO_Date): New Name_Id.
From-SVN: r235120
Arnaud Charlet [Mon, 18 Apr 2016 10:30:27 +0000 (12:30 +0200)]
[multiple changes]
2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
* layout.adb (Set_Elem_Alignment): Extend setting of alignment
to subtypes that are not first subtypes.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_prag.ads (Collect_Inherited_Class_Wide_Conditions):
Simplify interface.
* sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Insert
generated pragmas after subprogram declaration, rather than in
the corresponding subprogram body.
* sem_ch6.adb (New_Overloaded_Entity): In GNATProve
mode, if the operation is overridding, call
Collect_Inherited_Class_Wide_Conditions to generate the
corresponding pragmas immediately after the corresponding
subprogram declaration.
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* spark_xrefs.ads (Xref_Index, Scope_Index, File_Index): restrict
type to natural numbers.
(Stype): document code characters for concurrent entities.
2016-04-18 Olivier Hainque <hainque@adacore.com>
* targparm.ads: Update the Frontend_Exceptions default internal
value.
(Frontend_Exceptions_On_Target): Change default value to True.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Analyze_Selected_Component): Refine error
detection when a selected component in the body of a synchronized
type is a reference to an object of the same type declared
elsewhere. The construct is legal if the prefix of the selected
component includes an explicit dereference at any point.
From-SVN: r235118
Hristian Kirtchev [Mon, 18 Apr 2016 10:27:19 +0000 (10:27 +0000)]
sem_ch3.adb (Analyze_Object_Declaration): Do not consider internally generated expressions when...
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch3.adb (Analyze_Object_Declaration): Do not consider
internally generated expressions when trying to determine whether
a formal parameter of a tagged type subject to Extensions_Visible
False is used to initialize an object.
* sem_ch4.adb (Analyze_Type_Conversion): Do not consider
internally generated expressions when trying to determine whether
a formal parameter of a tagged type subject to Extensions_Visible
False is used in a type conversion.
From-SVN: r235117
Arnaud Charlet [Mon, 18 Apr 2016 10:24:03 +0000 (12:24 +0200)]
[multiple changes]
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* sem_res.adb (Is_Protected_Operation_Call):
Add guards to account for a non-decorated selected component.
2016-04-18 Yannick Moy <moy@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Improve
implementation of Body_Has_SPARK_Mode_On.
* sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_From_Annotation):
New function replacing previous Get_SPARK_Mode_From_Pragma, that
deals also with aspects.
(Get_SPARK_Mode_Type): Make function internal again.
* inline.adb, sem_ch7.adb, sem_util.adb: Use new
Get_SPARK_Mode_From_Annotation.
From-SVN: r235116
Hristian Kirtchev [Mon, 18 Apr 2016 10:22:13 +0000 (10:22 +0000)]
contracts.adb (Analyze_Object_Contract): Update references to SPARK RM.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* contracts.adb (Analyze_Object_Contract): Update references to
SPARK RM.
* freeze.adb (Freeze_Entity): Update references to SPARK RM.
* ghost.adb Add with and use clauses for Sem_Disp.
(Check_Ghost_Derivation): Removed.
(Check_Ghost_Overriding):
Reimplemented. (Check_Ghost_Policy): Update references to SPARK RM.
(Check_Ghost_Primitive): New routine.
(Check_Ghost_Refinement): New routine. (Is_OK_Ghost_Context):
Update references to SPARK RM. (Is_OK_Pragma): Update references
to SPARK RM. Predicates are now a valid context for references
to Ghost entities.
* ghost.ads (Check_Ghost_Derivation): Removed.
(Check_Ghost_Overriding): Update the comment on usage.
(Check_Ghost_Primitive): New routine.
(Check_Ghost_Refinement): New routine.
(Remove_Ignored_Ghost_Code): Update references to SPARK RM.
* sem_ch3.adb (Process_Full_View): Remove the now obsolete check
related to Ghost derivations
* sem_ch6.adb (Check_Conformance): Remove now obsolete check
related to the convention-like behavior of pragma Ghost.
(Check_For_Primitive_Subprogram): Verify that the Ghost policy
of a tagged type and its primitive agree.
* sem_prag.adb (Analyze_Pragma): Update references to SPARK
RM. Move the verification of pragma Assertion_Policy Ghost
to the proper place. Remove the now obsolete check related
to Ghost derivations.
(Collect_Constituent): Add a call to Check_Ghost_Refinement.
* sem_res.adb (Resolve_Actuals): Update references to SPARK RM.
From-SVN: r235115
Arnaud Charlet [Mon, 18 Apr 2016 10:19:26 +0000 (12:19 +0200)]
[multiple changes]
2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
* layout.adb: Fix more minor typos in comments.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* a-calend.ads, sem_prag.adb, sem_ch6.adb: Minor reformatting.
From-SVN: r235114
Arnaud Charlet [Mon, 18 Apr 2016 10:17:17 +0000 (12:17 +0200)]
[multiple changes]
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): In GNATprove
mode, collect inherited class-wide conditions to generate the
corresponding pragmas.
* sem_prag.ads (Build_Pragma_Check_Equivalent): Moved from contracts
* contracts.adb (Collect_Inherited_Class_Wide_Conditions): New
procedure for overriding subprograms, used to generate the pragmas
corresponding to an inherited class- wide pre- or postcondition.
* sem_prag.adb (Build_Pragma_Check_Equivalent): moved here
from contracts.adb (Replace_Condition_Entities): Subsidiary
Build_Pragma_Check_Equivalent, to implement the proper semantics
of inherited class-wide conditions, as given in AI12-0113.
(Process_Class_Wide_Condition): Removed.
(Collect_Inherited_Class_Wide_Conditions): Iterate over pragmas
in contract of subprogram, to collect inherited class-wide
conditions.
(Build_Pragma_Check_Equivalent): Moved to sem_prag.adb
2016-04-18 Yannick Moy <moy@adacore.com>
* a-calend.adb (Ada.Calendar): Mark package body as SPARK_Mode Off.
* a-calend.ads (Ada.Calendar): Mark package spec as
SPARK_Mode and add synchronous external abstract state Clock_Time.
From-SVN: r235113
Arnaud Charlet [Mon, 18 Apr 2016 10:02:58 +0000 (12:02 +0200)]
[multiple changes]
2016-04-18 Yannick Moy <moy@adacore.com>
* sem_res.adb (Resolve_Call): Prevent inlining of
calls inside expression functions. Factor previous code issuing
errors to call Cannot_Inline instead, which does appropriate
processing of message for GNATprove.
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* einfo.ads, sem_ch3.adb, sem_ch8.adb, osint-l.adb, rtsfind.adb,
osint-b.adb: Cleanups.
2016-04-18 Yannick Moy <moy@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only create
body to inline in GNATprove mode when SPARK_Mode On applies to
subprogram body.
* sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_Type): Make function
public.
2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
* layout.adb: Fix minor typo in comment.
* inline.adb: Fix minor pasto.
* sem_ch12.ads: Fix minor typos in comments.
From-SVN: r235111