This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/32758] [4.3 Regression] ecj1 hangs



------- Comment #25 from jakub at gcc dot gnu dot org  2007-08-29 13:26 -------
Unfortunately it breaks e.g. memcpy-chk.c, simplified testcase here:
extern void abort (void);
typedef __SIZE_TYPE__ size_t;
extern void *memcpy (void *, const void *, size_t);
extern volatile int chk_fail_allowed;
extern void *chk_fail_buf[];
char *s2 = "defg";
char *s3 = "FGH";
size_t l1 = 1;
void
__attribute__((noinline))
test4 (void)
{
  struct A { char buf1[10]; char buf2[10]; } a;
  char buf3[20];

  chk_fail_allowed = 1;

  if (__builtin_setjmp (chk_fail_buf) == 0)
    {
      __builtin___memcpy_chk (&a.buf2[9], s2, l1 + 1, __builtin_object_size
(&a.buf2[9], 0));
      abort ();
    }
  if (__builtin_setjmp (chk_fail_buf) == 0)
    {
      __builtin___memcpy_chk (&a.buf2[7], s3, strlen (s3) + 1,
__builtin_object_size (&a.buf2[7], 0));
      abort ();
    }

  if (__builtin_setjmp (chk_fail_buf) == 0)
    {
      __builtin___memcpy_chk (&buf3[19], "ab", 2, __builtin_object_size
(&buf3[19], 0));
      abort ();
    }
  chk_fail_allowed = 0;
}

Not all basic blocks have all 4 x86_64 regular_block_artificial_regs registers
set in DF_LR_IN and so oring this in causes infinite loop, as process_dce_block
always returns something changed.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32758


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]