From 9db83b3996b1e84775b112774c65184408b68a3c Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 17 Jul 2000 15:44:39 -0700 Subject: [PATCH] New test. From-SVN: r35107 --- gcc/testsuite/ChangeLog | 4 +++ .../gcc.c-torture/execute/20000717-4.c | 26 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/execute/20000717-4.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6e76c4d6335..95d657feaba 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2000-07-17 Richard Henderson + + * gcc.c-torture/execute/20000717-4.c: New test. + 2000-07-17 Zack Weinberg * gcc.dg/cpp/syshdr.c: New test. diff --git a/gcc/testsuite/gcc.c-torture/execute/20000717-4.c b/gcc/testsuite/gcc.c-torture/execute/20000717-4.c new file mode 100644 index 00000000000..c3d27bbac23 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20000717-4.c @@ -0,0 +1,26 @@ +/* Extracted from gas. Incorrectly generated non-pic code at -O0 for + IA-64, which produces linker errors on some operating systems. */ + +struct +{ + int offset; + struct slot + { + int field[6]; + } + slot[4]; +} s; + +int +x () +{ + int toggle = 0; + int r = s.slot[0].field[!toggle]; + return r; +} + +int +main () +{ + return 0; +}