public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/24302]  New: anonymous global union segfault with g++ 3.4.2 on solaris 8
@ 2005-10-10 22:30 jack dot alderson at xfab dot com
  2005-10-10 22:36 ` [Bug c++/24302] " jack dot alderson at xfab dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: jack dot alderson at xfab dot com @ 2005-10-10 22:30 UTC (permalink / raw)
  To: gcc-bugs

Using an anonymous global union causes g++ 3.4.2 to segfault on a Sun Ultra 5
running Solaris 8. Giving the anonymous union a name or making it a local
anonymous union allows it to compile successfully. A test compile of the same
code minus the -mcpu=ultrasparc flag on a SUSE LINUX 8.2 box using g++ 3.3
compiles successfully with no errors using the same anonymous union. I will
upload the small test files if I can find the option to do it.


-- 
           Summary: anonymous global union segfault with g++ 3.4.2 on
                    solaris 8
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jack dot alderson at xfab dot com


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


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

* [Bug c++/24302] anonymous global union segfault with g++ 3.4.2 on solaris 8
  2005-10-10 22:30 [Bug c++/24302] New: anonymous global union segfault with g++ 3.4.2 on solaris 8 jack dot alderson at xfab dot com
@ 2005-10-10 22:36 ` jack dot alderson at xfab dot com
  2005-10-10 22:37 ` jack dot alderson at xfab dot com
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jack dot alderson at xfab dot com @ 2005-10-10 22:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jack dot alderson at xfab dot com  2005-10-10 22:36 -------
Created an attachment (id=9955)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9955&action=view)
source file that causes the segfault

Compile source file as is to generate segfault. Enter union name at comment in
source file to have a successful compile.


-- 


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


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

* [Bug c++/24302] anonymous global union segfault with g++ 3.4.2 on solaris 8
  2005-10-10 22:30 [Bug c++/24302] New: anonymous global union segfault with g++ 3.4.2 on solaris 8 jack dot alderson at xfab dot com
  2005-10-10 22:36 ` [Bug c++/24302] " jack dot alderson at xfab dot com
@ 2005-10-10 22:37 ` jack dot alderson at xfab dot com
  2005-10-10 22:39 ` jack dot alderson at xfab dot com
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jack dot alderson at xfab dot com @ 2005-10-10 22:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jack dot alderson at xfab dot com  2005-10-10 22:37 -------
Created an attachment (id=9956)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9956&action=view)
g++ 3.4.2 segfault output

The output of the compiler during a segfault.


-- 


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


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

* [Bug c++/24302] anonymous global union segfault with g++ 3.4.2 on solaris 8
  2005-10-10 22:30 [Bug c++/24302] New: anonymous global union segfault with g++ 3.4.2 on solaris 8 jack dot alderson at xfab dot com
  2005-10-10 22:36 ` [Bug c++/24302] " jack dot alderson at xfab dot com
  2005-10-10 22:37 ` jack dot alderson at xfab dot com
@ 2005-10-10 22:39 ` jack dot alderson at xfab dot com
  2005-10-10 22:43 ` [Bug c++/24302] [3.4/4.0/4.1 regression] " pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jack dot alderson at xfab dot com @ 2005-10-10 22:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jack dot alderson at xfab dot com  2005-10-10 22:39 -------
Created an attachment (id=9957)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9957&action=view)
The *.i* file

The *.i* file specified on the submit instructions.


-- 


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


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

* [Bug c++/24302] [3.4/4.0/4.1 regression] anonymous global union segfault with g++ 3.4.2 on solaris 8
  2005-10-10 22:30 [Bug c++/24302] New: anonymous global union segfault with g++ 3.4.2 on solaris 8 jack dot alderson at xfab dot com
                   ` (3 preceding siblings ...)
  2005-10-10 22:43 ` [Bug c++/24302] [3.4/4.0/4.1 regression] " pinskia at gcc dot gnu dot org
@ 2005-10-10 22:43 ` jack dot alderson at xfab dot com
  2005-10-11  0:55 ` [Bug c++/24302] [3.4/4.0/4.1 regression] anonymous global union segfault with g++ 3.4.x mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jack dot alderson at xfab dot com @ 2005-10-10 22:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jack dot alderson at xfab dot com  2005-10-10 22:43 -------
Created an attachment (id=9958)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9958&action=view)
makefile

makefile for convienence.


-- 


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


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

* [Bug c++/24302] [3.4/4.0/4.1 regression] anonymous global union segfault with g++ 3.4.2 on solaris 8
  2005-10-10 22:30 [Bug c++/24302] New: anonymous global union segfault with g++ 3.4.2 on solaris 8 jack dot alderson at xfab dot com
                   ` (2 preceding siblings ...)
  2005-10-10 22:39 ` jack dot alderson at xfab dot com
@ 2005-10-10 22:43 ` pinskia at gcc dot gnu dot org
  2005-10-10 22:43 ` jack dot alderson at xfab dot com
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-10 22:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2005-10-10 22:43 -------
Confirmed, reduced testcase with -Wunused:
static union
{
unsigned char FLT4ARR[4];
float FLT4;
};


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-valid-code
      Known to fail|                            |3.4.0 4.0.0 4.1.0
      Known to work|                            |3.3.3
   Last reconfirmed|0000-00-00 00:00:00         |2005-10-10 22:43:16
               date|                            |
            Summary|anonymous global union      |[3.4/4.0/4.1 regression]
                   |segfault with g++ 3.4.2 on  |anonymous global union
                   |solaris 8                   |segfault with g++ 3.4.2 on
                   |                            |solaris 8
   Target Milestone|---                         |4.0.3


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


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

* [Bug c++/24302] [3.4/4.0/4.1 regression] anonymous global union segfault with g++ 3.4.x
  2005-10-10 22:30 [Bug c++/24302] New: anonymous global union segfault with g++ 3.4.2 on solaris 8 jack dot alderson at xfab dot com
                   ` (4 preceding siblings ...)
  2005-10-10 22:43 ` jack dot alderson at xfab dot com
@ 2005-10-11  0:55 ` mmitchel at gcc dot gnu dot org
  2005-10-11  6:20 ` cvs-commit at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-10-11  0:55 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |mark at codesourcery dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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


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

* [Bug c++/24302] [3.4/4.0/4.1 regression] anonymous global union segfault with g++ 3.4.x
  2005-10-10 22:30 [Bug c++/24302] New: anonymous global union segfault with g++ 3.4.2 on solaris 8 jack dot alderson at xfab dot com
                   ` (6 preceding siblings ...)
  2005-10-11  6:20 ` cvs-commit at gcc dot gnu dot org
@ 2005-10-11  6:20 ` cvs-commit at gcc dot gnu dot org
  2005-10-11  6:22 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-10-11  6:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from cvs-commit at gcc dot gnu dot org  2005-10-11 06:20 -------
Subject: Bug 24302

CVSROOT:        /cvs/gcc
Module name:    gcc
Branch:         gcc-4_0-branch
Changes by:     mmitchel@gcc.gnu.org    2005-10-11 06:20:35

Modified files:
        gcc            : toplev.c 
        gcc/testsuite  : ChangeLog 
Added files:
        gcc/testsuite/g++.dg/warn: Wunused-12.C 

Log message:
        PR c++/24302
        * toplev.c (check_global_declaration_1): Robustify.
        PR c++/24302
        * g++.dg/warn/Wunused-12.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/toplev.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.944.2.6&r2=1.944.2.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/warn/Wunused-12.C.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.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.439&r2=1.5084.2.440


-- 


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


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

* [Bug c++/24302] [3.4/4.0/4.1 regression] anonymous global union segfault with g++ 3.4.x
  2005-10-10 22:30 [Bug c++/24302] New: anonymous global union segfault with g++ 3.4.2 on solaris 8 jack dot alderson at xfab dot com
                   ` (5 preceding siblings ...)
  2005-10-11  0:55 ` [Bug c++/24302] [3.4/4.0/4.1 regression] anonymous global union segfault with g++ 3.4.x mmitchel at gcc dot gnu dot org
@ 2005-10-11  6:20 ` cvs-commit at gcc dot gnu dot org
  2005-10-11  6:20 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-10-11  6:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from cvs-commit at gcc dot gnu dot org  2005-10-11 06:20 -------
Subject: Bug 24302

CVSROOT:        /cvs/gcc
Module name:    gcc
Changes by:     mmitchel@gcc.gnu.org    2005-10-11 06:19:56

Modified files:
        gcc            : toplev.c 
        gcc/cp         : ChangeLog 
        gcc/testsuite  : ChangeLog 
Added files:
        gcc/testsuite/g++.dg/warn: Wunused-12.C 

Log message:
        PR c++/24302
        * toplev.c (check_global_declaration_1): Robustify.
        PR c++/24302
        * g++.dg/warn/Wunused-12.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/toplev.c.diff?cvsroot=gcc&r1=1.976&r2=1.977
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/warn/Wunused-12.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4917&r2=1.4918
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6160&r2=1.6161


-- 


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


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

* [Bug c++/24302] [3.4/4.0/4.1 regression] anonymous global union segfault with g++ 3.4.x
  2005-10-10 22:30 [Bug c++/24302] New: anonymous global union segfault with g++ 3.4.2 on solaris 8 jack dot alderson at xfab dot com
                   ` (7 preceding siblings ...)
  2005-10-11  6:20 ` cvs-commit at gcc dot gnu dot org
@ 2005-10-11  6:22 ` cvs-commit at gcc dot gnu dot org
  2005-10-11  6:30 ` mmitchel at gcc dot gnu dot org
  2006-03-23 19:55 ` dpatel at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-10-11  6:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from cvs-commit at gcc dot gnu dot org  2005-10-11 06:22 -------
Subject: Bug 24302

CVSROOT:        /cvs/gcc
Module name:    gcc
Branch:         gcc-4_0-branch
Changes by:     mmitchel@gcc.gnu.org    2005-10-11 06:22:09

Modified files:
        gcc            : ChangeLog 

Log message:
        PR c++/24302
        * toplev.c (check_global_declaration_1): Robustify.

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.456&r2=2.7592.2.457


-- 


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


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

* [Bug c++/24302] [3.4/4.0/4.1 regression] anonymous global union segfault with g++ 3.4.x
  2005-10-10 22:30 [Bug c++/24302] New: anonymous global union segfault with g++ 3.4.2 on solaris 8 jack dot alderson at xfab dot com
                   ` (8 preceding siblings ...)
  2005-10-11  6:22 ` cvs-commit at gcc dot gnu dot org
@ 2005-10-11  6:30 ` mmitchel at gcc dot gnu dot org
  2006-03-23 19:55 ` dpatel at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-10-11  6:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from mmitchel at gcc dot gnu dot org  2005-10-11 06:30 -------
Fixed in 4.0.3.


-- 

mmitchel at gcc dot gnu dot org changed:

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


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


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

* [Bug c++/24302] [3.4/4.0/4.1 regression] anonymous global union segfault with g++ 3.4.x
  2005-10-10 22:30 [Bug c++/24302] New: anonymous global union segfault with g++ 3.4.2 on solaris 8 jack dot alderson at xfab dot com
                   ` (9 preceding siblings ...)
  2005-10-11  6:30 ` mmitchel at gcc dot gnu dot org
@ 2006-03-23 19:55 ` dpatel at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: dpatel at gcc dot gnu dot org @ 2006-03-23 19:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from dpatel at gcc dot gnu dot org  2006-03-23 19:55 -------
Subject: Bug 24302

Author: dpatel
Date: Thu Mar 23 19:55:47 2006
New Revision: 112329

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=112329
Log:
       Radar 4484060
       PR c++/24302
       * toplev.c (check_global_declarations): Check anonymous
       decl name.

       * g++.dg/warn/Wunused-12.C: New test.

Added:
    branches/apple/trunk/gcc/testsuite/g++.dg/warn/Wunused-12.C
      - copied, changed from r105222,
trunk/gcc/testsuite/g++.dg/warn/Wunused-12.C
Modified:
    branches/apple/trunk/gcc/ChangeLog
    branches/apple/trunk/gcc/testsuite/ChangeLog
    branches/apple/trunk/gcc/toplev.c


-- 


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


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

end of thread, other threads:[~2006-03-23 19:55 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-10 22:30 [Bug c++/24302] New: anonymous global union segfault with g++ 3.4.2 on solaris 8 jack dot alderson at xfab dot com
2005-10-10 22:36 ` [Bug c++/24302] " jack dot alderson at xfab dot com
2005-10-10 22:37 ` jack dot alderson at xfab dot com
2005-10-10 22:39 ` jack dot alderson at xfab dot com
2005-10-10 22:43 ` [Bug c++/24302] [3.4/4.0/4.1 regression] " pinskia at gcc dot gnu dot org
2005-10-10 22:43 ` jack dot alderson at xfab dot com
2005-10-11  0:55 ` [Bug c++/24302] [3.4/4.0/4.1 regression] anonymous global union segfault with g++ 3.4.x mmitchel at gcc dot gnu dot org
2005-10-11  6:20 ` cvs-commit at gcc dot gnu dot org
2005-10-11  6:20 ` cvs-commit at gcc dot gnu dot org
2005-10-11  6:22 ` cvs-commit at gcc dot gnu dot org
2005-10-11  6:30 ` mmitchel at gcc dot gnu dot org
2006-03-23 19:55 ` dpatel 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).