public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gcc-bugs at marehr dot dialup.fu-berlin.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/96591] New: ICE with -flto=auto and -O1: tree code ‘typename_type’ is not supported in LTO streams
Date: Wed, 12 Aug 2020 15:58:52 +0000 [thread overview]
Message-ID: <bug-96591-4@http.gcc.gnu.org/bugzilla/> (raw)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96591
Bug ID: 96591
Summary: ICE with -flto=auto and -O1: tree code ‘typename_type’
is not supported in LTO streams
Product: gcc
Version: 10.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
Assignee: unassigned at gcc dot gnu.org
Reporter: gcc-bugs at marehr dot dialup.fu-berlin.de
CC: marxin at gcc dot gnu.org
Target Milestone: ---
Hi gcc-team,
I'm not sure if this is the right component.
The following code:
```c++
template <typename scalar_t, unsigned length>
struct builtin_simd
{
using type [[gnu::vector_size(sizeof(scalar_t) * length)]] = scalar_t;
};
struct simd_traits
{
using scalar_type = int;
template <typename new_scalar_type>
using rebind = typename builtin_simd<new_scalar_type, 1>::type;
};
template <typename simd_t>
constexpr simd_t fill(typename simd_traits::scalar_type const scalar)
{
return simd_t{scalar};
}
class Test
{
using score_type = typename builtin_simd<int, 1>::type;
score_type data[1]{fill<score_type>(8)};
};
struct TestFactoryBase
{
virtual Test *CreateTest() = 0;
};
template <class TestClass>
struct TestFactoryImpl : public TestFactoryBase
{
Test *CreateTest() override { return new TestClass; }
};
void MakeAndRegisterTestInfo(TestFactoryBase *factory);
int main() {
MakeAndRegisterTestInfo(new TestFactoryImpl<Test>);
}
```
https://godbolt.org/z/55xTod
produces with
> > g++ -O1 -flto=auto ice.cpp
> during IPA pass: pure-const
> ice.cpp:42:1: internal compiler error: tree code ‘typename_type’ is not supported in LTO streams
> 42 | }
> | ^
> Please submit a full bug report, with preprocessed source if appropriate.
> See <https://bugs.archlinux.org/> for instructions.
that error.
Some notes:
* removing "using rebind = typename builtin_simd<new_scalar_type, 1>::type;" or
* removing "constexpr" from constexpr simd_t fill(typename
simd_traits::scalar_type const scalar)
will make it compile.
Thank you!
next reply other threads:[~2020-08-12 15:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-12 15:58 gcc-bugs at marehr dot dialup.fu-berlin.de [this message]
2020-08-12 17:05 ` [Bug lto/96591] " marxin at gcc dot gnu.org
2020-08-25 9:27 ` [Bug c++/96591] [8/9/10/11 Regression] " rguenth at gcc dot gnu.org
2020-08-25 12:12 ` jakub at gcc dot gnu.org
2020-08-26 5:20 ` asolokha at gmx dot com
2020-10-12 12:34 ` rguenth at gcc dot gnu.org
2021-02-04 21:03 ` jason at gcc dot gnu.org
2021-02-06 6:20 ` [Bug lto/96591] " jason at gcc dot gnu.org
2021-02-08 7:47 ` rguenth at gcc dot gnu.org
2021-02-08 8:45 ` rguenth at gcc dot gnu.org
2021-02-08 12:05 ` cvs-commit at gcc dot gnu.org
2021-02-08 12:06 ` [Bug lto/96591] [8/9/10 " rguenth at gcc dot gnu.org
2021-03-24 14:26 ` cvs-commit at gcc dot gnu.org
2021-04-12 11:23 ` [Bug lto/96591] [8/9 " cvs-commit at gcc dot gnu.org
2021-04-26 10:46 ` [Bug lto/96591] [8 " cvs-commit at gcc dot gnu.org
2021-04-26 10:48 ` rguenth at gcc dot gnu.org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-96591-4@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).