This is the mail archive of the gcc-patches@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]

Re: [RFA:] Fix invalid tests (was: Re: Tests gcc.dg/c99-scope-2.c...)


On Tue, 31 Jul 2001, Geoff Keating wrote:
> > Date: Mon, 30 Jul 2001 18:29:06 -0400 (EDT)
> > From: Hans-Peter Nilsson <hp@bitrange.com>

> You only sent the patch for c99-scope-2; that part is OK.

Oops, sorry.  Thanks for reviewing it.  This one ok?  Repeating
myself, I think the align-1 test was checking a bug that
"contaminated" the type typedef:d from with the alignment
attribute.

To Joseph Myers: I'm sorry, but your suggestion of increasing
the number of ints in gcc.dg/c99-scope-2.c seems to me be less
stable than the now-committed solution; it would just step up
by-one the assumption level.

	* gcc.c-torture/execute/align-1.c: Compare size against size of
	another struct, not against sizeof int.

Index: align-1.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/testsuite/gcc.c-torture/execute/align-1.c,v
retrieving revision 1.1
diff -p -c -r1.1 align-1.c
*** align-1.c	2000/06/30 14:55:54	1.1
--- align-1.c	2001/08/01 01:15:33
***************
*** 1,9 ****
  typedef int new_int __attribute__ ((aligned(16)));
  struct S { int x; };

  int main()
  {
!   if (sizeof(struct S) != sizeof(int))
      abort ();
    return 0;
  }
--- 1,10 ----
+ struct S0 { int y; };
  typedef int new_int __attribute__ ((aligned(16)));
  struct S { int x; };

  int main()
  {
!   if (sizeof (struct S) != sizeof (struct S0))
      abort ();
    return 0;
  }

brgds, H-P


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