[tree-ssa/mudflap] Bug with introducing binding contours
Daniel Jacobowitz
drow@mvista.com
Mon May 26 19:30:00 GMT 2003
Hi Jason/Diego/Frank,
Here's a test for the problem I described to you earlier. It produces this
error message, which AFAIK we should never be generating for C code:
f.i: In function `elf_link_add_object_symbols':
f.i:47: error: label `error_free_dyn' used before containing binding contour
To reproduce just compile with -fmudflap, any optimization level.
The original testcase (elf32.lo in binutils) also produces a different ICE
at -O2 which is gone in the reduced testcase:
In file included from /opt/src/gdb/binutils/branch-src/bfd/elfcode.h:1574,
from /opt/src/gdb/binutils/branch-src/bfd/elf32.c:22:
/opt/src/gdb/binutils/branch-src/bfd/elflink.h: In function `elf_link_add_object_symbols':
/opt/src/gdb/binutils/branch-src/bfd/elflink.h:2050: internal compiler
error: in invert_truthvalue, at fold-const.c:2404
And this ICE at -O2 even without mudflap:
In file included from /opt/src/gdb/binutils/branch-src/bfd/elfcode.h:1574,
from /opt/src/gdb/binutils/branch-src/bfd/elf32.c:22:
/opt/src/gdb/binutils/branch-src/bfd/elflink.h: In function
`elf_link_add_object_symbols':
/opt/src/gdb/binutils/branch-src/bfd/elflink.h:2574: error: insn does not
satisfy its constraints:
(insn 5596 5595 5597 211 0x40fea980 (set (strict_low_part (reg:QI 4 sil))
(eq:QI (reg:CCZ 17 flags)
(const_int 0 [0x0]))) 362 {setcc_2} (insn_list 5594 (insn_list
5595
(nil)))
(expr_list:REG_DEAD (reg:CCZ 17 flags)
(nil)))
/opt/src/gdb/binutils/branch-src/bfd/elflink.h:2574: internal compiler
error: in copyprop_hardreg_forward_1, at regrename.c:1607
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
-------------- next part --------------
typedef unsigned int size_t;
typedef unsigned int uintptr_t;
struct __mf_cache
{
uintptr_t low;
uintptr_t high;
};
extern struct __mf_cache __mf_lookup_cache[];
extern uintptr_t __mf_lc_mask;
extern unsigned char __mf_lc_shift;
extern void
__mf_check (void *ptr, size_t sz, int type, const char *location)
__attribute ((nothrow));
extern void __mf_register (void *ptr, size_t sz, int type,
const char *name) __attribute ((nothrow));
extern void __mf_unregister (void *ptr,
size_t sz) __attribute ((nothrow));
static int
elf_link_add_object_symbols ()
{
{
struct xstruct { struct xstruct *next; } *runpath, **pn;
{
char *dynbuf = ((void *) 0);
dynbuf = (char *) bfd_malloc (1);
if (!dynbuf)
goto error_free_dyn;
{
struct { int x; } dyn;
foo(&dyn);
{
for (pn = &runpath; *pn != ((void *) 0); pn = &(*pn)->next)
;
}
{
if (1)
{
error_free_dyn:
free (dynbuf);
goto error_return;
}
}
}
free (dynbuf);
}
}
return 1;
error_return:
return 0;
}
More information about the Gcc-bugs
mailing list