From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 66880 invoked by alias); 30 Aug 2015 07:31:31 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 66838 invoked by uid 48); 30 Aug 2015 07:31:26 -0000 From: "jeanmichael.celerier at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/67398] Segfault when template static references another template Date: Sun, 30 Aug 2015 07:31:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 5.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jeanmichael.celerier at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-08/txt/msg02023.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D67398 --- Comment #2 from Jean-Micha=C3=ABl Celerier --- I now get this error : /home/jcelerier/i-score/base/plugins/iscore-plugin-scenario/source/Process/= ScenarioModel.cpp:63: internal compiler error: in make_decl_rtl, at varasm.c:1313 constexpr const QMetaObject NotifyingMap::staticMetaObject{ ^ if I change the relevant part of the code to this :=20 template struct strdata_t { QByteArrayData data[5]{ QT_MOC_LITERAL_CUSTOM(0, 0, 12), // "NotifyingMap" QT_MOC_LITERAL_CUSTOM(1, 13, 5), // "added" QT_MOC_LITERAL_CUSTOM(2, 19, 0), // "" QT_MOC_LITERAL_CUSTOM(3, 20, typeLength()), // "T" QT_MOC_LITERAL_CUSTOM(4, 21 + typeLength(), 7) // "removed" }; std::array()> stringdata0 =3D concat("NotifyingMap\0added\0\0", T::className, "\0removed"); }; static const uint staticMetaData[31]{ // content: 7, // revision 0, // classname 0, 0, // classinfo 2, 14, // methods 0, 0, // properties 0, 0, // enums/sets 0, 0, // constructors 0, // flags 2, // signalCount // signals: name, argc, parameters, tag, flags 1, 1, 24, 2, 0x06 /* Public */, 4, 1, 27, 2, 0x06 /* Public */, // signals: parameters QMetaType::Void, 0x80000000 | 3, 2, QMetaType::Void, 0x80000000 | 3, 2, 0 // eod }; template constexpr const QMetaObject NotifyingMap::staticMetaObject{ { &QObject::staticMetaObject, strdata_t{}.data, staticMetaData, qt_static_metacall, Q_NULLPTR, Q_NULLPTR } }; >>From gcc-bugs-return-495883-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Aug 30 08:22:51 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 26823 invoked by alias); 30 Aug 2015 08:22:50 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 26749 invoked by uid 48); 30 Aug 2015 08:22:46 -0000 From: "egall at gwmail dot gwu.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/67363] [6 Regression] r227188 breaks build for mingw-w64 Date: Sun, 30 Aug 2015 08:22:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: egall at gwmail dot gwu.edu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: dmalcolm at redhat dot com X-Bugzilla-Target-Milestone: 6.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-08/txt/msg02025.txt.bz2 Content-length: 340 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67363 --- Comment #3 from Eric Gallager --- Or actually, an even simpler solution to the strndup part of the bug would be to just use xstrndup instead of strndup; then there's no worrying about which header to add a declaration to, or anything related to that...