www.delorie.com/archives/browse.cgi   search  
Mail Archives: pgcc/1998/09/08/14:02:21

X-pop3-spooler: POP3MAIL 2.1.0 b 4 980420 -bs-
Message-ID: <35F5384E.7610953F@gte.net>
Date: Tue, 08 Sep 1998 06:59:42 -0700
From: John Nishinaga <jingoro AT gte DOT net>
X-Mailer: Mozilla 4.5b1 [en] (X11; I; Linux 2.1.120 i586)
X-Accept-Language: en
MIME-Version: 1.0
To: pgcc-list AT Desk DOT nl
Subject: PCG pgcc-1.1 SIGSEGV
Sender: Marc Lehmann <pcg AT goof DOT com>
Status: RO
X-Status: A
Lines: 83

While trying to compile the GNU package m4 I came across the following
pgcc bug.  It generates the error against pgcc 1.1 but does not generate
an error under egcs 2.91.52 so I assumed it's probably related to pgcc. 
This is under linux 2.1.120 and glibc 2.0.95.  Anyways, here's the info
that I hope is enough to go on...

---
[jingoro AT volume jingoro]$ gcc -c -O -fsoftware-pipe -fopt-jumps-out
-fomit-frame-pointer test.c -v
Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnu/pgcc-2.91.57/specs
gcc version pgcc-2.91.57 19980901 (egcs-1.1 release)
 /usr/lib/gcc-lib/i586-pc-linux-gnu/pgcc-2.91.57/cpp -lang-c -v -undef
-D__GNUC__=2 -D__GNUC_MINOR__=91 -D__ELF__ -Dunix -Dlinux -D__ELF__
-D__unix__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__OPTIMIZE__
-Asystem(unix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__
-Di586 -Dpentium -D__i586 -D__i586__ -D__pentium -D__pentium__ test.c
/tmp/ccMTrxhi.i
GNU CPP version pgcc-2.91.57 19980901 (egcs-1.1 release) (i386
Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/i586-pc-linux-gnu/include
 /usr/lib/gcc-lib/i586-pc-linux-gnu/pgcc-2.91.57/include
 /usr/include
End of search list.
 /usr/lib/gcc-lib/i586-pc-linux-gnu/pgcc-2.91.57/cc1 /tmp/ccMTrxhi.i
-quiet -dumpbase test.c -O -version -fsoftware-pipe -fopt-jumps-out
-fomit-frame-pointer -o /tmp/cctnckSl.s
GNU C version pgcc-2.91.57 19980901 (egcs-1.1 release)
(i586-pc-linux-gnu) compiled by GNU C version pgcc-2.91.57 19980901
(egcs-1.1 release).
gcc: Internal compiler error: program cc1 got fatal signal 11
[jingoro AT volume jingoro]$ cat test.c
enum blah { a,b };

struct {
  enum blah type;
} *c;

int
func (void)
{

  while (1)
    {
      if (c == 0)
        return 1;

      switch (c->type)
        {
        case a:
          return 0;
        case b:
          return 0;
        default:
          somefunc();
        }
    }
}
---

A few notes:

o I tried to prune error down much as I could -- both in source and
optimizations options.  The original source that gave me the initial
error from the m4 distribution was "m4-1.4/src/input.c".  I'm not sure
the segv shown here is the result of the same bug that gave me the error
when trying to compile m4.  (That was with -O6 -mpentium flags.)

o Hopefully this is enough for information for you to go on.  I spent an
hour or so on this trying to track it down the error myself but it's
becoming painfully obvious that I'm probably getting in over my head. 
I'll give it a crack again tomorrow after I get some sleep.

Note: I'm not on the pgcc mailing list so if you need to contact me give
me an email at the address listed below.  I would also be appreciative
if I could get subscriber's address so I can get this list myself.

Adios!

John
jingoro AT gte DOT net

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019