* gcc.dg/20020122-1.c: New test.

From-SVN: r49065
This commit is contained in:
Hans-Peter Nilsson 2002-01-22 07:43:58 +00:00 committed by Hans-Peter Nilsson
parent f982f8052a
commit 0c0c3c3995
2 changed files with 25 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2002-01-22 Hans-Peter Nilsson <hp@axis.com>
* gcc.dg/20020122-1.c: New test.
2001-01-22 David.Billinghurst <David.Billinghurst@riotinto.com>
* g++.old-deja/g++.ext/attrib5.C: XFAIL cygwin too

View File

@ -0,0 +1,21 @@
/* Copyright (C) 2002 Free Software Foundation.
by Hans-Peter Nilsson <hp@axis.com> */
/* { dg-do compile } */
typedef struct
{
unsigned short s;
} t;
struct u
{
t v;
};
int
foo (struct u *uu)
{
int i = ((unsigned int) ((uu->v) & 42)); /* { dg-error "invalid operands to binary" } */
return i;
}