re PR rtl-optimization/5429 (gcc 3.1 20020114 fails with Internal compiler error...
authorJakub Jelinek <jakub@redhat.com>
Wed, 6 Feb 2002 19:27:05 +0000 (20:27 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 6 Feb 2002 19:27:05 +0000 (20:27 +0100)
PR optimization/5429:
* gcc.c-torture/compile/20020206-1.c: New test.

From-SVN: r49548

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/20020206-1.c [new file with mode: 0644]

index 54f15563334abc854e5017fdd3abef50a9e2bd23..30b219e906aa295adb198260ca1fe29eeac256b2 100644 (file)
@@ -1,3 +1,8 @@
+2002-02-06  Jakub Jelinek  <jakub@redhat.com>
+
+       PR optimization/5429:
+       * gcc.c-torture/compile/20020206-1.c: New test.
+
 2002-02-06  Nick Clifton  <nickc@cambridge.redhat.com>
 
        * g++.dg/ext/align1.C: Do not use an explicit alignment value
diff --git a/gcc/testsuite/gcc.c-torture/compile/20020206-1.c b/gcc/testsuite/gcc.c-torture/compile/20020206-1.c
new file mode 100644 (file)
index 0000000..c21c564
--- /dev/null
@@ -0,0 +1,18 @@
+/* Origin: PR optimization/5429 from Philipp Thomas <pthomas@suse.de>.  */
+/* This testcase caused ICE on IA-32 -O2 -march=i686 due to rtl sharing
+   problem in noce_process_if_block.  Fixed by
+   http://gcc.gnu.org/ml/gcc-patches/2002-01/msg02146.html.  */
+
+typedef struct {
+  unsigned char a;
+} A;
+
+unsigned int foo (A *x)
+{
+  unsigned char b[2] = { 0, 0 };
+  unsigned char c = 0;
+
+  c = (x->a) ? b[1] : b[0];
+
+  return (unsigned int) c;
+}