public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/102326] New: ICE in tree_to_uhwi, at tree.c:4520
@ 2021-09-14 12:53 pc.wang at linux dot alibaba.com
2021-09-17 8:08 ` [Bug target/102326] " pc.wang at linux dot alibaba.com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: pc.wang at linux dot alibaba.com @ 2021-09-14 12:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102326
Bug ID: 102326
Summary: ICE in tree_to_uhwi, at tree.c:4520
Product: gcc
Version: 10.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: pc.wang at linux dot alibaba.com
Target Milestone: ---
Created attachment 51459
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51459&action=edit
A patch that may fix this bug
If there exists static local variable of variable-length vector type(like types
in AARCH64 SVE and RISCV Vector Extension) in C++ template, like:
```
#include <arm_sve.h>
template <int N>
void f()
{
int i = 0;
static svbool_t pg = svwhilelt_b64(0, N);
}
int main(int argc, char **argv)
{
f<2>();
return 0;
}
```
GCC raises an ICE like:
```
static-var-in-template.cpp:14:1: internal compiler error: in tree_to_uhwi, at
tree.h:4520
14 | }
| ^
```
And here is the version of GCC:
```
Using built-in specs.
COLLECT_GCC=aarch64-none-linux-gnu-g++
COLLECT_LTO_WRAPPER=/lhome/wangpc/software/arm/bin/../libexec/gcc/aarch64-none-linux-gnu/10.2.1/lto-wrapper
Target: aarch64-none-linux-gnu
Configured with:
/tmp/dgboter/bbs/build04--cen7x86_64/buildbot/cen7x86_64--aarch64-none-linux-gnu/build/src/gcc/configure
--target=aarch64-none-linux-gnu --prefix=
--with-sysroot=/aarch64-none-linux-gnu/libc
--with-build-sysroot=/tmp/dgboter/bbs/build04--cen7x86_64/buildbot/cen7x86_64--aarch64-none-linux-gnu/build/build-aarch64-none-linux-gnu/install//aarch64-none-linux-gnu/libc
--with-bugurl=https://bugs.linaro.org/ --enable-gnu-indirect-function
--enable-shared --disable-libssp --disable-libmudflap --enable-checking=release
--enable-languages=c,c++,fortran
--with-gmp=/tmp/dgboter/bbs/build04--cen7x86_64/buildbot/cen7x86_64--aarch64-none-linux-gnu/build/build-aarch64-none-linux-gnu/host-tools
--with-mpfr=/tmp/dgboter/bbs/build04--cen7x86_64/buildbot/cen7x86_64--aarch64-none-linux-gnu/build/build-aarch64-none-linux-gnu/host-tools
--with-mpc=/tmp/dgboter/bbs/build04--cen7x86_64/buildbot/cen7x86_64--aarch64-none-linux-gnu/build/build-aarch64-none-linux-gnu/host-tools
--with-isl=/tmp/dgboter/bbs/build04--cen7x86_64/buildbot/cen7x86_64--aarch64-none-linux-gnu/build/build-aarch64-none-linux-gnu/host-tools
--enable-fix-cortex-a53-843419 --with-pkgversion='GNU Toolchain for the
A-profile Architecture 10.2-2020.11 (arm-10.16)'
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.2.1 20201103 (GNU Toolchain for the A-profile Architecture
10.2-2020.11 (arm-10.16))
```
The lack of type checking (defined by hook `TARGET_VERIFY_TYPE_CONTEXT`) after
instantiation is the reason, since SVE/RVV types can't be static.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/102326] ICE in tree_to_uhwi, at tree.c:4520
2021-09-14 12:53 [Bug c++/102326] New: ICE in tree_to_uhwi, at tree.c:4520 pc.wang at linux dot alibaba.com
@ 2021-09-17 8:08 ` pc.wang at linux dot alibaba.com
2021-09-18 5:57 ` pc.wang at linux dot alibaba.com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pc.wang at linux dot alibaba.com @ 2021-09-17 8:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102326
Pengcheng Wang <pc.wang at linux dot alibaba.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #51459|0 |1
is obsolete| |
--- Comment #1 from Pengcheng Wang <pc.wang at linux dot alibaba.com> ---
Created attachment 51473
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51473&action=edit
V2 patch
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/102326] ICE in tree_to_uhwi, at tree.c:4520
2021-09-14 12:53 [Bug c++/102326] New: ICE in tree_to_uhwi, at tree.c:4520 pc.wang at linux dot alibaba.com
2021-09-17 8:08 ` [Bug target/102326] " pc.wang at linux dot alibaba.com
@ 2021-09-18 5:57 ` pc.wang at linux dot alibaba.com
2021-09-22 4:24 ` pc.wang at linux dot alibaba.com
2021-09-22 5:38 ` [Bug c++/102326] " pinskia at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: pc.wang at linux dot alibaba.com @ 2021-09-18 5:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102326
Pengcheng Wang <pc.wang at linux dot alibaba.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #51473|0 |1
is obsolete| |
--- Comment #2 from Pengcheng Wang <pc.wang at linux dot alibaba.com> ---
Created attachment 51476
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51476&action=edit
V2 patch after reviewing
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/102326] ICE in tree_to_uhwi, at tree.c:4520
2021-09-14 12:53 [Bug c++/102326] New: ICE in tree_to_uhwi, at tree.c:4520 pc.wang at linux dot alibaba.com
2021-09-17 8:08 ` [Bug target/102326] " pc.wang at linux dot alibaba.com
2021-09-18 5:57 ` pc.wang at linux dot alibaba.com
@ 2021-09-22 4:24 ` pc.wang at linux dot alibaba.com
2021-09-22 5:38 ` [Bug c++/102326] " pinskia at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: pc.wang at linux dot alibaba.com @ 2021-09-22 4:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102326
Pengcheng Wang <pc.wang at linux dot alibaba.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Pengcheng Wang <pc.wang at linux dot alibaba.com> ---
Patch has been applied.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/102326] ICE in tree_to_uhwi, at tree.c:4520
2021-09-14 12:53 [Bug c++/102326] New: ICE in tree_to_uhwi, at tree.c:4520 pc.wang at linux dot alibaba.com
` (2 preceding siblings ...)
2021-09-22 4:24 ` pc.wang at linux dot alibaba.com
@ 2021-09-22 5:38 ` pinskia at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-22 5:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102326
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.0
Component|target |c++
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-09-22 5:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-14 12:53 [Bug c++/102326] New: ICE in tree_to_uhwi, at tree.c:4520 pc.wang at linux dot alibaba.com
2021-09-17 8:08 ` [Bug target/102326] " pc.wang at linux dot alibaba.com
2021-09-18 5:57 ` pc.wang at linux dot alibaba.com
2021-09-22 4:24 ` pc.wang at linux dot alibaba.com
2021-09-22 5:38 ` [Bug c++/102326] " pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).