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]

crash compiling mozilla using egcs CVS tree of 9/9/1998


The code below, when compiled with -fPIC, will fail with

crash1a.c: In function `XmlInitUnknownEncoding':
crash1a.c:12: internal error--unrecognizable insn:
(insn 28 26 30 (set (reg:SI 27)
        (const (unspec[ 
                    (symbol_ref/v:SI ("latin1_encoding"))
                ]  7))) -1 (nil)
    (nil))
../../egcs/gcc/toplev.c:1365: Internal compiler error in function fatal_insn

using an updated egcs CVS tree of 9/9/1998.  If you add any form of
optimization, the crash will go away.  (Found while doing a linux build of the 
current mozilla CVS tree.)

Host is Redhat linux 5.0 w/ kernel 2.0.32, with glibc-2.0.7-19.

-- cut --
struct normal_encoding {};
struct unknown_encoding {};
static const struct normal_encoding latin1_encoding = {};

struct encoding*
XmlInitUnknownEncoding(void *mem)
{
  int i;
  struct unknown_encoding *e = mem;
  for (i = 0; i < sizeof(struct normal_encoding); i++)
    ((char *)mem)[i] = ((char *)&latin1_encoding)[i];
}
-- cut --


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