RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1958295 - gcc ice when compiling compiler-rt on aarch64
Summary: gcc ice when compiling compiler-rt on aarch64
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: gcc
Version: 8.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: ---
Assignee: Marek Polacek
QA Contact: Alexandra Petlanová Hájková
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-07 15:01 UTC by serge_sans_paille
Modified: 2023-07-18 14:19 UTC (History)
4 users (show)

Fixed In Version: gcc-8.5.0-1.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 19:35:43 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
t.cc (1.69 KB, text/plain)
2021-05-07 15:01 UTC, serge_sans_paille
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 87839 0 P3 RESOLVED [9 Regression] ICE in final_scan_insn_1, at final.c:3070 2021-05-07 15:45:43 UTC
Red Hat Product Errata RHSA-2021:4386 0 None None None 2021-11-09 19:35:57 UTC

Description serge_sans_paille 2021-05-07 15:01:14 UTC
Created attachment 1780768 [details]
t.cc

Description of problem:
# uname -a
Linux hpe-apollo-cn99xx-14-vm-10.khw4.lab.eng.bos.redhat.com 4.18.0-305.1.el8.aarch64 #1 SMP Fri Apr 30 16:27:55 EDT 2021 aarch64 aarch64 aarch64 GNU/Linux

# g++ --version
g++ (GCC) 8.4.1 20210423 (Red Hat 8.4.1-2)

# g++ -c -std=c++14 -fPIC -O2 t.cc -w
t.cc: In function ‘void Quarantine<Callback>::DoRecycle() [with Callback = QuarantineCallback]’:
t.cc:30:2: error: could not split insn
  }
  ^
(insn:TI 53 50 163 (parallel [
            (set (reg:CC 66 cc)
                (unspec_volatile:CC [
                        (const_int 0 [0])
                    ] UNSPECV_ATOMIC_CMPSW))
            (set (reg:DI 1 x1 [114])
                (mem/v:DI (reg/f:DI 23 x23 [128]) [-1  S8 A128]))
            (set (mem/v:DI (reg/f:DI 23 x23 [128]) [-1  S8 A128])
                (unspec_volatile:DI [
                        (const_int 42084505273 [0x9cc6e96b9])
                        (reg/v:DI 0 x0 [orig:97 xchg ] [97])
                        (const_int 0 [0])
                        (const_int 32773 [0x8005])
                        (const_int 32773 [0x8005])
                    ] UNSPECV_ATOMIC_CMPSW))
            (clobber (reg:SI 2 x2 [134]))
        ]) "t.cc":6 3372 {aarch64_compare_and_swapdi}
     (expr_list:REG_DEAD (reg/v:DI 0 x0 [orig:97 xchg ] [97])
        (expr_list:REG_UNUSED (reg:CC 66 cc)
            (expr_list:REG_UNUSED (reg:SI 2 x2 [134])
                (expr_list:REG_UNUSED (reg:DI 1 x1 [114])
                    (nil))))))
during RTL pass: final
t.cc:30:2: internal compiler error: in final_scan_insn_1, at final.c:3145

The attached test case got reduce from compiler-rt source by cvise.

Comment 1 Jakub Jelinek 2021-05-07 15:58:43 UTC
Slightly more reduced testcase:
// PR target/87839
// { dg-do compile { target c++11 } }
// { dg-options "-O2" }
// { dg-additional-options "-fpic" { target fpic } }

long long a;
static inline bool c(unsigned long long *j) {
  long long d = a, c = *j;
  __sync_val_compare_and_swap(&a, c, d);
  return true;
}
struct m { m(int *); };
struct p { void g() { m h(&aa); } int aa; };
struct q { using k = p; void g() { l.g(); } k l; };
template <typename> using n = q;
using o = n<int>;
struct t { long ab; void *ac[64]; };
struct F {
  t *r();
};
long x;
template <typename s> struct G {
  F af;
  s u;
  void __attribute__((noinline)) ae() {
    while (t *b = af.r())
      for (long j = 0; j < 6; j++)
        for (long i = x, e = b->ab; i < e; i++)
          if (i + e)
            u.v((int *)b->ac[i]);
  }
};
struct H {
  o w;
  void v(int *j) { w.g(); if (j) { unsigned long long f = 12084505273LL; c(&f); } }
};
struct x { G<H> ah; x(int); void y() { ah.ae(); } } g(0);
void aj() { g.y(); }

Comment 2 Marek Polacek 2021-05-07 16:20:44 UTC
This will be fixed next week by a new GCC 8.4.1 tarball.

Comment 3 Jakub Jelinek 2021-05-07 17:43:07 UTC
8.5.0 tarball ;)

Fixed upstream now: https://gcc.gnu.org/r8-10959-g3488242b9a949ebc55b4a857380f94506f90ff76

Comment 7 errata-xmlrpc 2021-11-09 19:35:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Low: gcc security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:4386


Note You need to log in before you can comment on or make changes to this bug.