public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19916] New: Segmentation fault in __static_initialization_and_destruction_0
@ 2005-02-12 14:07 jgrimm2 at us dot ibm dot com
  2005-02-12 15:06 ` [Bug c++/19916] [3.4/4.0? Regression] " pinskia at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: jgrimm2 at us dot ibm dot com @ 2005-02-12 14:07 UTC (permalink / raw)
  To: gcc-bugs

The following testcase segfaults on 3.4.4 and 3.4.0, but runs to completion on
3.2.3.

Note this test won't even compile on mainline, so I don't know if the same
problem exists there.   See:
  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19878
--------------------------------------------------------

//test.c
struct S {
  char k;
};

char const volatile S::* const p01 = &S::k;
int main(void)
{
  return  0;
}


--------------------------------------------------------  

/opt/gcc-nightly/3.4-20050211/bin/g++ -o test test.c 
./test 
Segmentation fault

------------------------------------------------

$ gdb ./test
(gdb) run
Starting program: /home/jgrimm/tmp/13930/test

Program received signal SIGSEGV, Segmentation fault.
0x10000474 in __static_initialization_and_destruction_0 (__initialize_p=1,
    __priority=65535) at g.c:5
5       char const volatile S::* const p01 = &S::k;

-----------------------------------------------

$ /opt/gcc-nightly/3.4-20050211/bin/g++ -v
Reading specs from
/home/gcc-nightly/3.4-20050211/bin/../lib/gcc/powerpc64-linux/3.4.4/specs
Configured with: /home/gccbuild/gcc_3.4_anoncvs/gcc/configure
--prefix=/opt/gcc-nightly/3.4-20050211 --build=powerpc64-linux
--host=powerpc64-linux --target=powerpc64-linux --with-cpu=default32
--with-as=/opt/gcc-nightly/binutils/bin/as
--with-ld=/opt/gcc-nightly/binutils/bin/ld --enable-threads=posix
--enable-shared --enable-__cxa_atexit --enable-languages=c,c++,f77,java,objc
Thread model: posix
gcc version 3.4.4 20050211 (prerelease)

-- 
           Summary: Segmentation fault in
                    __static_initialization_and_destruction_0
           Product: gcc
           Version: 3.4.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jgrimm2 at us dot ibm dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: ppc64-unknown-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19916


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-03-07 16:04 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-12 14:07 [Bug c++/19916] New: Segmentation fault in __static_initialization_and_destruction_0 jgrimm2 at us dot ibm dot com
2005-02-12 15:06 ` [Bug c++/19916] [3.4/4.0? Regression] " pinskia at gcc dot gnu dot org
2005-02-16 19:19 ` pinskia at gcc dot gnu dot org
2005-02-16 19:26 ` pinskia at gcc dot gnu dot org
2005-02-24 14:05 ` [Bug c++/19916] [3.4/4.0 " mmitchel at gcc dot gnu dot org
2005-02-24 14:05 ` [Bug c++/19916] [3.4/4.0? " mmitchel at gcc dot gnu dot org
2005-03-02 17:13 ` [Bug c++/19916] [3.4/4.0/4.1 " cvs-commit at gcc dot gnu dot org
2005-03-02 20:56 ` cvs-commit at gcc dot gnu dot org
2005-03-02 20:58 ` cvs-commit at gcc dot gnu dot org
2005-03-02 21:04 ` mmitchel at gcc dot gnu dot org
2005-03-07 16:04 ` jgrimm2 at us dot ibm dot com

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