re PR rtl-optimization/28940 (address selection does not work correctly)
authorEric Botcazou <ebotcazou@libertysurf.fr>
Sat, 3 Nov 2007 07:53:01 +0000 (08:53 +0100)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sat, 3 Nov 2007 07:53:01 +0000 (07:53 +0000)
PR rtl-optimization/28940
* gcc.target/i386/addr-sel-1.c: New test.

From-SVN: r129868

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/addr-sel-1.c [new file with mode: 0644]

index 1cfe8ad30d089b3a28c7d006541fd28935f1b962..e4db369d4f2c3c31392e743a8c2712e1a5c390e7 100644 (file)
@@ -1,3 +1,8 @@
+2007-11-03  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       PR rtl-optimization/28940
+       * gcc.target/i386/addr-sel-1.c: New test.
+
 2007-11-03  Jakub Jelinek  <jakub@redhat.com>
 
        PR middle-end/33670
diff --git a/gcc/testsuite/gcc.target/i386/addr-sel-1.c b/gcc/testsuite/gcc.target/i386/addr-sel-1.c
new file mode 100644 (file)
index 0000000..4e0d219
--- /dev/null
@@ -0,0 +1,16 @@
+/* PR rtl-optimization/28940 */
+/* Origin: Lev Makhlis <lmakhlis@bmc.com> */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-options "-O2 -mtune=i686" } */
+
+char a[10], b[10];
+
+int f(int i)
+{
+  return a[i+1] + b[i+1];
+}
+
+/* { dg-final { scan-assembler "a\\+1" } } */
+/* { dg-final { scan-assembler "b\\+1" } } */