This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/53432] [4.8 Regression] ICE failed to reclaim unneeded function in same comdat group


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53432

Roman Kononov <roman at binarylife dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |roman at binarylife dot net

--- Comment #2 from Roman Kononov <roman at binarylife dot net> 2012-05-22 16:11:42 UTC ---
Here is a testcase (independent of the original one):

$ cat test.cpp
struct A;
struct B;

struct AA { virtual void afoo(A&); };
struct BB { virtual void bfoo(B&); };

template<typename X>
void bar(A& a,X& x) {
  x.afoo(a);
}

void bar(A& ss,int& x);

struct ZZ: BB, AA {
  int i;
  void afoo(A& a) { bar(a,i); }
  void bfoo(B&);
};

void bar(A& a) {
  ZZ zz;
  bar(a,zz);
}

$ g++ -c -O2 test.cpp 
_ZN2ZZ4afooER1A/0 (virtual void ZZ::afoo(A&)) @0x7f1ecda1cc30
  Type: function
  Visibility: public weak comdat comdat_group:_ZN2ZZ4afooER1A one_only
section_name:.text._ZN2ZZ4afooER1A virtual
  Same comdat group as: _ZThn8_N2ZZ4afooER1A/2
  Address is taken.
  References: 
  Referring: _ZTV2ZZ/16 (addr)
  Availability: not_available
  Function flags: body finalized
  Called by: 
  Calls: 
test.cpp:23:1: internal compiler error: failed to reclaim unneeded function in
same comdat group
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]