This is the mail archive of the egcs@egcs.cygnus.com mailing list for the EGCS project. See the EGCS home page for more information.


[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]

egcs/gcc internal errors in the recent snapshot




Hello everybody -

This is a followup on my old bug report. Now it is about the recent
snapshot...

I. Hardware/software configuration:

1. The machine: Alpha 21264 (ev6) dual-CPU
		RedHat Linux 5.2, kernel 2.2.1 (SMP)


2. The compiler:

Reading specs from /bb/abel2/egcs/lib/gcc-lib/alphaev6-unknown-linux-gnu/egcs-2.93.11/specs
gcc version egcs-2.93.11 19990307 (gcc2 ss-980929 experimental)


II. Internal error #1

1. The file:

===============================================

#define MAX_BLOCKS 12

#define true 1

typedef unsigned char boolean;

typedef struct bar_t {
  struct {
    boolean over_allocated;
  } *block[MAX_BLOCKS];
} bar_t;


struct foo_t {
  bar_t **bar;

  struct 
  {
    double p, i;
    boolean oa;
  } ba[MAX_BLOCKS];
} ;


void 
end_tranches(struct foo_t *foo)
{
  long t, num_p, i;
  long forlim;

  for (i = 1; i <= forlim; i++) {
    if (foo->ba[i-1].p - 1.0e0 > 1.0e-8) {
      if (foo->ba[i-1].oa) {
      }
      else {
	error_message(132, 0, 9, true, true, 0, 3);
      }
    }
    if (foo->ba[i-1].i - 1.0e0 > 1.0e-8) {
      if (foo->ba[i-1].oa) {
	(*foo->bar)->block[i-1]->over_allocated = 1;
      }
      else {
	error_message(132, 0, 9, true, true, 0, 3);
      }
    }
  }
}


===============================================


2. The error:

===============================================
$ gcc -O2 -g egcs_crash3.c
egcs_crash3.c: In function `end_tranches':
egcs_crash3.c:49: internal error--insn does not satisfy its constraints:
(insn 309 282 214 (set (reg:QI 36 $f4)
        (reg:QI 3 $3)) 288 {movsi-1} (nil)
    (nil))
toplev.c:1447: Internal compiler error in function fatal_insn
Please submit a full bug report to `egcs-bugs@egcs.cygnus.com'.
See <URL:http://egcs.cygnus.com/faq.html#bugreport> for details.
===============================================




III. Internal error #2

1. The pristine file (preprocessed version follows):

===============================================
#include <string.h>


typedef struct foo_t {
  double foo, bar;
} foo_t;


void 
foobar(void)
{
  long maddr;
  foo_t payment;

  memcpy(maddr, (long)(&payment), sizeof(foo_t));
}
===============================================


2. The error:

===============================================
$ gcc -O2 -g egcs_crash1.c
egcs_crash1.c: In function `foobar':
egcs_crash1.c:15: warning: passing arg 1 of `memcpy' makes pointer from integer without a cast
egcs_crash1.c:15: warning: passing arg 2 of `memcpy' makes pointer from integer without a cast
./config/alpha/alpha.c:2176: Internal compiler error in function alpha_expand_block_move
Please submit a full bug report to `egcs-bugs@egcs.cygnus.com'.
See <URL:http://egcs.cygnus.com/faq.html#bugreport> for details.



$ gcc -g -c egcs_crash1.c
egcs_crash1.c: In function `foobar':
egcs_crash1.c:15: warning: passing arg 1 of `memcpy' makes pointer from integer without a cast
egcs_crash1.c:15: warning: passing arg 2 of `memcpy' makes pointer from integer without a cast
===============================================


3. The cpp'ed source:

egcs_crash1.i.gz



-- 
Alexander L. Belikoff
Bloomberg L.P. / BFM Financial Research Ltd.
abel@vallinor4.com, abel@bfr.co.il