diff options
author | Andrew Pinski <pinskia@physics.uc.edu> | 2005-11-03 16:15:53 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2005-11-03 08:15:53 -0800 |
commit | ca0b7d18c1cd76de7015e01ff1414c4314eda7b4 (patch) | |
tree | 486ee6dc152e01f26744eebbd7a4694f864135df /gcc/testsuite/gcc.dg/union-cast-1.c | |
parent | 031905948adabb18c9a4f1fe9156cbf5aea964b2 (diff) | |
download | gcc-ca0b7d18c1cd76de7015e01ff1414c4314eda7b4.zip gcc-ca0b7d18c1cd76de7015e01ff1414c4314eda7b4.tar.gz gcc-ca0b7d18c1cd76de7015e01ff1414c4314eda7b4.tar.bz2 |
re PR middle-end/23155 (Gimplification failed for union cast)
2005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/23155
* g++.dg/ext/c99struct1.C: New test.
* gcc.dg/union-cast-1.c: New test.
* gcc.dg/union-cast-2.c: New test.
* gcc.dg/union-cast-3.c: New test.
2005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/23155
* gimplifier.c (gimplify_expr): Create a temporary for lvalue
CONSTRUCTOR.
From-SVN: r106438
Diffstat (limited to 'gcc/testsuite/gcc.dg/union-cast-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/union-cast-1.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/union-cast-1.c b/gcc/testsuite/gcc.dg/union-cast-1.c new file mode 100644 index 0000000..1d7f4d5 --- /dev/null +++ b/gcc/testsuite/gcc.dg/union-cast-1.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-std=gnu89" } */ +/* A combine of two extensions to C89 are used here. + First casts to unions is used. + Second subscripting non lvalue arrays, this is in C99. */ + +union vx {short f[8]; int v;}; +int vec; + +void +foo5 (int vec) +{ + ((union vx) vec).f[5] = 1; +} |