aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20020206-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20020206-1.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20020206-1.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20020206-1.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20020206-1.c
new file mode 100644
index 000000000..c21c56454
--- /dev/null
+++ b/gcc-4.9/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;
+}