[Bug gold/17670] internal error in symval_for_branch, at powerpc.cc:6755 during qt5 build
https://sourceware.org/bugzilla/show_bug.cgi?id=17670 Cary Coutant changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|ccoutant at google dot com |amodra at gmail dot com --- Comment #1 from Cary Coutant --- Alan, can you take a look at this? -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/17670] internal error in symval_for_branch, at powerpc.cc:6755 during qt5 build
https://sourceware.org/bugzilla/show_bug.cgi?id=17670 --- Comment #2 from Markus Trippelsdorf --- Reduced using gcc trunk: trippels@gcc2-power8 corelib % cat qmimeglobpattern.ii class G; class A { public: A (G); }; class B { public: int m_fn1 (); }; class QString; struct C { B ref; }; template class QList { C d; public: ~QList (); void m_fn2 (); void m_fn3 (); }; class G : public QList { }; struct D { void m_fn4 (const QString &&); G m_matchingMimeTypes; }; class F { G m_fn5 (const QString &) const; }; template QList::~QList () { if (d.ref.m_fn1 ()) m_fn3 (); } template void QList::m_fn2 () { QList (); } void D::m_fn4 (const QString &&) { m_matchingMimeTypes.m_fn2 (); } G F::m_fn5 (const QString &) const { G a; for (A b (a);;) ; } trippels@gcc2-power8 corelib % cat qmimeprovider.ii class A { public: int m_fn1 (); }; class QString { public: static QString m_fn2 (char *); }; struct B { A ref; }; template class QList { B d; public: ~QList (); class const_iterator { }; const_iterator m_fn3 (); void m_fn4 (); }; class C { QList c; QList::const_iterator i; public: C (QList) : i (c.m_fn3 ()) {} }; class D { public: enum StandardLocation { GenericDataLocation }; static QList m_fn5 (StandardLocation, QString); }; QList a = D::m_fn5 (D::GenericDataLocation, QString::m_fn2 ("")); template QList::~QList () { if (d.ref.m_fn1 ()) m_fn4 (); } void fn1 () { C b (a); } trippels@gcc2-power8 corelib % g++ -shared -w -O3 -fvisibility=hidden -std=c++0x qmimeglobpattern.ii qmimeprovider.ii /home/trippels/bin/ld: internal error in symval_for_branch, at powerpc.cc:6755 -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/17670] internal error in symval_for_branch, at powerpc.cc:6755 during qt5 build
https://sourceware.org/bugzilla/show_bug.cgi?id=17670 --- Comment #3 from Alan Modra --- I don't know enough C++ to say anything authoritive about the testcase but it seems to me that either the testcase is invalid or mainline g++ is broken, probably the latter. The reason I say that is that qmimeglobpattern.o contains this group COMDAT group section [1] `.group' [_ZN5QListI7QStringED5Ev] contains 1 sections: [Index]Name [ 11] .text._ZN5QListI7QStringED2Ev defining the function _ZN5QListI7QStringED2Ev and qmimeprovider.o this group COMDAT group section [1] `.group' [_ZN5QListI7QStringED5Ev] contains 2 sections: [Index]Name [8] .text._ZN5QListI7QStringED2Ev [ 12] .gcc_except_table._ZN5QListI7QStringED2Ev defining _ZN5QListI7QStringED1Ev and _ZN5QListI7QStringED2Ev Since these are comdat groups, the first one is kept and the second dropped, resulting in _ZN5QListI7QStringED1Ev being undefined. The sym is weak so that in itself doesn't cause a link failure, but does result in runtime failure even on x86_64. I can simply change the assertion to a condition in powerpc.cc which will result in exactly the same runtime failure on powerpc.. Now it happens that _ZN5QListI7QStringED1Ev and _ZN5QListI7QStringED2Ev are aliases in the second group, but I don't think ld has any business trying to map symbols across to the kept section. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/17670] internal error in symval_for_branch, at powerpc.cc:6755 during qt5 build
https://sourceware.org/bugzilla/show_bug.cgi?id=17670 Markus Trippelsdorf changed: What|Removed |Added Status|ASSIGNED|RESOLVED URL||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=64163 Resolution|--- |MOVED --- Comment #4 from Markus Trippelsdorf --- Moved to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64163 -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/17670] internal error in symval_for_branch, at powerpc.cc:6755 during qt5 build
https://sourceware.org/bugzilla/show_bug.cgi?id=17670 Andrew Pinski changed: What|Removed |Added Status|RESOLVED|REOPENED CC||pinskia at gcc dot gnu.org Resolution|MOVED |--- --- Comment #5 from Andrew Pinski --- Reopening since the linker should not crash on code which violates C++ ODR. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/17670] internal error in symval_for_branch, at powerpc.cc:6755 during qt5 build
https://sourceware.org/bugzilla/show_bug.cgi?id=17670 --- Comment #6 from cvs-commit at gcc dot gnu.org --- This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "gdb and binutils". The branch, master has been updated via 1611bc4afb0f08f0aff64ec355b8d68e9f4f0a73 (commit) from 858339f2b7aafe199c1cd07fc8d4a7c8130aa285 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1611bc4afb0f08f0aff64ec355b8d68e9f4f0a73 commit 1611bc4afb0f08f0aff64ec355b8d68e9f4f0a73 Author: Alan Modra Date: Wed Dec 3 16:17:23 2014 +1030 powerpc gold, work around pr17670 pr17670 is about an assert triggering on a branch to an undefined weak symbol, the symbol being undefined due to dropping its comdat group section. (Well sort of. The symbol is actually defined in an .opd section which isn't part of the group, but the code section the opd entry points at is dropped.) So don't assert. Also, don't make long branch stubs to such symbols, and arrange to have target-reloc.h code warn when applying relocs that use the sym. PR 17670 * symtab.cc (Symbol::set_undefined): Remove assertion. * powerpc.cc (Target_powerpc::symval_for_branch): Don't assert on symbols defined in discarded sections, instead return false. Rearrange params, update all callers. (Target_powerpc::Branch_info::make_stub): Don't make stubs for branches to syms in discarded sections. (Global_symbol_visitor_opd::operator()): Set discarded opd syms undefined and flag as discarded. (Target_powerpc::Relocate::relocate): Localize variable. --- Summary of changes: gold/ChangeLog | 13 + gold/powerpc.cc | 54 +++--- gold/symtab.cc |1 - 3 files changed, 44 insertions(+), 24 deletions(-) -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/17670] internal error in symval_for_branch, at powerpc.cc:6755 during qt5 build
https://sourceware.org/bugzilla/show_bug.cgi?id=17670 --- Comment #7 from cvs-commit at gcc dot gnu.org --- This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "gdb and binutils". The branch, binutils-2_25-branch has been updated via feba93770920f91760d6390541221b75ba5c95f3 (commit) from b6cc44453451b1ac6ca22d83875a6c3583ceec3d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=feba93770920f91760d6390541221b75ba5c95f3 commit feba93770920f91760d6390541221b75ba5c95f3 Author: Alan Modra Date: Wed Dec 3 16:17:23 2014 +1030 powerpc gold, work around pr17670 pr17670 is about an assert triggering on a branch to an undefined weak symbol, the symbol being undefined due to dropping its comdat group section. (Well sort of. The symbol is actually defined in an .opd section which isn't part of the group, but the code section the opd entry points at is dropped.) So don't assert. Also, don't make long branch stubs to such symbols, and arrange to have target-reloc.h code warn when applying relocs that use the sym. PR 17670 * symtab.cc (Symbol::set_undefined): Remove assertion. * powerpc.cc (Target_powerpc::symval_for_branch): Don't assert on symbols defined in discarded sections, instead return false. Rearrange params, update all callers. (Target_powerpc::Branch_info::make_stub): Don't make stubs for branches to syms in discarded sections. (Global_symbol_visitor_opd::operator()): Set discarded opd syms undefined and flag as discarded. (Target_powerpc::Relocate::relocate): Localize variable. --- Summary of changes: gold/ChangeLog | 13 + gold/powerpc.cc | 54 +++--- gold/symtab.cc |1 - 3 files changed, 44 insertions(+), 24 deletions(-) -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/17670] internal error in symval_for_branch, at powerpc.cc:6755 during qt5 build
https://sourceware.org/bugzilla/show_bug.cgi?id=17670 Alan Modra changed: What|Removed |Added Status|REOPENED|RESOLVED CC|amodra at gmail dot com| Resolution|--- |FIXED Target Milestone|--- |2.25 --- Comment #8 from Alan Modra --- fixed -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils