diff options
author | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-02-10 13:41:16 +0000 |
---|---|---|
committer | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-02-10 13:41:16 +0000 |
commit | 3bcc1a800100c83e84eaa18ef50c68510a8d8cd1 (patch) | |
tree | 0875007b2f72c9c1dff1299a2d63339ae8a1c885 /gcc/testsuite/gcc.dg/pr14092-1.c | |
parent | 39d21acd0ed3610567de0e46023ee2b9ad58b148 (diff) | |
download | gcc-3bcc1a800100c83e84eaa18ef50c68510a8d8cd1.tar.gz |
PR c/14092
* gcc.dg/pr14092-1.c: New testcase.
* fold-const.c (fold) <NEGATE_EXPR>: Convert result of
negate_expr back to the original type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77602 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr14092-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr14092-1.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr14092-1.c b/gcc/testsuite/gcc.dg/pr14092-1.c new file mode 100644 index 00000000000..86076c241e0 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr14092-1.c @@ -0,0 +1,17 @@ +/* PR c/14092 + * Origin: bonzini@gnu.org + * rejects-valid + */ +/* { dg-do compile } */ + +typedef struct _PLCI { + unsigned char x; + unsigned char buf[1]; +} PLCI; + + +void nl_ind(PLCI * plci) +{ + plci->x = -((int)(plci->buf)) & 3; +} + |