Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1525304 - internal compiler error: in force_type_die, at dwarf2out.c:25128
Summary: internal compiler error: in force_type_die, at dwarf2out.c:25128
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Developer Toolset
Classification: Red Hat
Component: gcc
Version: DTS 7.1 RHEL 7
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: alpha
: 7.1
Assignee: Marek Polacek
QA Contact: Michael Petlan
Vladimír Slávik
URL:
Whiteboard:
Depends On: 1516576
Blocks: 1516577
TreeView+ depends on / blocked
 
Reported: 2017-12-13 02:04 UTC by Brad Hubbard
Modified: 2018-05-03 05:14 UTC (History)
14 users (show)

Fixed In Version: devtoolset-7-gcc-7.2.1-6.el6
Doc Type: Bug Fix
Doc Text:
Previously, the *GCC* compiler handled the Debugging Information Entries (DIE) incorrectly when generating them for a C++ class method nested in another class method. As a consequence, the compiler might terminate unexpectedly when compiling such C++ code. Handling of DIE in this situation has been corrected and the problem no longer occurs.
Clone Of: 1516576
Environment:
Last Closed: 2018-05-03 05:13:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Ceph Project Bug Tracker 22220 0 None None None 2017-12-13 02:04:38 UTC
GNU Compiler Collection 82155 0 None None None 2017-12-13 02:04:38 UTC
Red Hat Product Errata RHBA-2018:1293 0 None None None 2018-05-03 05:14:38 UTC

Description Brad Hubbard 2017-12-13 02:04:38 UTC
+++ This bug was initially created as a clone of Bug #1516576 +++

Description of problem:

Whilst compiling ceph we encountered an ICE. I was able to reduce it to the following. Note this is different to the reproducer in the gcc bug report identified below but involves similarly nested classes.

$ cat << EOF >reproducer.ii
template <typename a> struct b { a c; };
template <typename d> struct e { d *operator->(); };
template <typename d> class f {
public:
  typedef e<d> g;
};
class h {
protected:
  h(int);
};
class j {
public:
  virtual ~j();
  struct k : h {
    int l;
    k() : h(l) {
      struct m : j {
        m() {}
      };
    }
  };
};
struct n {
  n() {
    for (f<b<b<j *>>>::g i;;)
      delete i->c.c;
  }
};
void o() { n(); }
EOF
$ g++ -c -O2 -g reproducer.ii                                                                                                                                                                                     
reproducer.ii: In destructor ‘virtual j::k::k()::m::~m()’:
reproducer.ii:17:14: internal compiler error: in force_type_die, at dwarf2out.c:25128
       struct m : j {
              ^

Version-Release number of selected component (if applicable):
gcc-7.2.1-2.fc27.x86_64

How reproducible:
100%

Actual results:
internal compiler error

Expected results:
Successful compile

Additional info:
This is the linked gcc bug 82155.
Currently we are having to build with a gcc package including this patch which resolves the issue, https://github.com/gcc-mirror/gcc/commit/c7db9cf55ae4022f134624db81cc70d694079b6c

Giving this high severity as it is adversely affecting the ceph build system.

Comment 4 Michael Petlan 2018-04-18 16:54:19 UTC
Tests passed with devtoolset-7-gcc-7.3.1-5.4.el{6,7}.
VERIFIED.

Comment 8 errata-xmlrpc 2018-05-03 05:13:47 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, 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/RHBA-2018:1293


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