Patchwork [committed] Fix fixed-point testsuite failures

login
register
mail settings
Submitter Richard Sandiford
Date Jan. 16, 2011, 10:03 p.m.
Message ID <874o98y09l.fsf@firetop.home>
Download mbox | patch
Permalink /patch/79106/
State New
Headers show

Comments

Richard Sandiford - Jan. 16, 2011, 10:03 p.m.
composite-type.c was failing due to lots of "set but not used" warnings.
struct-union.c needed updating after an improvement to the error messages.

Tested on mips64-linux-gnu and applied as obvious.

Richard


gcc/testsuite/
	* gcc.dg/fixed-point/composite-type.c: Pass -Wno-unused.
	* gcc.dg/fixed-point/struct-union.c: Update error messages.

Patch

Index: gcc/testsuite/gcc.dg/fixed-point/composite-type.c
===================================================================
--- gcc/testsuite/gcc.dg/fixed-point/composite-type.c	2010-12-18 13:52:28.000000000 +0000
+++ gcc/testsuite/gcc.dg/fixed-point/composite-type.c	2011-01-16 21:55:20.000000000 +0000
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99 -O -Wall" } */
+/* { dg-options "-std=gnu99 -O -Wall -Wno-unused" } */
 
 /* C99 6.2.7: Compatible type and composite type.  */
 
Index: gcc/testsuite/gcc.dg/fixed-point/struct-union.c
===================================================================
--- gcc/testsuite/gcc.dg/fixed-point/struct-union.c	2011-01-16 21:58:24.000000000 +0000
+++ gcc/testsuite/gcc.dg/fixed-point/struct-union.c	2011-01-16 22:01:08.000000000 +0000
@@ -34,22 +34,22 @@  union u h (union u u)
 
 void f()
 {
-  cs.f = 0.1r; /* { dg-error "assignment of read-only variable" } */
-  cs.lf = 0.2lr; /* { dg-error "assignment of read-only variable" } */
+  cs.f = 0.1r; /* { dg-error "assignment of member 'f' in read-only object" } */
+  cs.lf = 0.2lr; /* { dg-error "assignment of member 'lf' in read-only object" } */
   s.lf = 0.3lr;  /* { dg-error "assignment of read-only member" } */
 
   s.f = 0.4r;
   u.f = 0.5r;
 
   u.lf = 0.6lr;    /* { dg-error "assignment of read-only member" } */
-  u.cs.f = 0.7r; /* { dg-error "assignment of read-only member" } */
-  u.cs.lf = 0.8lr; /* { dg-error "assignment of read-only member" } */
+  u.cs.f = 0.7r;   /* { dg-error "assignment of member 'f' in read-only object" } */
+  u.cs.lf = 0.8lr; /* { dg-error "assignment of member 'lf' in read-only object" } */
 
-  cu.f = 0.9r;   /* { dg-error "assignment of read-only variable" } */
+  cu.f = 0.9r;   /* { dg-error "assignment of member 'f' in read-only object" } */
 
-  cu.lf = 0.01lr;    /* { dg-error "assignment of read-only variable" } */
-  cu.cs.f = 0.02r; /* { dg-error "assignment of read-only variable" } */
-  cu.cs.lf = 0.03lr; /* { dg-error "assignment of read-only variable" } */
+  cu.lf = 0.01lr;    /* { dg-error "assignment of member 'lf' in read-only object" } */
+  cu.cs.f = 0.02r;   /* { dg-error "assignment of member 'f' in read-only object" } */
+  cu.cs.lf = 0.03lr; /* { dg-error "assignment of member 'lf' in read-only object" } */
 
   /* f().x is a valid postfix expression but is not an lvalue if
      function f() returning a structure or union.  */