aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2002-02-06 20:27:05 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2002-02-06 20:27:05 +0100
commit5364626ac42b3eb2efc7462f6832a352db03439b (patch)
tree7200940f4e1ed4cbd1483c1730d07cb54c993d6a /gcc
parent7fb750990cf0fb2e6f89ef26e267b581e0d70dad (diff)
downloadgcc-5364626ac42b3eb2efc7462f6832a352db03439b.zip
gcc-5364626ac42b3eb2efc7462f6832a352db03439b.tar.gz
gcc-5364626ac42b3eb2efc7462f6832a352db03439b.tar.bz2
re PR rtl-optimization/5429 (gcc 3.1 20020114 fails with Internal compiler error in verify_wide_reg_1, at flow.c:526)
PR optimization/5429: * gcc.c-torture/compile/20020206-1.c: New test. From-SVN: r49548
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20020206-1.c18
2 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 54f1556..30b219e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 0000000..c21c564
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/20020206-1.c
@@ -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;
+}