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

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).