public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/11948] New: ICE on illegal code: initialising a static data member @ 2003-08-16 14:48 o dot kullmann at swansea dot ac dot uk 2003-08-16 14:57 ` [Bug c++/11948] [3.3 Regression] " pinskia at gcc dot gnu dot org ` (4 more replies) 0 siblings, 5 replies; 6+ messages in thread From: o dot kullmann at swansea dot ac dot uk @ 2003-08-16 14:48 UTC (permalink / raw) To: gcc-bugs PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11948 Summary: ICE on illegal code: initialising a static data member Product: gcc Version: 3.3.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: o dot kullmann at swansea dot ac dot uk CC: gcc-bugs at gcc dot gnu dot org #include <limits> template <class T> struct X { static const int max = std::numeric_limits<int>::max(); X() : m(max) {} int m; }; template <class T> const int X<T>::max; int main() { X<int> x; } compiled with g++ version 3.3.1 (without options) yields internal compiler error: Segmentation fault This error doesn't occur with version 3.3 or 3.2.1, since these versions do not detect the invalid non-constant initialisation within the class. The code #include <limits> template <class T> struct X { static const int max = std::numeric_limits<int>::max(); }; template <class T> const int X<T>::max; int main() { X<int> x; } compiles with g++ version 3.3.1 although it is invalid. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/11948] [3.3 Regression] ICE on illegal code: initialising a static data member 2003-08-16 14:48 [Bug c++/11948] New: ICE on illegal code: initialising a static data member o dot kullmann at swansea dot ac dot uk @ 2003-08-16 14:57 ` pinskia at gcc dot gnu dot org 2003-08-16 14:58 ` pinskia at gcc dot gnu dot org ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu dot org @ 2003-08-16 14:57 UTC (permalink / raw) To: gcc-bugs PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11948 pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed| |1 Keywords| |ice-on-invalid-code Last reconfirmed|0000-00-00 00:00:00 |2003-08-16 14:57:37 date| | Summary|ICE on illegal code: |[3.3 Regression] ICE on |initialising a static data |illegal code: initialising a |member |static data member Target Milestone|3.4 |3.3.2 ------- Additional Comments From pinskia at gcc dot gnu dot org 2003-08-16 14:57 ------- I can confirm this on 3.3.2 (20030815). It is already fixed on the mainline (20030815). >From Phil's regression hunter: Search converges between 2002-09-29-trunk (#91) and 2002-10- 02-trunk (#92). It was accepted before that date. Reduce code: int f(); template <class T> struct X { static const int max = f(); X() : m(max) {} int m; }; template <class T> const int X<T>::max; template struct X<int>; int main() { X<int> x; } ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/11948] [3.3 Regression] ICE on illegal code: initialising a static data member 2003-08-16 14:48 [Bug c++/11948] New: ICE on illegal code: initialising a static data member o dot kullmann at swansea dot ac dot uk 2003-08-16 14:57 ` [Bug c++/11948] [3.3 Regression] " pinskia at gcc dot gnu dot org @ 2003-08-16 14:58 ` pinskia at gcc dot gnu dot org 2003-08-23 3:05 ` pinskia at gcc dot gnu dot org ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu dot org @ 2003-08-16 14:58 UTC (permalink / raw) To: gcc-bugs PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11948 ------- Additional Comments From pinskia at gcc dot gnu dot org 2003-08-16 14:58 ------- Just a note the mainline rejects both of the sources. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/11948] [3.3 Regression] ICE on illegal code: initialising a static data member 2003-08-16 14:48 [Bug c++/11948] New: ICE on illegal code: initialising a static data member o dot kullmann at swansea dot ac dot uk 2003-08-16 14:57 ` [Bug c++/11948] [3.3 Regression] " pinskia at gcc dot gnu dot org 2003-08-16 14:58 ` pinskia at gcc dot gnu dot org @ 2003-08-23 3:05 ` pinskia at gcc dot gnu dot org 2003-10-16 9:28 ` mmitchel at gcc dot gnu dot org 2003-12-21 22:17 ` pinskia at gcc dot gnu dot org 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu dot org @ 2003-08-23 3:05 UTC (permalink / raw) To: gcc-bugs PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11948 pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |minor ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/11948] [3.3 Regression] ICE on illegal code: initialising a static data member 2003-08-16 14:48 [Bug c++/11948] New: ICE on illegal code: initialising a static data member o dot kullmann at swansea dot ac dot uk ` (2 preceding siblings ...) 2003-08-23 3:05 ` pinskia at gcc dot gnu dot org @ 2003-10-16 9:28 ` mmitchel at gcc dot gnu dot org 2003-12-21 22:17 ` pinskia at gcc dot gnu dot org 4 siblings, 0 replies; 6+ messages in thread From: mmitchel at gcc dot gnu dot org @ 2003-10-16 9:28 UTC (permalink / raw) To: gcc-bugs PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11948 mmitchel at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|3.3.2 |3.3.3 ------- Additional Comments From mmitchel at gcc dot gnu dot org 2003-10-16 09:28 ------- Postponed until GCC 3.3.3. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/11948] [3.3 Regression] ICE on illegal code: initialising a static data member 2003-08-16 14:48 [Bug c++/11948] New: ICE on illegal code: initialising a static data member o dot kullmann at swansea dot ac dot uk ` (3 preceding siblings ...) 2003-10-16 9:28 ` mmitchel at gcc dot gnu dot org @ 2003-12-21 22:17 ` pinskia at gcc dot gnu dot org 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu dot org @ 2003-12-21 22:17 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2003-12-21 22:08 ------- The patch which fixed it on the mainline is here: <http://gcc.gnu.org/ml/gcc-patches/2003- 01/msg02453.html> but it too huge to back port so closing as will not fix. -- What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WONTFIX http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11948 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-12-21 22:08 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2003-08-16 14:48 [Bug c++/11948] New: ICE on illegal code: initialising a static data member o dot kullmann at swansea dot ac dot uk 2003-08-16 14:57 ` [Bug c++/11948] [3.3 Regression] " pinskia at gcc dot gnu dot org 2003-08-16 14:58 ` pinskia at gcc dot gnu dot org 2003-08-23 3:05 ` pinskia at gcc dot gnu dot org 2003-10-16 9:28 ` mmitchel at gcc dot gnu dot org 2003-12-21 22:17 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).