Make the types of the addr and data arguments in the __go_ptrace shim
match the types declared in Go and the types declared by the C ptrace
function, i.e., void*. This avoids a warning about an implicit
int-to-pointer cast on some platforms.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/262340
This patch fixes some bugs in the powerpc testsuite for runnable tests
whose expected values were endian dependent.
gcc/testsuite/ChangeLog:
2020-10-15 David Edelsohn <dje.gcc@gmail.com>
* gcc.target/powerpc/builtins-1-p9-runnable.c: Adjust for big endian.
* gcc.target/powerpc/builtins-7-p9-runnable.c: Same.
It looks like I did a s/a/__a/ substition in one of these headers, and
then copied it to the other one.
libstdc++-v3/ChangeLog:
* include/std/concepts: Fix typos in copyright notice.
* include/std/ranges: Likewise.
Trying to diagnose the problem with an implicit copy function breaks if the
function isn't actually a copy function.
gcc/cp/ChangeLog:
PR c++/95844
* decl.c (copy_fn_p): Return false for a function that is neither a
constructor nor an assignment operator.
(move_signature_fn_p): Likewise.
gcc/testsuite/ChangeLog:
PR c++/95844
* g++.dg/cpp2a/spaceship-eq10.C: New test.
This PR points out that when printing the parameter mapping for a
pointer-to-member-function, the output was truncated:
[with T = void (X::*]
Fixed by printing the abstract declarator for pointers-to-members in
cxx_pretty_printer::type_id. So now we print:
[with T = void (X::*)()]
But when I tried a pointer-to-data-member, I got
[with T = ‘offset_type’ not supported by simple_type_specifier)‘offset_type’ not supported by direct_abstract_declarator]
so had to fix that too so that we now print:
[with T = int X::*]
or
[with T = int (X::*)[5]]
when the type is an array type. Which is what PR85901 was about.
gcc/cp/ChangeLog:
PR c++/97406
PR c++/85901
* cxx-pretty-print.c (pp_cxx_type_specifier_seq): Handle OFFSET_TYPE.
(cxx_pretty_printer::abstract_declarator): Fix the printing of ')'.
(cxx_pretty_printer::direct_abstract_declarator): Handle OFFSET_TYPE.
(cxx_pretty_printer::type_id): Likewise. Print the abstract declarator
for pointers-to-members.
gcc/testsuite/ChangeLog:
PR c++/97406
PR c++/85901
* g++.dg/diagnostic/ptrtomem1.C: New test.
* g++.dg/diagnostic/ptrtomem2.C: New test.
Nvptx currently doesn't support atomics if it involves a stack address.
PR97444 is open about.
Xfail corresponding execution fails in gcc.dg/atomic. Tested on nvptx.
gcc/testsuite/ChangeLog:
2020-10-15 Tom de Vries <tdevries@suse.de>
* gcc.dg/atomic/c11-atomic-exec-6.c: Xfail execution for nvptx.
* gcc.dg/atomic/c11-atomic-exec-7.c: Same.
* gcc.dg/atomic/stdatomic-op-5.c: Same.
The nvptx port has an -m32 option, but it's not clear whether this
was ever build/tested/used.
Don't expose to user anymore. Tested on nvptx.
gcc/ChangeLog:
2020-10-15 Tom de Vries <tdevries@suse.de>
PR target/97436
* config/nvptx/nvptx.opt (m32): Comment out.
* doc/invoke.texi (NVPTX options): Remove -m32.
gcc/testsuite/ChangeLog:
2020-10-15 Tom de Vries <tdevries@suse.de>
PR target/97436
* gcc.target/nvptx/atomic_fetch-3.c: Remove.
This fixes the missing constant offset from TARGET_MEM_REF dumping.
2020-10-15 Richard Biener <rguenther@suse.de>
* tree-pretty-print.c (dump_mem_ref): Print constant offset
also for TARGET_MEM_REF.
This fixes the case where the insertion iterator for the live stmt
is the end of a BB by adjusting the dominance query to the definition
of the def we're substituting.
2020-10-15 Richard Biener <rguenther@suse.de>
* tree-vect-loop.c (vectorizable_live_operation): Adjust
dominance query.
* gcc.dg/vect/bb-slp-52.c: New testcase.
gcc/ada/
* sem_ch10.adb (Install_With_Clause): Fix implementation of Ada
2005 AI-262 by taking into account generic packages. Minor
reformatting.
* libgnat/a-cbhase.ads, libgnat/a-cbhase.adb: Remove use clause
on runtime unit spec.
gcc/ada/
* sem_prag.adb (Analyze_Pragma): Adding semantic support of
Standard to Default_Storage_Pool.
* freeze.adb (Freeze_Entity): If pragma Default_Storage_Pool
applies and it is set to Standard then use the global pool as
the associated storage pool of the access type.
gcc/ada/
* checks.adb (Apply_Predicate_Check): Generate "infinite
recursion" warning message even if run-time predicate checking
is disabled.
* exp_ch6.adb (Expand_Simple_Function_Return): In testing
whether the returned expression is a function call, look for the
case where the call has been transformed into a dereference of
an access value that designates the result of a function call.
* sem_ch3.adb (Analyze_Object_Declaration): Legality checking
for a static expression is unaffected by assertion policy (and,
in particular, enabling/disabling of subtype predicates. To get
the right legality checking, we need to call
Check_Expression_Against_Static_Predicate for a static
expression even if predicate checking is disabled for the given
predicate-bearing subtype. On the other hand, we don't want to
call Make_Predicate_Check unless predicate checking is enabled.
* sem_ch7.adb (Uninstall_Declarations.Preserve_Full_Attributes):
Preserve the Predicates_Ignored attribute.
* sem_eval.adb (Check_Expression_Against_Static_Predicate):
Previously callers ensured that this procedure was only called
if predicate checking was enabled; that is no longer the case,
so predicates-disabled case must be handled.
* sem_prag.adb (Analyze_Pragma): Fix bug in setting
Predicates_Ignored attribute in Predicate pragma case.
gcc/ada/
* freeze.adb (Freeze_Fixed_Point_Type): Do not scale the bounds
of a declared subtype using the 'Small of the type; this is
done during resolution of the bound itself, unlike what is done
for the bounds of the base type, which are used to determine its
required size. Previous code performed this scaling twice,
leading to meaningless values for such a subtype.
gcc/ada/
* sem_ch3.adb (Process_Subtype): Combine guards for
Null_Exclusion_Present in May_Have_Null_Exclusion; use this
combined guard when checking AI-231.
gcc/ada/
* sem_prag.adb (Is_Acceptable_Dim3): Use Is_RTE to not pull CUDA
package unless necessary; rename local Tmp variable; iterate
with procedural Next.
gcc/ada/
* sem_ch3.adb (Array_Type_Declaration): Refine type of a local
variable.
(Make_Index): Simplify to avoid assignment with a type entity
and then backtracking by reassigning to Empty; remove excessive
whitespace.
* sem_ch9.adb (Analyze_Entry_Body): Remove extra parens.
gcc/ada/
* sem_ch13.adb (Add_Predicates): Prevent analyzing twice the
same pragma in case an inner package references the type with a
predicate (as opposed to defining the type).
gcc/ada/
* sem_ch3.ads, sem_ch3.adb (Make_Index): Refined type of
parameter.
(Constrain_Index): Likewise.
(Array_Type_Declaration): Refine type of a local counter
variable; remove a trivially useless initialization.
gcc/ada/
* sem_ch3.adb (Analyze_Subtype_Declaration): Recognize both
identifiers and expanded names; use high-level Is_Scalar_Type
instead of low-level membership test.
gcc/ada/
* sem_eval.adb (Eval_Intrinsic_Call, Fold_Shift): Add support
for Shift_Right_Arithmetic and for signed integers.
* exp_ch4.adb (Expand_N_Op_Rotate_Left,
Expand_N_Op_Rotate_Right, Expand_N_Op_Shift_Left,
Expand_N_Op_Shift_Right_Arithmetic): Minor reformatting and code
cleanup to ensure a consistent handling. Update comments and add
assertion.
gcc/ada/
* sem_ch13.adb (Visible_Component): Enable this code for task
and protected types, as well as record and private types.
* sem_ch13.ads (Replace_Type_References_Generic): Update
comment. Move the efficiency comment into the body, because
it's about the implementation.
gcc/ada/
* par-ch13.adb (Get_Aspect_Specifications): Generate a warning
rather than an error on unknown aspects unless -gnatd2 is used.
(Aspect_Specifications_Present): Improve detection of unknown
aspects.
* debug.adb (Debug_Flag_2): Update document.
gcc/ada/
* exp_aggr.adb (Expand_N_Aggregate): A record aggregate requires
a non-private type.
* sem_ch13.adb (Valid_Assign_Indexed): New subprogram local to
Resolve_Aspect_Aggregate, to handle the case when the
corresponding name appearing in the aspect specification for an
indexed aggregate is an overloaded operation.
* libgnat/a-convec.ads, libgnat/a-convec.adb,
libgnat/a-coinve.ads, libgnat/a-coinve.adb,
libgnat/a-cobove.ads, libgnat/a-cobove.adb,
libgnat/a-cdlili.ads, libgnat/a-cdlili.adb,
libgnat/a-cbdlli.ads, libgnat/a-cbdlli.adb,
libgnat/a-cohama.ads, libgnat/a-cihama.ads,
libgnat/a-cbhama.ads, libgnat/a-cborma.ads,
libgnat/a-ciorma.ads, libgnat/a-coorma.ads,
libgnat/a-cihase.ads, libgnat/a-cohase.ads,
libgnat/a-cbhase.ads, libgnat/a-cborse.ads,
libgnat/a-ciorse.ads, libgnat/a-coorse.ads: Add Ada_2020 aspect
Aggregate to types declared in standard containers, as well as
new subprograms where required.
gcc/ada/
* Makefile.rtl: Add target pair for interfac.ads.
* libgnat/interfac.ads: Add a comment.
* libgnat/interfac__2020.ads: New, used for bootstrap purposes.
* sem_util.adb (Is_Static_Function): Always return False for pre
Ada 2020 to e.g. ignore the Static aspect in Interfaces for
Ada < 2020.
split_constant_offset is confused about a nop-conversion from
unsigned long to sizetype and tries to prove non-overflowing
of the inner operation. Obviously the conversion could have been
elided so make sure split_constant_offset handles this properly.
It also makes sure that convert_to_ptrofftype does not introduce
conversions not necessary which in this case is the source for
the unnecessary conversion.
2020-10-15 Richard Biener <rguenther@suse.de>
PR tree-optimization/97482
* tree-data-ref.c (split_constant_offset_1): Handle
trivial conversions better.
* fold-const.c (convert_to_ptrofftype_loc): Elide conversion
if the offset is already ptrofftype_p.
* gcc.dg/vect/pr97428.c: New testcase.
The xfail in gcc.dg/tree-ssa/pr84512.c for PR84958 has started to xpass,
presumably because of commit 744fd446c3 "tree-ssa-sccvn.c (class pass_fre):
Add may_iterate pass parameter".
Remove the xfail. Tested on nvptx.
gcc/testsuite/ChangeLog:
2020-10-15 Tom de Vries <tdevries@suse.de>
* gcc.dg/tree-ssa/pr84512.c: Remove xfail for nvptx.
For nvptx, I see:
...
XPASS: c-c++-common/ident-0b.c -Wc++-compat scan-assembler-not GCC:
...
Fix this by requiring effective target ident_directive. Tested on nvptx.
gcc/testsuite/ChangeLog:
2020-10-15 Tom de Vries <tdevries@suse.de>
* c-c++-common/ident-0b.c: Require effective target ident_directive.
There's a dg-skip-if for nvptx that is related to ptxas oom.
If I remove it, the test-case passes for me (with ptxas from cuda 9.1).
I've tested it on a range of cudas, from 5.0 to 11.1 and did not
manage to reproduce the fail.
Remove the dg-skip-if. Tested on nvptx.
gcc/testsuite/ChangeLog:
2020-10-15 Tom de Vries <tdevries@suse.de>
* gcc.c-torture/compile/limits-externdecl.c: Remove dg-skip-if for
nvptx.