Age | Commit message (Collapse) | Author | Files | Lines |
|
The finalization actions for the components of the aggregates are blocked
by Expand_Ctrl_Function_Call, which sets Is_Ignored_Transient on all the
temporaries generated from within a conditional expression whatever the
intermediate constructs. Now aggregates and their expansion in the form
of block and loop statements are "impenetrable" as far as temporaries are
concerned, i.e. the lifetime of temporaries generated within them does
not extend beyond them, so their finalization must not be blocked there.
gcc/ada/
* exp_util.ads (Within_Case_Or_If_Expression): Adjust description.
* exp_util.adb (Find_Hook_Context): Stop the search for the topmost
conditional expression, if within one, at contexts where temporaries
may be contained.
(Within_Case_Or_If_Expression): Return false upon first encoutering
contexts where temporaries may be contained.
|
|
The Ada priority range of the QNX runtime started from 0, differing from
the QNX system priorities range starting from 1. As this may cause
confusion, especially if used in a mixed language environment, the Ada
priority range now starts at 1.
The default priority of Ada tasks as mandated is the middle of the
priority range. On QNX this means the default priority of Ada tasks is
30. This is much higher than the default QNX priority of 10 and may
cause unexpected system interruptions when Ada tasks take a lot of CPU time.
gcc/ada/
* libgnarl/s-osinte__qnx.adb: Adjust priority conversion function.
* libgnat/system-qnx-arm.ads: Adjust priority range and default
priority.
|
|
This patch removes a few dangling references to the late front-end
implementation of exceptions from the comments of targparm.ads, and
also fixes a thinko there.
gcc/ada/
* targparm.ads: Remove references to front-end-based exceptions. Fix
thinko.
|
|
The recently added aspect Always_Terminates is now allowed on packages
and generic packages, but only when it has no arguments. The intuitive
meaning is that all subprograms declared in such a package are always
terminating.
gcc/ada/
* contracts.adb (Add_Contract_Item): Add pragma Always_Terminates to
package contract.
* sem_prag.adb (Analyze_Pragma): Accept pragma Always_Terminates on
packages and generic packages, but only when it has no arguments.
|
|
The recently added aspect Always_Terminates is allowed on both
procedures and entries.
gcc/ada/
* sem_prag.adb (Analyze_Pragma): Accept pragma Always_Terminates when
it applies to an entry.
|
|
The recently added aspect Always_Terminates is only allowed on
procedures.
gcc/ada/
* sem_prag.adb (Analyze_Pragma): Reject pragma Always_Terminates when
it applies to a function or generic function.
|
|
Testing for the presence of Non_Limited_View is not sufficient to detect
whether the nonlimited view has been analyzed because Build_Limited_Views
always sets the field on the limited view. Instead the discriminant is
whether this nonlimited view is itself an incomplete type.
gcc/ada/
* sem_ch4.adb (Analyze_Call): Adjust the test to detect the presence
of an incomplete view of a type on a function call.
|
|
The package Ttypef has been removed but a reference to it was left
over in a comment. This patch removes that reference, and also fixes
a typo.
gcc/ada/
* ttypes.ads: Remove reference to Ttypef in comment. Fix typo in
comment.
|
|
This constant has been unused for ages. The corresponding getter function
is also removed from the Get_Targ package, but the corresponding constant
declared in Set_Targ is preserved for the sake of backward compatibility
of the target file format.
gcc/ada/
* get_targ.ads (Get_Max_Unaligned_Field): Delete.
* ada_get_targ.adb (Get_Max_Unaligned_Field): Likewise.
* get_targ.adb (Get_Max_Unaligned_Field): Likewise.
* set_targ.ads (Max_Unaligned_Field): Adjust comment.
* set_targ.adb: Set Max_Unaligned_Field to 1 during elaboration.
* ttypes.ads (Max_Unaligned_Field): Delete.
|
|
The comment is correct but the code implements the opposite outcome.
gcc/ada/
* sem_type.adb (Disambiguate): Fix pasto in the implementation of
the RM 8.4(10) clause for operators.
|
|
The recently added aspect Always_Terminates is now accepted without
explicit boolean expression, where a missing expression implicitly means
True, similar to aspects Async_Readers, Async_Writers, etc.
gcc/ada/
* aspects.adb
(Base_Aspect): Fix layout.
* aspects.ads
(Aspect_Argument): Expression for Always_Terminates is optional.
* sem_prag.adb
(Analyze_Always_Terminates_In_Decl_Part): Only analyze expression when
pragma argument is present.
(Analyze_Pragma): Argument for Always_Terminates is optional; fix
whitespace for Async_Readers.
|
|
The compiler crashes compiling a function that has pragma
CPP_constructor when its return type is a private type.
gcc/ada/
* sem_util.adb
(Is_CPP_Constructor_Call): Add missing support for calls to
functions returning a private type.
|
|
gcc/ada/
* exp_util.ads (Build_Transient_Object_Statements): Remove obsolete
references to array and record aggregates in documentation.
|
|
The compiler is waiting for the freeze node of the body, but it is never
generated since the freezing of the body is not delayed. The change also
removes an obsolete piece of code.
gcc/ada/
* sem_ch13.adb (Analyze_Aspect_Specifications): Add missing items
in the list of aspects handled by means of Insert_Pragma.
<Aspect_Linker_Section>: Remove obsolete code. Do not delay the
processing of the aspect if the entity is already frozen.
|
|
Cleanups related to analysis of iterated component association for
GNATprove.
gcc/ada/
* sem_aggr.adb
(Resolve_Array_Aggregate): Simplify comment.
(Resolve_Iterated_Component_Association): Tune comment; change variable
to constant.
|
|
The LA464 micro-architecture is sensitive to alignment of code. The
Loongson team has benchmarked various combinations of function, the
results [1] show that 16-byte label alignment together with 32-byte
function alignment gives best results in terms of SPEC score.
Add a mtune-based table-driven mechanism to set the default of
-falign-{functions,labels}. As LA464 is the first (and the only for
now) uarch supported by GCC, the same setting is also used for
the "generic" -mtune=loongarch64. In the future we may set different
settings for LA{2,3,6}64 once we add the support for them.
Bootstrapped and regtested on loongarch64-linux-gnu. Ok for trunk?
gcc/ChangeLog:
* config/loongarch/loongarch-tune.h (loongarch_align): New
struct.
* config/loongarch/loongarch-def.h (loongarch_cpu_align): New
array.
* config/loongarch/loongarch-def.c (loongarch_cpu_align): Define
the array.
* config/loongarch/loongarch.cc
(loongarch_option_override_internal): Set the value of
-falign-functions= if -falign-functions is enabled but no value
is given. Likewise for -falign-labels=.
|
|
[...]/c-c++-common/Wfree-nonheap-object-3.c:57:24: warning: 'malloc (dealloc_float)' attribute ignored with deallocation functions declared 'inline' [-Wattributes]
[...]/c-c++-common/Wfree-nonheap-object-3.c:51:1: note: deallocation function declared here
[...]/c-c++-common/Wfree-nonheap-object-3.c: In function 'void test_nowarn_int(int)':
[...]/c-c++-common/Wfree-nonheap-object-3.c:25:20: warning: 'void __builtin_free(void*)' called on pointer 'p' with nonzero offset 4 [-Wfree-nonheap-object]
[...]/c-c++-common/Wfree-nonheap-object-3.c:24:24: note: returned from 'int* alloc_int(int)'
[...]/c-c++-common/Wfree-nonheap-object-3.c: In function 'void test_nowarn_long(int)':
[...]/c-c++-common/Wfree-nonheap-object-3.c:45:18: warning: 'void dealloc_long(long int*)' called on pointer '<unknown>' with nonzero offset 8 [-Wfree-nonheap-object]
[...]/c-c++-common/Wfree-nonheap-object-3.c:44:26: note: returned from 'long int* alloc_long(int)'
In function 'void dealloc_float(float*)',
inlined from 'void test_nowarn_float(int)' at [...]/c-c++-common/Wfree-nonheap-object-3.c:68:19:
[...]/c-c++-common/Wfree-nonheap-object-3.c:53:18: warning: 'void __builtin_free(void*)' called on pointer '<unknown>' with nonzero offset 8 [-Wfree-nonheap-object]
[...]/c-c++-common/Wfree-nonheap-object-3.c: In function 'void test_nowarn_float(int)':
[...]/c-c++-common/Wfree-nonheap-object-3.c:67:28: note: returned from 'float* alloc_float(int)'
PASS: c-c++-common/Wfree-nonheap-object-3.c -std=gnu++98 (test for warnings, line 25)
FAIL: c-c++-common/Wfree-nonheap-object-3.c -std=gnu++98 (test for warnings, line 45)
PASS: c-c++-common/Wfree-nonheap-object-3.c -std=gnu++98 (test for warnings, line 51)
PASS: c-c++-common/Wfree-nonheap-object-3.c -std=gnu++98 (test for warnings, line 53)
PASS: c-c++-common/Wfree-nonheap-object-3.c -std=gnu++98 (test for warnings, line 57)
FAIL: c-c++-common/Wfree-nonheap-object-3.c -std=gnu++98 (test for excess errors)
Excess errors:
[...]/c-c++-common/Wfree-nonheap-object-3.c:45:18: warning: 'void dealloc_long(long int*)' called on pointer '<unknown>' with nonzero offset 8 [-Wfree-nonheap-object]
..., that is: decorated 'void dealloc_long(long int*)' instead of plain
'dealloc_long' -- similar to how all the other 'dg-warning's allow for the
decorated function signature in addition to the plain one.
This issue was latent since the test case was added in
commit fe7f75cf16783589eedbab597e6d0b8d35d7e470
"Correct/improve maybe_emit_free_warning (PR middle-end/98166, PR c++/57111, PR middle-end/98160)",
and was finally exposed by my recent
commit 9c03391ba447ff86038d6a34c90ae737c3915b5f
"Tighten 'dg-warning' alternatives in 'c-c++-common/Wfree-nonheap-object{,-2,-3}.c'".
gcc/testsuite/
* c-c++-common/Wfree-nonheap-object-3.c: Fix 'dg-warning' for C++.
|
|
The following patch introduces {add,sub}c5_optab and pattern recognizes
various forms of add with carry and subtract with carry/borrow, see
pr79173-{1,2,3,4,5,6}.c tests on what is matched.
Primarily forms with 2 __builtin_add_overflow or __builtin_sub_overflow
calls per limb (with just one for the least significant one), for
add with carry even when it is hand written in C (for subtraction
reassoc seems to change it too much so that the pattern recognition
doesn't work). __builtin_{add,sub}_overflow are standardized in C23
under ckd_{add,sub} names, so it isn't any longer a GNU only extension.
Note, clang has for these (IMHO badly designed)
__builtin_{add,sub}c{b,s,,l,ll} builtins which don't add/subtract just
a single bit of carry, but basically add 3 unsigned values or
subtract 2 unsigned values from one, and result in carry out of 0, 1, or 2
because of that. If we wanted to introduce those for clang compatibility,
we could and lower them early to just two __builtin_{add,sub}_overflow
calls and let the pattern matching in this patch recognize it later.
I've added expanders for this on ix86 and in addition to that
added various peephole2s (in preparation patches for this patch) to make
sure we get nice (and small) code for the common cases. I think there are
other PRs which request that e.g. for the _{addcarry,subborrow}_u{32,64}
intrinsics, which the patch also improves.
Would be nice if support for these optabs was added to many other targets,
arm/aarch64 and powerpc* certainly have such instructions, I'd expect
in fact that most targets do.
The _BitInt support I'm working on will also need this to emit reasonable
code.
2023-06-15 Jakub Jelinek <jakub@redhat.com>
PR middle-end/79173
* internal-fn.def (UADDC, USUBC): New internal functions.
* internal-fn.cc (expand_UADDC, expand_USUBC): New functions.
(commutative_ternary_fn_p): Return true also for IFN_UADDC.
* optabs.def (uaddc5_optab, usubc5_optab): New optabs.
* tree-ssa-math-opts.cc (uaddc_cast, uaddc_ne0, uaddc_is_cplxpart,
match_uaddc_usubc): New functions.
(math_opts_dom_walker::after_dom_children): Call match_uaddc_usubc
for PLUS_EXPR, MINUS_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR unless
other optimizations have been successful for those.
* gimple-fold.cc (gimple_fold_call): Handle IFN_UADDC and IFN_USUBC.
* fold-const-call.cc (fold_const_call): Likewise.
* gimple-range-fold.cc (adjust_imagpart_expr): Likewise.
* tree-ssa-dce.cc (eliminate_unnecessary_stmts): Likewise.
* doc/md.texi (uaddc<mode>5, usubc<mode>5): Document new named
patterns.
* config/i386/i386.md (uaddc<mode>5, usubc<mode>5): New
define_expand patterns.
(*setcc_qi_addqi3_cconly_overflow_1_<mode>, *setccc): Split
into NOTE_INSN_DELETED note rather than nop instruction.
(*setcc_qi_negqi_ccc_1_<mode>, *setcc_qi_negqi_ccc_2_<mode>):
Likewise.
* gcc.target/i386/pr79173-1.c: New test.
* gcc.target/i386/pr79173-2.c: New test.
* gcc.target/i386/pr79173-3.c: New test.
* gcc.target/i386/pr79173-4.c: New test.
* gcc.target/i386/pr79173-5.c: New test.
* gcc.target/i386/pr79173-6.c: New test.
* gcc.target/i386/pr79173-7.c: New test.
* gcc.target/i386/pr79173-8.c: New test.
* gcc.target/i386/pr79173-9.c: New test.
* gcc.target/i386/pr79173-10.c: New test.
|
|
destination [PR79173]
This patch adds subborrow<mode> alternative so that it can have memory
destination and adds various peephole2s which help to match it.
2023-06-15 Jakub Jelinek <jakub@redhat.com>
PR middle-end/79173
* config/i386/i386.md (subborrow<mode>): Add alternative with
memory destination and add for it define_peephole2
TARGET_READ_MODIFY_WRITE/-Os patterns to prefer using memory
destination in these patterns.
|
|
borrow with memory destination [PR79173]
This patch adds various peephole2s which help to recognize add with
carry or subtract with borrow with memory destination.
2023-06-14 Jakub Jelinek <jakub@redhat.com>
PR middle-end/79173
* config/i386/i386.md (*sub<mode>_3, @add<mode>3_carry,
addcarry<mode>, @sub<mode>3_carry, *add<mode>3_cc_overflow_1): Add
define_peephole2 TARGET_READ_MODIFY_WRITE/-Os patterns to prefer
using memory destination in these patterns.
|
|
into fold-const-call.cc
Here is an incremental patch to handle constant folding of these
in fold-const-call.cc rather than gimple-fold.cc.
Not really sure if that is the way to go because it is replacing 28
lines of former code with 65 of new code, for the overall benefit that say
int
foo (long long *p)
{
int one = 1;
long long max = __LONG_LONG_MAX__;
return __builtin_add_overflow (one, max, p);
}
can be now fully folded already in ccp1 pass while before it was only
cleaned up in forwprop1 pass right after it.
On Wed, Jun 14, 2023 at 12:25:46PM +0000, Richard Biener wrote:
> I think that's still very much desirable so this followup looks OK.
> Maybe you can re-base it as prerequesite though?
Rebased then (of course with the UADDC/USUBC handling removed from this
first patch, will be added in the second one).
2023-06-15 Jakub Jelinek <jakub@redhat.com>
* gimple-fold.cc (gimple_fold_call): Move handling of arg0
as well as arg1 INTEGER_CSTs for .UBSAN_CHECK_{ADD,SUB,MUL}
and .{ADD,SUB,MUL}_OVERFLOW calls from here...
* fold-const-call.cc (fold_const_call): ... here.
|
|
This patch adds new RTL and tests for sabd and uabd
PR tree-optimization/109156
gcc/ChangeLog:
* config/aarch64/aarch64-simd.md (aarch64_<su>abd<mode>):
Rename to <su>abd<mode>3.
* config/aarch64/aarch64-sve.md (<su>abd<mode>_3): Rename
to <su>abd<mode>3.
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/abd.h: New file.
* gcc.target/aarch64/abd_2.c: New test.
* gcc.target/aarch64/abd_3.c: New test.
* gcc.target/aarch64/abd_4.c: New test.
* gcc.target/aarch64/abd_none_2.c: New test.
* gcc.target/aarch64/abd_none_3.c: New test.
* gcc.target/aarch64/abd_none_4.c: New test.
* gcc.target/aarch64/abd_run_1.c: New test.
* gcc.target/aarch64/sve/abd_1.c: New test.
* gcc.target/aarch64/sve/abd_none_1.c: New test.
* gcc.target/aarch64/sve/abd_2.c: New test.
* gcc.target/aarch64/sve/abd_none_2.c: New test.
|
|
This adds a recognition pattern for the non-widening
absolute difference (ABD).
gcc/ChangeLog:
* doc/md.texi (sabd, uabd): Document them.
* internal-fn.def (ABD): Use new optab.
* optabs.def (sabd_optab, uabd_optab): New optabs,
* tree-vect-patterns.cc (vect_recog_absolute_difference):
Recognize the following idiom abs (a - b).
(vect_recog_sad_pattern): Refactor to use
vect_recog_absolute_difference.
(vect_recog_abd_pattern): Use patterns found by
vect_recog_absolute_difference to build a new ABD
internal call.
|
|
During the regression testing of the LoongArch architecture GCC, it was found
that the tests in the pr90883.C file failed. The problem was modulated and
found that the error was caused by setting the macro LARCH_CALL_RATIO to a too
large value. Combined with the actual LoongArch architecture, the different
thresholds for meeting the test conditions were tested using the engineering method
(SPEC CPU 2006), and the results showed that its optimal threshold should be set
to 6.
gcc/ChangeLog:
* config/loongarch/loongarch.h (LARCH_CALL_RATIO): Modify the value
of macro LARCH_CALL_RATIO on LoongArch to make it perform optimally.
|
|
This patch is to optimize the permuation case that is suiteable use
merge approach.
Consider this following case:
typedef int8_t vnx16qi __attribute__((vector_size (16)));
void __attribute__ ((noipa))
merge0 (vnx16qi x, vnx16qi y, vnx16qi *out)
{
vnx16qi v = __builtin_shufflevector ((vnx16qi) x, (vnx16qi) y, MASK_16);
*(vnx16qi*)out = v;
}
The gimple IR:
v_3 = VEC_PERM_EXPR <x_1(D), y_2(D), { 0, 17, 2, 19, 4, 21, 6, 23, 8, 9, 10, 27, 12, 29, 14, 31 }>;
Selector = { 0, 17, 2, 19, 4, 21, 6, 23, 8, 9, 10, 27, 12, 29, 14, 31 }, the common expression:
{ 0, nunits + 1, 2, nunits + 3, 4, nunits + 5, ... }
For this selector, we can use vmsltu + vmerge to optimize the codegen.
Before this patch:
merge0:
addi a5,sp,16
vl1re8.v v3,0(a5)
li a5,31
vsetivli zero,16,e8,m1,ta,mu
vmv.v.x v2,a5
lui a5,%hi(.LANCHOR0)
addi a5,a5,%lo(.LANCHOR0)
vl1re8.v v1,0(a5)
vl1re8.v v4,0(sp)
vand.vv v1,v1,v2
vmsgeu.vi v0,v1,16
vrgather.vv v2,v4,v1
vadd.vi v1,v1,-16
vrgather.vv v2,v3,v1,v0.t
vs1r.v v2,0(a0)
ret
After this patch:
merge0:
addi a5,sp,16
vl1re8.v v1,0(a5)
lui a5,%hi(.LANCHOR0)
addi a5,a5,%lo(.LANCHOR0)
vsetivli zero,16,e8,m1,ta,ma
vl1re8.v v0,0(a5)
vl1re8.v v2,0(sp)
vmsltu.vi v0,v0,16
vmerge.vvm v1,v1,v2,v0
vs1r.v v1,0(a0)
ret
The key of this optimization is that:
1. mask = vmsltu (selector, nunits)
2. result = vmerge (op0, op1, mask)
gcc/ChangeLog:
* config/riscv/riscv-v.cc (shuffle_merge_patterns): New pattern.
(expand_vec_perm_const_1): Add merge optmization.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/autovec/vls-vlmax/merge-1.c: New test.
* gcc.target/riscv/rvv/autovec/vls-vlmax/merge-2.c: New test.
* gcc.target/riscv/rvv/autovec/vls-vlmax/merge-3.c: New test.
* gcc.target/riscv/rvv/autovec/vls-vlmax/merge-4.c: New test.
* gcc.target/riscv/rvv/autovec/vls-vlmax/merge-5.c: New test.
* gcc.target/riscv/rvv/autovec/vls-vlmax/merge-6.c: New test.
* gcc.target/riscv/rvv/autovec/vls-vlmax/merge-7.c: New test.
* gcc.target/riscv/rvv/autovec/vls-vlmax/merge_run-1.c: New test.
* gcc.target/riscv/rvv/autovec/vls-vlmax/merge_run-2.c: New test.
* gcc.target/riscv/rvv/autovec/vls-vlmax/merge_run-3.c: New test.
* gcc.target/riscv/rvv/autovec/vls-vlmax/merge_run-4.c: New test.
* gcc.target/riscv/rvv/autovec/vls-vlmax/merge_run-5.c: New test.
* gcc.target/riscv/rvv/autovec/vls-vlmax/merge_run-6.c: New test.
* gcc.target/riscv/rvv/autovec/vls-vlmax/merge_run-7.c: New test.
|
|
The V2 patch address comments from Juzhe, thanks.
Hi,
The reason for this bug is that in the case where the vector register is set
to a fixed length (with `--param=riscv-autovec-preference=fixed-vlmax` option),
TARGET_PASS_BY_REFERENCE thinks that variables of type vint32m1 can be passed
through two scalar registers, but when GCC calls FUNCTION_VALUE (call function
riscv_get_arg_info inside) it returns NULL_RTX. These two functions are not
unified. The current treatment is to pass all vector arguments and returns
through the function stack, and a new calling convention for vector registers
will be added in the future.
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/
https://github.com/palmer-dabbelt/riscv-elf-psabi-doc/commit/126fa719972ff998a8a239c47d506c7809aea363
Best,
Lehua
gcc/ChangeLog:
PR target/110119
* config/riscv/riscv.cc (riscv_get_arg_info): Return NULL_RTX for vector mode
(riscv_pass_by_reference): Return true for vector mode
gcc/testsuite/ChangeLog:
PR target/110119
* gcc.target/riscv/rvv/base/pr110119-1.c: New test.
* gcc.target/riscv/rvv/base/pr110119-2.c: New test.
|
|
This patch is considered as the follow up of the below PATCH.
https://gcc.gnu.org/pipermail/gcc-patches/2023-June/621347.html
We aligned the predictor style for the define_insn_and_split suggested
by Kito. To avoid potential issues before we hit.
Signed-off-by: Pan Li <pan2.li@intel.com>
gcc/ChangeLog:
* config/riscv/autovec-opt.md: Align the predictor sytle.
* config/riscv/autovec.md: Ditto.
|
|
When constructing a vector mask from individual elements we wrongly
assumed that we can broadcast BITS_PER_WORD (i.e. XLEN). The maximum is
actually the vector element length (i.e. ELEN). This patch fixes this.
After this patch, below failures on RV32 will be fixed.
FAIL: gcc.target/riscv/rvv/autovec/partial/multiple_rgroup_run-2.c execution test
FAIL: gcc.target/riscv/rvv/autovec/partial/multiple_rgroup_run-2.c execution test
FAIL: gcc.target/riscv/rvv/autovec/partial/multiple_rgroup_run-2.c execution test
FAIL: gcc.target/riscv/rvv/autovec/partial/multiple_rgroup_run-2.c execution test
FAIL: gcc.target/riscv/rvv/autovec/vls-vlmax/repeat_run-3.c -std=c99 -O3 -ftree-vectorize --param riscv-autovec-preference=fixed-vlmax execution test
Signed-off-by: Pan Li <pan2.li@intel.com>
gcc/ChangeLog:
* config/riscv/riscv-v.cc (rvv_builder::get_merge_scalar_mask):
Take elen instead of scalar BITS_PER_WORD.
(expand_vector_init_merge_repeating_sequence): Use inner_bits_size
instead of scaler BITS_PER_WORD.
|
|
|
|
This patch removes a remnant of mudflap.
gcc/ChangeLog:
* config/moxie/uclinux.h (MFWRAP_SPEC): Remove
|
|
ChangeLog:
* MAINTAINERS: Add myself to write after approval
|
|
Pushing to fix bootstrap.
gcc/ChangeLog:
* config/aarch64/aarch64-sve-builtins-base.cc (svlast_impl::fold):
Fix signed comparison warning in loop from npats to enelts.
|
|
This patch simplifies comparison of results that have filesystem
paths. E.g., (assuming different values of <N>):
<cut>
Running /home/user/gcc-N/gcc/testsuite/gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp ...
ERROR: tcl error sourcing /home/user/gcc-N/gcc/testsuite/gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp.
</cut>
We add "--srcpath <regex>", option, and set it by default to
"[^ ]+/testsuite/", which works well for all components of the GNU
Toolchain. We then remove substrings matching <regex> from paths of
.exp files and from occasional "ERROR:" results.
contrib/ChangeLog:
* testsuite-management/validate_failures.py (TestResult,)
(ParseManifestWorker, ParseSummary, Main): Handle new option
"--srcpath <regex>".
|
|
This option sets "today" date to compare expiration entries against.
Setting expiration date into the future allows re-detection of flaky
tests and creating fresh entries for them before the current flaky
entries expire.
contrib/ChangeLog:
* testsuite-management/validate_failures.py (TestResult): Update.
(Main): Handle new option "--expiry_date YYYYMMDD".
|
|
This option is used to detect flaky tests that FAILed in the clean
build (or manifest), but PASSed in the current build (or manifest).
The option inverts output logic similar to what "-v/--invert-match"
does for grep.
contrib/ChangeLog:
* testsuite-management/validate_failures.py (ResultSet.update,)
(ResultSet.HasTestsuite): New methods.
(GetResults): Update.
(ParseSummary, CompareResults, PerformComparison, Main): Handle new
option --invert_match.
|
|
- Print message in case of broken sum file error.
- Print error messages to stderr. The script's stdout is, usually,
redirected to a file, and error messages shouldn't go there.
contrib/ChangeLog:
* testsuite-management/validate_failures.py (TestResult): Improve error
output.
|
|
This makes it easier to extract the $tool:$exp pair when iterating
over failures/flaky tests, which, in turn, simplifies re-running
testsuite parts that have unexpected failures or passes.
contrib/ChangeLog:
* testsuite-management/validate_failures.py (_EXP_LINE_FORMAT,)
(_EXP_LINE_REX, ResultSet): Support "$tool:" prefix in exp names.
|
|
... in the results. Python exits with code "1" on exceptions and
internal errors, which we use to detect failure to parse results.
contrib/ChangeLog:
* testsuite-management/validate_failures.py (Main): Use exit code "2"
to indicate regression.
|
|
Before this patch we would identify malformed line
"UNRESOLVEDTest run by tcwg-buildslave on Mon Aug 23 10:17:50 2021"
as an interesting result, only to fail in TestResult:__init__ due
to missing ":" after UNRESOLVED.
This patch makes all places that parse result lines use a single
compiled regex.
contrib/ChangeLog:
* testsuite-management/validate_failures.py (_VALID_TEST_RESULTS_REX):
Update.
(TestResult): Use _VALID_TEST_RESULTS_REX.
|
|
... to control validate_failures.py output
contrib/ChangeLog:
* testsuite-management/validate_failures.py: Add more verbosity levels.
|
|
... and don't require a valid build directory when no data from it
is necessary.
contrib/ChangeLog:
* testsuite-management/validate_failures.py: Simplify GetManifestPath().
|
|
This allows comparison of two build directories with a manifest
listing known flaky tests on the side.
contrib/ChangeLog:
* testsuite-management/validate_failures.py (GetResults): Update.
(CompareBuilds): Read in manifest.
|
|
contrib/ChangeLog:
* testsuite-management/validate_failures.py (ParseManifestWorker):
Support expiry attributes in manifests.
(ParseSummary): Add a comment.
|
|
This patch adds tracking of current testsuite "tool" and "exp"
to the processing of .sum files. This avoids aliasing between
tests from different testsuites with same name+description.
E.g., this is necessary for testsuite/c-c++-common, which is ran
for both gcc and g++ "tools".
This patch changes manifest format from ...
<cut>
FAIL: gcc_test
FAIL: g++_test
</cut>
... to ...
<cut>
=== gcc tests ===
Running gcc/foo.exp ...
FAIL: gcc_test
=== gcc Summary ==
=== g++ tests ===
Running g++/bar.exp ...
FAIL: g++_test
=== g++ Summary ==
</cut>.
The new format uses same formatting as DejaGnu's .sum files
to specify which "tool" and "exp" the test belongs to.
contrib/ChangeLog:
* testsuite-management/validate_failures.py: Avoid testsuite
aliasing.
|
|
In discussion of this issue CWG decided that the change of behavior on
well-formed code like overload-conv-4.C is undesirable. In further
discussion of possible resolutions, we discovered that we can avoid that
change while still getting the desired behavior on overload-conv-3.C by
making this a tiebreaker after comparing conversions, rather than before.
This also simplifies the implementation.
The issue resolution has not yet been finalized, but this seems like a clear
improvement.
DR 2327
PR c++/86521
gcc/cp/ChangeLog:
* call.cc (joust_maybe_elide_copy): Don't change cand.
(joust): Move the elided tiebreaker later.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/overload-conv-4.C: Remove warnings.
* g++.dg/cpp1z/elide7.C: New test.
|
|
libstdc++-v3/ChangeLog:
* doc/xml/manual/extensions.xml: Remove demangle exception
description and include.
* doc/html/manual/ext_demangling.html: Regenerate.
|
|
On 2023-06-14T11:42:22+0200, Tobias Burnus <tobias@codesourcery.com> wrote:
> On 14.06.23 10:09, Thomas Schwinge wrote:
>> Let me know if I should also adjust the new 'target { ! offload_device }'
>> diagnostic "[...] MANDATORY but only the host device is available" to
>> include a comma before 'but', for consistency with the other existing
>> diagnostics (cited above)?
>
> I think it makes sense to be consistent. Thus: Yes, please add the commas.
Fix-up for recent commit 18c8b56c7d67a9e37acf28822587786f0fc0efbc
"OpenMP: Set default-device-var with OMP_TARGET_OFFLOAD=mandatory".
libgomp/
* target.c (resolve_device): Align a
'OMP_TARGET_OFFLOAD=mandatory' diagnostic with others.
* testsuite/libgomp.c/target-51.c: Adjust.
|
|
..., so that users don't manually need to specify
'-foffload-options=-lgfortran', '-foffload-options=-lm' in addition to
'-lgfortran', '-lm' (specified manually, or implicitly by the driver).
gcc/
* gcc.cc (driver_handle_option): Forward host '-lgfortran', '-lm'
to offloading compilation.
* config/gcn/mkoffload.cc (main): Adjust.
* config/nvptx/mkoffload.cc (main): Likewise.
* doc/invoke.texi (foffload-options): Update example.
libgomp/
* testsuite/libgomp.fortran/fortran.exp (lang_link_flags): Don't
set.
* testsuite/libgomp.oacc-fortran/fortran.exp (lang_link_flags):
Likewise.
* testsuite/libgomp.c/simd-math-1.c: Remove
'-foffload-options=-lm'.
* testsuite/libgomp.fortran/fortran-torture_execute_math.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/fortran-torture_execute_math.f90:
Likewise.
|
|
..., via 'include'ing the existing 'gfortran.fortran-torture/execute/math.f90',
which therefore is enhanced for optional OpenACC 'serial', OpenMP 'target'
usage.
gcc/testsuite/
* gfortran.fortran-torture/execute/math.f90: Enhance for optional
OpenACC 'serial', OpenMP 'target' usage.
libgomp/
* testsuite/libgomp.fortran/fortran-torture_execute_math.f90: New.
* testsuite/libgomp.oacc-fortran/fortran-torture_execute_math.f90:
Likewise.
|
|
'c-c++-common/Wfree-nonheap-object{,-2,-3}.c'
..., added in commit fe7f75cf16783589eedbab597e6d0b8d35d7e470
"Correct/improve maybe_emit_free_warning (PR middle-end/98166, PR c++/57111, PR middle-end/98160)".
These use alternatives like, for example, "AB|CDE|FG", but what really must've
been meant is "A(B|C)D(E|F)G". The former variant also does "work": it matches
any of "AB", or "CDE", or "FG", which are components of the latter variant.
(That means, the former variant matches too loosely.)
gcc/testsuite/
* c-c++-common/Wfree-nonheap-object-2.c: Tighten 'dg-warning'
alternatives.
* c-c++-common/Wfree-nonheap-object-3.c: Likewise.
* c-c++-common/Wfree-nonheap-object.c: Likewise.
|