diff options
author | No Author <no-author@gcc.gnu.org> | 2003-03-14 14:59:34 +0000 |
---|---|---|
committer | No Author <no-author@gcc.gnu.org> | 2003-03-14 14:59:34 +0000 |
commit | 4d4b3a03168f3d461708d2908bf7b71c5295dda9 (patch) | |
tree | 9744f57dabd097bb9a565bbd33f36f3659c7fa8d | |
parent | 820f9b130b46a30517c5d0089a695a039f154d0b (diff) | |
download | gcc-4d4b3a03168f3d461708d2908bf7b71c5295dda9.zip gcc-4d4b3a03168f3d461708d2908bf7b71c5295dda9.tar.gz gcc-4d4b3a03168f3d461708d2908bf7b71c5295dda9.tar.bz2 |
This commit was manufactured by cvs2svn to create branch
'gcc-3_2-branch'.
From-SVN: r64361
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20030314-1.c | 18 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/20030224-2.c | 28 |
2 files changed, 46 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/20030314-1.c b/gcc/testsuite/gcc.c-torture/compile/20030314-1.c new file mode 100644 index 0000000..02d4fed --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20030314-1.c @@ -0,0 +1,18 @@ +/* PR optimization/8396 */ +/* Originator: <papadopo@shfj.cea.fr> */ + +/* Verify that the tree inliner doesn't mess up the types + when passing the value of read-only constant arguments. */ + +static inline bar(const short int xs, const short int xe) +{ + if (xe && (xs < xe)) + ; +} + +void f() +{ + short int xe; + + bar(0, xe); +} diff --git a/gcc/testsuite/gcc.c-torture/execute/20030224-2.c b/gcc/testsuite/gcc.c-torture/execute/20030224-2.c new file mode 100644 index 0000000..5b692fb --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20030224-2.c @@ -0,0 +1,28 @@ +/* Make sure that we don't free any temp stack slots associated with + initializing marker before we're finished with them. */ + +extern void abort(); + +typedef struct { short v16; } __attribute__((packed)) jint16_t; + +struct node { + jint16_t magic; + jint16_t nodetype; + int totlen; +} __attribute__((packed)); + +struct node node, *node_p = &node; + +int main() +{ + struct node marker = { + .magic = (jint16_t) {0x1985}, + .nodetype = (jint16_t) {0x2003}, + .totlen = node_p->totlen + }; + if (marker.magic.v16 != 0x1985) + abort(); + if (marker.nodetype.v16 != 0x2003) + abort(); + return 0; +} |