public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/94426] New: [10 Regression] ICE in mangle_decl with -flto
@ 2020-03-31 15:25 jakub at gcc dot gnu.org
  2020-03-31 15:25 ` [Bug c++/94426] " jakub at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-31 15:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94426

            Bug ID: 94426
           Summary: [10 Regression] ICE in mangle_decl with -flto
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
  Target Milestone: ---

The following testcase ICEs in mangle_decl with -O2 -flto starting with
r10-7403-g517f5356bb0ca717f51e937be880e38a828edbf7, before that it has been
rejected.
template <int a> struct b { static constexpr int c = a; };
template <bool a> using d = b<a>;
template <typename> auto ad() -> decltype(0);
struct m { d<noexcept(ad<int>())> e; };
struct n : m { typedef decltype(e) ab; };
template <bool> using aj = int;
class C { void q(); int bq; };
template <typename by, typename... bj> using bz = typename by::bz<bj...>;
namespace ca {
struct r { template <typename cc> using bz = cc; };
template <typename cc, typename> using cd = bz<r, cc>;
namespace ce {
struct s { template <class bj> s(bj); };
struct t { bool c; };
t ci(void *, s);
}
template <bool ck> aj<ck> cl;
template <typename> bool f;
template <typename> constexpr bool destructible = n::ab ::c;
template <typename cc> constexpr bool cp = destructible<cc>;
template <typename cc> constexpr bool cq = cp<cc>;
template <typename cc> constexpr bool copyable = cq<cc>;
template <typename cc> constexpr bool cr = copyable<cc>;
}
namespace cs {
using namespace ca;
namespace ce {
template <typename cy = decltype(0)> using da = cy;
}
template <typename> using da = ce::da<>;
template <typename>
bool db = ca::ce::ci(nullptr, [](auto g) -> decltype(cl<f<da<decltype(g)>>>)
{}).c;
template <typename cx> constexpr bool dd = cr<cx>;
template <typename cx> constexpr bool de = dd<cx>;
template <typename cx> constexpr bool h = de<cx>;
template <typename cx> constexpr bool df = h<cx>;
template <typename, typename di, typename> bool dj = db<di>;
namespace ce {
template <typename> struct H;
}
template <typename, typename dl> using dn = ce::H<dl>;
template <typename cx> constexpr bool i = df<cx>;
struct {
  template <typename cx, typename j, typename cc, typename k>
  auto operator()(cx, j, cc, k) -> cd<cx, aj<i<cx> && dj<int, dn<cx, k>, cc>>>
{ while (1); }
  template <typename l, typename cc, typename k>
  void operator()(l, cc p2, k u) { (*this)(0, 0, p2, u); }
} o;
}
int p;
void C::q() { cs::o(bq, p, [] {}); }

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/94426] [10 Regression] ICE in mangle_decl with -flto
  2020-03-31 15:25 [Bug c++/94426] New: [10 Regression] ICE in mangle_decl with -flto jakub at gcc dot gnu.org
@ 2020-03-31 15:25 ` jakub at gcc dot gnu.org
  2020-04-01  7:00 ` rguenth at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-31 15:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94426

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |10.0

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/94426] [10 Regression] ICE in mangle_decl with -flto
  2020-03-31 15:25 [Bug c++/94426] New: [10 Regression] ICE in mangle_decl with -flto jakub at gcc dot gnu.org
  2020-03-31 15:25 ` [Bug c++/94426] " jakub at gcc dot gnu.org
@ 2020-04-01  7:00 ` rguenth at gcc dot gnu.org
  2020-04-01  8:33 ` jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-04-01  7:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94426

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |lto
           Priority|P3                          |P1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/94426] [10 Regression] ICE in mangle_decl with -flto
  2020-03-31 15:25 [Bug c++/94426] New: [10 Regression] ICE in mangle_decl with -flto jakub at gcc dot gnu.org
  2020-03-31 15:25 ` [Bug c++/94426] " jakub at gcc dot gnu.org
  2020-04-01  7:00 ` rguenth at gcc dot gnu.org
@ 2020-04-01  8:33 ` jakub at gcc dot gnu.org
  2020-04-01 11:00 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-04-01  8:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94426

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
                 CC|                            |nathan at gcc dot gnu.org
   Last reconfirmed|                            |2020-04-01

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Though the unreduced testcase started to ICE already with
r10-7243-g11cf25c40e3f586d19474108c78a2dfad7925902
I might try to re-reduce this such that it ICEs already with that release.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/94426] [10 Regression] ICE in mangle_decl with -flto
  2020-03-31 15:25 [Bug c++/94426] New: [10 Regression] ICE in mangle_decl with -flto jakub at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-04-01  8:33 ` jakub at gcc dot gnu.org
@ 2020-04-01 11:00 ` jakub at gcc dot gnu.org
  2020-04-01 12:34 ` nathan at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-04-01 11:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94426

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Adjusted testcase that ICEs already starting with the r10-7243 commit, again
-O2 -flto:
template <int a> struct b { static constexpr int c = a; };
template <bool a> using d = b<a>;
template <typename> auto ad() -> decltype(0);
struct m { d<noexcept(ad<int>())> e; };
struct n : m { typedef decltype(e) ab; };
template <bool> using aj = int;
class C { void q(); int bq; };
template <typename by, typename... bj> using bz = typename by::template
bz<bj...>;
namespace ca {
struct r { template <typename cc> using bz = cc; };
template <typename cc, typename> using cd = bz<r, cc>;
namespace ce {
struct s { template <class bj> s(bj); };
struct t { bool c; };
t ci(void *, s);
}
template <bool ck> aj<ck> cl;
template <typename> bool f;
template <typename> constexpr bool destructible = n::ab ::c;
template <typename cc> constexpr bool cp = destructible<cc>;
template <typename cc> constexpr bool cq = cp<cc>;
template <typename cc> constexpr bool copyable = cq<cc>;
template <typename cc> constexpr bool cr = copyable<cc>;
}
namespace cs {
using namespace ca;
namespace ce {
template <typename cy = decltype(0)> using da = cy;
}
template <typename> using da = ce::da<>;
template <typename>
bool db = ca::ce::ci(nullptr, [](auto g) -> decltype(cl<f<da<decltype(g)>>>)
{}).c;
template <typename cx> constexpr bool dd = cr<cx>;
template <typename cx> constexpr bool de = dd<cx>;
template <typename cx> constexpr bool h = de<cx>;
template <typename cx> constexpr bool df = h<cx>;
template <typename, typename di, typename> bool dj = db<di>;
namespace ce {
template <typename> struct H;
}
template <typename, typename dl> using dn = ce::H<dl>;
template <typename cx> constexpr bool i = df<cx>;
struct {
  template <typename cx, typename j, typename cc, typename k>
  auto operator()(cx, j, cc, k) -> cd<cx, aj<i<cx> && dj<int, dn<cx, k>, cc>>>
{ while (1); }
  template <typename l, typename cc, typename k>
  void operator()(l, cc p2, k u) { (*this)(0, 0, p2, u); }
} o;
}
int p;
void C::q() { cs::o(bq, p, [] {}); }

The difference from the #c0 testcase is:
-template <typename by, typename... bj> using bz = typename by::bz<bj...>;
+template <typename by, typename... bj> using bz = typename by::template
bz<bj...>;

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/94426] [10 Regression] ICE in mangle_decl with -flto
  2020-03-31 15:25 [Bug c++/94426] New: [10 Regression] ICE in mangle_decl with -flto jakub at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-04-01 11:00 ` jakub at gcc dot gnu.org
@ 2020-04-01 12:34 ` nathan at gcc dot gnu.org
  2020-04-01 12:44 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: nathan at gcc dot gnu.org @ 2020-04-01 12:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94426

Nathan Sidwell <nathan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |nathan at gcc dot gnu.org
             Status|NEW                         |SUSPENDED

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/94426] [10 Regression] ICE in mangle_decl with -flto
  2020-03-31 15:25 [Bug c++/94426] New: [10 Regression] ICE in mangle_decl with -flto jakub at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2020-04-01 12:34 ` nathan at gcc dot gnu.org
@ 2020-04-01 12:44 ` jakub at gcc dot gnu.org
  2020-04-01 13:14 ` nathan at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-04-01 12:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94426

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Is this SUSPENDED on https://github.com/itanium-cxx-abi/cxx-abi/issues/94
resolution, or something else?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/94426] [10 Regression] ICE in mangle_decl with -flto
  2020-03-31 15:25 [Bug c++/94426] New: [10 Regression] ICE in mangle_decl with -flto jakub at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2020-04-01 12:44 ` jakub at gcc dot gnu.org
@ 2020-04-01 13:14 ` nathan at gcc dot gnu.org
  2020-04-01 17:41 ` nathan at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: nathan at gcc dot gnu.org @ 2020-04-01 13:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94426

Nathan Sidwell <nathan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|SUSPENDED                   |ASSIGNED

--- Comment #4 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
nope, I fat fingered the status

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/94426] [10 Regression] ICE in mangle_decl with -flto
  2020-03-31 15:25 [Bug c++/94426] New: [10 Regression] ICE in mangle_decl with -flto jakub at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2020-04-01 13:14 ` nathan at gcc dot gnu.org
@ 2020-04-01 17:41 ` nathan at gcc dot gnu.org
  2020-04-13 13:39 ` nathan at gcc dot gnu.org
  2020-04-16 20:15 ` cvs-commit at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: nathan at gcc dot gnu.org @ 2020-04-01 17:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94426

--- Comment #5 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
Reduced testcase:

template <bool> using Void = void;

template <typename U> bool Init (U);

template <typename> bool VAR = Init ([] {});

template <typename T>
Void<false && VAR<T>> Foo (T)
{}

void q ()
{
  Foo ([] {});
}

bug.ii: At global scope:
bug.ii:5:38: internal compiler error: in mangle_decl, at cp/mangle.c:3907
    5 | template <typename> bool VAR = Init ([] {});

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/94426] [10 Regression] ICE in mangle_decl with -flto
  2020-03-31 15:25 [Bug c++/94426] New: [10 Regression] ICE in mangle_decl with -flto jakub at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2020-04-01 17:41 ` nathan at gcc dot gnu.org
@ 2020-04-13 13:39 ` nathan at gcc dot gnu.org
  2020-04-16 20:15 ` cvs-commit at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: nathan at gcc dot gnu.org @ 2020-04-13 13:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94426

Nathan Sidwell <nathan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #6 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
Fixed 8d213cbbe18

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/94426] [10 Regression] ICE in mangle_decl with -flto
  2020-03-31 15:25 [Bug c++/94426] New: [10 Regression] ICE in mangle_decl with -flto jakub at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2020-04-13 13:39 ` nathan at gcc dot gnu.org
@ 2020-04-16 20:15 ` cvs-commit at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-16 20:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94426

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain D Sandoe <iains@gcc.gnu.org>:

https://gcc.gnu.org/g:b084efe3fcdfcf88e1703800b9b99347e89beefb

commit r10-7761-gb084efe3fcdfcf88e1703800b9b99347e89beefb
Author: Iain Sandoe <iain@sandoe.co.uk>
Date:   Thu Apr 16 21:13:51 2020 +0100

    testsuite: Update pr94426-2 test to handle more targets [PR94426]

    The function (_Z4InitIN3VARIZ1qvEUlvE_EUlvE_EEbT_) that initializes
    VAR has changed siganture.  It was was weak / comdat [Linux] or
    weak / global [Darwin] and now is text section local.

    So: test that the symbol exists, is spelled the way intended by the
    ABI mangling and is not weak (or global on Darwin).

    gcc/testsuite/ChangeLog:

    2020-04-16  Iain Sandoe  <iain@sandoe.co.uk>

            PR c++/94426
            * g++.dg/cpp0x/lambda/pr94426-2.C: Adjust scan-asms to test
            for the change on more platforms.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-04-16 20:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-31 15:25 [Bug c++/94426] New: [10 Regression] ICE in mangle_decl with -flto jakub at gcc dot gnu.org
2020-03-31 15:25 ` [Bug c++/94426] " jakub at gcc dot gnu.org
2020-04-01  7:00 ` rguenth at gcc dot gnu.org
2020-04-01  8:33 ` jakub at gcc dot gnu.org
2020-04-01 11:00 ` jakub at gcc dot gnu.org
2020-04-01 12:34 ` nathan at gcc dot gnu.org
2020-04-01 12:44 ` jakub at gcc dot gnu.org
2020-04-01 13:14 ` nathan at gcc dot gnu.org
2020-04-01 17:41 ` nathan at gcc dot gnu.org
2020-04-13 13:39 ` nathan at gcc dot gnu.org
2020-04-16 20:15 ` cvs-commit 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).