public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/31663] New: [4.3 Regression] Segfault in constrain_class_visibility with anonymous namespace @ 2007-04-23 7:06 tbm at cyrius dot com 2007-04-23 14:07 ` [Bug c++/31663] " pinskia at gcc dot gnu dot org ` (4 more replies) 0 siblings, 5 replies; 6+ messages in thread From: tbm at cyrius dot com @ 2007-04-23 7:06 UTC (permalink / raw) To: gcc-bugs I get the following segfault with current gcc 4.3. This was introduced between 20070330-r123378 (works) and 20070417-r123941 (segfault). This is related to the use of anonymous namespace. I believe it was caused by: 2007-04-16 Seongbae Park <seongbae.park@gmail.com> PR c++/29365 * cp/decl2.c (constrain_class_visibility): Do not warn about the use of anonymous namespace in the main input file. (sid)19349:tbm@em64t: ~] /usr/lib/gcc-snapshot/bin/g++ -c kdevelop-mainwindowshare.cc kdevelop-mainwindowshare.cc:6: internal compiler error: Segmentation fault Please submit a full bug report, Testcase: namespace { class ToolbarListView; } class KEditToolbarWidget { ToolbarListView *m_inactiveList; }; Backtrace: Program received signal SIGSEGV, Segmentation fault. 0x0000000000497f92 in constrain_class_visibility (type=0x2aae86bd2540) at /home/tbm/scratch/gcc/gcc/cp/decl2.c:1865 1865 DECL_SOURCE_FILE (TYPE_MAIN_DECL (ftype)))) (gdb) where #0 0x0000000000497f92 in constrain_class_visibility (type=0x2aae86bd2540) at /home/tbm/scratch/gcc/gcc/cp/decl2.c:1865 #1 0x00000000004915ff in finish_struct_1 (t=0x2aae86bd2540) at /home/tbm/scratch/gcc/gcc/cp/class.c:5103 #2 0x0000000000492560 in finish_struct (t=0x2aae868df960, attributes=0x0) at /home/tbm/scratch/gcc/gcc/cp/class.c:5221 #3 0x00000000004b9146 in cp_parser_type_specifier (parser=0x2aae86a3f550, flags=<value optimized out>, decl_specs=0x7fff247a2f30, is_declaration=1 '\001', declares_class_or_enum=0x7fff247a2ee0, is_cv_qualifier=<value optimized out>) at /home/tbm/scratch/gcc/gcc/cp/parser.c:13821 #4 0x00000000004be14a in cp_parser_decl_specifier_seq (parser=0x2aae86a3f550, flags=CP_PARSER_FLAGS_OPTIONAL, decl_specs=0x7fff247a2f30, declares_class_or_enum=0x7fff247a2f88) at /home/tbm/scratch/gcc/gcc/cp/parser.c:8023 #5 0x00000000004c34d5 in cp_parser_simple_declaration (parser=0x2aae86a3f550, function_definition_allowed_p=1 '\001') at /home/tbm/scratch/gcc/gcc/cp/parser.c:7725 #6 0x00000000004c56e7 in cp_parser_block_declaration (parser=0x2aae86a3f550, statement_p=0 '\0') at /home/tbm/scratch/gcc/gcc/cp/parser.c:7686 #7 0x00000000004c805e in cp_parser_declaration (parser=0x2aae86a3f550) at /home/tbm/scratch/gcc/gcc/cp/parser.c:7594 #8 0x00000000004c7976 in cp_parser_declaration_seq_opt (parser=0x2aae86a3f550) at /home/tbm/scratch/gcc/gcc/cp/parser.c:7489 #9 0x00000000004c7c91 in c_parse_file () at /home/tbm/scratch/gcc/gcc/cp/parser.c:2941 #10 0x00000000005771ea in c_common_parse_file (set_yydebug=<value optimized out>) at /home/tbm/scratch/gcc/gcc/c-opts.c:1268 #11 0x0000000000786f04 in toplev_main (argc=<value optimized out>, argv=<value optimized out>) at /home/tbm/scratch/gcc/gcc/toplev.c:1050 #12 0x00002aae866b2314 in __libc_start_main () from /lib/libc.so.6 -- Summary: [4.3 Regression] Segfault in constrain_class_visibility with anonymous namespace Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tbm at cyrius dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31663 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/31663] [4.3 Regression] Segfault in constrain_class_visibility with anonymous namespace 2007-04-23 7:06 [Bug c++/31663] New: [4.3 Regression] Segfault in constrain_class_visibility with anonymous namespace tbm at cyrius dot com @ 2007-04-23 14:07 ` pinskia at gcc dot gnu dot org 2007-04-23 15:53 ` spark 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 @ 2007-04-23 14:07 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from pinskia at gcc dot gnu dot org 2007-04-23 15:07 ------- http://gcc.gnu.org/ml/gcc-patches/2007-04/msg01191.html -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31663 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/31663] [4.3 Regression] Segfault in constrain_class_visibility with anonymous namespace 2007-04-23 7:06 [Bug c++/31663] New: [4.3 Regression] Segfault in constrain_class_visibility with anonymous namespace tbm at cyrius dot com 2007-04-23 14:07 ` [Bug c++/31663] " pinskia at gcc dot gnu dot org @ 2007-04-23 15:53 ` spark at gcc dot gnu dot org 2007-04-30 10:21 ` pinskia at gcc dot gnu dot org ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: spark at gcc dot gnu dot org @ 2007-04-23 15:53 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from spark at gcc dot gnu dot org 2007-04-23 16:53 ------- My patch (which is still waiting for a review) should fix this. -- spark at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |spark at gcc dot gnu dot org |dot org | Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2007-04-23 16:53:04 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31663 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/31663] [4.3 Regression] Segfault in constrain_class_visibility with anonymous namespace 2007-04-23 7:06 [Bug c++/31663] New: [4.3 Regression] Segfault in constrain_class_visibility with anonymous namespace tbm at cyrius dot com 2007-04-23 14:07 ` [Bug c++/31663] " pinskia at gcc dot gnu dot org 2007-04-23 15:53 ` spark at gcc dot gnu dot org @ 2007-04-30 10:21 ` pinskia at gcc dot gnu dot org 2007-05-02 23:11 ` spark at gcc dot gnu dot org 2007-05-06 23:17 ` pinskia at gcc dot gnu dot org 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu dot org @ 2007-04-30 10:21 UTC (permalink / raw) To: gcc-bugs -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pinskia at gcc dot gnu dot | |org Target Milestone|--- |4.3.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31663 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/31663] [4.3 Regression] Segfault in constrain_class_visibility with anonymous namespace 2007-04-23 7:06 [Bug c++/31663] New: [4.3 Regression] Segfault in constrain_class_visibility with anonymous namespace tbm at cyrius dot com ` (2 preceding siblings ...) 2007-04-30 10:21 ` pinskia at gcc dot gnu dot org @ 2007-05-02 23:11 ` spark at gcc dot gnu dot org 2007-05-06 23:17 ` pinskia at gcc dot gnu dot org 4 siblings, 0 replies; 6+ messages in thread From: spark at gcc dot gnu dot org @ 2007-05-02 23:11 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from spark at gcc dot gnu dot org 2007-05-03 00:11 ------- Subject: Bug 31663 Author: spark Date: Wed May 2 23:11:13 2007 New Revision: 124363 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124363 Log: gcc/ChangeLog: 2007-05-02 Seongbae Park <seongbae.park@gmail.com> PR c++/31663 * c-common.c (strip_pointer_or_array_types): New function. * c-common.h (strip_pointer_or_array_types): New function declaration. gcc/cp/ChangeLog: 2007-05-02 Seongbae Park <seongbae.park@gmail.com> PR c++/31663 * decl2.c (constrain_class_visibility): Use strip_pointer_or_array_types instead of strip_array_types. gcc/testsuite/ChangeLog: 2007-05-02 Seongbae Park <seongbae.park@gmail.com> PR C++/31663 * g++.dg/warn/anonymous-namespace-2.C: New. * g++.dg/warn/anonymous-namespace-2.h: New. Added: trunk/gcc/testsuite/g++.dg/warn/anonymous-namespace-2.C trunk/gcc/testsuite/g++.dg/warn/anonymous-namespace-2.h Modified: trunk/gcc/ChangeLog trunk/gcc/c-common.c trunk/gcc/c-common.h trunk/gcc/cp/ChangeLog trunk/gcc/cp/decl2.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31663 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/31663] [4.3 Regression] Segfault in constrain_class_visibility with anonymous namespace 2007-04-23 7:06 [Bug c++/31663] New: [4.3 Regression] Segfault in constrain_class_visibility with anonymous namespace tbm at cyrius dot com ` (3 preceding siblings ...) 2007-05-02 23:11 ` spark at gcc dot gnu dot org @ 2007-05-06 23:17 ` pinskia at gcc dot gnu dot org 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu dot org @ 2007-05-06 23:17 UTC (permalink / raw) To: gcc-bugs ------- Comment #4 from pinskia at gcc dot gnu dot org 2007-05-07 00:17 ------- Fixed. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- OtherBugsDependingO| |29365 nThis| | Status|ASSIGNED |RESOLVED Resolution| |FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31663 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-05-06 23:17 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2007-04-23 7:06 [Bug c++/31663] New: [4.3 Regression] Segfault in constrain_class_visibility with anonymous namespace tbm at cyrius dot com 2007-04-23 14:07 ` [Bug c++/31663] " pinskia at gcc dot gnu dot org 2007-04-23 15:53 ` spark at gcc dot gnu dot org 2007-04-30 10:21 ` pinskia at gcc dot gnu dot org 2007-05-02 23:11 ` spark at gcc dot gnu dot org 2007-05-06 23: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).