PR other/79046
libatomic/
* testsuite/Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead
of cat to get version from BASE-VER file.
* testsuite/Makefile.in: Regenerated.
libffi/
* configure.ac: Add GCC_BASE_VER.
* include/Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead
of cat to get version from BASE-VER file.
* configure: Regenerated.
* testsuite/Makefile.in: Regenerated.
* include/Makefile.in: Regenerated.
* Makefile.in: Regenerated.
* man/Makefile.in: Regenerated.
libgomp/
* testsuite/Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead
of cat to get version from BASE-VER file.
* testsuite/Makefile.in: Regenerated.
libitm/
* testsuite/Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead
of cat to get version from BASE-VER file.
* testsuite/Makefile.in: Regenerated.
libmpx/
* mpxrt/Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead
of cat to get version from BASE-VER file.
* mpxwrap/Makefile.am (gcc_version): Likewise.
* mpxrt/Makefile.in: Regenerated.
* mpxwrap/Makefile.in: Regenerated.
liboffloadmic/
* plugin/configure.ac: Add GCC_BASE_VER.
* plugin/Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead
of cat to get version from BASE-VER file.
* plugin/configure: Regenerated.
* plugin/aclocal.m4: Regenerated.
* plugin/Makefile.in: Regenerated.
libsanitizer/
* interception/Makefile.am (gcc_version): Use @get_gcc_base_ver@
instead of cat to get version from BASE-VER file.
* asan/Makefile.am (gcc_version): Likewise.
* ubsan/Makefile.am (gcc_version): Likewise.
* sanitizer_common/Makefile.am (gcc_version): Likewise.
* lsan/Makefile.am (gcc_version): Likewise.
* tsan/Makefile.am (gcc_version): Likewise.
* interception/Makefile.in: Regenerated.
* asan/Makefile.in: Regenerated.
* ubsan/Makefile.in: Regenerated.
* sanitizer_common/Makefile.in: Regenerated.
* lsan/Makefile.in: Regenerated.
* tsan/Makefile.in: Regenerated.
libvtv/
* testsuite/Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead
of cat to get version from BASE-VER file.
* testsuite/Makefile.in: Regenerated.
From-SVN: r244742
2017-01-21 Bernd Schmidt <bschmidt@redhat.com>
rtl-optimization/79125
* cprop.c (local_cprop_pass): Handle cases where we make an
unconditional trap.
PR rtl-optimization/79125
* gcc.dg/torture/pr79125.c: New test.
From-SVN: r244741
The varargs code for SVR4 puts all (integer) arguments in 4-byte slots.
When it then reads an item from there as something not a multiple of 4
bytes, it needs to adjust the address if big endian. We didn't yet do
that.
This fixes the g++.dg/abi/scoped1.C, gcc.dg/compat/scalar-by-value-4,
and gcc.dg/compat/scalar-return-4 testcases.
PR target/61729
PR target/77850
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
read from, for big endian.
From-SVN: r244740
Some fixes that permit misc/cgo/test in the master gc repository to
pass using the current gccgo.
Install testing/internal/testdeps.gox; it is needed by `go test`.
Export runtime.lockedOSThread to enable calling via go:linkname; it is
used by misc/cgo/test.
Loop on EAGAIN when creating a new thread; this is what the gc code
does, and misc/cgo/test tests that it works.
Reviewed-on: https://go-review.googlesource.com/35479
From-SVN: r244733
PR go/79146
math/big: fix build on s390x
Don't build arith_decl_s390x.go for gccgo; it is only for assembly
code that has not yet been ported to gccgo.
For GCC PR 79146.
From-SVN: r244731
2017-01-20 Thomas Quinot <quinot@adacore.com>
* sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
message.
2017-01-20 Nicolas Roche <roche@adacore.com>
* terminals.c: Ignore failures on setpgid and tcsetpgrp commands.
2017-01-20 Bob Duff <duff@adacore.com>
* sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
(etc) optimizations when the type is modular.
2017-01-20 Yannick Moy <moy@adacore.com>
* sem_ch6.adb (Move_Pragmas): move some pragmas,
but copy the SPARK_Mode pragma instead of moving it.
(Build_Subprogram_Declaration): Ensure that the generated spec
and original body share the same SPARK_Pragma aspect/pragma.
* sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
procedure to copy SPARK_Mode aspect.
2017-01-20 Bob Duff <duff@adacore.com>
* sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
even in ASIS mode.
* sem_ch13.adb (Resolve_Name): Enable setting the entity to
Empty even in ASIS mode.
From-SVN: r244720
2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch9.adb: minor style fixes in comments.
* sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
relative statement introduces an implicit dependency on
Ada.Real_Time.Clock_Time.
* sem_util.adb: Minor reformatting.
2017-01-20 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
must be treated as delayed aspect even if the expression is
a literal, because the aspect affects the freezing and the
elaboration of the object to which it applies.
2017-01-20 Tristan Gingold <gingold@adacore.com>
* s-osinte-vxworks.ads (Interrup_Range): New subtype.
2017-01-20 Ed Schonberg <schonberg@adacore.com>
* lib-xref.adb (Generate_Reference): Do not warn about the
presence of a pragma Unreferenced if the entity appears as the
actual in a procedure call that does not come from source.
2017-01-20 Pascal Obry <obry@adacore.com>
* expect.c, terminals.c: Fix some warnings about unused variables.
* gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
of the runtime.
2017-01-20 Bob Duff <duff@adacore.com>
* exp_attr.adb (Constrained): Apply an access check (check that
the prefix is not null) when the prefix denotes an object of an
access type; that is, when there is an implicit dereference.
2017-01-20 Gary Dismukes <dismukes@adacore.com>
* s-rident.ads (constant Profile_Info): Remove
No_Calendar from GNAT_Extended_Ravenscar restrictions.
2017-01-20 Tristan Gingold <gingold@adacore.com>
* s-maccod.ads: Add pragma No_Elaboration_Code_All
From-SVN: r244718
PR target/71270
* config/arm/arm.c (neon_valid_immediate): Reject vector constants
in big-endian mode when they are not a single duplicated value.
From-SVN: r244716
gcc/cp/ChangeLog:
PR c++/77829
PR c++/78656
* cp-tree.h (suggest_alternatives_for): Add bool param.
(suggest_alternative_in_explicit_scope): New decl.
* error.c (qualified_name_lookup_error): When SCOPE is a namespace
that isn't the global one, call new function
suggest_alternative_in_explicit_scope, only calling
suggest_alternatives_for if it fails, and disabling near match
searches fort that case. When SCOPE is the global namespace,
pass true for new param to suggest_alternatives_for to allow for
fuzzy name lookups.
* lex.c (unqualified_name_lookup_error): Pass true for new param
to suggest_alternatives_for.
* name-lookup.c (consider_binding_level): Add forward decl.
(suggest_alternatives_for): Add "suggest_misspellings" param,
using it to conditionalize the fuzzy name-lookup code.
(suggest_alternative_in_explicit_scope): New function.
* parser.c (cp_parser_primary_expression): When calling
finish_id_expression, pass location of id_expression rather
than that of id_expr_token.
(cp_parser_id_expression): Convert local "unqualified_id" from
tree to cp_expr to avoid implicitly dropping location information.
gcc/testsuite/ChangeLog:
PR c++/77829
PR c++/78656
* g++.dg/spellcheck-pr77829.C: New test case.
* g++.dg/spellcheck-pr78656.C: New test case.
From-SVN: r244715
* omp-low.c (omplow_simd_context): New struct. Use it...
(lower_rec_simd_input_clauses): ...here and...
(lower_rec_input_clauses): ...here to hold common data. Adjust all
references to idx, lane, max_vf, is_simt.
From-SVN: r244713
PR libstdc++/72792
* include/bits/alloc_traits.h (__allocator_traits_base::__diff_type)
(__allocator_traits_base::__size_type): Remove.
(allocator_traits::_Ptr): New class template to detect const and void
pointer types without instantiating pointer_traits::rebind
unnecessarily.
(allocator_traits::_Diff): Likewise for detecting difference_type.
(allocator_traits::_Size): New class template to detect size_type
without instantiating make_unsigned unnecessarily.
* include/bits/ptr_traits.h (pointer_traits::element_type): Use
__detected_or_t instead of __detected_or_t_.
* include/std/type_traits (__detected_or_t_): Remove.
* testsuite/20_util/allocator_traits/members/pointers.cc: New test.
From-SVN: r244706
2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
* ghost.adb (Mark_Ghost_Clause): New routine.
(Prune_Node): Do not prune compilation unit nodes.
(Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
This does not touch the node itself, but does prune all its fields.
* ghost.ads (Mark_Ghost_Clause): New routine.
* sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
package clause mentions Ghost and non-Ghost packages. Mark a
use package clause as Ghost when it mentions a Ghost package.
(Analyze_Use_Type): Emit an error when a use type clause mentions
Ghost and non-Ghost types. Mark a use type clause as Ghost when
it mentions a Ghost type.
* sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
Ghost when it withs a Ghost unit.
2017-01-20 Javier Miranda <miranda@adacore.com>
* sem_res.adb (Resolve_Call): If a function call
returns a limited view of a type and at the point of the call the
function is not declared in the extended main unit then replace
it with the non-limited view, which must be available. If the
called function is in the extended main unit then no action is
needed since the back-end handles this case.
2017-01-20 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
(Contains_Subprograms_Refs): ...this. Adjust comment
for constants. (Is_Subp_Or_Const_Ref): Rename into...
(Is_Subprogram_Ref): ...this.
(Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
Has_Non_Subprograms_Referencer and adjust comment. Remove
incorrect shortcut for package declarations and bodies.
2017-01-20 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Complete_Private_Subtype): If the scope of the
base type differs from that of the completion and the private
subtype is an itype (created for a constraint on an access
type e.g.), set Delayed_Freeze on both to prevent out-of-scope
anomalies in gigi.
2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper):
When inheriting the SPARK_Mode of a prior expression function,
look at the properly resolved entity rather than the initial
candidate which may denote a homonym.
2017-01-20 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Rewrite_Assertion_Kind): If the name is
Precondition or Postcondition, and the context is pragma
Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
and suggest the standard names Assertion_Policy /Pre /Post
instead.
From-SVN: r244704
2017-01-20 Javier Miranda <miranda@adacore.com>
* sem_ch3.adb (Access_Type_Declaration): Protect access to the
Entity attribute.
* sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
* sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
malformed trees.
2017-01-20 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specification, case
Dynamic_Predicate): If the entity E is a subtype that inherits
a static predicate for its parent P,, the inherited and the
new predicate combine in the generated predicate function,
and E only has a dynamic predicate.
2017-01-20 Tristan Gingold <gingold@adacore.com>
* s-boustr.ads, s-boustr.adb: New package.
* Makefile.rtl: Add s-boustr.
2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
* inline.adb (Process_Formals): Qualify the
expression of a return statement when it yields a universal type.
2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
* freeze.adb (Freeze_All): Freeze the default
expressions of all eligible formal parameters that appear in
entries, entry families, and protected subprograms.
From-SVN: r244701
2017-01-20 Yannick Moy <moy@adacore.com>
* inline.adb (Expand_Inlined_Call): Keep more
precise type of actual for inlining whenever possible. In
particular, do not switch to the formal type in GNATprove mode in
some case where the GNAT backend might require it for visibility.
2017-01-20 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
aspect Implicit_Dereference can be inherited by a full view if
the partial view has no discriminants, because there is no way
to apply the aspect to the partial view.
(Build_Derived_Record_Type): If derived type renames discriminants
of the parent, the new discriminant inherits the aspect from
the old one.
* sem_ch4.adb (Analyze_Call): Handle properly a parameterless
call through an access discriminant designating a subprogram.
* sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
properly a parameterless call through an access discriminant on
the left-hand side of an assignment.
* sem_res.adb (resolve): If an interpreation involves a
discriminant with an implicit dereference and the expression is an
entity, resolution takes place later in the appropriate routine.
* sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
access discriminants that designate a subprogram type.
2017-01-20 Pascal Obry <obry@adacore.com>
* a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016
From-SVN: r244698
2017-01-20 Yannick Moy <moy@adacore.com>
* sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
on implicitly with'ed units in GNATprove mode.
* sinfo.ads (Implicit_With): Document use of flag for implicitly
with'ed units in GNATprove mode.
2017-01-20 Ed Schonberg <schonberg@adacore.com>
* sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
unit Do not report an error on a non-static entity that appears
in the context of a spec expression, such as an aspect expression.
2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
(Is_Underlying_Full_View): New routine.
(Set_Is_Underlying_Full_View): New routine.
(Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
* einfo.ads Add new attribute Is_Underlying_Full_View.
(Is_Underlying_Full_View): New routine along with pragma Inline.
(Set_Is_Underlying_Full_View): New routine along with pragma Inline.
* exp_util.adb (Build_DIC_Procedure_Body): Do not consider
class-wide types and underlying full views. The first subtype
is used as the working type for all Itypes, not just array base types.
(Build_DIC_Procedure_Declaration): Do not consider
class-wide types and underlying full views. The first subtype
is used as the working type for all Itypes, not just array
base types.
* freeze.adb (Freeze_Entity): Inherit the freeze node of a full
view or an underlying full view without clobbering the attributes
of a previous freeze node.
(Inherit_Freeze_Node): New routine.
* sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying
full view as such.
(Build_Underlying_Full_View): Mark an underlying full view as such.
* sem_ch7.adb (Install_Private_Declarations): Mark an underlying
full view as such.
From-SVN: r244696
2017-01-20 Martin Liska <mliska@suse.cz>
* read-rtl-function.c (function_reader::create_function): Use
build_decl instread of build_decl_stat.
From-SVN: r244686
* cp-tree.h (TEMPLATE_TYPE_PARM_FOR_CLASS): New.
* pt.c (push_template_decl_real): Set it.
(maybe_adjust_types_for_deduction): Check it.
(rewrite_template_parm): Copy it.
From-SVN: r244682
PR libstdc++/72792
PR libstdc++/72793
* include/bits/alloc_traits.h (__allocator_traits_base::__rebind):
Replace with class template using void_t.
(__alloc_rebind): Define in terms of
__allocator_traits_base::__rebind.
(allocator_traits): Remove unconditional static_assert for
rebind_alloc.
* include/bits/ptr_traits.h (__replace_first_arg): Remove type member.
(pointer_traits::__rebind): Replace with class template using void_t.
(pointer_traits::rebind): Define in terms of __rebind.
(pointer_traits): Remove unconditional static_assert for rebind.
* testsuite/20_util/allocator_traits/members/rebind_alloc.cc: New test.
* testsuite/20_util/pointer_traits/rebind.cc: New test.
From-SVN: r244680
PR go/79146
crypto/elliptic: explicitly ignore p256_s390x.go
The file only works if used in conjunction with assembly code not
(yet) written for gccgo.
Fixes GCC PR 79146.
Reviewed-on: https://go-review.googlesource.com/35477
From-SVN: r244679
I foolishly tested this with r241087 reverted. After that revision
default_stack_protect_guard is no longer called if the compiler defaults
to using the TLS guard, which of course is the wrong thing to do if
there is some other way to enable the global guard.
This fixes it.
PR target/78875
PR target/79140
* config/rs6000/rs6000.c (TARGET_STACK_PROTECT_GUARD): Unconditionally
define to rs6000_init_stack_protect_guard.
(rs6000_init_stack_protect_guard): New function.
From-SVN: r244677