Successfully identified regression in *gcc* in CI configuration tcwg_bmk_gnu_eabi_stm32/gnu_eabi-master-arm_eabi-coremark-Os. So far, this commit has regressed CI configurations:
- tcwg_bmk_gnu_eabi_stm32/gnu_eabi-master-arm_eabi-coremark-Os
Culprit:
<cut>
commit 784de5292c34e287c848b382b431599b818ea76e
Author: Jakub Jelinek <jakub(a)redhat.com>
Date: Fri Apr 16 09:34:26 2021 +0200
c++: Fix up C++23 [] <...> requires primary -> type {} parsing [PR99850]
The requires clause parsing has code to suggest users wrapping
non-primary expressions in (), so if it e.g. parses a primary expression
and sees it is followed by ++, --, ., ( or -> among other things it
will try to reparse it as assignment expression or what and if that works
suggests wrapping it inside of parens.
When it is requires-clause that is after <typename T> etc. it already
has an exception from that as ( can occur in valid C++20 expression there
- starting the parameters of the lambda.
In C++23 another case can occur, as the parameters with the ()s can be
omitted, requires C can be followed immediately by -> which starts a
trailing return type. Even in that case, we don't want to parse that
as C->...
2021-04-16 Jakub Jelinek <jakub(a)redhat.com>
PR c++/99850
* parser.c (cp_parser_constraint_requires_parens) <case CPP_DEREF>:
If lambda_p, return pce_ok instead of pce_maybe_postfix.
* g++.dg/cpp23/lambda-specifiers2.C: New test.
</cut>
Results regressed to (for first_bad == 784de5292c34e287c848b382b431599b818ea76e)
# reset_artifacts:
-10
# build_abe binutils:
-9
# build_abe stage1 -- --set gcc_override_configure=--disable-libsanitizer --set gcc_override_configure=--disable-multilib --set gcc_override_configure=--with-cpu=cortex-m4 --set gcc_override_configure=--with-mode=thumb --set gcc_override_configure=--with-float=hard:
-8
# build_abe newlib:
-6
# build_abe stage2 -- --set gcc_override_configure=--disable-libsanitizer --set gcc_override_configure=--disable-multilib --set gcc_override_configure=--with-cpu=cortex-m4 --set gcc_override_configure=--with-mode=thumb --set gcc_override_configure=--with-float=hard:
-5
# true:
0
# benchmark -Os_mthumb -- artifacts/build-784de5292c34e287c848b382b431599b818ea76e/results_id:
1
from (for last_good == 20eb7a1891cfd7fa85295a236cebe0322d041edd)
# reset_artifacts:
-10
# build_abe binutils:
-9
# build_abe stage1 -- --set gcc_override_configure=--disable-libsanitizer --set gcc_override_configure=--disable-multilib --set gcc_override_configure=--with-cpu=cortex-m4 --set gcc_override_configure=--with-mode=thumb --set gcc_override_configure=--with-float=hard:
-8
# build_abe newlib:
-6
# build_abe stage2 -- --set gcc_override_configure=--disable-libsanitizer --set gcc_override_configure=--disable-multilib --set gcc_override_configure=--with-cpu=cortex-m4 --set gcc_override_configure=--with-mode=thumb --set gcc_override_configure=--with-float=hard:
-5
# true:
0
# benchmark -Os_mthumb -- artifacts/build-baseline/results_id:
1
Artifacts of last_good build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_ea…
Results ID of last_good: stm32_STM32L476RGTx/tcwg_bmk_gnu_eabi_stm32/baseline-gnu_eabi-master-arm_eabi-coremark-Os/2215
Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_ea…
Results ID of first_bad: stm32_STM32L476RGTx/tcwg_bmk_gnu_eabi_stm32/bisect-gnu_eabi-master-arm_eabi-coremark-Os/2252
Build top page/logs: https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_ea…
Configuration details:
Reproduce builds:
<cut>
mkdir investigate-gcc-784de5292c34e287c848b382b431599b818ea76e
cd investigate-gcc-784de5292c34e287c848b382b431599b818ea76e
git clone https://git.linaro.org/toolchain/jenkins-scripts
mkdir -p artifacts/manifests
curl -o artifacts/manifests/build-baseline.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_ea… --fail
curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_ea… --fail
curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_ea… --fail
chmod +x artifacts/test.sh
# Reproduce the baseline build (build all pre-requisites)
./jenkins-scripts/tcwg_bmk-build.sh @@ artifacts/manifests/build-baseline.sh
# Save baseline build state (which is then restored in artifacts/test.sh)
mkdir -p ./bisect
rsync -a --del --delete-excluded --exclude /bisect/ --exclude /artifacts/ --exclude /gcc/ ./ ./bisect/baseline/
cd gcc
# Reproduce first_bad build
git checkout --detach 784de5292c34e287c848b382b431599b818ea76e
../artifacts/test.sh
# Reproduce last_good build
git checkout --detach 20eb7a1891cfd7fa85295a236cebe0322d041edd
../artifacts/test.sh
cd ..
</cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/…
Artifacts: https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_ea…
Build log: https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_ea…
Full commit (up to 1000 lines):
<cut>
commit 784de5292c34e287c848b382b431599b818ea76e
Author: Jakub Jelinek <jakub(a)redhat.com>
Date: Fri Apr 16 09:34:26 2021 +0200
c++: Fix up C++23 [] <...> requires primary -> type {} parsing [PR99850]
The requires clause parsing has code to suggest users wrapping
non-primary expressions in (), so if it e.g. parses a primary expression
and sees it is followed by ++, --, ., ( or -> among other things it
will try to reparse it as assignment expression or what and if that works
suggests wrapping it inside of parens.
When it is requires-clause that is after <typename T> etc. it already
has an exception from that as ( can occur in valid C++20 expression there
- starting the parameters of the lambda.
In C++23 another case can occur, as the parameters with the ()s can be
omitted, requires C can be followed immediately by -> which starts a
trailing return type. Even in that case, we don't want to parse that
as C->...
2021-04-16 Jakub Jelinek <jakub(a)redhat.com>
PR c++/99850
* parser.c (cp_parser_constraint_requires_parens) <case CPP_DEREF>:
If lambda_p, return pce_ok instead of pce_maybe_postfix.
* g++.dg/cpp23/lambda-specifiers2.C: New test.
---
gcc/cp/parser.c | 13 +++++++++++++
gcc/testsuite/g++.dg/cpp23/lambda-specifiers2.C | 7 +++++++
2 files changed, 20 insertions(+)
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 940751b5f05..dfc9b8251a7 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -28530,7 +28530,20 @@ cp_parser_constraint_requires_parens (cp_parser *parser, bool lambda_p)
case CPP_PLUS_PLUS:
case CPP_MINUS_MINUS:
case CPP_DOT:
+ /* Unenclosed postfix operator. */
+ return pce_maybe_postfix;
+
case CPP_DEREF:
+ /* A primary constraint that precedes the lambda-declarator of a
+ lambda expression is followed by trailing return type.
+
+ []<typename T> requires C -> void {}
+
+ Don't try to re-parse this as a postfix expression in
+ C++23 and later. In C++20 ( needs to come in between but we
+ allow it to be omitted with pedwarn. */
+ if (lambda_p)
+ return pce_ok;
/* Unenclosed postfix operator. */
return pce_maybe_postfix;
}
diff --git a/gcc/testsuite/g++.dg/cpp23/lambda-specifiers2.C b/gcc/testsuite/g++.dg/cpp23/lambda-specifiers2.C
new file mode 100644
index 00000000000..0cc69bebc64
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp23/lambda-specifiers2.C
@@ -0,0 +1,7 @@
+// PR c++/99850
+// P1102R2 - Down with ()!
+// { dg-do compile { target c++23 } }
+
+auto l = []<auto> requires true -> void {};
+template <typename...> concept C = true;
+auto m = []<typename... Ts> requires (C<Ts> && ...) -> void {};
</cut>
Successfully identified regression in *gcc* in CI configuration tcwg_bmk_gnu_tx1/gnu-master-aarch64-spec2k6-O2. So far, this commit has regressed CI configurations:
- tcwg_bmk_gnu_tx1/gnu-master-aarch64-spec2k6-O2
Culprit:
<cut>
commit d999d9b7e53b9a9cd2004a19e84c637e5e5013f5
Author: Patrick Palka <ppalka(a)redhat.com>
Date: Thu Jun 3 09:39:13 2021 -0400
c++: cv-qualified dependent name of alias tmpl [PR100592]
Here, the dependent template name in the return type of f() resolves to
an alias of int& after substitution, and we end up complaining about
qualifying this reference type with 'const' from cp_build_qualified_type
rather than just silently dropping the qualification as per [dcl.ref]/1.
The problem is ultimately that make_typename_type ignores the
tf_keep_type_decl flag when the dependent name is a template-id. This
in turn causes the TYPE_DECL check within tsubst <case TYPENAME_TYPE>
to fail, and so we end up not passing tf_ignore_bad_quals to
cp_build_qualified_type. This patch fixes this by making
make_typename_type respect the tf_keep_type_decl flag in this situation.
PR c++/100592
gcc/cp/ChangeLog:
* decl.c (make_typename_type): After calling
lookup_template_class, adjust the result to its TYPE_NAME and
then consider the tf_keep_type_decl flag.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/alias-decl-71.C: New test.
</cut>
Results regressed to (for first_bad == d999d9b7e53b9a9cd2004a19e84c637e5e5013f5)
# reset_artifacts:
-10
# build_abe binutils:
-9
# build_abe stage1 -- --set gcc_override_configure=--disable-libsanitizer:
-8
# build_abe linux:
-7
# build_abe glibc:
-6
# build_abe stage2 -- --set gcc_override_configure=--disable-libsanitizer:
-5
# true:
0
# benchmark -O2 -- artifacts/build-d999d9b7e53b9a9cd2004a19e84c637e5e5013f5/results_id:
1
# 447.dealII,dealII_base.default regressed by 103
# 447.dealII,[.] _ZNK8MappingQILi3EE19transform_covariantEP6Ten regressed by 117
from (for last_good == 69f517ac20566a645ff41a9bfca535822205a538)
# reset_artifacts:
-10
# build_abe binutils:
-9
# build_abe stage1 -- --set gcc_override_configure=--disable-libsanitizer:
-8
# build_abe linux:
-7
# build_abe glibc:
-6
# build_abe stage2 -- --set gcc_override_configure=--disable-libsanitizer:
-5
# true:
0
# benchmark -O2 -- artifacts/build-69f517ac20566a645ff41a9bfca535822205a538/results_id:
1
Artifacts of last_good build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa…
Results ID of last_good: tx1_64/tcwg_bmk_gnu_tx1/bisect-gnu-master-aarch64-spec2k6-O2/2208
Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa…
Results ID of first_bad: tx1_64/tcwg_bmk_gnu_tx1/bisect-gnu-master-aarch64-spec2k6-O2/2248
Build top page/logs: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa…
Configuration details:
Reproduce builds:
<cut>
mkdir investigate-gcc-d999d9b7e53b9a9cd2004a19e84c637e5e5013f5
cd investigate-gcc-d999d9b7e53b9a9cd2004a19e84c637e5e5013f5
git clone https://git.linaro.org/toolchain/jenkins-scripts
mkdir -p artifacts/manifests
curl -o artifacts/manifests/build-baseline.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa… --fail
curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa… --fail
curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa… --fail
chmod +x artifacts/test.sh
# Reproduce the baseline build (build all pre-requisites)
./jenkins-scripts/tcwg_bmk-build.sh @@ artifacts/manifests/build-baseline.sh
# Save baseline build state (which is then restored in artifacts/test.sh)
mkdir -p ./bisect
rsync -a --del --delete-excluded --exclude /bisect/ --exclude /artifacts/ --exclude /gcc/ ./ ./bisect/baseline/
cd gcc
# Reproduce first_bad build
git checkout --detach d999d9b7e53b9a9cd2004a19e84c637e5e5013f5
../artifacts/test.sh
# Reproduce last_good build
git checkout --detach 69f517ac20566a645ff41a9bfca535822205a538
../artifacts/test.sh
cd ..
</cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/…
Artifacts: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa…
Build log: https://ci.linaro.org/job/tcwg_bmk_ci_gnu-bisect-tcwg_bmk_tx1-gnu-master-aa…
Full commit (up to 1000 lines):
<cut>
commit d999d9b7e53b9a9cd2004a19e84c637e5e5013f5
Author: Patrick Palka <ppalka(a)redhat.com>
Date: Thu Jun 3 09:39:13 2021 -0400
c++: cv-qualified dependent name of alias tmpl [PR100592]
Here, the dependent template name in the return type of f() resolves to
an alias of int& after substitution, and we end up complaining about
qualifying this reference type with 'const' from cp_build_qualified_type
rather than just silently dropping the qualification as per [dcl.ref]/1.
The problem is ultimately that make_typename_type ignores the
tf_keep_type_decl flag when the dependent name is a template-id. This
in turn causes the TYPE_DECL check within tsubst <case TYPENAME_TYPE>
to fail, and so we end up not passing tf_ignore_bad_quals to
cp_build_qualified_type. This patch fixes this by making
make_typename_type respect the tf_keep_type_decl flag in this situation.
PR c++/100592
gcc/cp/ChangeLog:
* decl.c (make_typename_type): After calling
lookup_template_class, adjust the result to its TYPE_NAME and
then consider the tf_keep_type_decl flag.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/alias-decl-71.C: New test.
---
gcc/cp/decl.c | 13 +++++++++----
gcc/testsuite/g++.dg/cpp0x/alias-decl-71.C | 13 +++++++++++++
2 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index fb21a3a1ae8..a3687dbb0dd 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -4136,10 +4136,15 @@ make_typename_type (tree context, tree name, enum tag_types tag_type,
return error_mark_node;
if (want_template)
- return lookup_template_class (t, TREE_OPERAND (fullname, 1),
- NULL_TREE, context,
- /*entering_scope=*/0,
- complain | tf_user);
+ {
+ t = lookup_template_class (t, TREE_OPERAND (fullname, 1),
+ NULL_TREE, context,
+ /*entering_scope=*/0,
+ complain | tf_user);
+ if (t == error_mark_node)
+ return error_mark_node;
+ t = TYPE_NAME (t);
+ }
if (DECL_ARTIFICIAL (t) || !(complain & tf_keep_type_decl))
t = TREE_TYPE (t);
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-71.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-71.C
new file mode 100644
index 00000000000..6a61f93a0b0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-71.C
@@ -0,0 +1,13 @@
+// PR c++/100592
+// { dg-do compile { target c++11 } }
+
+template<bool>
+struct meta {
+ template<class> using if_c = int&;
+};
+
+template<bool B>
+typename meta<B>::template if_c<void> const f();
+
+using type = decltype(f<true>());
+using type = int&;
</cut>
== This Week ==
* PR66791 (replace builtins with vector extensions in arm_neon.h intrinsics)
- vshl_n: Submitted patch for review and addressing comments by Richard.
- vmul_n fp: Investigated regression on arm-none-eabi and followed up
with Christophe.
- vmul_n int: Waiting for feedback.
- vld1: Created patch.
* Misc
- Fixed breakage in vect metric CI job due to type annotations.
* Off on thursday
- Public holiday
== Next Week ==
- Continue with PR66791
VirtIO Initiative ([STR-9])
===========================
VirtIO RPMB ([STR-5])
- posted [PATCH] virtio-rpmb: fix the description for multi-block
reads Message-Id: <20210722110903.8769-1-alex.bennee(a)linaro.org>
- Ruchika realised the spec didn't allow for multi-block reads
- she also suggested some [fixes for the C daemon]
- finally spent about 1/2 day on my [hacking branch] but making better
progress now trained ;-)
- create some sub-cards to track what we are doing
[STR-5] <https://projects.linaro.org/browse/STR-5>
[fixes for the C daemon]
<https://github.com/ruchi393/qemu/tree/vhost-user-rpmb-fixes>
[hacking branch] <https://github.com/stsquad/virtio-rpmb/tree/hacking>
QEMU Upstream Work ([UM-2])
===========================
- spent some time pulling together various maintainer trees for final
6.1 PRs
- hopefully [this is the last iteration before Monday]
- posted [PATCH for 6.1 v2 0/5] custom device configs Message-Id:
<20210707131744.26027-1-alex.bennee(a)linaro.org>
- chips away at the mega ARM re-factor patch set
- posted [PATCH v1 0/2] some device emulation documentation cleanup
Message-Id: <20210707184549.24436-1-alex.bennee(a)linaro.org>
- posted [PULL for 6.1 00/40] testing and plugin updates Message-Id:
<20210712122653.11354-1-alex.bennee(a)linaro.org>
- posted [PATCH for 6.1 v3 0/3] tricore fixes Message-Id:
<20210720114057.32053-1-alex.bennee(a)linaro.org>
- various iterations of review of rth's breakpoints
- posted [PULL for 6.1-rc1 00/28] doc, metadata, plugin and testing
updates Message-Id: <20210723170354.18975-1-alex.bennee(a)linaro.org>
[UM-2] <https://projects.linaro.org/browse/UM-2>
[this is the last iteration before Monday]
<https://patchew.org/QEMU/20210709143005.1554-1-alex.bennee@linaro.org/>
Enable plugins by default on TCG builds
- [X] clean-up testing matrix
Write a generic overview of vhost user usage for the manual
Other
=====
- preparing for [LOD discussion]
- some hackbox disk space admin
[LOD discussion]
<https://linaro.atlassian.net/wiki/spaces/LOD/pages/28544303418/2021-07-23+M…>
Completed Reviews [7/7]
=======================
[PATCH v6 0/4] GitLab Custom Runners and Jobs (was: QEMU Gating CI)
Message-Id: <20210608031425.833536-1-crosa(a)redhat.com>
[PATCH v4 00/22] tests/docker: start using libvirt-ci's "lcitool" for dockerfiles
Message-Id: <20210623142245.307776-1-berrange(a)redhat.com>
[PATCH v4 0/5] plugins: New TCG plugin for cache modelling
Message-Id: <20210623125458.450462-1-ma.mandourr(a)gmail.com>
[PATCH v3 0/2] execlog TCG plugin to log instructions
Message-Id: <20210702081307.1653644-1-erdnaxe(a)crans.org>
[PATCH 0/3] ci: use cirrus-run to utilize Cirrus CI from GitLab CI
Message-Id: <20210625172211.451010-1-berrange(a)redhat.com>
[PATCH v3 0/4] virtio: Add vhost-user based RNG
Message-Id: <20210710005929.1702431-1-mathieu.poirier(a)linaro.org>
[PATCH for-6.1 v6 00/17] tcg: breakpoint reorg
Message-Id: <20210720195439.626594-1-richard.henderson(a)linaro.org>
Absences
========
- several days of internet outages made things tricky
- July 26th-29th holiday
- On holiday for large chunks of August
Current Review Queue
====================
Needs reorganising ;-)
--
Alex Bennée
Progress:
* UM-2 [QEMU upstream maintainership]
+ Noticed we didn't enforce the M-profile "low 2 bits of SP are always 0"
rule, and wrote a patch to fix that
+ Found and fixed a handful of other corner-case M-profile bugs
+ Some minor docs improvements
* QEMU-406 [QEMU support for MVE (M-profile Vector Extension; Helium)]
+ Implemented the last 4 instruction patterns (VCVT, VRINT), bringing
us to Progress: 210/210 (100%)
+ Found and fixed a few bugs in already-implemented instructions
+ Started looking at how to make the MVE loads/stores correctly
raise alignment faults for unaligned addresses (this runs into
problems because QEMU doesn't currently have a good API for doing
the load/store the way we want to do it and also handling alignment
faults)
+ Remaining TODO list for this task:
- alignment fault behaviour, if not too difficult
- report MVE registers via the gdbstub (pending on the XML format being
fixed by gdb upstream)
- send out patches for code review
-- PMM
Successfully identified regression in *gcc* in CI configuration tcwg_bmk_llvm_tk1/llvm-master-arm-spec2k6-O3_LTO. So far, this commit has regressed CI configurations:
- tcwg_bmk_llvm_tk1/llvm-master-arm-spec2k6-O3_LTO
Culprit:
<cut>
commit c77230856eac2d28eb7bf10985846885c3c8727b
Author: Iain Buclaw <ibuclaw(a)gdcproject.org>
Date: Sat Jul 3 00:13:29 2021 +0200
d: RHS value lost when a target_expr modifies LHS in a cond_expr
To prevent the RHS of an assignment modifying the LHS before the
assignment proper, a target_expr is forced so that function calls that
return with slot optimization modify the temporary instead. This did
not work for conditional expressions however, to give one example. So
now the RHS is always forced to a temporary.
PR d/101282
gcc/d/ChangeLog:
* d-codegen.cc (build_assign): Force target_expr on RHS for non-POD
assignment expressions.
gcc/testsuite/ChangeLog:
* gdc.dg/torture/pr101282.d: New test.
</cut>
Results regressed to (for first_bad == c77230856eac2d28eb7bf10985846885c3c8727b)
# reset_artifacts:
-10
# build_abe binutils:
-9
# build_abe stage1 -- --set gcc_override_configure=--with-mode=arm --set gcc_override_configure=--disable-libsanitizer:
-8
# build_abe linux:
-7
# build_abe glibc:
-6
# build_abe stage2 -- --set gcc_override_configure=--with-mode=arm --set gcc_override_configure=--disable-libsanitizer:
-5
# build_llvm true:
-3
# true:
0
# benchmark -O3_LTO_marm -- artifacts/build-c77230856eac2d28eb7bf10985846885c3c8727b/results_id:
1
# 447.dealII,dealII_base.default regressed by 103
from (for last_good == 6feb628a706e86eb3f303aff388c74bdb29e7381)
# reset_artifacts:
-10
# build_abe binutils:
-9
# build_abe stage1 -- --set gcc_override_configure=--with-mode=arm --set gcc_override_configure=--disable-libsanitizer:
-8
# build_abe linux:
-7
# build_abe glibc:
-6
# build_abe stage2 -- --set gcc_override_configure=--with-mode=arm --set gcc_override_configure=--disable-libsanitizer:
-5
# build_llvm true:
-3
# true:
0
# benchmark -O3_LTO_marm -- artifacts/build-6feb628a706e86eb3f303aff388c74bdb29e7381/results_id:
1
Artifacts of last_good build: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-llvm-master-…
Results ID of last_good: tk1_32/tcwg_bmk_llvm_tk1/bisect-llvm-master-arm-spec2k6-O3_LTO/1951
Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-llvm-master-…
Results ID of first_bad: tk1_32/tcwg_bmk_llvm_tk1/bisect-llvm-master-arm-spec2k6-O3_LTO/1938
Build top page/logs: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-llvm-master-…
Configuration details:
Reproduce builds:
<cut>
mkdir investigate-gcc-c77230856eac2d28eb7bf10985846885c3c8727b
cd investigate-gcc-c77230856eac2d28eb7bf10985846885c3c8727b
git clone https://git.linaro.org/toolchain/jenkins-scripts
mkdir -p artifacts/manifests
curl -o artifacts/manifests/build-baseline.sh https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-llvm-master-… --fail
curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-llvm-master-… --fail
curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-llvm-master-… --fail
chmod +x artifacts/test.sh
# Reproduce the baseline build (build all pre-requisites)
./jenkins-scripts/tcwg_bmk-build.sh @@ artifacts/manifests/build-baseline.sh
# Save baseline build state (which is then restored in artifacts/test.sh)
rsync -a --del --delete-excluded --exclude bisect/ --exclude artifacts/ --exclude gcc/ ./ ./bisect/baseline/
cd gcc
# Reproduce first_bad build
git checkout --detach c77230856eac2d28eb7bf10985846885c3c8727b
../artifacts/test.sh
# Reproduce last_good build
git checkout --detach 6feb628a706e86eb3f303aff388c74bdb29e7381
../artifacts/test.sh
cd ..
</cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/…
Artifacts: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-llvm-master-…
Build log: https://ci.linaro.org/job/tcwg_bmk_ci_llvm-bisect-tcwg_bmk_tk1-llvm-master-…
Full commit (up to 1000 lines):
<cut>
commit c77230856eac2d28eb7bf10985846885c3c8727b
Author: Iain Buclaw <ibuclaw(a)gdcproject.org>
Date: Sat Jul 3 00:13:29 2021 +0200
d: RHS value lost when a target_expr modifies LHS in a cond_expr
To prevent the RHS of an assignment modifying the LHS before the
assignment proper, a target_expr is forced so that function calls that
return with slot optimization modify the temporary instead. This did
not work for conditional expressions however, to give one example. So
now the RHS is always forced to a temporary.
PR d/101282
gcc/d/ChangeLog:
* d-codegen.cc (build_assign): Force target_expr on RHS for non-POD
assignment expressions.
gcc/testsuite/ChangeLog:
* gdc.dg/torture/pr101282.d: New test.
---
gcc/d/d-codegen.cc | 7 +++++++
gcc/testsuite/gdc.dg/torture/pr101282.d | 23 +++++++++++++++++++++++
2 files changed, 30 insertions(+)
diff --git a/gcc/d/d-codegen.cc b/gcc/d/d-codegen.cc
index 9a9447371aa..ce7c17baaaf 100644
--- a/gcc/d/d-codegen.cc
+++ b/gcc/d/d-codegen.cc
@@ -1344,6 +1344,13 @@ build_assign (tree_code code, tree lhs, tree rhs)
d_mark_addressable (lhs);
CALL_EXPR_RETURN_SLOT_OPT (rhs) = true;
}
+ /* If modifying an LHS whose type is marked TREE_ADDRESSABLE. */
+ else if (code == MODIFY_EXPR && TREE_ADDRESSABLE (TREE_TYPE (lhs))
+ && TREE_SIDE_EFFECTS (rhs) && TREE_CODE (rhs) != TARGET_EXPR)
+ {
+ /* LHS may be referenced by the RHS expression, so force a temporary. */
+ rhs = force_target_expr (rhs);
+ }
/* The LHS assignment replaces the temporary in TARGET_EXPR_SLOT. */
if (TREE_CODE (rhs) == TARGET_EXPR)
diff --git a/gcc/testsuite/gdc.dg/torture/pr101282.d b/gcc/testsuite/gdc.dg/torture/pr101282.d
new file mode 100644
index 00000000000..b75d5fc678f
--- /dev/null
+++ b/gcc/testsuite/gdc.dg/torture/pr101282.d
@@ -0,0 +1,23 @@
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101282
+// { dg-do run }
+
+void main()
+{
+ struct S101282
+ {
+ int impl;
+ S101282 opUnary(string op : "-")()
+ {
+ return S101282(-impl);
+ }
+ int opCmp(int i)
+ {
+ return (impl < i) ? -1 : (impl > i) ? 1 : 0;
+ }
+ }
+ auto a = S101282(120);
+ a = -a;
+ assert(a.impl == -120);
+ a = a >= 0 ? a : -a;
+ assert(a.impl == 120);
+}
</cut>