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]

[Bug c++/11852] New: ICE: g++ with bad struct initializer.


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: ICE: g++ with bad struct initializer.
           Product: gcc
           Version: 3.2.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: krh at bitplanet dot net
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: Redhat build, don't know.
  GCC host triplet: i386-redhat-linux
GCC target triplet: i386-redhat-linux

g++ crashes with an ICE on the following program:

  struct bug {
    const char *name;
    unsigned long type;
  };

  struct bug s = { 0, (unsigned long) &s | 1 };

When compiled as C code, gcc says "initializer element is not computable at load
time".

Output of gcc -v:

Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)


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