public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/104880] New: regression ICE in expand_expr_addr_expr_1, at expr.c:8231
@ 2022-03-11 11:31 dimitar.yordanov at sap dot com
  2022-03-11 12:29 ` [Bug middle-end/104880] [11/12 Regression] ICE in expand_expr_addr_expr_1, at expr.c:8231 since r11-165-geb72dc663e9070 marxin at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: dimitar.yordanov at sap dot com @ 2022-03-11 11:31 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104880
           Summary: regression ICE in expand_expr_addr_expr_1, at
                    expr.c:8231
           Product: gcc
           Version: 11.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dimitar.yordanov at sap dot com
  Target Milestone: ---

Hi,

I hit an ICE with the following reduced example:

cat > foo.cc << EOF

class c {
  long b;
};
class B {
public:
  typedef void *d;
};
class aa {
public:
  aa(B::d, char *);
};
class e : public B {
public:
  e();
};
__uint128_t f;
struct g {
  struct h : c {
    h(__uint128_t &i) : c(reinterpret_cast<c &>(i)) {}
    __uint128_t ad();
  };
};
class n : g {
public:
  n(int);
  void j() {
    __uint128_t a;
    h k(a);
    __atomic_compare_exchange_n(&f, &a, k.ad(), true, 3, 0);
  }
};
int l;
class m : e {
  void ar() {
    n b(l);
    b.j();
  }
  virtual c bd() { aa(d(&m::ar), ""); }
};
void o() { new m; }

EOF

g++ -mcx16 -O2 -c foo.cc

during RTL pass: expand
foo.cc: In member function ‘void m::ar()’:
foo.cc:29:32: internal compiler error: in expand_expr_addr_expr_1, at
expr.c:8231
   29 |     __atomic_compare_exchange_n(&f, &a, k.ad(), true, 3, 0);

Regression appeared first with:

https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=eb72dc663e9070b281be83a80f6f838a3a878822

Best regards
Dimitar

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

end of thread, other threads:[~2022-04-19 12:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-11 11:31 [Bug middle-end/104880] New: regression ICE in expand_expr_addr_expr_1, at expr.c:8231 dimitar.yordanov at sap dot com
2022-03-11 12:29 ` [Bug middle-end/104880] [11/12 Regression] ICE in expand_expr_addr_expr_1, at expr.c:8231 since r11-165-geb72dc663e9070 marxin at gcc dot gnu.org
2022-03-11 12:53 ` rguenth at gcc dot gnu.org
2022-03-11 14:03 ` [Bug middle-end/104880] [11 " cvs-commit at gcc dot gnu.org
2022-03-14 16:25 ` dimitar.yordanov at sap dot com
2022-04-07  8:58 ` cvs-commit at gcc dot gnu.org
2022-04-07  8:59 ` rguenth at gcc dot gnu.org
2022-04-19 12:31 ` cvs-commit at gcc dot gnu.org
2022-04-19 12:32 ` 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).