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 tree-optimization/42248] compat test struct-by-value-17 fails execution with -O1 -fschedule-insns



------- Comment #1 from janis at gcc dot gnu dot org  2009-12-02 00:07 -------
Oops.

GCC trunk fails execution for five tests from gcc.dg/compat when compiled with
"-m64 -O1 -fschedule-insns" on powerpc64-linux.  The tests are:

  gcc.dg/compat/struct-by-value-16_main.c
  gcc.dg/compat/struct-by-value-16a_main.c
  gcc.dg/compat/struct-by-value-17_main.c
  gcc.dg/compat/struct-by-value-17a_main.c
  gcc.dg/compat/struct-by-value-18_main.c

This testcase is minimized from struct-by-value-17:

-----------------------------------------------------------------------
typedef struct {
  _Complex double a;
  _Complex double b;
  _Complex double c;
  _Complex double d;
  _Complex double e;
  _Complex double f;
  _Complex double g;
  _Complex double h;
  _Complex double i;
  _Complex double j;
} Scf10;

Scf10 g1s;

void
check (Scf10 x, _Complex double y)
{
  if (x.a != y) __builtin_abort ();
  if (x.b != y) __builtin_abort ();
  if (x.c != y) __builtin_abort ();
  if (x.d != y) __builtin_abort ();
  if (x.e != y) __builtin_abort ();
  if (x.f != y) __builtin_abort ();
  if (x.g != y) __builtin_abort ();
  if (x.h != y) __builtin_abort ();
  if (x.i != y) __builtin_abort ();
  if (x.j != y) __builtin_abort ();
}

void
init (Scf10 *p, _Complex double y)
{
  p->a = y;
  p->b = y;
  p->c = y;
  p->d = y;
  p->e = y;
  p->f = y;
  p->g = y;
  p->h = y;
  p->i = y;
  p->j = y;
}
-----------------------------------------------------------------------

elm3b149% /home/janis/tools/gcc-trunk-anonsvn/bin/gcc -m64 -O1 -fschedule-insns
-static bug.c
elm3b149% ./a.out
Aborted

The failure starts with this patch from Richard Guenther and Andrey
Belevantsev:

    http://gcc.gnu.org/viewcvs?view=rev&rev=149624

    r149624 | rguenth | 2009-07-14 09:59:18 +0000 (Tue, 14 Jul 2009)

I ran into this due to a bug in lto.exp leaking compiler option lists to the
compat tests.


-- 


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


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