Article View: gnu.gcc.bug
Article #6168Sorry, now here it is uncoded ...
From: Andy Shaw
Date: Thu, 21 Nov 1996 00:00
Date: Thu, 21 Nov 1996 00:00
1890 lines
40442 bytes
40442 bytes
Hi:
OK, sorry, I misread the previous e-mail which suggested that I send
uncoded ASCII.
I've included the body of the original e-mail, and the pre-processed C
file. Any help is very much appreciated ...
-Andy
====================================================================================
OK, one more try ... this file makes gcc dump core on -O2, but not on -O.
It is running on a Sparc 10, under SunOS 4.1.3.
The following is uuencoded pre-processed (using -E option on gcc) C file.
Any help would be appreciated -- even just pointers to what I should avoid
that caused this problem. Fixing gcc would be great, but it might be
easier for me to avoid this problem, because this is machine-generated C
..
====================================================================================
# 1 "qsort-par.c"
# 1 "/map/sys/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2.1/include/stdio.h" 1 3
# 1 "/map/sys/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2.1/include/stdarg.h" 1 3
# 1 "/map/sys/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2.1/include/va-sparc.h" 1 3
# 19 "/map/sys/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2.1/include/va-sparc.h" 3
typedef char * __gnuc_va_list;
# 203 "/map/sys/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2.1/include/va-sparc.h" 3
# 30 "/map/sys/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2.1/include/stdarg.h" 2 3
# 100 "/map/sys/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2.1/include/stdarg.h" 3
# 171 "/map/sys/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2.1/include/stdarg.h" 3
# 9 "/map/sys/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2.1/include/stdio.h" 2 3
extern struct _iobuf {
int _cnt;
unsigned char *_ptr;
unsigned char *_base;
int _bufsiz;
short _flag;
char _file;
} _iob[];
extern struct _iobuf *fopen (const char *, const char *) ;
extern struct _iobuf *fdopen (int, const char *) ;
extern struct _iobuf *freopen (const char *, const char *, struct _iobuf *) ;
extern struct _iobuf *popen (const char *, const char *) ;
extern struct _iobuf *tmpfile();
extern long ftell (struct _iobuf *) ;
extern char *fgets (char *, int, struct _iobuf *) ;
extern char *gets (char *) ;
extern char *sprintf (char *, const char *, ...) ;
extern char *ctermid (char *) ;
extern char *cuserid (char *) ;
extern char *tempnam (const char *, const char *) ;
extern char *tmpnam (char *) ;
# 118 "/map/sys/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2.1/include/stdio.h" 3
# 1 "qsort-par.c" 2
# 1 "/map/sys/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2.1/include/math.h" 1 3
extern double __infinity();
extern double acos (double) ;
extern double asin (double) ;
extern double atan (double) ;
extern double atan2 (double, double) ;
extern double ceil (double) ;
extern double cos (double) ;
extern double cosh (double) ;
extern double exp (double) ;
extern double fabs (double) ;
extern double floor (double) ;
extern double fmod (double, double) ;
extern double frexp (double, int *) ;
extern double ldexp (double, int) ;
extern double log (double) ;
extern double log10 (double) ;
extern double modf (double, double *) ;
extern double pow (double, double) ;
extern double sin (double) ;
extern double sinh (double) ;
extern double sqrt (double) ;
extern double tan (double) ;
extern double tanh (double) ;
# 1 "/map/sys/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2.1/include/floatingpoint.h" 1 3
# 1 "/map/sys/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2.1/include/sys/ieeefp.h" 1 3
enum fp_direction_type
{
fp_nearest = 0,
fp_tozero = 1,
fp_positive = 2,
fp_negative = 3
} ;
# 34 "/map/sys/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2.1/include/sys/ieeefp.h" 3
# 43 "/map/sys/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2.1/include/sys/ieeefp.h" 3
# 53 "/map/sys/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2.1/include/sys/ieeefp.h" 3
enum fp_precision_type
{
fp_extended = 0,
fp_single = 1,
fp_double = 2,
fp_precision_3 = 3
} ;
# 73 "/map/sys/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2.1/include/sys/ieeefp.h" 3
enum fp_exception_type
{
fp_inexact = 0,
fp_division = 1,
fp_underflow = 2,
fp_overflow = 3,
fp_invalid = 4
} ;
enum fp_class_type
{
fp_zero = 0,
fp_subnormal = 1,
fp_normal = 2,
fp_infinity = 3,
fp_quiet = 4,
fp_signaling = 5
} ;
# 25 "/map/sys/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2.1/include/floatingpoint.h" 2 3
typedef float single;
typedef unsigned long extended[3];
typedef long double quadruple;
typedef unsigned fp_exception_field_type;
typedef int sigfpe_code_type;
typedef void (*sigfpe_handler_type) ();
extern enum fp_direction_type fp_direction;
extern enum fp_precision_type fp_precision;
extern fp_exception_field_type fp_accrued_exceptions;
typedef char decimal_string[512 ];
typedef struct {
enum fp_class_type fpclass;
int sign;
int exponent;
decimal_string ds;
int more;
int ndigits;
}
decimal_record;
enum decimal_form {
fixed_form,
floating_form
};
typedef struct {
enum fp_direction_type rd;
enum decimal_form df;
int ndigits;
}
decimal_mode;
enum decimal_string_form {
invalid_form,
whitespace_form,
fixed_int_form,
fixed_intdot_form,
fixed_dotfrac_form,
fixed_intdotfrac_form,
floating_int_form,
floating_intdot_form,
floating_dotfrac_form,
floating_intdotfrac_form,
inf_form,
infinity_form,
nan_form,
nanstring_form
};
extern void double_to_decimal();
extern void quadruple_to_decimal();
extern char *econvert();
extern char *fconvert();
extern char *gconvert();
extern char *qeconvert();
extern char *qfconvert();
extern char *qgconvert();
extern sigfpe_handler_type ieee_handlers[5 ];
extern sigfpe_handler_type sigfpe();
extern void single_to_decimal();
extern void extended_to_decimal();
extern void decimal_to_single();
extern void decimal_to_double();
extern void decimal_to_extended();
extern void decimal_to_quadruple();
extern char *seconvert();
extern char *sfconvert();
extern char *sgconvert();
extern void string_to_decimal();
extern void file_to_decimal();
extern void func_to_decimal();
extern double atof (const char *) ;
extern int errno;
extern double strtod (const char *, char **) ;
# 56 "/map/sys/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2.1/include/math.h" 2 3
extern double acosh (double) ;
extern double asinh (double) ;
extern double atanh (double) ;
extern double cbrt (double) ;
extern double copysign (double, double) ;
extern double erf (double) ;
extern double erfc (double) ;
extern double expm1();
extern int finite (double) ;
extern double hypot (double, double) ;
extern double j0 (double) ;
extern double j1 (double) ;
extern double jn (int, double) ;
extern double lgamma (double) ;
extern double log1p();
extern double rint (double) ;
extern double y0 (double) ;
extern double y1 (double) ;
extern double yn (int, double) ;
enum fp_pi_type {
fp_pi_infinite = 0,
fp_pi_66 = 1,
fp_pi_53 = 2
};
extern enum fp_pi_type fp_pi;
extern enum fp_class_type fp_class();
extern int ieee_flags();
extern int ieee_handler();
extern void ieee_retrospective();
extern int ilogb();
extern double infinity();
extern int irint();
extern int isinf (double) ;
extern int isnan (double) ;
extern int isnormal();
extern int issubnormal();
extern int iszero();
extern double logb (double) ;
extern double max_normal();
extern double max_subnormal();
extern double min_normal();
extern double min_subnormal();
extern double nextafter (double, double) ;
extern void nonstandard_arithmetic();
extern double quiet_nan();
extern double remainder (double, double) ;
extern double scalb (double, double) ;
extern double scalbn();
extern double signaling_nan();
extern int signbit();
extern double significand();
extern void standard_arithmetic();
extern double acospi();
extern double aint();
extern double anint();
extern double annuity();
extern double asinpi();
extern double atan2pi();
extern double atanpi();
extern double compound();
extern double cospi();
extern double exp10();
extern double exp2();
extern double log2();
extern int nint();
extern void sincos();
extern void sincospi();
extern double sinpi();
extern double tanpi();
struct exception;
extern int matherr (struct exception *) ;
extern int ir_finite_();
extern enum fp_class_type ir_fp_class_();
extern int ir_ilogb_();
extern int ir_irint_();
extern int ir_isinf_();
extern int ir_isnan_();
extern int ir_isnormal_();
extern int ir_issubnormal_();
extern int ir_iszero_();
extern int ir_nint_();
extern int ir_signbit_();
extern void r_sincos_();
extern void r_sincospi_();
extern double r_acos_();
extern double r_acosh_();
extern double r_acospi_();
extern double r_aint_();
extern double r_anint_();
extern double r_annuity_();
extern double r_asin_();
extern double r_asinh_();
extern double r_asinpi_();
extern double r_atan2_();
extern double r_atan2pi_();
extern double r_atan_();
extern double r_atanh_();
extern double r_atanpi_();
extern double r_cbrt_();
extern double r_ceil_();
extern double r_compound_();
extern double r_copysign_();
extern double r_cos_();
extern double r_cosh_();
extern double r_cospi_();
extern double r_erf_();
extern double r_erfc_();
extern double r_exp10_();
extern double r_exp2_();
extern double r_exp_();
extern double r_expm1_();
extern double r_fabs_();
extern double r_floor_();
extern double r_fmod_();
extern double r_hypot_();
extern double r_infinity_();
extern double r_j0_();
extern double r_j1_();
extern double r_jn_();
extern double r_lgamma_();
extern double r_log10_();
extern double r_log1p_();
extern double r_log2_();
extern double r_log_();
extern double r_logb_();
extern double r_max_normal_();
extern double r_max_subnormal_();
extern double r_min_normal_();
extern double r_min_subnormal_();
extern double r_nextafter_();
extern double r_pow_();
extern double r_quiet_nan_();
extern double r_remainder_();
extern double r_rint_();
extern double r_scalb_();
extern double r_scalbn_();
extern double r_signaling_nan_();
extern double r_significand_();
extern double r_sin_();
extern double r_sinh_();
extern double r_sinpi_();
extern double r_sqrt_();
extern double r_tan_();
extern double r_tanh_();
extern double r_tanpi_();
extern double r_y0_();
extern double r_y1_();
extern double r_yn_();
struct exception {
int type;
char *name;
double arg1;
double arg2;
double retval;
};
extern int signgam;
extern double cabs();
extern double drem (double, double) ;
extern double gamma (double) ;
# 2 "qsort-par.c" 2
# 1 "ph-par.h" 1
# 1 "ph-par1.h" 1
# 1 "generic.h" 1
typedef struct cont_t {
void *ip;
union gen_t *fp;
} CONT;
typedef union gen_t {
struct closure_t *clval;
int ival;
long long lval;
char cval;
double fval;
char *sval;
void *pval;
union gen_t *fpval;
union gen_t *gpval;
CONT cnval;
} GENERIC;
typedef GENERIC* GENERIC_PTR;
# 4 "ph-par1.h" 2
typedef struct closure_t {
void *ip;
int args_ptr;
int full_arity;
GENERIC args[14 ];
} CLOSURE;
extern GENERIC message_array[];
extern GENERIC local_queue_array[];
extern CONT current_cont;
register GENERIC *current_frame __asm__("%l0");
register GENERIC *msg_queue __asm__("%l1");
register GENERIC *local_queue __asm__("%l2");
extern GENERIC *local_queue_backup;
extern GENERIC *msg_queue_backup;
register GENERIC *free_frames __asm__("%l3");
register GENERIC return_reg __asm__("%l4");
register void *right_queue_head_reg __asm__("%i5");
static inline GENERIC *alloc_frame_malloc()
{
return (GENERIC *) malloc((1200* sizeof(GENERIC) ) );
}
static inline GENERIC *alloc_frame()
{ if (free_frames) {
GENERIC *tmp = free_frames;
free_frames = free_frames[0].fpval;
return(tmp);
}
else
return (alloc_frame_malloc());
}
static inline GENERIC *alloc_frame_init(void *return_ptr)
{ GENERIC *frame = alloc_frame();
frame[0].pval = return_ptr;
frame[1].fpval = current_frame;
return frame;
}
static inline void return_frame(GENERIC *frame)
{ *frame = (GENERIC) free_frames;
free_frames = frame;
}
GENERIC *ph_alloc_heap(int size);
char *ph_alloc_string(int size);
GENERIC *I_FETCH_DEFER(void *inlet, GENERIC *istr, int offset, GENERIC *cf, GENERIC *mq);
static inline void I_FETCH_I(void *inlet, GENERIC *istr, int offset)
{ if ((((char *) istr )[-( offset )-1]) == 1 )
{ ((local_queue->ival = istr[offset].ival ), local_queue++) ; (local_queue->pval = inlet , local_queue++) ; }
else msg_queue = I_FETCH_DEFER(inlet, istr, offset, current_frame, msg_queue);
}
static inline void I_FETCH_F(void *inlet, GENERIC *istr, int offset)
{ if ((((char *) istr )[-( offset )-1]) == 1 )
{ ((local_queue->fval = istr[offset].fval ), local_queue++) ; (local_queue->pval = inlet , local_queue++) ; }
else msg_queue = I_FETCH_DEFER(inlet, istr, offset, current_frame, msg_queue);
}
static inline void I_FETCH_GP(void *inlet, GENERIC *istr, int offset)
{ if ((((char *) istr )[-( offset )-1]) == 1 )
{ ((local_queue->gpval = istr[offset].gpval ), local_queue++) ; (local_queue->pval = inlet , local_queue++) ; }
else msg_queue = I_FETCH_DEFER(inlet, istr, offset, current_frame, msg_queue);
}
static inline void I_FETCH_G(void *inlet, GENERIC *istr, int offset)
{ if ((((char *) istr )[-( offset )-1]) == 1 )
{ ((*local_queue = istr[offset] ), local_queue++) ; (local_queue->pval = inlet , local_queue++) ; }
else msg_queue = I_FETCH_DEFER(inlet, istr, offset, current_frame, msg_queue);
}
GENERIC *I_STORE_DEFER(GENERIC *istr, int offset, GENERIC value, GENERIC *cf, GENERIC *mq);
static inline void I_STORE_I(GENERIC *istr, int offset, int value)
{ if ((((char *) istr )[-( offset )-1]) == 0 )
{ (((char *) istr )[-( offset )-1] = 1 ) ; istr[offset].ival = value; }
else msg_queue = I_STORE_DEFER(istr, offset, (GENERIC) value, current_frame, msg_queue);
}
static inline void I_STORE_F(GENERIC *istr, int offset, double value)
{ if ((((char *) istr )[-( offset )-1]) == 0 )
{ (((char *) istr )[-( offset )-1] = 1 ) ; istr[offset].fval = value; }
else msg_queue = I_STORE_DEFER(istr, offset, (GENERIC) value, current_frame, msg_queue);
}
static inline void I_STORE_GP(GENERIC *istr, int offset, GENERIC_PTR value)
{ if ((((char *) istr )[-( offset )-1]) == 0 )
{ (((char *) istr )[-( offset )-1] = 1 ) ; istr[offset].gpval = value; }
else msg_queue = I_STORE_DEFER(istr, offset, (GENERIC) value, current_frame, msg_queue);
}
static inline void I_STORE_G(GENERIC *istr, int offset, GENERIC value)
{ if ((((char *) istr )[-( offset )-1]) == 0 )
{ (((char *) istr )[-( offset )-1] = 1 ) ; istr[offset] = value; }
else msg_queue = I_STORE_DEFER(istr, offset, value, current_frame, msg_queue);
}
GENERIC *I_TAKE_DEFER(void *inlet, GENERIC *istr, int offset, GENERIC *cf, GENERIC *mq);
static inline void I_TAKE_I(void *inlet, GENERIC *istr, int offset)
{ if ((((char *) istr )[-( offset )-1]) == 1 )
{ (((char *) istr )[-( offset )-1] = 0 ) ; ((local_queue->ival = istr[offset].ival ), local_queue++) ; (local_queue->pval = inlet , local_queue++) ; }
else msg_queue = I_TAKE_DEFER(inlet, istr, offset, current_frame, msg_queue);
}
static inline void I_TAKE_F(void *inlet, GENERIC *istr, int offset)
{ if ((((char *) istr )[-( offset )-1]) == 1 )
{ (((char *) istr )[-( offset )-1] = 0 ) ; ((local_queue->fval = istr[offset].fval ), local_queue++) ; (local_queue->pval = inlet , local_queue++) ; }
else msg_queue = I_TAKE_DEFER(inlet, istr, offset, current_frame, msg_queue);
}
static inline void I_TAKE_GP(void *inlet, GENERIC *istr, int offset)
{ if ((((char *) istr )[-( offset )-1]) == 1 )
{ (((char *) istr )[-( offset )-1] = 0 ) ; ((local_queue->gpval = istr[offset].gpval ), local_queue++) ; (local_queue->pval = inlet , local_queue++) ; }
else msg_queue = I_TAKE_DEFER(inlet, istr, offset, current_frame, msg_queue);
}
static inline void I_TAKE_G(void *inlet, GENERIC *istr, int offset)
{ if ((((char *) istr )[-( offset )-1]) == 1 )
{ (((char *) istr )[-( offset )-1] = 0 ) ; ((*local_queue = istr[offset] ), local_queue++) ; (local_queue->pval = inlet , local_queue++) ; }
else msg_queue = I_TAKE_DEFER(inlet, istr, offset, current_frame, msg_queue);
}
GENERIC *I_PUT_DEFER(GENERIC *istr, int offset, GENERIC value, GENERIC *cf, GENERIC *mq);
static inline void I_PUT_I(GENERIC *istr, int offset, int value)
{ if ((((char *) istr )[-( offset )-1]) == 0 )
{ (((char *) istr )[-( offset )-1] = 1 ) ; istr[offset].ival = value; }
else msg_queue = I_PUT_DEFER(istr, offset, (GENERIC) value, current_frame, msg_queue);
}
static inline void I_PUT_F(GENERIC *istr, int offset, double value)
{ if ((((char *) istr )[-( offset )-1]) == 0 )
{ (((char *) istr )[-( offset )-1] = 1 ) ; istr[offset].fval = value; }
else msg_queue = I_PUT_DEFER(istr, offset, (GENERIC) value, current_frame, msg_queue);
}
static inline void I_PUT_GP(GENERIC *istr, int offset, GENERIC_PTR value)
{ if ((((char *) istr )[-( offset )-1]) == 0 )
{ (((char *) istr )[-( offset )-1] = 1 ) ; istr[offset].gpval = value; }
else msg_queue = I_PUT_DEFER(istr, offset, (GENERIC) value, current_frame, msg_queue);
}
static inline void I_PUT_G(GENERIC *istr, int offset, GENERIC value)
{ if ((((char *) istr )[-( offset )-1]) == 0 )
{ (((char *) istr )[-( offset )-1] = 1 ) ; istr[offset] = value; }
else msg_queue = I_PUT_DEFER(istr, offset, value, current_frame, msg_queue);
}
static inline void I_WRITE_I(GENERIC *istr, int offset, int value)
{ istr[offset].ival = value; }
static inline void I_WRITE_F(GENERIC *istr, int offset, double value)
{ istr[offset].fval = value; }
static inline void I_WRITE_GP(GENERIC *istr, int offset, GENERIC_PTR value)
{ istr[offset].gpval = value; }
static inline void I_WRITE_G(GENERIC *istr, int offset, GENERIC value)
{ istr[offset] = value; }
static inline int I_READ_I(GENERIC *istr, int offset)
{ return (istr[offset].ival); }
static inline double I_READ_F(GENERIC *istr, int offset)
{ return (istr[offset].fval); }
static inline GENERIC_PTR I_READ_GP(GENERIC *istr, int offset)
{ return (istr[offset].gpval); }
static inline GENERIC I_READ_G(GENERIC *istr, int offset)
{ return (istr[offset]); }
static inline int DV_FETCH(GENERIC *istr, int offset)
{ return (istr[offset].ival); }
static inline CLOSURE *alloc_closure()
{ return ((CLOSURE *) malloc(sizeof(CLOSURE))); }
extern void general_apply_stub_entry (void) __asm__("entry_" "general_apply_stub_entry" ) ;
static inline void ph_general_apply(CLOSURE *closure, void *inlet, GENERIC argument)
{
int args_ptr = closure->args_ptr;
int full_arity = closure->full_arity;
GENERIC *frame = alloc_frame_init(inlet);
if (args_ptr == (full_arity-1))
{
void *ip = closure->ip;
int i;
for (i=0; i<full_arity-1; i++)
frame[i+2] = closure->args[i];
frame[full_arity+1] = argument;
(msg_queue->cnval.ip = ( ip ), msg_queue->cnval.fp = ( frame ), msg_queue++) ;
}
else
{
CLOSURE *new_closure = alloc_closure();
int i;
void *stub = (void *) &general_apply_stub_entry;
new_closure->ip = closure->ip;
new_closure->args_ptr = args_ptr + 1;
new_closure->full_arity = full_arity;
if (full_arity > 14 ) {
printf("Too many args, increase PH_MAXARGS!\n");
exit(1);
}
new_closure->args[args_ptr] = argument;
for (i=0;i<args_ptr;i++)
new_closure->args[i] = closure->args[i];
frame[2].clval = new_closure;
(msg_queue->cnval.ip = ( stub ), msg_queue->cnval.fp = ( frame ), msg_queue++) ;
}
}
static inline CLOSURE *ph_unsatisfied_apply(CLOSURE *closure, GENERIC argument)
{
CLOSURE *new_closure = alloc_closure();
int i;
new_closure->ip = closure->ip;
new_closure->args_ptr = closure->args_ptr + 1;
new_closure->full_arity = closure->full_arity;
new_closure->args[closure->args_ptr] = argument;
for (i=0;i<closure->args_ptr;i++)
new_closure->args[i] = closure->args[i];
return(new_closure);
}
static inline void RETURN_CONTROL()
{
void *ip = current_frame[0].pval;
return_frame(current_frame);
current_frame = current_frame[1].fpval;
goto *(ip);
}
static inline int STR_REF(GENERIC_PTR string, int offset)
{ return((int) ((char *) string)[offset]); }
static inline int STR_STORE(GENERIC_PTR string, int offset, int value)
{ ((char *) string)[offset] = (char) value; }
static inline int STR_EQ(GENERIC_PTR s1, GENERIC_PTR s2)
{ return(0 == strcmp((char*) s1,(char*) s2)); }
static inline int STR_LT(GENERIC_PTR s1, GENERIC_PTR s2)
{ return(0 < strcmp((char*) s1,(char*) s2)); }
static inline int STR_LE(GENERIC_PTR s1, GENERIC_PTR s2)
{ return(0 <= strcmp((char*) s1,(char*) s2)); }
static inline int STR_GT(GENERIC_PTR s1, GENERIC_PTR s2)
{ return(0 > strcmp((char*) s1,(char*) s2)); }
static inline int STR_GE(GENERIC_PTR s1, GENERIC_PTR s2)
{ return(0 >= strcmp((char*) s1,(char*) s2)); }
static inline int STR_LEN(GENERIC_PTR s1)
{ return(strlen((char*) s1)); }
# 1 "ph-par.h" 2
# 1 "smp-am.h" 1
# 1 "locks.h" 1
# 14 "locks.h"
# 27 "locks.h"
# 47 "locks.h"
static inline int take_lock (int *lock)
{
int obtain_lock = 1;
while (xmem (lock, obtain_lock) != 0)
sleep (0);
return 0;
}
static inline void release_lock (int *lock)
{
*lock = 0;
}
# 5 "smp-am.h" 2
extern int NPROCS;
extern int SELF;
typedef struct _msg {
struct _msg *next_msg;
void (*handler)();
int home_proc;
GENERIC data[20 ];
} SHM_MSG, *SHM_MSG_PTR;
typedef struct _msg_queue {
int lock;
SHM_MSG *first;
SHM_MSG *last;
int padding[13];
} MESSAGE_QUEUE;
void send_msg_right(int proc, SHM_MSG *msg);
void send_msg_left(int proc, SHM_MSG *msg);
void free_msg (SHM_MSG *msg);
void send_back_empty_msg(SHM_MSG *msg);
extern SHM_MSG **local_left_queue_head;
extern SHM_MSG **local_right_queue_head;
void poll_right_function ();
static inline void poll_right ()
{
if (0 == *local_right_queue_head)
return;
else
{
local_queue_backup = local_queue;
msg_queue_backup = msg_queue;
poll_right_function();
msg_queue = msg_queue_backup;
local_queue = local_queue_backup;
}
}
void poll_left_function ();
static inline void poll_left ()
{
if (0 == *local_left_queue_head)
return;
else
poll_left_function();
}
static inline void poll_both ()
{
poll_right();
poll_left();
}
extern SHM_MSG *free_msg_list;
static inline SHM_MSG *alloc_msg ()
{
SHM_MSG *msg;
while (!free_msg_list)
{
poll_left();
}
msg = free_msg_list;
free_msg_list = msg->next_msg;
return msg;
}
void barrier_synchronization();
void setup_global_shared_memory (int nprocs);
void setup_local_shared_memory ();
void *alloc_from_local_heap (int size);
# 2 "ph-par.h" 2
static inline poll_right_reg()
{
if (0 != * (int *) right_queue_head_reg) {
local_queue_backup = local_queue;
msg_queue_backup = msg_queue;
poll_right_function();
msg_queue = msg_queue_backup;
local_queue = local_queue_backup;
}
}
static inline void poll_and_dispatch_next()
{
if (0 != * (int *) right_queue_head_reg)
{
local_queue_backup = local_queue;
msg_queue_backup = msg_queue;
poll_right_function();
msg_queue = msg_queue_backup;
local_queue = local_queue_backup;
}
goto *((--msg_queue, current_frame = msg_queue->cnval.fp, msg_queue->cnval.ip) );
}
# 3 "qsort-par.c" 2
# 1 "qsort-par.h" 1
extern void PH_FILTER_entry (void) __asm__("entry_" "PH_FILTER_entry" ) ;
extern GENERIC PH_FILTER;
extern void PH_APPEND_entry (void) __asm__("entry_" "PH_APPEND_entry" ) ;
extern GENERIC PH_APPEND;
extern void PH_QSORTa2DXGTa2D0_entry (void) __asm__("entry_" "PH_QSORTa2DXGTa2D0_entry" ) ;
extern GENERIC PH_QSORTa2DXGTa2D0;
extern void PH_QSORT_entry (void) __asm__("entry_" "PH_QSORT_entry" ) ;
extern GENERIC PH_QSORT;
extern void PH_MAINa2DFa2D0_entry (void) __asm__("entry_" "PH_MAINa2DFa2D0_entry" ) ;
extern GENERIC PH_MAINa2DFa2D0;
extern void PH_MAIN_entry (void) __asm__("entry_" "PH_MAIN_entry" ) ;
extern GENERIC PH_MAIN;
# 4 "qsort-par.c" 2
void PH_FILTER_fun ()
{
PH_FILTER_entry : __asm__(".globl entry_" "PH_FILTER_entry" "\n" "entry_" "PH_FILTER_entry" ":") ;
current_frame[5].ival = 2;
PH_FILTER_i1:
{
int REG5I, REG6I;
GENERIC_PTR REG2GP, REG8GP;
GENERIC REG1G, REG4G, REG7G, REG9G;
REG1G = current_frame[2];
REG2GP = current_frame[3].gpval;
REG5I = (REG2GP > (GENERIC_PTR) 256);
REG6I = !REG5I;
if (REG6I)
{
REG8GP = 0;
REG9G = REG7G;
((return_reg.gpval = REG8GP ), RETURN_CONTROL()) ;
}
else
{
I_FETCH_GP(&&PH_FILTER_i2,REG2GP,1);
I_FETCH_G(&&PH_FILTER_i4,REG2GP,0);
current_frame[10] = REG1G;
}
goto *((local_queue--, local_queue->pval) );
}
PH_FILTER_i2:
{
GENERIC_PTR REG11GP;
REG11GP = (--local_queue, local_queue->gpval) ;
current_frame[11].gpval = REG11GP;
if (1 == current_frame[ 5 ].ival) goto PH_FILTER_PARTITION2 ; else --current_frame[ 5 ].ival ;
goto *((local_queue--, local_queue->pval) );
}
PH_FILTER_i3:
{
int REG13I;
REG13I = (return_reg.ival) ;
current_frame[13].ival = REG13I;
if (1 == current_frame[ 5 ].ival) goto PH_FILTER_PARTITION2 ; else --current_frame[ 5 ].ival ;
poll_and_dispatch_next();
}
PH_FILTER_i4:
{
GENERIC REG1G, REG12G;
REG1G = current_frame[10];
REG12G = (--local_queue, *local_queue) ;
ph_general_apply(REG1G.clval, &&PH_FILTER_i3, REG12G);
current_frame[9] = REG12G;
goto *((local_queue--, local_queue->pval) );
}
PH_FILTER_i5:
{
GENERIC_PTR REG16GP, REG17GP, REG22GP, REG8GP;
GENERIC REG21G, REG23G, REG29G, REG9G;
REG16GP = current_frame[8].gpval;
REG16GP = current_frame[8].gpval;
REG17GP = (return_reg.gpval) ;
I_STORE_GP(REG16GP, 1, REG17GP);
REG22GP = REG16GP;
REG23G = REG21G;
REG8GP = REG22GP;
REG9G = REG29G;
((return_reg.gpval = REG8GP ), RETURN_CONTROL()) ;
poll_and_dispatch_next();
}
PH_FILTER_i6:
{
GENERIC_PTR REG26GP, REG22GP, REG8GP;
GENERIC REG28G, REG23G, REG29G, REG9G;
REG26GP = (return_reg.gpval) ;
REG22GP = REG26GP;
REG23G = REG28G;
REG8GP = REG22GP;
REG9G = REG29G;
((return_reg.gpval = REG8GP ), RETURN_CONTROL()) ;
poll_and_dispatch_next();
}
PH_FILTER_PARTITION2:
{
int REG13I;
GENERIC_PTR REG11GP, REG15GP, REG16GP, REG25GP;
GENERIC REG12G, REG1G;
REG12G = current_frame[9];
REG1G = current_frame[10];
REG11GP = current_frame[11].gpval;
REG13I = current_frame[13].ival;
REG13I = current_frame[13].ival;
if (REG13I)
{
REG15GP = (GENERIC_PTR) &PH_FILTER_entry;
REG16GP = ph_alloc_heap(2);
{
GENERIC *frame = alloc_frame_init(&&PH_FILTER_i5);
frame[2] = REG1G;
frame[3].gpval = REG11GP;
(msg_queue->cnval.ip = ( REG15GP ), msg_queue->cnval.fp = ( frame ), msg_queue++) ;
}
I_STORE_G(REG16GP, 0, REG12G);
current_frame[8].gpval = REG16GP;
}
else
{
REG25GP = (GENERIC_PTR) &PH_FILTER_entry;
{
GENERIC *frame = alloc_frame_init(&&PH_FILTER_i6);
frame[2] = REG1G;
frame[3].gpval = REG11GP;
(msg_queue->cnval.ip = ( REG25GP ), msg_queue->cnval.fp = ( frame ), msg_queue++) ;
}
}
goto *((local_queue--, local_queue->pval) );
}
}
CLOSURE PH_FILTER_closure = { &PH_FILTER_entry, 0, 2};
GENERIC PH_FILTER = { &PH_FILTER_closure };
void PH_APPEND_fun ()
{
PH_APPEND_entry : __asm__(".globl entry_" "PH_APPEND_entry" "\n" "entry_" "PH_APPEND_entry" ":") ;
current_frame[5].ival = 2;
PH_APPEND_i1:
{
int REG5I, REG6I;
GENERIC_PTR REG1GP, REG2GP, REG8GP, REG12GP;
GENERIC REG4G, REG7G, REG9G;
REG1GP = current_frame[2].gpval;
REG2GP = current_frame[3].gpval;
REG5I = (REG1GP > (GENERIC_PTR) 256);
REG6I = !REG5I;
if (REG6I)
{
REG8GP = REG2GP;
REG9G = REG7G;
((return_reg.gpval = REG8GP ), RETURN_CONTROL()) ;
}
else
{
REG12GP = ph_alloc_heap(2);
I_FETCH_GP(&&PH_APPEND_i2,REG1GP,1);
I_FETCH_G(&&PH_APPEND_i3,REG1GP,0);
current_frame[9].gpval = REG12GP;
current_frame[6].gpval = REG2GP;
}
goto *((local_queue--, local_queue->pval) );
}
PH_APPEND_i2:
{
GENERIC_PTR REG2GP, REG13GP, REG11GP;
REG2GP = current_frame[6].gpval;
REG13GP = (--local_queue, local_queue->gpval) ;
REG11GP = (GENERIC_PTR) &PH_APPEND_entry;
{
GENERIC *frame = alloc_frame_init(&&PH_APPEND_i4);
frame[2].gpval = REG13GP;
frame[3].gpval = REG2GP;
(msg_queue->cnval.ip = ( REG11GP ), msg_queue->cnval.fp = ( frame ), msg_queue++) ;
}
goto *((local_queue--, local_queue->pval) );
}
PH_APPEND_i3:
{
GENERIC_PTR REG12GP;
GENERIC REG17G;
REG12GP = current_frame[9].gpval;
REG17G = (--local_queue, *local_queue) ;
I_STORE_G(REG12GP, 0, REG17G);
if (1 == current_frame[ 5 ].ival) goto PH_APPEND_PARTITION3 ; else --current_frame[ 5 ].ival ;
goto *((local_queue--, local_queue->pval) );
}
PH_APPEND_i4:
{
GENERIC_PTR REG12GP, REG14GP;
REG12GP = current_frame[9].gpval;
REG14GP = (return_reg.gpval) ;
I_STORE_GP(REG12GP, 1, REG14GP);
if (1 == current_frame[ 5 ].ival) goto PH_APPEND_PARTITION3 ; else --current_frame[ 5 ].ival ;
poll_and_dispatch_next();
}
PH_APPEND_PARTITION3:
{
GENERIC_PTR REG12GP, REG8GP;
GENERIC REG19G, REG9G;
REG12GP = current_frame[9].gpval;
REG8GP = REG12GP;
REG9G = REG19G;
((return_reg.gpval = REG8GP ), RETURN_CONTROL()) ;
goto *((local_queue--, local_queue->pval) );
}
}
CLOSURE PH_APPEND_closure = { &PH_APPEND_entry, 0, 2};
GENERIC PH_APPEND = { &PH_APPEND_closure };
void PH_QSORTa2DXGTa2D0_fun ()
{
PH_QSORTa2DXGTa2D0_entry : __asm__(".globl entry_" "PH_QSORTa2DXGTa2D0_entry" "\n" "entry_" "PH_QSORTa2DXGTa2D0_entry" ":") ;
PH_QSORTa2DXGTa2D0_i1:
{
GENERIC REG1G, REG2G, REG3G;
REG1G = current_frame[2];
REG2G = current_frame[3];
REG3G = current_frame[4];
ph_general_apply(REG1G.clval, &&PH_QSORTa2DXGTa2D0_i2, REG2G);
current_frame[6] = REG3G;
poll_and_dispatch_next();
}
PH_QSORTa2DXGTa2D0_i2:
{
GENERIC REG3G, REG6G;
REG3G = current_frame[6];
REG6G = (return_reg) ;
ph_general_apply(REG6G.clval, &&PH_QSORTa2DXGTa2D0_i3, REG3G);
poll_and_dispatch_next();
}
PH_QSORTa2DXGTa2D0_i3:
{
int REG8I, REG11I;
REG8I = (return_reg.ival) ;
REG11I = !REG8I;
((return_reg.ival = REG11I ), RETURN_CONTROL()) ;
poll_and_dispatch_next();
}
}
CLOSURE PH_QSORTa2DXGTa2D0_closure = { &PH_QSORTa2DXGTa2D0_entry, 0, 3};
GENERIC PH_QSORTa2DXGTa2D0 = { &PH_QSORTa2DXGTa2D0_closure };
void PH_QSORT_fun ()
{
PH_QSORT_entry : __asm__(".globl entry_" "PH_QSORT_entry" "\n" "entry_" "PH_QSORT_entry" ":") ;
current_frame[5].ival = 2;
current_frame[6].ival = 2;
current_frame[7].ival = 2;
PH_QSORT_i1:
{
int REG5I, REG6I;
GENERIC_PTR REG2GP, REG8GP, REG15GP;
GENERIC REG1G, REG4G, REG7G, REG9G, REG12G, REG18G;
REG1G = current_frame[2];
REG2GP = current_frame[3].gpval;
REG5I = (REG2GP > (GENERIC_PTR) 256);
REG6I = !REG5I;
if (REG6I)
{
REG8GP = 0;
REG9G = REG7G;
((return_reg.gpval = REG8GP ), RETURN_CONTROL()) ;
}
else
{
REG12G = PH_QSORTa2DXGTa2D0;
REG15GP = ph_alloc_heap(2);
REG18G.clval = ph_unsatisfied_apply(REG12G.clval,REG1G);
I_FETCH_G(&&PH_QSORT_i5,REG2GP,0);
I_FETCH_GP(&&PH_QSORT_i3,REG2GP,1);
current_frame[9] = REG18G;
current_frame[10].gpval = REG15GP;
current_frame[11] = REG1G;
}
goto *((local_queue--, local_queue->pval) );
}
PH_QSORT_i2:
{
GENERIC REG21G;
REG21G = (return_reg) ;
current_frame[17] = REG21G;
if (1 == current_frame[ 6 ].ival) goto PH_QSORT_PARTITION3 ; else --current_frame[ 6 ].ival ;
poll_and_dispatch_next();
}
PH_QSORT_i3:
{
GENERIC_PTR REG26GP;
REG26GP = (--local_queue, local_queue->gpval) ;
current_frame[18].gpval = REG26GP;
if (1 == current_frame[ 5 ].ival) (local_queue->pval = && PH_QSORT_PARTITION2 , local_queue++) ; else --current_frame[ 5 ].ival ;
if (1 == current_frame[ 6 ].ival) goto PH_QSORT_PARTITION3 ; else --current_frame[ 6 ].ival ;
goto *((local_queue--, local_queue->pval) );
}
PH_QSORT_i4:
{
GENERIC_PTR REG31GP;
REG31GP = (return_reg.gpval) ;
current_frame[19].gpval = REG31GP;
if (1 == current_frame[ 7 ].ival) goto PH_QSORT_PARTITION5 ; else --current_frame[ 7 ].ival ;
poll_and_dispatch_next();
}
PH_QSORT_i5:
{
GENERIC_PTR REG15GP;
GENERIC REG1G, REG18G, REG20G, REG23G;
REG1G = current_frame[11];
REG18G = current_frame[9];
REG15GP = current_frame[10].gpval;
REG20G = (--local_queue, *local_queue) ;
ph_general_apply(REG1G.clval, &&PH_QSORT_i2, REG20G);
REG23G.clval = ph_unsatisfied_apply(REG18G.clval,REG20G);
I_STORE_G(REG15GP, 0, REG20G);
current_frame[15] = REG23G;
if (1 == current_frame[ 5 ].ival) goto PH_QSORT_PARTITION2 ; else --current_frame[ 5 ].ival ;
goto *((local_queue--, local_queue->pval) );
}
PH_QSORT_i6:
{
GENERIC_PTR REG27GP, REG17GP;
GENERIC REG1G;
REG1G = current_frame[11];
REG27GP = (return_reg.gpval) ;
REG17GP = (GENERIC_PTR) &PH_QSORT_entry;
{
GENERIC *frame = alloc_frame_init(&&PH_QSORT_i7);
frame[2] = REG1G;
frame[3].gpval = REG27GP;
(msg_queue->cnval.ip = ( REG17GP ), msg_queue->cnval.fp = ( frame ), msg_queue++) ;
}
poll_and_dispatch_next();
}
PH_QSORT_i7:
{
GENERIC_PTR REG15GP, REG29GP, REG14GP;
REG15GP = current_frame[10].gpval;
REG29GP = (return_reg.gpval) ;
REG14GP = (GENERIC_PTR) &PH_APPEND_entry;
{
GENERIC *frame = alloc_frame_init(&&PH_QSORT_i4);
frame[2].gpval = REG29GP;
frame[3].gpval = REG15GP;
(msg_queue->cnval.ip = ( REG14GP ), msg_queue->cnval.fp = ( frame ), msg_queue++) ;
}
poll_and_dispatch_next();
}
PH_QSORT_i8:
{
GENERIC_PTR REG33GP, REG13GP;
GENERIC REG1G;
REG1G = current_frame[11];
REG33GP = (return_reg.gpval) ;
REG13GP = (GENERIC_PTR) &PH_QSORT_entry;
{
GENERIC *frame = alloc_frame_init(&&PH_QSORT_i9);
frame[2] = REG1G;
frame[3].gpval = REG33GP;
(msg_queue->cnval.ip = ( REG13GP ), msg_queue->cnval.fp = ( frame ), msg_queue++) ;
}
poll_and_dispatch_next();
}
PH_QSORT_i9:
{
GENERIC_PTR REG15GP, REG35GP;
REG15GP = current_frame[10].gpval;
REG35GP = (return_reg.gpval) ;
I_STORE_GP(REG15GP, 1, REG35GP);
if (1 == current_frame[ 7 ].ival) goto PH_QSORT_PARTITION5 ; else --current_frame[ 7 ].ival ;
poll_and_dispatch_next();
}
PH_QSORT_PARTITION2:
{
GENERIC_PTR REG26GP, REG16GP;
GENERIC REG23G;
REG23G = current_frame[15];
REG26GP = current_frame[18].gpval;
REG16GP = (GENERIC_PTR) &PH_FILTER_entry;
{
GENERIC *frame = alloc_frame_init(&&PH_QSORT_i6);
frame[2] = REG23G;
frame[3].gpval = REG26GP;
(msg_queue->cnval.ip = ( REG16GP ), msg_queue->cnval.fp = ( frame ), msg_queue++) ;
}
goto *((local_queue--, local_queue->pval) );
}
PH_QSORT_PARTITION3:
{
GENERIC_PTR REG26GP, REG11GP;
GENERIC REG21G;
REG21G = current_frame[17];
REG26GP = current_frame[18].gpval;
REG11GP = (GENERIC_PTR) &PH_FILTER_entry;
{
GENERIC *frame = alloc_frame_init(&&PH_QSORT_i8);
frame[2] = REG21G;
frame[3].gpval = REG26GP;
(msg_queue->cnval.ip = ( REG11GP ), msg_queue->cnval.fp = ( frame ), msg_queue++) ;
}
goto *((local_queue--, local_queue->pval) );
}
PH_QSORT_PARTITION5:
{
GENERIC_PTR REG31GP, REG8GP;
GENERIC REG38G, REG9G;
REG31GP = current_frame[19].gpval;
REG8GP = REG31GP;
REG9G = REG38G;
((return_reg.gpval = REG8GP ), RETURN_CONTROL()) ;
goto *((local_queue--, local_queue->pval) );
}
}
CLOSURE PH_QSORT_closure = { &PH_QSORT_entry, 0, 2};
GENERIC PH_QSORT = { &PH_QSORT_closure };
void PH_MAINa2DFa2D0_fun ()
{
PH_MAINa2DFa2D0_entry : __asm__(".globl entry_" "PH_MAINa2DFa2D0_entry" "\n" "entry_" "PH_MAINa2DFa2D0_entry" ":") ;
PH_MAINa2DFa2D0_i1:
{
int REG1I, REG2I, REG5I;
REG1I = current_frame[2].ival;
REG2I = current_frame[3].ival;
REG5I = (REG1I < REG2I);
((return_reg.ival = REG5I ), RETURN_CONTROL()) ;
poll_and_dispatch_next();
}
}
CLOSURE PH_MAINa2DFa2D0_closure = { &PH_MAINa2DFa2D0_entry, 0, 2};
GENERIC PH_MAINa2DFa2D0 = { &PH_MAINa2DFa2D0_closure };
void PH_MAIN_fun ()
{
PH_MAIN_entry : __asm__(".globl entry_" "PH_MAIN_entry" "\n" "entry_" "PH_MAIN_entry" ":") ;
PH_MAIN_i1:
{
int REG7I, REG15I, REG27I, REG22I, REG23I, REG24I;
GENERIC_PTR REG6GP, REG8GP, REG10GP, REG11GP, REG16GP, REG18GP, REG25GP;
GENERIC REG1G, REG9G, REG17G, REG21G, REG26G;
REG1G = current_frame[2];
REG6GP = ph_alloc_heap(2);
REG7I = (REG6GP > (GENERIC_PTR) 256);
if (REG7I)
{
REG8GP = REG6GP;
}
else
{
REG10GP = (GENERIC_PTR) "ERROR (at place 1133[44,c15]): Expected a CONS.";
printf("%s\n", (char *) REG10GP);
exit(1);
REG8GP = REG11GP;
}
REG15I = 10;
REG16GP = REG6GP;
do {
REG18GP = ph_alloc_heap(2);
I_STORE_GP(REG16GP, 1, REG18GP);
I_STORE_I(REG18GP, 0, REG15I);
REG22I = REG15I - 1;
REG23I = (REG22I >= 1);
REG24I = REG22I;
REG25GP = REG18GP;
REG26G = REG21G;
REG27I = REG23I;
REG15I = REG24I;
REG16GP = REG25GP;
} while (REG27I);
I_STORE_GP(REG25GP, 1, 0);
I_FETCH_GP(&&PH_MAIN_i2,REG8GP,1);
current_frame[4].gpval = REG6GP;
goto *((local_queue--, local_queue->pval) );
}
PH_MAIN_i2:
{
GENERIC_PTR REG12GP, REG5GP;
GENERIC REG4G;
REG12GP = (--local_queue, local_queue->gpval) ;
REG4G = PH_MAINa2DFa2D0;
REG5GP = (GENERIC_PTR) &PH_QSORT_entry;
{
GENERIC *frame = alloc_frame_init(&&PH_MAIN_i3);
frame[2] = REG4G;
frame[3].gpval = REG12GP;
(msg_queue->cnval.ip = ( REG5GP ), msg_queue->cnval.fp = ( frame ), msg_queue++) ;
}
goto *((local_queue--, local_queue->pval) );
}
PH_MAIN_i3:
{
GENERIC_PTR REG6GP, REG13GP;
GENERIC REG30G;
REG6GP = current_frame[4].gpval;
REG13GP = (return_reg.gpval) ;
((return_reg.gpval = REG13GP ), RETURN_CONTROL()) ;
poll_and_dispatch_next();
}
}
CLOSURE PH_MAIN_closure = { &PH_MAIN_entry, 0, 1};
GENERIC PH_MAIN = { &PH_MAIN_closure };
Technical Details
Message-ID:
<9611211417.AA28696@au-bon-pain.lcs.mit.edu>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 113d02,c96ab9e23e013380,start X-Google-Attributes: gid113d02,public From: shaw@au-bon-pain.lcs.mit.edu (Andy Shaw) Subject: Sorry, now here it is uncoded ... Date: 1996/11/21 Message-ID: <9611211417.AA28696@au-bon-pain.lcs.mit.edu> X-Deja-AN: 197824196 sender: bug-gcc-request@prep.ai.mit.edu x-gateway: relay6.UU.NET from bug-gcc to gnu.gcc.bug; Thu, 21 Nov 1996 09:31:56 EST newsgroups: gnu.gcc.bug