public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/107485] New: gcc-10 ICE with -fnon-call-exception
@ 2022-11-01  3:23 spop at gcc dot gnu.org
  2022-11-01  3:40 ` [Bug middle-end/107485] " pinskia at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: spop at gcc dot gnu.org @ 2022-11-01  3:23 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107485
           Summary: gcc-10 ICE with -fnon-call-exception
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: spop at gcc dot gnu.org
  Target Milestone: ---

On arm64-linux I see the following crash only on gcc-10.
I do not see the ICE on gcc-11, 12, and trunk. 

$ ~/gcc-10/bld/gcc/cc1plus -fnon-call-exceptions f.ii
[...]
f.ii:29:23: internal compiler error: Segmentation fault
   29 |   template <int> void x(double *, b, unsigned long *) { f(); }
      |                       ^
0x134e58b crash_signal
        ../../gcc/toplev.c:328
0x1639464 tree_vec_extract(gimple_stmt_iterator*, tree_node*, tree_node*,
tree_node*, tree_node*)
        ../../gcc/tree-vect-generic.c:140
0x163ca0f expand_vector_condition
        ../../gcc/tree-vect-generic.c:1044
0x164081f expand_vector_operations_1
        ../../gcc/tree-vect-generic.c:1988
0x16419f7 expand_vector_operations
        ../../gcc/tree-vect-generic.c:2240
0x1641b3f execute
        ../../gcc/tree-vect-generic.c:2284
[...]

$ cat f.ii
typedef long a;
typedef double b;
typedef struct {
  a c __attribute__((__vector_size__(32)));
  b d __attribute__((__vector_size__(32)));
} e;
__attribute__((__always_inline__)) b f() {
  e g, h, i;
  g.c = h.d < i.d;
}
class j {
  bool k();
};
template <typename l, typename n, typename aa> void ab(aa, l, n) {
  int o;
  typename n::p q;
  unsigned long r;
  q(0, o, &r);
}
namespace s {
template <typename, typename n, typename, typename>
void t(j *, long, long, unsigned long *, int u) {
  n ac;
  void v();
  ab(v, u, ac);
}
} // namespace s
struct w {
  template <int> void x(double *, b, unsigned long *) { f(); }
  double ad;
  void operator()(double, double, unsigned long *) {
    unsigned long m;
    x<0>(&ad, 0, &m);
  }
};
using s::t;
struct y {
  using p = w;
};
long ag, ah;
unsigned long ai;
double aj;
bool j::k() {
  using n = y;
  t<j, n, a, double>(this, ag, ah, &ai, aj);
}



git bisect stops on this patch:

commit 1e676cfbe1e13fba2c636b560362ed4f0a56893d
Author: Richard Biener <rguenther@suse.de>
Date:   Mon May 18 08:51:23 2020 +0200

    middle-end/95171 - inlining of trapping compare into non-call EH fn

    This fixes always-inlining across -fnon-call-exception boundaries
    for conditions which we do not allow to throw.

    2020-05-18  Richard Biener  <rguenther@suse.de>

            PR middle-end/95171
            * tree-inline.c (remap_gimple_stmt): Split out trapping compares
            when inlining into a non-call EH function.

            * gcc.dg/pr95171.c: New testcase.

    (cherry picked from commit fe168751c5c1c517c7c89c9a1e4e561d66b24663)

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

end of thread, other threads:[~2022-11-14 19:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-01  3:23 [Bug middle-end/107485] New: gcc-10 ICE with -fnon-call-exception spop at gcc dot gnu.org
2022-11-01  3:40 ` [Bug middle-end/107485] " pinskia at gcc dot gnu.org
2022-11-01  3:41 ` [Bug middle-end/107485] [10 Regression] " pinskia at gcc dot gnu.org
2022-11-01  3:51 ` pinskia at gcc dot gnu.org
2022-11-01  3:56 ` pinskia at gcc dot gnu.org
2022-11-01  3:58 ` pinskia at gcc dot gnu.org
2022-11-05 10:35 ` rguenth at gcc dot gnu.org
2022-11-14 16:18 ` rguenth at gcc dot gnu.org
2022-11-14 18:08 ` cvs-commit at gcc dot gnu.org
2022-11-14 18:15 ` rguenth at gcc dot gnu.org
2022-11-14 19:19 ` spop 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).