diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-24 13:27:25 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-24 13:27:25 +0000 |
commit | adb0ebb1e8bf2ce8f98f8d082d62c35b3127a6c0 (patch) | |
tree | 126cfb4378caa5075533fd25a1538e261cbc2dc7 | |
parent | 7fecfde9ce9b254771959d4d8979e334cbc0bc01 (diff) | |
download | gcc-adb0ebb1e8bf2ce8f98f8d082d62c35b3127a6c0.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101292 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/pr22171.c | 28 |
3 files changed, 39 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a8a5231d0a8..818aea579ca 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 413f381bea2..f699cd2eb0b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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 index 00000000000..6a26c56d0e7 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr22171.c @@ -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; +} |