From: Hans-Peter Nilsson Date: Mon, 14 Jul 2008 00:24:35 +0000 (+0000) Subject: re PR target/35492 (ICE building kernel sk_stream_wait_connect output_operand: invali... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0de5137b9679fe34bb8e772a2d4772c5646a8bff;p=gcc.git re PR target/35492 (ICE building kernel sk_stream_wait_connect output_operand: invalid operand for 'p' modifier) PR target/35492 * gcc.c-torture/compile/pr35492.c: New test. From-SVN: r137766 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0b1bc977718..2f20e5b9295 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-07-14 Hans-Peter Nilsson + + PR target/35492 + * gcc.c-torture/compile/pr35492.c: New test. + 2008-06-22 Daniel Kraft * gfortran.dg/used_types_21.f90: New test. diff --git a/gcc/testsuite/gcc.c-torture/compile/pr35492.c b/gcc/testsuite/gcc.c-torture/compile/pr35492.c new file mode 100644 index 00000000000..a1681f0a09d --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr35492.c @@ -0,0 +1,26 @@ +void prepare_to_wait (void *, void *, int); +void finish_wait (void *, void *); +extern signed long schedule_timeout (signed long); +struct sock +{ + unsigned char skc_state; + void *sk_sleep; + int sk_err; +}; + +void +sk_stream_wait_connect (struct sock *sk, long *timeo_p) +{ + int done; + int wait; + do + { + if ((1 << sk->skc_state) & ~12) + return; + prepare_to_wait (sk->sk_sleep, &wait, 1); + *(timeo_p) = schedule_timeout (0); + done = !sk->sk_err; + finish_wait (sk->sk_sleep, &wait); + } + while (!done); +}