public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/94775] New: [8/9/10 Regression] ICE in strip_typedefs, at cp/tree.c:1734
@ 2020-04-26 15:24 zhroma at gcc dot gnu.org
  2020-04-26 19:34 ` [Bug tree-optimization/94775] " zhroma at gcc dot gnu.org
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: zhroma at gcc dot gnu.org @ 2020-04-26 15:24 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94775
           Summary: [8/9/10 Regression] ICE in strip_typedefs, at
                    cp/tree.c:1734
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zhroma at gcc dot gnu.org
  Target Milestone: ---

At least ubuntu v8.3.0 and trunk v10.0.1 (20200402) ICE on Linux x86-64 with
the following reduced testcase while emitting diagnostic:

$ cat bug.ii
template <typename> using a = int;
template <bool, typename, typename> using b = int;
typedef char d;
template <long> using e = int;
template <int f, int q> struct h { using i = b<q, a<e<f>>, e<f>>; };
template <long f, bool g> using j = typename h<f, g>::i;
long ab, k, aj;
const d l[]{};
class m {
public:
  m(int);
};
class n {
  m ad() const;
  template <class ae> void o(long) const {
    using c __attribute__((aligned(1))) = const ae;
  }
  long p;
  template <class, class>
  auto s(unsigned long, unsigned long, unsigned long, unsigned long) const;
  template <bool = false> auto q(unsigned long, unsigned long) const;
};
template <class, class>
auto n::s(unsigned long, unsigned long, unsigned long, unsigned long t) const {
  o<d>(p);
  return t;
}
template <bool g> auto n::q(unsigned long p1, unsigned long p2) const {
  using r = j<4, false>;
  using ai = j<4, g>;
  return s<ai, r>(ab, k, p1, p2);
}
m n::ad() const {
  long f(l[aj]);
  m(q(8, f));
}

$ g++ -std=c++17 -Wall -O2 -c -fsanitize=address bug.ii
bug.ii: In member function 'void n::o(long int) const':
bug.ii:16:11: warning: typedef 'using c = const ae' locally defined but not
used [-Wunused-local-typedefs]
   16 |     using c __attribute__((aligned(1))) = const ae;
      |           ^
bug.ii: In member function 'm n::ad() const':
bug.ii:36:1: warning: no return statement in function returning non-void
[-Wreturn-type]
   36 | }
      | ^
'
during GIMPLE pass: vrp
in strip_typedefs, at cp/tree.c:1734
   33 | m n::ad() const {
      |   ^
0x9b4eeb strip_typedefs(tree_node*, bool*, unsigned int)
...

7.5.0 seems to work fine.

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

end of thread, other threads:[~2021-04-09 20:03 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-26 15:24 [Bug tree-optimization/94775] New: [8/9/10 Regression] ICE in strip_typedefs, at cp/tree.c:1734 zhroma at gcc dot gnu.org
2020-04-26 19:34 ` [Bug tree-optimization/94775] " zhroma at gcc dot gnu.org
2020-04-27  4:33 ` [Bug tree-optimization/94775] [8/9/10 Regression] ICE in strip_typedefs, at cp/tree.c:1734 since r8-4668-g8a5ee94a082b3d48 marxin at gcc dot gnu.org
2020-04-27  6:44 ` rguenth at gcc dot gnu.org
2020-04-27 17:19 ` msebor at gcc dot gnu.org
2020-04-27 17:24 ` msebor at gcc dot gnu.org
2020-04-27 19:03 ` [Bug c++/94775] " msebor at gcc dot gnu.org
2020-04-29 17:30 ` mpolacek at gcc dot gnu.org
2020-04-29 17:31 ` mpolacek at gcc dot gnu.org
2020-04-29 17:40 ` jakub at gcc dot gnu.org
2020-04-29 17:51 ` mpolacek at gcc dot gnu.org
2020-04-30 12:35 ` cvs-commit at gcc dot gnu.org
2020-04-30 12:48 ` [Bug c++/94775] [8/9 " mpolacek at gcc dot gnu.org
2020-05-04 14:36 ` cvs-commit at gcc dot gnu.org
2020-05-04 14:42 ` cvs-commit at gcc dot gnu.org
2020-05-04 14:43 ` [Bug c++/94775] [8/9/10/11 " mpolacek at gcc dot gnu.org
2020-05-11 18:50 ` zhroma at gcc dot gnu.org
2020-05-11 18:53 ` mpolacek at gcc dot gnu.org
2021-01-28 15:51 ` mpolacek at gcc dot gnu.org
2021-01-28 21:23 ` cvs-commit at gcc dot gnu.org
2021-01-28 21:26 ` [Bug c++/94775] [8/9/10 " mpolacek at gcc dot gnu.org
2021-04-09 20:03 ` mpolacek 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).