This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/19556] [4.0 Regression] ICE with -march=pentium-m (during bootstrap)
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Jan 2005 02:11:20 -0000
- Subject: [Bug target/19556] [4.0 Regression] ICE with -march=pentium-m (during bootstrap)
- References: <20050121003012.19556.arend.bayer@web.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-21 02:11 -------
This is as reduced as I can get it (80 lines):
typedef unsigned int size_t;
extern void __assert_fail () __attribute__ ((__noreturn__));
typedef unsigned int uintptr_t;
extern int __mf_heuristic_check (uintptr_t, uintptr_t);
struct __mf_options
{
unsigned adapt_cache;
enum { mode_nop, mode_check } mudflap_mode;
};
extern enum __mf_state_enum __mf_state;
extern int __mf_starting_p;
extern struct __mf_options __mf_opts;
typedef struct __mf_object { unsigned read_count, write_count, liveness; } __mf_object_t;
unsigned __mf_find_objects (uintptr_t ptr_low, uintptr_t ptr_high,
__mf_object_t **objs, unsigned max_objs);
void __mf_adapt_cache (void);
void __mfu_check (void *ptr, size_t sz, int type)
{
int judgement = 0;
uintptr_t ptr_low = (uintptr_t) ptr;
uintptr_t ptr_high = (sz ? (((uintptr_t) ptr) <= (~ (uintptr_t) 0)-(sz)+1
? ((uintptr_t) ptr)+((uintptr_t) sz) - 1 : (~ (uintptr_t) 0)) :
((uintptr_t) ptr));
switch (__mf_opts.mudflap_mode)
{
case mode_nop:
break;
case mode_check:
{
unsigned heuristics = 0;
static unsigned adapt_count;
adapt_count ++;
if ((__builtin_expect (!!(__mf_opts.adapt_cache > 0
&& adapt_count > __mf_opts.adapt_cache), 0)))
{
adapt_count = 0;
__mf_adapt_cache ();
}
while (judgement == 0)
{
extern void __real_free (void *p);
__mf_object_t* ovr_obj[1];
unsigned obj_count;
__mf_object_t** all_ovr_obj = ((void *)0);
__mf_object_t** dealloc_me = ((void *)0);
unsigned i;
obj_count = __mf_find_objects (ptr_low, ptr_high, ovr_obj, 1);
if ((__builtin_expect (!!(obj_count > 1), 0)))
{
extern void * __real_malloc (size_t c);
unsigned n;
all_ovr_obj = __real_malloc ((sizeof (__mf_object_t *) * obj_count));
n = __mf_find_objects (ptr_low, ptr_high, all_ovr_obj, obj_count);
((void) (__builtin_expect (!!(n == obj_count), 1) ? 0
: (__assert_fail (), 0)));
dealloc_me = all_ovr_obj;
}
else
{
all_ovr_obj = ovr_obj;
dealloc_me = ((void *)0);
}
for (i = 0; i < obj_count; i++)
{
__mf_object_t *obj = all_ovr_obj[i];
((void) (__builtin_expect (!!(obj != ((void *)0)), 1) ? 0
: (__assert_fail (), 0)));
if (type == 0)
obj->read_count ++;
}
if (dealloc_me != ((void *)0))
__real_free (dealloc_me);
if (heuristics++ < 2)
judgement = __mf_heuristic_check (ptr_low, ptr_high);
}
}
}
}
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-01-21 02:11:18
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19556