This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/6477: Segfault on conflicting types in trivial code



>Number:         6477
>Category:       c++
>Synopsis:       Segfault on conflicting types in trivial code
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 26 08:56:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Ralf Corsepius
>Release:        gcc version 3.1 20020424 (prerelease)
>Organization:
>Environment:
i686-linux, binutils-2.12.90.0.4

Configured with: ../configure --enable-threads=posix --enable-long-long --prefix=/opt/gcc31 --mandir=/opt/gcc31/share/man --infodir=/opt/gcc31/share/info --with-local-prefix=/usr/local --enable-languages=c,c++ --disable-nls --enable-shared --with-system-zlib --host=i486-suse-linux --build=i486-suse-linux
>Description:
# g++31 -o pr6465.o pr6465.cc
pr6465.cc:2: internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

This is a regression against 3.0.4, which correctly diagnoses the illegal code:
# g++ -o pr6465.o pr6465.cc
pr6465.cc:2: conflicting types for `struct Tk_PostscriptInfo'
pr6465.cc:1: previous declaration as `typedef struct 
   Tk_PostscriptInfo_*Tk_PostscriptInfo'

Note: This PR replaces PR6465, which can be closed.
>How-To-Repeat:
Compile this code (Also in the attachment)

typedef struct Tk_PostscriptInfo_ *Tk_PostscriptInfo;
typedef struct Tk_PostscriptInfo Tk_PostscriptInfo;
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="pr6465.cc"
Content-Disposition: inline; filename="pr6465.cc"

typedef struct Tk_PostscriptInfo_ *Tk_PostscriptInfo;
typedef struct Tk_PostscriptInfo Tk_PostscriptInfo;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]