ado@NCIFCRF.GOV (Arthur David Olson) (02/06/89)
(We're running SunOS 4.0 on a Sun 3/110.)
Description:
Gnu GCC 1.33 (plus a fix from rms) can dump core if -O is used
Repeat-By:
Script started on Mon Feb 6 10:33:32 1989
elsie$ cat try.c
func(i, total, pointers)
char * pointers;
{
total -= i;
if (total < 0)
*pointers = i;
}
elsie$ /usr/local/bin/gcc -v -O try.c
gcc version 1.33
/usr/local/lib/gcc-cpp -v -undef -D__GNUC__ -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__OPTIMIZE__ -D__HAVE_68881__ -Dmc68020 try.c /tmp/cca06427.cpp
GNU CPP version 1.33
/usr/local/lib/gcc-cc1 /tmp/cca06427.cpp -quiet -dumpbase try.c -O -version -o /tmp/cca06427.s
GNU C version 1.33 (68k, MIT syntax) compiled by GNU C version 1.33.
/usr/local/bin/gcc: Program cc1 got fatal signal 6.
elsie$ dbx /usr/local/lib/gcc-cc1
Reading symbolic information...
Read 49288 symbols
(dbx) where
kill(0x191f, 0x6) at 0x70be4
abort() at 0x6a971
final(first = 0x8cc20, file = 0x81e20, write_symbols = NO_DEBUG, optimize = 1, prescan = 0, 0x8cc20, 0x81e20, 0x0, 0x1, 0x946ee), line 809 in "final.c"
rest_of_compilation(decl = 0x8cf4c, 0x8eb1e, 0x7), line 1454 in "toplev.c"
finish_function(), line 3509 in "c-decl.c"
yyparse(), line 245 in "bison.simple"
compile_file(name = 0x81e20 ""), line 976 in "toplev.c"
main(argc = 0, argv = 0x8cf4c, envp = 0xefffb54), line 1713 in "toplev.c"
(dbx) quit
elsie$ exit
script done on Mon Feb 6 10:34:13 1989
--
Arthur David Olson ado@ncifcrf.gov ADO is a trademark of Ampex.
bob@allosaur.cis.ohio-state.edu (Bob Sutterfield) (02/07/89)
In article <8902061535.AA06464@elsie> elsie!ado@NCIFCRF.GOV (Arthur David Olson) writes:
Description:
Gnu GCC 1.33 (plus a fix from rms) can dump core if -O is used
Where was this fix published? Did it appear on the bug-gcc mailing
list? If so, would someone please forward it to me, because it didn't
appear on the gnu.gcc.bug newsgroup and I'd like to track down any
problems in the gateway!
Oh, and what did the fix fix? Do I want to install it for myself?
ado@NCIFCRF.GOV (Arthur David Olson) (02/18/89)
(We're running SunOS 4.0 on a Sun 3/280.)
Description:
Gnu gcc 1.33 sometimes dumps core even when the -O option isn't in use.
Repeat-By:
Script started on Fri Feb 17 19:20:28 1989
elsie$ cat try.c
const int l[2][6] = {
31, 28, 31, 30, 31, 30,
31, 29, 31, 30, 31, 30,
};
a() {}
b(i) { l[0][i]; }
elsie$ /usr/local/bin/gcc -v try.c
gcc version 1.33
/usr/local/lib/gcc-cpp -v -undef -D__GNUC__ -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__HAVE_68881__ -Dmc68020 try.c /tmp/cca01929.cpp
GNU CPP version 1.33
/usr/local/lib/gcc-cc1 /tmp/cca01929.cpp -quiet -dumpbase try.c -version -o /tmp/cca01929.s
GNU C version 1.33 (68k, MIT syntax) compiled by GNU C version 1.33.
/usr/local/bin/gcc: Program cc1 got fatal signal 10.
elsie$ exit
script done on Fri Feb 17 19:20:50 1989
--
Arthur David Olson ado@ncifcrf.gov ADO is a trademark of Ampex.
ado@NCIFCRF.GOV (Arthur David Olson) (02/20/89)
Index: ... (We're running SunOS 4.0 on a Sun 3/280.) Description: Gnu gcc 1.33's cc1 can dump core. Repeat-By: Script started on Sun Feb 19 18:12:48 1989 elsie$ cat try.c static char a[] = "xxxxxxxxxxxxxxxx"; static char b[] = "xxxxxxxxxxxxxx"; static char c[] = "xxxxxxxxxxxxxxxx"; static char d[] = "xxxxxxxxxxxxx"; static char e[] = "xxxxxxxxxxxxxxxx"; #include <stdio.h> #include <ctype.h> #include <time.h> #include <string.h> #include <sys/param.h> #include <math.h> #include <sys/stat.h> extern char * calloc(); extern char * malloc(); extern char * realloc(); extern void free(); extern char * getenv(); extern void exit(); extern void qsort(); extern int emkdir(const char * name, int mode); extern int getopt(int argc, char * argv[], const char * options); extern char * icatalloc(char * old, const char * new); extern char * icpyalloc(const char * string); extern void ifree(char * p); extern char * imalloc(int n); extern char * irealloc(char * old, int n); extern int link(const char * fromname, const char * toname); extern char * optarg; extern int optind; extern void perror(const char * string); extern char * scheck(const char * string, const char * format); static void addtt(time_t starttime, int type); static int addtype(long gmtoff, const char * abbr, int isdst); static void addleap(time_t t, int positive, int rolling); static void adjleap(void); static void associate(void); static int ciequal(const char * ap, const char * bp); static void convert(long val, char * buf); static void dolink(const char * fromfile, const char * tofile); static void eat(const char * name, int num); static void eats(const char * name, int num, const char * rname, int rnum); static long eitol(int i); static void error(const char * message); static char ** getfields(char * buf); static long gethms(char * string, char * errstrng, int signable); static void infile(const char * filename); static void inleap(char ** fields, int nfields); static void inlink(char ** fields, int nfields); static void inrule(char ** fields, int nfiekds); static int inzcont(char ** fields, int nfields); static int inzone(char ** fields, int nfields); static int inzsub(char ** fields, int nfields, int iscont); static int itsabbr(const char * abbr, const char * word); static int itsdir(char * name); static int lowerit(int c); char * memcheck(char * tocheck); static int mkdirs(char * filename); static void newabbr(const char * abbr); static long oadd(long t1, long t2); static void outzone(const struct zone * zp, int ntzones); static void puttzcode(long code, FILE * fp); static int rcomp(const void * leftp, const void * rightp); static time_t rpytime(const struct rule * rp, int wantedy); void rulesub(struct rule * rp, char * loyearp, char * hiyearp, char * typep, char * monthp, char * dayp, char * timep); static void setboundaries(void); static time_t tadd(time_t t1, long t2); static void usage(void); static void writezone(const char * name); static int yearistype(int year, const char * type); static int charcnt; static int errors; static const char * filename; static int leapcnt; static int linenum; static time_t max_time; static int max_year; static time_t min_time; static int min_year; static int noise; static const char * rfilename; static int rlinenum; static const char * progname; static int timecnt; static int typecnt; static int tt_signed; struct rule { const char * r_filename; int r_linenum; const char * r_name; int r_loyear; int r_hiyear; const char * r_yrtype; int r_month; int r_dycode; int r_dayofmonth; int r_wday; long r_tod; int r_todisstd; long r_stdoff; const char * r_abbrvar; int r_todo; time_t r_temp; }; static struct rule * rules; static int nrules; struct zone { const char * z_filename; int z_linenum; const char * z_name; long z_gmtoff; const char * z_rule; const char * z_format; long z_stdoff; struct rule * z_rules; int z_nrules; struct rule z_untilrule; time_t z_untiltime; }; static struct zone * zones; static int nzones; struct link { const char * l_filename; int l_linenum; const char * l_from; const char * l_to; }; static struct link * links; static int nlinks; struct lookup { const char * l_word; const int l_value; }; static struct lookup const * byword(char * string, struct lookup * lp); static struct lookup const mon_names[] = { "January", 0, "February", 0, "March", 0, "April", 0, "May", 0, "June", 0, "July", 0, "August", 0, "September", 0, "October", 0, "November", 0, "December", 0, 0, 0 }; static struct lookup const wday_names[] = { "Sunday", 0, "Monday", 0, "Tuesday", 0, "Wednesday", 0, "Thursday", 0, "Friday", 0, "Saturday", 0, 0, 0 }; static struct lookup const lasts[] = { "last-Sunday", 0, "last-Monday", 0, "last-Tuesday", 0, "last-Wednesday", 0, "last-Thursday", 0, "last-Friday", 0, "last-Saturday", 0, 0, 0 }; static struct lookup const begin_years[] = { "minimum", 0, "maximum", 0, 0, 0 }; static struct lookup const end_years[] = { "minimum", 0, "maximum", 0, "only", 0, 0, 0 }; static struct lookup const leap_types[] = { "Rolling", 0, "Stationary", 0, 0, 0 }; static const int len_months[2][12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; static const int len_years[2] = { 365, 366 }; static time_t ats[370]; static unsigned char types[370]; static long gmtoffs[256]; static char isdsts[256]; static char abbrinds[256]; static char chars[50]; static time_t trans[50]; static long corr[50]; static char roll[50]; char * memcheck(ptr) char * ptr; { return ptr; } void rulesub(rp, loyearp, hiyearp, typep, monthp, dayp, timep) struct rule * rp; char * loyearp; char * hiyearp; char * typep; char * monthp; char * dayp; char * timep; { struct lookup const * lp; char * cp; if ((lp = byword(monthp, 0)) == 0) { error("invalid month name"); return; } rp->r_month = lp->l_value; if (*cp != '\0') { cp += strlen(cp) - 1; switch (lowerit(*cp)) { case 's': rp->r_todisstd = 0; break; case 'w': rp->r_todisstd = 0; *cp = '\0'; break; } } rp->r_tod = gethms(timep, "invalid time of day", 0); cp = loyearp; if ((lp = byword(cp, 0)) != 0) switch ((int) lp->l_value) { case 0: rp->r_loyear = min_year; break; case 1: rp->r_loyear = max_year; break; default: (void) exit(0); } else if (sscanf(cp, scheck(cp, "%d"), &rp->r_loyear) != 1 || rp->r_loyear < min_year || rp->r_loyear > max_year) { if (noise) error("invalid starting year"); if (rp->r_loyear > max_year) return; } if ((lp = byword(cp, 0)) != 0) switch ((int) lp->l_value) { case 0: rp->r_hiyear = min_year; break; case 1: rp->r_hiyear = max_year; break; case 2: rp->r_hiyear = rp->r_loyear; break; } else { if (sscanf(cp, scheck(cp, "%d")) != 1 || rp->r_hiyear < min_year || rp->r_hiyear > max_year) { error("invalid ending year"); if (rp->r_hiyear < min_year) return; } } len_months[1][rp->r_month]; } elsie$ /usr/local/bin/gcc -v try.c gcc version 1.33 /usr/local/lib/gcc-cpp -v -undef -D__GNUC__ -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__HAVE_68881__ -Dmc68020 try.c /tmp/cca18840.cpp GNU CPP version 1.33 /usr/local/lib/gcc-cc1 /tmp/cca18840.cpp -quiet -dumpbase try.c -version -o /tmp/cca18840.s GNU C version 1.33 (68k, MIT syntax) compiled by GNU C version 1.33. try.c:60: warning: parameter `zp' points to incomplete type try.c:63: warning: parameter `rp' points to incomplete type try.c:66: warning: parameter `rp' points to incomplete type try.c: In function rulesub: try.c:218: argument `rp' doesn't match function prototype /usr/local/bin/gcc: Program cc1 got fatal signal 11. elsie$ exit script done on Sun Feb 19 18:13:10 1989 -- Arthur David Olson ado@ncifcrf.gov ADO is a trademark of Ampex.