re PR tree-optimization/22171 (gcc-4.0-20050623 internal compiler error in linux...
authorMark Mitchell <mark@codesourcery.com>
Fri, 24 Jun 2005 13:27:25 +0000 (13:27 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Fri, 24 Jun 2005 13:27:25 +0000 (13:27 +0000)
PR 22171
* tree-ssa-operands.c (get_expr_operands): Check s_ann for NULL
before use.

PR 22171
* gcc.dg/tree-ssa/pr22171.c: New test.

From-SVN: r101292

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/pr22171.c [new file with mode: 0644]

index a8a5231..818aea5 100644 (file)
@@ -1,3 +1,9 @@
+2005-06-24  Mark Mitchell  <mark@codesourcery.com>
+
+       PR 22171
+       * tree-ssa-operands.c (get_expr_operands): Check s_ann for NULL
+       before use.
+
 2005-06-23  Mark Mitchell  <mark@codesourcery.com>
 
        PR 22000
index 413f381..f699cd2 100644 (file)
@@ -1,3 +1,8 @@
+2005-06-24  Mark Mitchell  <mark@codesourcery.com>
+
+       PR 22171
+       * gcc.dg/tree-ssa/pr22171.c: New test.
+
 2005-06-24  Feng Wang  <fengwang@nudt.edu.cn>
 
        * gfortran.dg/simplify_modulo.f90: New.
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr22171.c b/gcc/testsuite/gcc.dg/tree-ssa/pr22171.c
new file mode 100644 (file)
index 0000000..6a26c56
--- /dev/null
@@ -0,0 +1,28 @@
+/* { dg-options "-O2" } */
+
+static unsigned int old_serial_port_irq[10];
+
+static struct uart_8250_port {
+  volatile unsigned int slock;
+  unsigned int irq;
+} serial8250_ports[10];
+
+static __inline__ __attribute__((always_inline)) int irq_canonicalize(int irq)
+{
+  return ((irq == 2) ? 9 : irq);
+}
+
+void serial8250_isa_init_ports(void)
+{
+  struct uart_8250_port *up;
+  int i;
+
+  for (i = 0, up = serial8250_ports; i < 10; i++, up++)
+    up->irq = irq_canonicalize(old_serial_port_irq[i]);
+}
+
+int main(void)
+{
+  serial8250_isa_init_ports();
+  return 0;
+}