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

* [Bug c++/19916] [3.4/4.0? Regression] Segmentation fault in __static_initialization_and_destruction_0
  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 ` pinskia at gcc dot gnu dot org
  2005-02-16 19:19 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-12 15:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-11 23:12 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |19878
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |wrong-code
   Last reconfirmed|0000-00-00 00:00:00         |2005-02-11 23:12:41
               date|                            |
            Summary|Segmentation fault in       |[3.4/4.0? Regression]
                   |__static_initialization_and_|Segmentation fault in
                   |destruction_0               |__static_initialization_and_
                   |                            |destruction_0
   Target Milestone|---                         |3.4.4


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


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

* [Bug c++/19916] [3.4/4.0? Regression] Segmentation fault in __static_initialization_and_destruction_0
  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
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-16 19:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-16 15:29 -------
The behavior changed between 20030722 and 20030724.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org


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


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

* [Bug c++/19916] [3.4/4.0? Regression] Segmentation fault in __static_initialization_and_destruction_0
  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 ` mmitchel at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-16 19:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-16 15:33 -------
I think this was caused by:
2003-07-22  Mark Mitchell  <mark@codesourcery.com>

        Eliminate use of POINTER_TYPE for pointers-to-members.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mark at codesourcery dot com


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


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

* [Bug c++/19916] [3.4/4.0 Regression] Segmentation fault in __static_initialization_and_destruction_0
  2005-02-12 14:07 [Bug c++/19916] New: Segmentation fault in __static_initialization_and_destruction_0 jgrimm2 at us dot ibm dot com
                   ` (3 preceding siblings ...)
  2005-02-24 14:05 ` mmitchel at gcc dot gnu dot org
@ 2005-02-24 14:05 ` 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
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-02-24 14:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2005-02-24 02:45 -------
Now that 19878 has been fixed, we can see that this does in fact fail on the
mainline as well.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |mark at codesourcery dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED
            Summary|[3.4/4.0? Regression]       |[3.4/4.0 Regression]
                   |Segmentation fault in       |Segmentation fault in
                   |__static_initialization_and_|__static_initialization_and_
                   |destruction_0               |destruction_0


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


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

* [Bug c++/19916] [3.4/4.0? Regression] Segmentation fault in __static_initialization_and_destruction_0
  2005-02-12 14:07 [Bug c++/19916] New: Segmentation fault in __static_initialization_and_destruction_0 jgrimm2 at us dot ibm dot com
                   ` (2 preceding siblings ...)
  2005-02-16 19:26 ` pinskia at gcc dot gnu dot org
@ 2005-02-24 14:05 ` 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
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-02-24 14:05 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 19916 depends on bug 19878, which changed state.

Bug 19878 Summary: [4.0 Regression] ICE in import_export_decl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19878

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

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


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

* [Bug c++/19916] [3.4/4.0/4.1 Regression] Segmentation fault in __static_initialization_and_destruction_0
  2005-02-12 14:07 [Bug c++/19916] New: Segmentation fault in __static_initialization_and_destruction_0 jgrimm2 at us dot ibm dot com
                   ` (4 preceding siblings ...)
  2005-02-24 14:05 ` [Bug c++/19916] [3.4/4.0 " mmitchel at gcc dot gnu dot org
@ 2005-03-02 17:13 ` cvs-commit at gcc dot gnu dot org
  2005-03-02 20:56 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-02 17:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-03-02 17:13 -------
Subject: Bug 19916

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2005-03-02 17:13:10

Modified files:
	gcc            : ChangeLog varasm.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/init: ptrmem2.C 

Log message:
	PR c++/19916
	* varasm.c (initializer_constant_valid_p): Allow conversions
	between OFFSET_TYPEs.  Tidy.
	
	PR c++/19916
	* g++.dg/init/ptrmem2.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7636&r2=2.7637
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/varasm.c.diff?cvsroot=gcc&r1=1.477&r2=1.478
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5102&r2=1.5103
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/ptrmem2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug c++/19916] [3.4/4.0/4.1 Regression] Segmentation fault in __static_initialization_and_destruction_0
  2005-02-12 14:07 [Bug c++/19916] New: Segmentation fault in __static_initialization_and_destruction_0 jgrimm2 at us dot ibm dot com
                   ` (5 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-02 20:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-03-02 20:56 -------
Subject: Bug 19916

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	mmitchel@gcc.gnu.org	2005-03-02 20:55:58

Modified files:
	gcc            : ChangeLog varasm.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/init: ptrmem2.C 

Log message:
	PR c++/19916
	* varasm.c (initializer_constant_valid_p): Allow conversions
	between OFFSET_TYPEs.  Tidy.
	
	PR c++/19916
	* g++.dg/init/ptrmem2.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.18&r2=2.7592.2.19
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/varasm.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.477&r2=1.477.6.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.13&r2=1.5084.2.14
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/ptrmem2.C.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1



-- 


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


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

* [Bug c++/19916] [3.4/4.0/4.1 Regression] Segmentation fault in __static_initialization_and_destruction_0
  2005-02-12 14:07 [Bug c++/19916] New: Segmentation fault in __static_initialization_and_destruction_0 jgrimm2 at us dot ibm dot com
                   ` (6 preceding siblings ...)
  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
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-02 20:58 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-03-02 20:58 -------
Subject: Bug 19916

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	mmitchel@gcc.gnu.org	2005-03-02 20:57:53

Modified files:
	gcc            : ChangeLog varasm.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/init: ptrmem2.C 

Log message:
	PR c++/19916
	* varasm.c (initializer_constant_valid_p): Allow conversions
	between OFFSET_TYPEs.  Tidy.
	
	PR c++/19916
	* g++.dg/init/ptrmem2.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.809&r2=2.2326.2.810
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/varasm.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.405.2.6&r2=1.405.2.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.366&r2=1.3389.2.367
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/ptrmem2.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.4.1



-- 


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


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

* [Bug c++/19916] [3.4/4.0/4.1 Regression] Segmentation fault in __static_initialization_and_destruction_0
  2005-02-12 14:07 [Bug c++/19916] New: Segmentation fault in __static_initialization_and_destruction_0 jgrimm2 at us dot ibm dot com
                   ` (7 preceding siblings ...)
  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
  9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-03-02 21:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2005-03-02 21:04 -------
Fixed in GCC 3.4.4.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug c++/19916] [3.4/4.0/4.1 Regression] Segmentation fault in __static_initialization_and_destruction_0
  2005-02-12 14:07 [Bug c++/19916] New: Segmentation fault in __static_initialization_and_destruction_0 jgrimm2 at us dot ibm dot com
                   ` (8 preceding siblings ...)
  2005-03-02 21:04 ` mmitchel at gcc dot gnu dot org
@ 2005-03-07 16:04 ` jgrimm2 at us dot ibm dot com
  9 siblings, 0 replies; 11+ messages in thread
From: jgrimm2 at us dot ibm dot com @ 2005-03-07 16:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jgrimm2 at us dot ibm dot com  2005-03-07 16:04 -------
Verified. Thanks.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |VERIFIED


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